Skip to content

test(repo-guards): tie the fixture prefilter to its resolver and cover the producer skip branches - #4898

Merged
thymikee merged 2 commits into
callstack:mainfrom
samanyudas:test/repo-guard-prefilter-followups
Nov 21, 2026
Merged

thymikee merged 2 commits into
callstack:mainfrom
samanyudas:test/repo-guard-prefilter-followups

Conversation

@samanyudas

@samanyudas samanyudas commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the non-blocking review notes on #4885, which merged before they landed.

  • Daemon fixture guard: the prefilter re-derived resolveLocalImport's candidate paths by hand, so a later resolver change (a new extension, for example) could narrow it silently. In a file with no backslash, every quoted text that opens with . now goes through resolveLocalImport itself. Without escapes, a request's text is its value, so this stays a superset. Files with a backslash stay possible importers of every member. The scan includes overlapping quote pairs, so a stray quote earlier on the line cannot hide a request.
  • Snapshot producer guard: only the live repo exercised the skip regex's backslash and PRODUCER branches. Two example modules now need them: an escaped key and a lone *_PRODUCER constant.

Related: #4512 saw the producer scan time out. No open issue tracks these tests.

Validation

  • At pre-rebase 9f653a66e (same files):
  • Each new case fails when the branch it covers is removed: escaped candidates, overlapping quote pairs, the backslash branch, and the PRODUCER branch.
  • pnpm check:affected --run --head 92ac51fc5 passed every runnable check, including full unit (21,400 passed).

Reviewed with sol-loop: 1 round with gpt-6.2-sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.


Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

samanyudas and others added 2 commits November 21, 2026 22:26
…s own resolver

The prefilter re-derived resolveLocalImport's candidate paths by hand, so
a later resolver change (a new extension, for example) could narrow it
silently. It now passes every quoted text that opens with `.` in an
unescaped file through resolveLocalImport itself. Without escapes, a
request's text is its value, so this stays a superset of each file's
relative requests. Files with a backslash stay candidates for every
member.

The text scan includes overlapping quote pairs, so a stray quote earlier
on the line cannot consume a request's opening quote. A new case covers
that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… branches

The skip regex kept modules with a backslash or a `PRODUCER` name, but
only the live repo exercised those branches. Two example modules now
need them: an escaped `produc\u0065r` key, and a lone `*_PRODUCER`
constant. Each case fails when its branch is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thymikee

Copy link
Copy Markdown
Member

Thanks for the tight change. At 92ac51f, the fixture prefilter is now tied to its resolver, and the new cases cover the producer skip branches. The code looks correct to me, and no conflicts are known. Both non-passing checks are the cancelled "Body rules" runs, which look unrelated because this diff touches no PR-body route. Re-run them if the merge gate needs them green. Not verified here: the new tests, the repo-wide scan, the timing numbers, the violation counts and the full-unit result were not run, and the claim that each new case fails without its branch rests on reading the code.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 21, 2026
@thymikee
thymikee merged commit 721adbc into callstack:main Nov 21, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants