Repository navigation
fix(cli): validate project before delete confirmation - #127
Merged
Merged
Conversation
vinceblock99
added a commit
that referenced
this pull request
Jul 24, 2026
Align workspace/org/team/intent delete with the project delete semantics from #127: the existence precheck runs only before the interactive confirmation, so scripted --force deletes stay a single request.
This was referenced Jul 24, 2026
vinceblock99
added a commit
that referenced
this pull request
Jul 28, 2026
* fix(cli): resolve command-surface defects found by harness review
- query search/neighbors: truncate summaries on char boundaries instead
of byte indexes; long CJK/emoji summaries no longer panic (exit 101).
Adds truncate_display() with unit tests, and fixes the same latent
byte-slicing in plan-exec output.
- agent enable --all: error out when no agents are detected instead of
installing hooks for every registered agent.
- agent disable --global: add the missing codex path
(~/.codex/hooks.json), restoring enable/disable symmetry.
- push/pull: honor the remote configured via 'atomic remote default';
an explicit CLI argument still wins, with "origin" as the final
fallback. REMOTE arg is now optional with no clap default.
- git push: exit non-zero when the underlying git push fails (the
commit is kept and the user is told how to retry).
- pull/clone: exit non-zero when downloads, applies, or materialize
fail; partial results are kept on disk.
- project/workspace/org/team/intent delete: verify the target exists
before showing the destructive confirmation prompt.
* test(cli): use escaped unicode in truncation regression tests
Replace raw CJK/emoji string literals with \u{20ac} and \u{1f680}
escape sequences so the source stays ASCII-only while keeping the
same multi-byte char-boundary coverage. Also tighten the loose
assertions in the no-panic case.
* fix(cli): skip delete existence prechecks under --force
Align workspace/org/team/intent delete with the project delete semantics
from #127: the existence precheck runs only before the interactive
confirmation, so scripted --force deletes stay a single request.
* docs(cli): correct push/pull remote resolution help text
The --help text promised 'falling back to "origin"' but
resolve_remote_name delegates to RemoteConfig::get_default, which also
returns the sole configured remote when exactly one is registered. A
repo with a single remote named something other than origin therefore
resolves to that remote, contradicting the documented behavior.
Document the real order: marked default > "origin" > sole remote >
literal "origin".
* docs(cli): simplify behavior comments
* test(cli): validate every public command surface * test(harness): distinguish skipped suites from passes * docs(cli): document command harness * test(harness): eliminate fake greens in vault suite, skip logic, and diff filter - 14_vault_kg.sh: every assertion now checks exit code and expected output shape via run_cmd/assert_ran; previously 20 if/else sites passed in both branches and 4 more passed unconditionally, so the suite stayed green even with /usr/bin/true as the binary (now: 40/44 fail, suite exits 1). Also fixes a wrong vault show path and broken \| alternations in ERE patterns that made match branches unreachable. - helpers.sh: skip_suite exits 1 when assertions already failed — a mid-suite skip (e.g. network loss after real failures) can no longer mask a failing suite as skipped in the runner summary. - 09_semantic_diff_pairing.sh: extract_atomic_change_lines now drops only the +++/--- file headers instead of requiring a non-+/- second character, which silently excluded added/deleted blank lines and change lines whose content starts with + or -. * fix(cli): correct behavior found by the command harness (#132) * fix(cli): resolve command-surface defects found by harness review - query search/neighbors: truncate summaries on char boundaries instead of byte indexes; long CJK/emoji summaries no longer panic (exit 101). Adds truncate_display() with unit tests, and fixes the same latent byte-slicing in plan-exec output. - agent enable --all: error out when no agents are detected instead of installing hooks for every registered agent. - agent disable --global: add the missing codex path (~/.codex/hooks.json), restoring enable/disable symmetry. - push/pull: honor the remote configured via 'atomic remote default'; an explicit CLI argument still wins, with "origin" as the final fallback. REMOTE arg is now optional with no clap default. - git push: exit non-zero when the underlying git push fails (the commit is kept and the user is told how to retry). - pull/clone: exit non-zero when downloads, applies, or materialize fail; partial results are kept on disk. - project/workspace/org/team/intent delete: verify the target exists before showing the destructive confirmation prompt. * test(cli): use escaped unicode in truncation regression tests Replace raw CJK/emoji string literals with \u{20ac} and \u{1f680} escape sequences so the source stays ASCII-only while keeping the same multi-byte char-boundary coverage. Also tighten the loose assertions in the no-panic case. * fix(cli): skip delete existence prechecks under --force Align workspace/org/team/intent delete with the project delete semantics from #127: the existence precheck runs only before the interactive confirmation, so scripted --force deletes stay a single request. * docs(cli): correct push/pull remote resolution help text The --help text promised 'falling back to "origin"' but resolve_remote_name delegates to RemoteConfig::get_default, which also returns the sole configured remote when exactly one is registered. A repo with a single remote named something other than origin therefore resolves to that remote, contradicting the documented behavior. Document the real order: marked default > "origin" > sole remote > literal "origin". * docs(cli): simplify behavior comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--forceon the existing single-DELETE request path.Test Coverage
All new behavior paths have test coverage. One regression test was added.
Pre-Landing Review
No issues found.
Design Review
No frontend files changed, design review skipped.
Eval Results
No prompt-related files changed, evals skipped.
Plan Completion
No plan file detected.
Test plan
cargo test -p atomic-cli missing_project_is_rejected_before_confirmation -- --nocapturecargo test -p atomic-cli(1,652 tests, 0 failures)cargo fmt --all -- --checkcargo clippy -p atomic-cli --all-targets -- -D warningscargo build -p atomic-clitarget/debug/atomic project deleteagainst a one-shot local mock proxy: only GET was received, CLI returned 404 without prompting, and no DELETE was sent.