Hmbown/CodeWhale · error · anyhow::Error
Push is never automatic; re-run with --dry-run to preview…
Error message
Push is never automatic; re-run with --dry-run to preview, then confirm explicitly
What it means
`codewhale account push` is preview-only by design: it never writes to the server automatically. Without `--dry-run` the command bails after only the me() identity check, forcing an explicit preview-then-confirm flow.
Solutions
- Re-run with `--dry-run`: `codewhale account push --dry-run` to see what would be pushed.
- Follow any explicit confirm flow the dry-run output describes.
- Since automatic push is intentionally unsupported, script only the dry-run form; no apply path exists yet.
Example fix
// before codewhale account push // after codewhale account push --dry-run
Defensive patterns
Strategy: validation
Validate before calling
// Guard automation: push is preview-only let args: Vec<String> = std::env::args().collect(); assert!(args.iter().any(|a| a == "--dry-run"), "push requires --dry-run");
Prevention
- Always run `codewhale account push --dry-run` first.
- Never assume push applies changes — it is intentionally manual.
- In CI, invoke only the dry-run form.
- Design scripts around the preview; expect the flag to remain mandatory.
When it happens
Trigger: Running `codewhale account push` without `--dry-run`.
Common situations: Users expecting push to upload local settings in one shot; scripts assuming push is the write side of pull; CI automation calling push non-interactively.
Related errors
- Account settings import is not available yet; local config…
- A positive pull request number is required
- account_agent_model_unconfigured
- already exists; pass --force to overwrite it
- Android identifies runtime linker ` `; refusing to use the…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/d7da0f60882d820f.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/cloud.rs:938
writeln!(out, "Account settings (pull --dry-run):")?;
writeln!(out, "Account ID: {}", printable(&user.id))?;
writeln!(out, "Profile: {}", printable(profile))?;
writeln!(out, "API: {api_base}")?;
writeln!(
out,
"dry-run: remote settings import is not available; local config unchanged"
)?;
// Show the invariant: Bearer custody stays in the OS keyring, never in config.toml.
writeln!(
out,
"Secure custody: Bearer tokens remain in the OS keyring"
)?;
Ok(())
}
CloudCommand::Push(args) => {
let user = client.me()?;
if !args.dry_run {
bail!(
"Push is never automatic; re-run with --dry-run to preview, then confirm explicitly"
);
}
writeln!(out, "Account settings (push --dry-run):")?;
writeln!(out, "Account ID: {}", printable(&user.id))?;
writeln!(out, "Profile: {}", printable(profile))?;
writeln!(out, "API: {api_base}")?;
writeln!(
out,
"dry-run: would PATCH /api/me/preferences with If-Match revision check (412 on conflict)"
)?;
writeln!(
out,
"No credentials, paths, or env are copied; only explicit fields (field-level last-writer-wins)"
)?;
Ok(())
}
}View on GitHub (pinned to 73e0f67d83)