What
Add text redaction within files (in addition to the existing folder and file redaction in fixture3 reduce). Currently the reducer can remove whole files and directory subtrees; it cannot remove sections of code within a file.
Why
Real fixture trees often have files where only some functions, types, or code blocks are actually exercised by the suite. Keeping the whole file when only 20% is reachable inflates fixtures and obscures what's actually under test. In-file redaction would let fixture3 reduce produce a truly minimal fixture: not just "fewest files" but "smallest possible content per file."
Blocker
This work depends on extracting the code-walking components from guardrail3 (syn for Rust, tree-sitter for TypeScript and others) into a reusable package. Today those walkers live inside guardrail3's source-scan crates and aren't published as a standalone dependency. The extraction work belongs in guardrail3, not here.
Tracking blocker as a sibling issue when one is opened in guardrail3.
Approach (after blocker resolves)
- Add a
--reducers code flag to fixture3 reduce.
- For each file in the trial tree, walk the AST and try removing one definition at a time (function, struct, impl, module, top-level statement).
- Run the suite. If approved output stays stable, keep the removal.
- Continue until no further definition can be removed.
- Same DDMin oracle-budget model as the existing reducers.
Done
fixture3 reduce --reducers code works on at least Rust and TypeScript.
- Documented in wiki Workflow and Commands.
- Self-suite + fake-project verifications still pass after the change.
What
Add text redaction within files (in addition to the existing folder and file redaction in
fixture3 reduce). Currently the reducer can remove whole files and directory subtrees; it cannot remove sections of code within a file.Why
Real fixture trees often have files where only some functions, types, or code blocks are actually exercised by the suite. Keeping the whole file when only 20% is reachable inflates fixtures and obscures what's actually under test. In-file redaction would let
fixture3 reduceproduce a truly minimal fixture: not just "fewest files" but "smallest possible content per file."Blocker
This work depends on extracting the code-walking components from guardrail3 (
synfor Rust,tree-sitterfor TypeScript and others) into a reusable package. Today those walkers live inside guardrail3's source-scan crates and aren't published as a standalone dependency. The extraction work belongs in guardrail3, not here.Tracking blocker as a sibling issue when one is opened in guardrail3.
Approach (after blocker resolves)
--reducers codeflag tofixture3 reduce.Done
fixture3 reduce --reducers codeworks on at least Rust and TypeScript.