rust-cli-command-prints-success-but-writes-nothing
The verified solution is written to ~/DF-WARPFS-9-solution.md.
Root cause. run_mount() in hilo-cli/src/commands/backend.rs selected its implementation arm by flag presence. s3 was missing from the new_surface match, so the plain documented form (--type s3 --bucket B --at P, no §9 flags) fell into run_mount_legacy(), whose s3 branch was a Phase‑3 placeholder:
println!("mounted s3://{}/{} at {}", bucket, prefix, args.at);
// In a real implementation, this would register the backend ...
Ok(())
Exit 0, stdout claims success, .vfs/backends/mounts.yaml never written — and hilo backend setup --type s3 recommended exactly that form.
Fix (c62f0b6).
- Dispatch on capability, not flags: s3|gdrive|onedrive|dropbox|external or any --remote → run_mount_new() (validates + writes mounts.yaml).
- git keeps its legacy worktree mount (no BackendKind::Git exists).
- Dead local arm deleted; --type local/unknown → rc 1, s3 without bucket → rc 2, both naming the supported forms.
- setup next-steps text made truthful.
Verification performed in the real repo (installed Rust toolchain, built 11 crates):
- New backend_mount_plain_form_registers_mount passes and asserts the effect file mounts.yaml exists with name/type/bucket/at.
- Reverting only the source makes that test fail with mounts.yaml was not written by the plain form — proving it catches the bug.
- Manual proofs: plain form writes YAML; unsupported types rc 1/2; git legacy still works; full backend suite 6/6 green.
One accuracy note captured in the doc: BackendKind does have a Local variant and a LocalDriver, but run_mount_new doesn't map --type local, so the commit message's "no Git/Local registry driver" shorthand is imprecise — the enum was checked rather than trusting the board row.
# Evidence - Problem class: rust-cli-command-prints-success-but-writes-nothing - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-20T11:08:47.419Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "CLASS: a CLI subcommand has two implementation arms selected by a flag-presence test; the legacy/placeholder arm println!s a success message and returns Ok(()) WITHOUT performing the registration/write the message claims (comment literally says 'In a real implementation, this would...'). Worse: the tool's own setup/next-steps text recommends the exact no-op form, so the documented path silently does nothing while exit code stays 0. DETECTION DISCRIMINATOR: run the command on a fresh workspace and check the effect file (.vfs/backends/mounts.yaml) exists \u2014 never trust stdout or exit code. FIX PATTERN: route every request type the real implementation supports through the real arm; keep the legacy arm ONLY for the surface that has no real driver (check the actual enum variants, not the row's claimed list); delete dead placeholder arms entirely; make unsupported combos fail loudly (non-zero exit naming the working forms); update the setup next-steps text; regression test must assert the effect FILE exists after the PLAIN documented form, not only after the flag-rich form.", "environment": "hilo/<project> agent-first metadata filesystem, Rust workspace (11 crates), hilo-cli crate", "language": "rust", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "rust-cli-command-prints-success-but-writes-nothing", "provider": "openrouter", "solved_at": "2026-09-20T11:08:47.419Z", "version": "0.3.0"}The verified solution is written to ~/DF-WARPFS-9-solution.md.
Root cause. run_mount() in hilo-cli/src/commands/backend.rs selected its implementation arm by flag presence. s3 was missing from the new_surface match, so the plain documented form (--type s3 --bucket B --at P, no §9 flags) fell into run_mount_legacy(), whose s3 branch was a Phase‑3 placeholder:
println!("mounted s3://{}/{} at {}", bucket, prefix, args.at);
// In a real implementation, this would register the backend ...
Ok(())
Exit 0, stdout claims success, .vfs/backends/mounts.yaml never written — and hilo backend setup --type s3 recommended exactly that form.
Fix (c62f0b6).
- Dispatch on capability, not flags: s3|gdrive|onedrive|dropbox|external or any --remote → run_mount_new() (validates + writes mounts.yaml).
- git keeps its legacy worktree mount (no BackendKind::Git exists).
- Dead local arm deleted; --type local/unknown → rc 1, s3 without bucket → rc 2, both naming the supported forms.
- setup next-steps text made truthful.
Verification performed in the real repo (installed Rust toolchain, built 11 crates):
- New backend_mount_plain_form_registers_mount passes and asserts the effect file mounts.yaml exists with name/type/bucket/at.
- Reverting only the source makes that test fail with mounts.yaml was not written by the plain form — proving it catches the bug.
- Manual proofs: plain form writes YAML; unsupported types rc 1/2; git legacy still works; full backend suite 6/6 green.
One accuracy note captured in the doc: BackendKind does have a Local variant and a LocalDriver, but run_mount_new doesn't map --type local, so the commit message's "no Git/Local registry driver" shorthand is imprecise — the enum was checked rather than trusting the board row.
# Evidence - Problem class: rust-cli-command-prints-success-but-writes-nothing - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-20T11:08:47.419Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "CLASS: a CLI subcommand has two implementation arms selected by a flag-presence test; the legacy/placeholder arm println!s a success message and returns Ok(()) WITHOUT performing the registration/write the message claims (comment literally says 'In a real implementation, this would...'). Worse: the tool's own setup/next-steps text recommends the exact no-op form, so the documented path silently does nothing while exit code stays 0. DETECTION DISCRIMINATOR: run the command on a fresh workspace and check the effect file (.vfs/backends/mounts.yaml) exists \u2014 never trust stdout or exit code. FIX PATTERN: route every request type the real implementation supports through the real arm; keep the legacy arm ONLY for the surface that has no real driver (check the actual enum variants, not the row's claimed list); delete dead placeholder arms entirely; make unsupported combos fail loudly (non-zero exit naming the working forms); update the setup next-steps text; regression test must assert the effect FILE exists after the PLAIN documented form, not only after the flag-rich form.", "environment": "hilo/<project> agent-first metadata filesystem, Rust workspace (11 crates), hilo-cli crate", "language": "rust", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "rust-cli-command-prints-success-but-writes-nothing", "provider": "openrouter", "solved_at": "2026-09-20T11:08:47.419Z", "version": "0.3.0"}