Problem
classifyFile() in packages/core/src/analysis/diff-analyzer.mjs returns docs for any path under docs/ because the docs/ prefix check precedes the code/.mjs and config/.json extension checks. A code or config file hosted under docs/ (e.g. docs/example.mjs imported by a test, docs/fixture.json consumed at runtime) classifies as docs.
Two fail-closed consumers depend on this classifier and would then treat such a file as prose:
Status: latent, not active
docs/ currently holds only .md/.html/.css prose + presentation assets — no .mjs/.json/.yml. So no code escapes today. The analogous "load-bearing .md" case (SKILL.md etc.) is intentionally docs (Copilot does not code-review prose) and is correct by design. This is a defense-in-depth hardening against a future docs/-hosted script/config being silently carried forward.
Acceptance criteria
Non-goals
Changing the docs/-hosted prose (.md/SKILL.md) → docs behavior. Reworking the surface map or the carry-forward decision logic (only the file-kind classifier's ordering).
Found during the #1329 pre-approval deep review.
Problem
classifyFile()inpackages/core/src/analysis/diff-analyzer.mjsreturnsdocsfor any path underdocs/because thedocs/prefix check precedes the code/.mjsand config/.jsonextension checks. A code or config file hosted underdocs/(e.g.docs/example.mjsimported by a test,docs/fixture.jsonconsumed at runtime) classifies asdocs.Two fail-closed consumers depend on this classifier and would then treat such a file as prose:
resolveAngleCarryForward, perf(gate): iterative small-fix convergence re-fans all angles + Copilot re-flags resolved nits #1308): a doc-only delta carries a clean code-angle verdict forward — adocs/-hosted code file could carry a code angle over an unreviewed code change.resolveConvergenceCarryForward, feat(gate): wire the Copilot loop to consume convergence carry-forward (AC2 follow-up to #1308) #1326): a post-convergencedocs/-hosted code/config change could be suppressed from a fresh Copilot round.Status: latent, not active
docs/currently holds only.md/.html/.cssprose + presentation assets — no.mjs/.json/.yml. So no code escapes today. The analogous "load-bearing.md" case (SKILL.mdetc.) is intentionallydocs(Copilot does not code-review prose) and is correct by design. This is a defense-in-depth hardening against a futuredocs/-hosted script/config being silently carried forward.Acceptance criteria
classifyFile()classifies a path by known code/config/test extension before thedocs/(and any other directory-prefix) fallback, so adocs/example.mjs→codeanddocs/fixture.json→config, whiledocs/foo.mdstaysdocs.docs/classifying by extension, and a.md/.html/.cssunderdocs/still classifying asdocs.resolveAngleCarryForward,resolveConvergenceCarryForward) inherit the corrected classification (adocs/-hosted code/config delta now re-runs the angle / re-opens the round).npm run verifygreen.Non-goals
Changing the
docs/-hosted prose (.md/SKILL.md) →docsbehavior. Reworking the surface map or the carry-forward decision logic (only the file-kind classifier's ordering).Found during the #1329 pre-approval
deepreview.