You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sites.push({line: i,tail: m ? routeTailOf(m[2]) : null});
996
1004
}
997
1005
constbyTail=newMap();
998
1006
for(letk=0;k<sites.length;k++){
@@ -1524,6 +1532,115 @@ function selfTest() {
1524
1532
check('bridge','a diff touching only the symbol the comment MENTIONS selects no route','tails',JSON.stringify([]),JSON.stringify(tailsSelectedBy(newSet(['promoteDraftForPublish']),commentary)));
1525
1533
check('bridge','a diff touching the symbol the handler CALLS still selects the publish route','tails',JSON.stringify(['/:type/:name/publish']),JSON.stringify(tailsSelectedBy(newSet(['publishMetaItem']),commentary)));
1526
1534
1535
+
// ---- a registration BOUNDS the previous window even when its path is a variable (#9503) ----
1536
+
// The third layer of the same family, and the only one with no measured wrong row on the
1537
+
// tree that filed it — read that as the point of the block, not as a reason to skip it.
1538
+
//
1539
+
// MECHANISM (verified on e7daea169). `rest-server.ts:5661` registers
1540
+
// `/:name/state/:field`; the next LITERAL `path:` is 255 lines later at 5916, so the
1541
+
// window runs its full 150 lines to 5810 — straight over `path: publishedPath` at 5747,
1542
+
// which registers a different route the scan cannot see. 64 lines of the `published`
1543
+
// handler sat inside the `state` route's window.
1544
+
//
1545
+
// MEASURED HARM ON THAT TREE: ZERO identifiers, and the reason is worth writing down.
1546
+
// 55 of those 64 lines are the ADR-0033/#8278 commentary, which #9432 masks to blank,
1547
+
// and the remaining 9 are `for`/`register`/`method`/`handler`/`try`/`const` boilerplate
1548
+
// whose every token already occurs earlier in the same window. Whole-tree before/after:
1549
+
// 42 tails → 42, 3320 identifier slots → 3320, zero gained, zero lost. #9432's mask is
1550
+
// what is holding this defect down, and it holds it down by ACCIDENT OF COMMENT LENGTH.
1551
+
//
1552
+
// WHAT IS UNDERNEATH: the same span measured against the foreign handler's own 150 lines
1553
+
// carries 18 identifiers the `state` route does not otherwise see — `getMetaItemLayered`,
check('parseRegistrarSource','the site\'s OWN implementation symbol still lands in its window','legalNextStates',true,!!stateIds?.has('legalNextStates'));
1608
+
check('parseRegistrarSource','a `path:` written in a COMMENT bounds nothing — the boundary rides the same mask the tail does','legalNextStates after a commented `path:`',true,!!stateIds?.has('legalNextStates'));
1609
+
check('parseRegistrarSource','the NEXT route\'s handler symbol is not this route\'s implementation','getMetaItemLayered',false,!!stateIds?.has('getMetaItemLayered'));
1610
+
check('parseRegistrarSource','a variable `path:` bounds a window without claiming a tail — the recall half is untouched, not silently faked','tails',JSON.stringify(['/:name/state/:field']),JSON.stringify([...variablePath.keys()]));
1611
+
1612
+
// The counterfactual: `parseRegistrarSource` verbatim as it stood before this hop —
1613
+
// literal `path:` lines are the only sites. Both halves have to be real for the block
1614
+
// above to prove anything: the defect must reach the foreign symbol, and it must do so
1615
+
// through the boundary and not through the 150-line cap.
check('parseRegistrarSource','counterfactual: the literal-only site scan DID swallow the next route\'s handler whole','getMetaItemLayered',true,!!preFix.get('/:name/state/:field')?.has('getMetaItemLayered'));
1637
+
check('parseRegistrarSource','counterfactual: and the fixture is short enough that the 150-line cap is not what stops it','lines under the window',true,variablePathRegistrar.split('\n').length<REGISTRAR_HANDLER_WINDOW);
1638
+
1639
+
// End to end through the same selection step the bridge runs.
1640
+
check('bridge','a diff touching only the FOREIGN handler\'s symbol selects no route','tails',JSON.stringify([]),JSON.stringify(tailsSelectedBy(newSet(['getMetaItemLayered']),variablePath)));
1641
+
check('bridge','the pre-fix behaviour, held as the counterfactual: it DID select the state route','tails',JSON.stringify(['/:name/state/:field']),JSON.stringify(tailsSelectedBy(newSet(['getMetaItemLayered']),preFix)));
1642
+
check('bridge','a diff touching the site\'s own symbol still selects its own route','tails',JSON.stringify(['/:name/state/:field']),JSON.stringify(tailsSelectedBy(newSet(['legalNextStates']),variablePath)));
1643
+
1527
1644
// ---- the CLI command anchor kind (#9230) ----------------------------------
1528
1645
// The recall class: a CLI-surface change derives `MetaResync` / a lowercase `resync`,
1529
1646
// and neither reaches the page that documents the command. The phrase does. Both halves
0 commit comments