Repository navigation
Re-land Direct/MCP work: quick-map status, scope fallback, checklist, leak ratchet - #67
Merged
Merged
Conversation
…ak ratchet - _direct_quick_map now reports ok / truncated / unavailable instead of silently serving a partial or empty excerpt (the serving page's section is 3754 chars against the 3500 cap; its request-contract rows were being dropped with no marker). Routes whose map is not ok grant exactly that many knowledge_file_reads in the execution budget, so the response never says 'read this' next to '0 knowledge reads'. - changed_files normally only validate scope; when no title/body route matches an owner they select the routes instead, declared as status: scope_fallback rather than silently. - two checklist items for failure classes measured on the wave-1 arm that no component owner can carry: test assertions bound to fixture-injected values, and new dependency kwargs checked against the lowest permitted version rather than the installed one. - test_v2_p0 repo-neutrality check becomes an explicit debt RATCHET: known leaks are recorded at today's exact counts and can only shrink; all offenders are collected before asserting so one leak no longer masks the rest. config.py resource probes drop their repo literal (glob markers). - hunyuan-image3 knowledge pages: rename the dev-entry heading so _direct_quick_map can extract it; new test pins that intra-knowledge anchor links resolve (38 today, 0 broken). Merged with upstream's frozen-head-SHA evidence binding and budget timing (9f3655d): the timed budget call now carries knowledge_file_reads, and both sides' checklist items and tests are kept. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Also restores the unsupported-repo guard that the upstream adapter-routing change lost for repos with no adapter: _adapter_changed_file_routes returns every changed file as unmatched when no adapter exists, which reported garbage repos as description_unrouted; an adapter-presence gate now keeps unsupported_exact_router for them while served adapter repos route normally. (Re-landed: the original PR #64 accidentally merged the CI/docs commit instead of this content — a branch ref was moved by a reset --hard in an attached worktree before push. This commit is the same reviewed tree rebuilt onto current main; config.py re-merged with the zero-yield hunk from #63.)
tzhouam
force-pushed
the
mcp/direct-quick-map-status-and-checklist
branch
from
August 12, 2026 08:42
2aa5228 to
7ed20f3
Compare
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.
Re-land of #64's intended content
PR #64 was titled for this work but merged the CI/docs commit instead (the same content #66 originally carried, so nothing wrong landed — but the Direct/MCP work itself never reached main). Cause: while hopping test targets, a
git reset --hard <branch>in a worktree with themcpbranch checked out silently moved the branch ref to the docs commit before push. This PR is the same reviewed, tested tree rebuilt onto current main, withconfig.pyre-merged so it carries both #63's zero-yield hunk and this PR's glob markers.Content (unchanged from #64's description)
_direct_quick_mapreportsok/truncated/unavailableinstead of silently serving a partial or empty excerpt; routes whose map is notokgrant exactly that manyknowledge_file_readsin the execution budget.status: scope_fallback.test_repo_neutral_corerecords known leaks at exact counts that can only shrink, collecting all offenders before asserting;config.pyresource probes drop their repo literal via glob markers. This is the fix for main's currently redsuitejob (config.py: 3 literals, ceiling 2).description_unrouted, a served-repo status). An adapter-presence gate restoresunsupported_exact_routerfor them while afd-plugin routes normally. Pinned bytest_unsupported_repo_never_routes_regardless_of_description.Validation
Full suite green on this branch against current main (only deselection:
test_subprocess_tamper_defense, which fails identically on clean main on this machine — environmental ulimit). Both knowledge validators pass. Merge this + #66 (python -m pytest) and thesuitejob should go green.🤖 Generated with Claude Code