Skip to content

fix(core): level 0 loads no workspace module again (#5219) - #5228

Merged
lex00 merged 1 commit into
mainfrom
fix/5219
Nov 16, 2026
Merged

lex00 merged 1 commit into
mainfrom
fix/5219

Conversation

@lex00

@lex00 lex00 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Closes #5219

A plain project loads no workspace module again. Each module named below now loads where it is used.

  • op-waves-evidence.ts imports the evidence signer with import() when a wave reads or signs evidence. CHECK_EVIDENCE_KEY_ENV and RUNNER_IDENTITY_ENV move to ci-evidence-claims.ts, which imports only node modules.
  • local-executor.ts loads workspace-run-env when an Op runs.
  • The aws, helm and k8s plugins keep the last-read member report in a new member-report.ts, which workspace-member.ts re-exports. Each plugin imports the reader only when a member is configured.
  • The otel plugin's workspaceLinks loads its reader when called. LexiconPlugin.workspaceLinks may now return a promise, and its one caller in workspace/lexicon-outputs.ts awaits it inside the same try.
  • The terraform lexicon's composed group loads the cloud identity reader when it runs.

The issue named the evidence signer. Fixing only that left the level-0 e2e failing on the other chains above.

packages/core/src/cli/level0-imports.test.ts is a new unit guard. It builds an esbuild metafile from the level-0 handlers and the five plugins, then walks the static imports with the harness's rule. It names the chain when it fails on the old code. It runs in about 200 ms, so a new leak shows on a pull request without the e2e project.

The pulumi and sql plugins still import workspace modules statically, and no golden example loads either lexicon. They are left for a follow-up issue.

level0-goldens and lineage-lock went from 21 failed and 19 passed to 3 failed and 37 passed. The three left are the golden drifts that #5224 fixes. The other gate steps pass, and the repo-wide typecheck has no regressions. The test step failed under load at a load average above 50, with failures over the unit-test budget (#5221) and four timing tests in other files, and those files pass on their own.

The op runner, the executor and five lexicon plugins imported workspace
code statically, so a plain project's build, lint, graph, audit and run
list loaded it. Each now loads it where it is used:

- op-waves-evidence imports the evidence signer when a wave reads or signs
  evidence; the runner key and identity variable names move to
  ci-evidence-claims.
- local-executor reads the workspace run citation when an Op runs.
- the aws, helm and k8s plugins import their member reader only for a
  member; the last-read report lives in member-report.ts.
- otel's workspaceLinks hook loads its reader on call; the hook may now
  return a promise.
- terraform's composed group loads the cloud identity reader when it runs.

A unit test walks the static imports of the level-0 handlers and those
plugins and fails on any workspace module.
@lex00
lex00 added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 6f816a0 Nov 16, 2026
10 checks passed
@lex00
lex00 deleted the fix/5219 branch November 16, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

level 0 loads workspace modules again: op-waves-run imports the evidence signer

1 participant