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
schema: address third Copilot review round (plan 156)
Five new review findings:
1. claimsLaterLiteral was too permissive after the previous fix:
an optional specific scope followed by a broad `.+` matcher
yielded its heading to the broad scope, skipping its own
content / rules. Add `isBroadMatcher` and skip broad-regex
later scopes in the yield check. Test:
TestPlan156_OptionalSpecificClaimsOwnSlot.
2-4. The per-scope walkers (rules, content, acronyms) were
greedy: a broad repeated matcher claimed every matching
heading before later named scopes got a chance, so the named
scopes' content / rules / acronyms-scope checks silently
skipped those headings. Add a walker-side yield helper
(`laterScopeMatches` / `laterScopeClaimsHead`) and wire it
into walkContentScopes, walkRanges, and the per-scope rule
walker. Test:
TestPlan156_BroadRepeatYieldsToLaterScopeInPerScopeWalkers.
5. The matcher cache was a process-global sync.Map that could
grow unboundedly in a long-running LSP session — each unique
`fmvar(...)` value adds an entry. Replace with a bounded
map (cap 1024); reset the map when it fills. Mutex-guarded so
parallel validator passes stay race-free. Test:
TestMatcherCache_BoundsGrowth.
https://claude.ai/code/session_012GGH62fZUzLuzP8T4ocGkJ
0 commit comments