The installed tree names its authorities and links to none of them - #841
Merged
Conversation
…none of them (closes #839) Second instance of #838's class: nine files under skills/fomo-kernel/ carried seventeen relative links to docs/expression-contract.md, docs/output-contract.md, docs/output-voice.md, and evals/episodes/README.md -- all dead on an installed host, which receives the symlinked skill directory alone. Every one of the seventeen was provenance, not a route: the answer shape is SKILL.md's own §3 projection, each surface reference opens with its exemplar (#834), card structure is enforced by engine/card_renderer.py, and ux-receipt.md already handles the vendored-without-evals/ case. So the authorities stay in docs/ and the links become named citations ("the repository's docs/expression-contract.md") -- the tree may name an authority, never link out of itself. Gate: tests/test_installed_skill_tree.py gains test_no_reference_escapes_the_installed_tree (every markdown link target must resolve inside the tree, lexically, so ../schemas/ stays legal; no upward-relative path into docs//evals//tests/ in any syntax) plus a mutation test with an in-tree negative arm. Probed end to end: reverting one citation to its old link form reddens naming the exact file and target. In passing, per #839 part 2: engine/review.py's comment mis-citing "ledger-derived current holdings stay canonical" as AGENTS.md boundary 6 corrected to boundary 2; the remaining .py AGENTS.md mentions stay, per the scan-scope rationale in the #838 mirrored-surfaces row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nd (PR #841 review) Three focused review lenses over the delta; every finding below verified by probe and re-run (full product group 49/49 after). - The escape gate's second arm matched a directory name list, which both false-reddened in-tree `../evals/` (skills/fomo-kernel/evals/ exists; the comment asserted otherwise) and passed out-of-tree targets that were not docs/evals/tests in four common syntaxes. Rewritten: every extracted target (inline links with titles and angle brackets, reference-style definitions, HTML href/src) and every upward path token resolves lexically; resolution decides, not a name list. Site-root and absolute targets count as escapes. External URLs are stripped before token scanning. Scope widened from .md to every text runtime surface, matching the AGENTS.md citation ban beside it. - Mutation arms now pin each syntax and both resolution rules, with two in-tree negative arms (../schemas/ link, ../evals/ code span). - tests/test_engine_units.py carried the third boundary-6-for-2 mis-citation (same class as the review.py one #841 fixes); corrected to invariant 2 with the rule half-sentence inline. - The mirrored corpus sentence in four references re-ordered ("§3.5 of the repository's expression contract ... makes") so the parenthetical path no longer splits subject from verb — the same fix pattern SKILL.md's own rewrite already used; two pathless citations regained their `docs/expression-contract.md` pointer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #839. Second instance of #838's delivery class, found by #838's own adversarial review.
Nine files under
skills/fomo-kernel/carried seventeen relative links todocs/expression-contract.md,docs/output-contract.md,docs/output-voice.md, andevals/episodes/README.md— all dead on an installed host, which receives the symlinked skill directory alone.Verified per site before rewriting: all seventeen were provenance, not routes. The answer shape is SKILL.md's own §3 projection, each surface reference opens with its exemplar (#834), card structure is enforced by
engine/card_renderer.py, andux-receipt.mdalready handles the vendored-without-evals/case explicitly. So the authorities stay indocs/and every link becomes a named citation ("the repository'sdocs/expression-contract.md"): the tree may name an authority, never link out of itself. No content moved into the subtree — shipping maintainer docs into the runtime surface is the route #507 closed.Gate:
tests/test_installed_skill_tree.py::test_no_reference_escapes_the_installed_tree— every markdown link target must resolve inside the tree (lexically, so../schemas/stays legal), and no upward-relative path intodocs//evals//tests/may appear in any syntax, link or inline code. Mutation test includes an in-tree negative arm; probed end to end by reverting one citation to its old link form (reddens naming the exact file:line and target).Part 2 of #839 in passing:
engine/review.py's comment mis-citing "ledger-derived current holdings stay canonical" as AGENTS.md boundary 6 corrected to boundary 2 (comment-only change). The remaining.pyAGENTS.md mentions stay, per the scan-scope rationale in the #838 mirrored-surfaces row.python3 tests/run_all.py --group product: all 49 suites pass.🤖 Generated with Claude Code