When an operator fixes a misclassified segment, we currently only save that single segment's points. But to turn that real-world fix into a test case in tests/traces/, we need the entire chain's raw inputs (points, keyboard taps, shift key states, possession, and attack direction).
MatchState.last_raw already holds this data while tracing, but we don't save it alongside the feedback record. Bridging this gap would let us build our test suite directly out of real usage.
Suggested fix:
Save last_raw (or a link to it) when a correction is logged. Add a CLI command like python -m tracer.feedback promote to export a new trace file into tests/traces/ with an "expect" block based on what the user corrected.
Definition of Done:
Running promote generates a new trace file that test_corpus.py picks up and verifies against the operator's correction.
When an operator fixes a misclassified segment, we currently only save that single segment's points. But to turn that real-world fix into a test case in tests/traces/, we need the entire chain's raw inputs (points, keyboard taps, shift key states, possession, and attack direction).
MatchState.last_raw already holds this data while tracing, but we don't save it alongside the feedback record. Bridging this gap would let us build our test suite directly out of real usage.
Suggested fix:
Save last_raw (or a link to it) when a correction is logged. Add a CLI command like python -m tracer.feedback promote to export a new trace file into tests/traces/ with an "expect" block based on what the user corrected.
Definition of Done:
Running promote generates a new trace file that test_corpus.py picks up and verifies against the operator's correction.