Skip to content

Re-land Direct/MCP work: quick-map status, scope fallback, checklist, leak ratchet - #67

Merged
tzhouam merged 1 commit into
mainfrom
mcp/direct-quick-map-status-and-checklist
Aug 12, 2026
Merged

tzhouam merged 1 commit into
mainfrom
mcp/direct-quick-map-status-and-checklist

Conversation

@tzhouam

@tzhouam tzhouam commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

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 the mcp branch 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, with config.py re-merged so it carries both #63's zero-yield hunk and this PR's glob markers.

Content (unchanged from #64's description)

  • Quick-map status: _direct_quick_map reports ok / truncated / unavailable instead of silently serving a partial or empty excerpt; routes whose map is not ok grant exactly that many knowledge_file_reads in the execution budget.
  • Scope fallback, declared: when no title/body route matches an owner, changed files select the routes — announced as status: scope_fallback.
  • Two cross-cutting checklist items for wave-1-measured failure classes no component owner can carry (fixture-bound test assertions; dependency kwargs vs lowest permitted version).
  • Leak ratchet: test_repo_neutral_core records known leaks at exact counts that can only shrink, collecting all offenders before asserting; config.py resource probes drop their repo literal via glob markers. This is the fix for main's currently red suite job (config.py: 3 literals, ceiling 2).
  • Upstream 3-way merge with Bind direct review evidence to the frozen head SHA #56's frozen-head-SHA work, plus a behavior fix: the afd-plugin adapter routing lost the unsupported-repo guard for repos with no adapter (they were reported as description_unrouted, a served-repo status). An adapter-presence gate restores unsupported_exact_router for them while afd-plugin routes normally. Pinned by test_unsupported_repo_never_routes_regardless_of_description.
  • Knowledge: hunyuan-image3 dev-entry heading renamed so the quick map can extract it; new test pins that intra-knowledge anchor links resolve.

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 the suite job should go green.

🤖 Generated with Claude Code

…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
tzhouam force-pushed the mcp/direct-quick-map-status-and-checklist branch from 2aa5228 to 7ed20f3 Compare August 12, 2026 08:42
@tzhouam
tzhouam merged commit b9cfa7f into main Aug 12, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant