Repository navigation
test: scope the tree-wide pin scans to the extensions they judge, one shared scan per file - #25410
Merged
Merged
Conversation
Adopts the diff of the fork pull request from Nitjsefnie as proposed: each pin's scan hands git the pathspec of the extension it judges and shares one scan across its assertions, with SCAN_TIMEOUT_MS unchanged. Co-authored-by: Nitjsefnie <zmatek.peter@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J61suxUmEiTYnKbc7EKFYs
… one-scan shape The adopted diff scoped the objectql twin's scan to `.ts` but kept a second file read per symbol and no attribution check. This ports the runtime twin's half D as it stands on main: one multi-needle `git grep` over SCANNED_PATHSPECS in the describe's beforeAll, per-symbol line attribution read once, a throw when git lists a file the read cannot attribute, and the per-test budgets dropped because the tests no longer scan. SCAN_TIMEOUT_MS stays 60_000 and keeps the runtime twin's "not a dial" note. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J61suxUmEiTYnKbc7EKFYs
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Elon · project thread
Fixes #25321
Clause-②: no
Metadata-protocol: none
The four tree-scan pins that still handed
git grepall ofpackages/and filtered to.tsafterwards now give git the pathspec of the extension they judge, and run that scan once per file, shared by every assertion that reads it. This is the shape PR #25319 gave the@objectstack/runtimetwin.SCAN_TIMEOUT_MS = 60_000is unchanged in every file: this is not a timeout raise.Test-only;
skip-changeset(all four files aresrc/**/*.test.ts, which neither package ships: bothfiles[]shipdist).Adopted from a fork PR
The core of this diff is the fork PR #25389 by Nitjsefnie, adopted onto an internal branch per the repository's card-first rule for outside contributions. Its first commit carries their diff unchanged, with
Co-authored-by: Nitjsefnie. The fork PR itself is not landed; it is closed with thanks when this card closes.The second commit is the review change. The fork made the
@objectstack/objectqltwin one scan too, but kept a second file read per symbol and dropped the attribution check. That file now carries the runtime twin's half D as it stands onmain:git grepoverSCANNED_PATHSPECSin the describe'sbeforeAll;SCAN_TIMEOUT_MS, because they no longer scan;SCAN_TIMEOUT_MSkeeps the runtime twin's "not a dial" note.The two copies are kept parallel on purpose (PR #25319's acceptance note). The remaining differences from the runtime twin are the package-specific ones (
findUpfor the CJS root,PIN_FILES[0], the runtime site as the reach target, no half lettering) and comment wording that already differed onmain.Per file
packages/objectql/src/action-owner-key-single-source.test.tspackages:(glob)packages/**/*.ts, both needlespackages/core/src/security/row-serving-door-exposure.pin.test.tspackages*.ts, inbeforeAllpackages/core/src/security/second-object-read-exposure.pin.test.tspackages*.ts, inbeforeAllpackages/core/src/security/operation-private-keys.pin.test.tspackages(+3ls-files)*.ts+*.tsx, inbeforeAll(thels-filescensus is untouched)packages/core/src/security/granted-permissions-not-enforced.pin.test.ts*.ts+*.mtsoperation-private-keyskeeps.tsxin its prefilter on purpose: the boundary-expiry assertion judges.tsxdeclarations, so that population must still be read.Readings (local container, base
830a63a, head98ac499)Bytes are
rcharfrom/proc/PID/iofor the git processes each file starts, with the test's own arguments. Wall is the vitest JSON reporter's file duration, 3 runs each, underscripts/pm/os-verify-lock.sh.ls-files→ 1 + 3The local wall cannot reproduce a loaded shard. Estimate, not measured on a shard: if a shard's cost scales with the bytes read, as the runtime twin's 86.24 s across three walks suggests, each edited file now reads what one walk read there.
The judged file set did not shrink: measured
Old shape (grep over
packages, then the file's own filter) against new shape (pathspec grep, then the same filter), on the head tree plus untracked plants underpackages/zz-eq-25321/holding every needle:top.ts(depth 1),a/b/deep.ts,a/b/deep.d.ts,a/b/z.test.ts,a/b/x.tsx,a/b/y.mts,a/b/note.md(depth 3).actionObjectKeytop.ts,deep.ts,deep.d.ts,z.test.tsstandaloneActionOwnerKeycanReadObjecttop.ts,deep.tsreferenceTargetOftop.ts,deep.ts.tsminus.d.ts)top.ts,deep.ts,z.test.ts.tsx)x.tsxThe plants were removed by a trap, and
git statuswas clean afterwards.A planted mention in a still-scanned path goes red
Predicted direction: red, naming the planted file. Each leg plants one untracked file under
packages/plugins/plugin-auth/src/zz-ablation-25321/deep/er/and runs that pin file alone at head98ac499, after the fix was committed.planted.ts, a comment namingactionObjectKey…/deep/er/planted.ts:1planted.mdplanted.tscallingsvc.canReadObject(…).mdplanted.tscallingreferenceTargetOf(…).mdplanted.tsdeclaringOPERATION_PRIVATE_KEY_PREFIXplanted.tsx.tsalone…", listing the plant; the offender assertion stays green.mdThe plant directory was removed by a trap after every leg;
git status --porcelainandgit diff HEADwere empty afterwards.Local verification (head
98ac499)vitest run --project repo, per file).pnpm --filter @objectstack/core run typecheck: exit 0.pnpm --filter @objectstack/objectql run typecheck: exit 0.pnpm exec eslint --no-inline-configon the four files: exit 0.node scripts/pm/dispatch-gates.mjs --commandsderived 58 families;--ranreconciliation: 58 accounted for, 53 run, 5 NOT MEASURED (exit 3, nodist/in this container:check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content;check-plugin-teardown-shape --self-test, whose pinned fixture commit is outside the shallow clone).check-engine-split-ratio --days 90exited 2, refusing the shallow clone's 90-day window: also NOT MEASURED here. Their verdicts are this PR's CI checks.scripts/pm/check-governed-merges.mjs --teston the four paths: 0 of 4 hit the register, NOT governed.Acceptance notes
granted-permissions-not-enforced.pin.test.tsis left unchanged, as the card asks (its pathspecs are already.ts+.mts). It is now the largest reader of the five: seven separate scoped greps, 1,065.3 MB per file run. The test "leaves the fs and network grant classes with no enforcement surface at all" runs three of them (about 456 MB) inside one 60 s budget, which is more than the 426 MB a single test of the runtime twin read before it timed out on a loaded shard. It has not been seen red. The same one-shared-scan shape would fit it. Noted, not filed; carrier: none.f38d888, read as NOT MEASURED. This branch's CI is the first measurement of the adopted diff.claude/project-thread-37l85m, the name the session was given, notclaude/issue-25321-…. The Duplicate Fix Guard may say so. The claim (comment 6364199079) names it.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01J61suxUmEiTYnKbc7EKFYs