feat: add conservative trace structure cleanup#58
Open
Sam-Hui-dot wants to merge 1 commit into
Open
Conversation
Signed-off-by: Sam-Hui-dot <19303092837@163.com>
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
This PR adds a conservative, reproducible workflow for detecting and reviewing structural anomalies in VulnGym trace annotations.
It covers:
{file, line, code};entry_point;critical_operation;Dataset audit
The complete
data/entries.jsonldataset was scanned:All 7 duplicate candidates are in verified entries and/or contain conflicting descriptions, so they are preserved rather than merged automatically.
Conservative fix decision
The default
fixrun applies zero changes to the canonical dataset.The four unverified order findings are recorded in
reports/trace_needs_human.csvbecause source declaration order does not necessarily represent runtime execution order:entry-00103entry-00185entry-00320entry-00511Deleting these nodes solely from source-line comparisons could remove valid control-flow or call-chain evidence.
The implementation still supports deterministic deletion of clearly safe findings through the explicit structural policy. Synthetic regression tests cover this behavior.
Deliverables
scripts/trace_cleanup.pycheckandfixmodes;tests/test_trace_cleanup.pydata/entries.trace_fixed.jsonlreports/trace_findings.csvreports/trace_fix_diff.csvreports/trace_needs_human.csvreports/trace_structure_report.jsonreports/trace_structure_report.mdreports/trace_cleanup_acceptance_matrix.mdscripts/README_trace_cleanup.mdValidation
The following checks passed:
Closes #5