Repository navigation
tools: context_pack.py, issue -> path:start-end pointers from the self-scan DB (Part of #5521) - #5532
Merged
Merged
Conversation
…om the self-scan DB (Part of #5521) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 18, 2026 20:47
squid-protocol
enabled auto-merge (squash)
October 18, 2026 20:51
Contributor
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.
Part of #5521 (promoter-bot wiring is a follow-up, not this PR).
What
tests/tools/context_pack.py <issue> [--db] [--max-tokens 3000] [--body-file F]: extracts paths, backticked identifiers and snake/camelCase names from the issue, resolves them againstfile_data/function_data/class_data, and prints a Markdown block:path:start-end, complexity, one hop of callers/callees fromfcall_data, import fan-in fromedge_data, "BIG, read only the named ranges" above 8k tokens. Nothing resolved -> prints nothing. Names shorter than 4 chars and bare extensions are ignored; a name defined in >4 places only counts when the issue names the file; an issue word equal to alanguages/<x>.pystem points at that file.Docs fixed:
self-scan-orientation.md(brief lives ongenerated; start_line exists),self_scan.pydocstring,self-scan-querySKILL.md ("no line numbers").Hit rate (11 recent merged churn PRs, DB at current main, 0.03-0.24 s each, packs 80-250 tokens)
Source/test file the merged PR changed appears in the pack: 6/11 PRs (any file); 3/5 PRs that changed source files had >=1 source file named (#5465->glsl.py, #5467->detector.py + statistical_auditor.py). Misses are mostly epics ("Part of #N") whose bodies name no code, so the tool has nothing to resolve: this is a ceiling set by issue text, not a ranking issue. The acceptance asks for 5 closed churn issues each naming the changed files; on this sample that is met only by #5467 and #4048, so the criterion is NOT shown as met for the general case.
Class sweep
Class: "ways a worker finds the code from an issue". Handled: explicit path, function name, class name, language-stem word. Sibling gaps: none filed by me; see Remaining slices.
Remaining slices
churn workerprompt.md (separate repo; follow-up issue/PR not yet filed).git log --grep).Gates
pr_gates --fast6/6 pass;test_context_pack.py8 pass; tree-guard tests pass;audit_checkmypy lists 16 findings all in untouched files (shared venv mypy), none in changed files.🤖 Generated with Claude Code