feat(tools): add conservative code location repair workflow#63
Draft
Du-professor wants to merge 2 commits into
Draft
feat(tools): add conservative code location repair workflow#63Du-professor wants to merge 2 commits into
Du-professor wants to merge 2 commits into
Conversation
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 #4
Summary
This PR adds a conservative, reproducible workflow for repairing stale code
locations in
data/entries.jsonl, together with the generated repair andmanual-review artifacts.
Matching and safety policy
For every
entry_point,critical_operation, andtrace[*]node, the toolloads the exact
repo_url + commitsnapshot and checks locations in this fixedorder:
Whitespace and newline differences are normalized. Exact snippets are tried
first; schema-permitted CJK annotator comment suffixes can be projected only
after the exact attempt fails. Multiple matches are never guessed. Missing,
invalid, unavailable, empty, and ambiguous nodes remain unchanged and are
written to
needs_human.csv.When a file or line changes,
descis updated only for explicit, unambiguousfile/line references. If the description cannot be updated safely, the whole
node repair is withheld for manual review. The tool does not modify
code,verify, vulnerability categories, or other non-location fields.Results
entries.fixed.jsonlbytefor byte and retained the same 28 review rows
Focused samples:
entry-00103: repairedtrace[1]from605-614to606-614andtrace[2]from146-155to146-154; explicit descriptions were updated.entry-00185: repairedtrace[1]from75-82to76-82; its descriptioncontained no explicit location and remained unchanged.
entry-00320: exact locations; no repair or review row.entry-00511: exact locations; no repair or review row.Verification
Additional checks passed:
SCHEMA.md;fix_diff.csvrow maps exactly to one changed node;needs_human.csv;already populated);
The
.cache/vulngym-location-fixer/directory, downloaded upstream projects,Python caches, temporary files, and credentials are not committed.