|
| 1 | +--- |
| 2 | +"@objectstack/core": patch |
| 3 | +--- |
| 4 | + |
| 5 | +fix(core): narrow the operation-private-keys pin's scanner to `.ts`, so it judges exactly the population turbo re-runs it for (#15090) |
| 6 | + |
| 7 | +`packages/core/src/security/operation-private-keys.pin.test.ts` filtered its |
| 8 | +candidate set with `/\.tsx?$/` — `.ts` **and** `.tsx` — while this package's |
| 9 | +declared radius in the cross-package declaration table is a `packages/**` |
| 10 | +subtree glob ending in `.ts`. So the pin judged a population **strictly wider** |
| 11 | +than the one either scoping layer of `check:cross-package-test-inputs` knows |
| 12 | +about: Layer A never unions this package into the test shard when a `.tsx` file |
| 13 | +changes, and Layer B never moves the `test` task's cache hash for one. A `.tsx` |
| 14 | +file under `packages/` declaring its own `OPERATION_PRIVATE_KEY_PREFIX` or |
| 15 | +`withoutOperationPrivateKeys` was therefore scanned by the pin and invisible to |
| 16 | +CI's scoping — landing on `main` with every PR green and then reddening whichever |
| 17 | +unrelated PR next touched a `.ts` file. That is the #7802 shape the declaration |
| 18 | +table exists to close, one extension wide. |
| 19 | + |
| 20 | +Repaired by narrowing the **scanner**, not by widening the **glob** — and that |
| 21 | +asymmetry is measured rather than assumed. On `b548e438d`, adding a `.tsx` glob |
| 22 | +to this package's roster entry and re-deriving `check:cross-package-test-inputs`' |
| 23 | +watch hints flips the dispatch-gates self-test case *"nor a .tsx test file inside |
| 24 | +it"* from true to false, with the added glob itself as the covering hint. That |
| 25 | +case is a live specimen for "a test class the hint route cannot reach", so the |
| 26 | +red is real and re-pointing it is a decision in another lane, not a fixup. |
| 27 | + |
| 28 | +What the boundary costs, measured on the pin's own surface (tracked **plus** |
| 29 | +untracked, ignored paths excluded) at `b548e438d`: **5408** `.ts` files scanned, |
| 30 | +8 of them mentioning a guarded symbol; **8** `.tsx` files excluded, **0** of them |
| 31 | +mentioning either symbol. The loss is empty today — and that reading is no longer |
| 32 | +transcribed and trusted. A new case re-measures it on every run: it asserts the |
| 33 | +excluded `.tsx` population is non-empty (so the boundary is an exclusion and not |
| 34 | +an empty tree describing itself), that the filter really drops those files, and |
| 35 | +that none of them declares either symbol. Ablation, with the restore proven by |
| 36 | +blob hash rather than by exit code: re-widening the scanner reddens it while the |
| 37 | +offender assertion stays green — which is precisely the failure mode, since a |
| 38 | +wider scanner reads as coverage CI never runs — and planting a `.tsx` |
| 39 | +redeclaration reddens it with a message that says the choice is a second-gate |
| 40 | +trade, not a one-line widening. |
| 41 | + |
| 42 | +The correspondence between scanner and glob is now stated at **both** ends: the |
| 43 | +pin's header and the declaration table's entry for this package. No published |
| 44 | +surface moves — the only source file edited is a test. |
0 commit comments