Repository navigation
Open
Labels
priority:p2Normal - queue itNormal - queue itpriority:p3Low - nice to haveLow - nice to havescope:repoConfined to this repositoryConfined to this repositorytech-debtKnown shortcut, drift, or hygiene owed - includes cleanupKnown shortcut, drift, or hygiene owed - includes cleanuptestingTests, benchmarks, fuzzing, property checks, coverageTests, benchmarks, fuzzing, property checks, coverage
Description
Found on 2026-11-17 while fixing redo in #231.
Problems
- Tests that never run the shell. In
impl/rust-cli/tests/integration_test.rs, the redirection undo/redo tests (test_redirect_undo_file_created,..._truncated,..._appended,test_redirect_redo_truncate) simulate the operation, the undo and the redo with plainfs::write. They never build aShellStateor callvsh::commands::undo/redo. They passed while undo of every>/>>redirection was broken for any sandbox root other than/. - A confidence percentage. The header of
impl/rust-cli/tests/correspondence_tests.rssays "Current confidence level: ~95%".CLAUDE.mdforbids that form; the status istested-only. - Quoted Rust that does not exist.
docs/LEAN4_RUST_CORRESPONDENCE.adoc, sections "Undo/Redo Correspondence" and "Composition Theorems", quotestate.undo_stack.pop(),OperationType::Touch,OperationType::Rmand anundomethod onShellState, and end with "Theorem guarantees correctness" ticks. - Stale test counts. The
CLAUDE.mdtest table says 736 tests.cargo testreported 868 passed on the Fix redo: redone operations keep their undo data, and redo restores what the operation produced #231 branch ate3fd805.
What to do
- Rewrite the four redirect tests to drive
vsh::parser::parse_command(line)?.execute(&mut state)and the real undo/redo. Use an external command such as/bin/echo hi > f: the built-inechowrites throughprintln!, which the test harness captures before it reaches the redirected file. - Sweep
impl/rust-cli/tests/for other tests whose body never touches thevshcrate. - Reword the
correspondence_tests.rsheader totested-only. - Replace the stale sections of
docs/LEAN4_RUST_CORRESPONDENCE.adocwith the real code shape and the ledger status words. The subsection "Redo, and redo followed by undo (added 2026-11-17)" shows the intended style. - Re-measure the test counts and update
CLAUDE.mdwith the date.
Done means
- Each rewritten test fails when the behaviour it names is broken. Show it for the redirect-undo tests by temporarily reverting the relative-path fix in
record_for_undo(impl/rust-cli/src/redirection.rs). - In
impl/rust-cli:cargo fmt --check,cargo clippy --all-targets --all-features -- -D warningsandcargo testpass. Commits signed.
Wider than this repository
"A test whose body never calls the crate under test" can be checked mechanically and may suit a Hypatia rule. Mention it in the PR; do not implement it here.
Notes
- If Fix redo: redone operations keep their undo data, and redo restores what the operation produced #231 has not merged, base the work on its branch
claude/busy-brahmagupta-lqyiyq. - Do not claim the shell is production-ready or formally verified end to end.
Reacted by coderabbitai
Metadata
Metadata
Assignees
Labels
priority:p2Normal - queue itNormal - queue itpriority:p3Low - nice to haveLow - nice to havescope:repoConfined to this repositoryConfined to this repositorytech-debtKnown shortcut, drift, or hygiene owed - includes cleanupKnown shortcut, drift, or hygiene owed - includes cleanuptestingTests, benchmarks, fuzzing, property checks, coverageTests, benchmarks, fuzzing, property checks, coverage
Activity
coderabbitai commentedon Nov 17, 2026
🔗 Related PRs
#231 - Fix redo: redone operations keep their undo data, and redo restores what the operation produced [open]
#232 - Runtime holes: 13 of 15 closed, by containment through a directory handle and a fixed session root [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!