Repository navigation
scan: persist debt marker positions (debt_marker table) - #8566
Merged
Merged
Conversation
…comment text) The engine counted TODO/FIXME/HACK/XXX markers per file and function but kept neither where they sit nor what they say, so a marker could not be followed between scans or given an age. The detector already knows each marker's line (the positional comment pass); it now returns them as debt_markers and the recorder writes one row per marker. DB-only: no change to any report; table cascades with its file and is cleared on rescan. Part of #8534. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRveGdV73aUiuqkipAic
Contributor
Contributor
|
No description provided. |
This was referenced Nov 17, 2026
squid-shepherd Bot
pushed a commit
that referenced
this pull request
Nov 17, 2026
… you are here" marker list (#8582) Functions touched: a function whose signature changed (parameter count differs between --base-db and --scan-db, or, without a base scan, a hunk covers its declaration line) comes first and has up to five callers named, because in the study behind the order fixes after a signature change landed in the callers about 1.2 times as often as in other functions of the same file (exploratory). The rest stay most-called first. New section: when the change adds or removes 50+ source lines, the open TODO/FIXME/HACK/XXX markers in the touched files from the scan's debt_marker table (merged in #8566), this author's first and then the oldest, aged by git blame at REV; markers the change itself wrote are left out. A scan without markers says "not measured". No scan output changes. Claude-Session: https://claude.ai/code/session_018srRveGdV73aUiuqkipAic Co-authored-by: Claude Sonnet 5.5 <[email protected]>
1 task done
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.
Summary
The scan now records where each TODO / FIXME / HACK / XXX marker sits: a new
debt_markertable (file, line, class, comment text up to 200 characters). The engine already counted markers per file and function (state_planned_debt,state_fragile_debt) and the detector already worked out each marker's line to attribute it to a function, but neither the line nor the text reached the database, so a marker could not be followed from one scan to the next or given an age. The detector now returns them asdebt_markersand the recorder writes one row each. Part of #8534 (the debt ledger).Safe for scan output
DB-only. No report, brief, SARIF, SBOM or GPU output changes:
crucible_check.pypasses on both legs without a re-bless. The key is added to a file's result only when it has markers. The table cascades with its file and is cleared on a rescan of the same commit (same handling asfcall_external).Tests
tests/tools_recorders/test_debt_marker.pyscans a small C file with a block-comment TODO, a line-comment FIXME and a trailing HACK and checks lines 3, 5 and 10, their classes and text, and that rows go with their file.audit_checkclean.Not here
Marker age and author (need
git blameat scan time or a comparison across scans), the repository's own repayment yardstick, and any report that reads the table.gitgalaxy change(#8561) can read it for a "while you are here" prompt next.Type of change
Class / Sibling gaps
Class: facts the scan computes but does not persist. Handled: marker positions. Sibling gaps: (1) the class is the engine's planned/fragile split, not per-word (TODO vs FIXME vs HACK vs XXX are not separated); (2) markers in languages whose comment rules do not define the debt patterns are not recorded; (3) text is the whole comment line, trimmed, so a marker inside a long comment may be cut at 200 characters.
Lessons for agents
data_payload.update(logic_data)ingalaxyscope.pycarries any key the detector adds to its result into the file record the recorder reads, so a new per-file fact needs only the detector key and a recorder insert (add the key only when non-empty).🤖 Generated with Claude Code
https://claude.ai/code/session_018srRveGdV73aUiuqkipAic