Skip to content

ISS-14015: Admit a module's own results file in main-sync closure - #425

Merged
shafty023 merged 2 commits into
mainfrom
fix/iss-14015-report-closure
Nov 11, 2026
Merged

shafty023 merged 2 commits into
mainfrom
fix/iss-14015-report-closure

Conversation

@shafty023

Copy link
Copy Markdown
Collaborator

Summary

  • Root cause. walkReportClosure (tools/vibe-workers/src/main-sync-report-closure.ts:59 on main) matched every committed reader's path references against reportOutputs. symphony-alpha's packages/control/src/vibe-shots/pixel-core/compare.mjs (#9744) reads back its own cache as readFileSync(join(outDir, RESULTS_FILE)), where outDir is the caller's parameter. The parser records that as {value: "/results.json", unknownPrefix: true}, and pathPossibility turns it into */results.json. That pattern matches apps/desktop/playwright-report-e2e/results.json, so line 61 threw. This happened whenever pnpm typecheck:affected selected @repo/control#typecheck, which made every build-purpose main-sync refuse.
  • Fix: narrow the match. No output-only admission is added. compare.mjs never names a retained report location: its directory is unbound and its only known piece is the generic file name. New inputUnlocatedFileName in main-sync-input-references.ts (the owner of the unknown-path encoding) recognizes a path reference whose value and uncertain terms have no known directory segment. The closure walk returns early for such a reference. A fully unbound path was already no match, and this treats an unbound directory plus a bare file name the same way.
  • What is still refused. A reader that names the report's full path, a literal or argv/cwd-bound path, or the report's directory under an unbound root (join(root, "playwright-report-e2e", "results.json")). symphony-alpha's real consumers (scripts/ci/desktop-e2e-attribution.ts, apps/desktop/test/e2e/helpers/desktop-e2e-coverage-finalize.ts) name the full path, so they stay refused.
  • vibe 1.1.81. The committed dist/main-sync.mjs is rebuilt. The plugin manifests, the README line and the pin tests are bumped. vibe-core is unchanged.
  • Changed source lines: main-sync-report-closure.ts line 8 (import) and new lines 53 and 54 (early return); main-sync-input-references.ts lines 735 to 745 (new function at the bottom). These auto-merge with ISS-13446's branch; only the version lines conflict.

Breaking changes

None. The change is internal to the vibe-workers closure check.

Test plan

  • main-sync-report-closure.test.ts (14 pass): a new case reproduces the compare.mjs shape with a retained apps/desktop/playwright-report-e2e/results.json present and passes. Another new case, a reader naming playwright-report-e2e under an unbound root, is still refused. The existing literal, argv and cwd retained-reader refusals still pass.
  • Mutation checks. Removing the early return fails the compare.mjs case. Making the helper admit every uncertain path fails the refusal case.
  • main-sync-input-references.test.ts (184 pass) and tsc --noEmit are clean. The Python pin tests (22 and 8) and vibe-bench reply-checker.test.ts (4) pass.
  • The dist rebuilt twice is byte-identical.
  • Run on symphony-alpha origin/main 3d41b1c604: verifyReportExecution(fixed-check, pnpm typecheck:affected, tasks [@repo/control#typecheck]) REFUSED with the ISS-14015 message on unfixed code and PASSES with this change. The closure over compare.mjs and over all of packages/control passes too.
  • Not run locally: the full vitest suite and a real main-sync-validate in a vibe session. CI runs the full suite.

The selected report closure turned compare.mjs's join(outDir, "results.json"),
with outDir an unbound caller parameter, into */results.json and matched the
retained apps/desktop/playwright-report-e2e/results.json, so every
symphony-alpha build-purpose main-sync refused once typecheck:affected
selected @repo/control. An uncertain path whose only known piece is the file
name now locates no retained report; naming the report's directory or full
path is still refused. vibe 1.1.81.
@shafty023
shafty023 merged commit 39b9262 into main Nov 11, 2026
12 checks passed
@shafty023
shafty023 deleted the fix/iss-14015-report-closure branch November 11, 2026 18:15
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.

1 participant