Implement insert/add in the storage domain and connect edit to the CLI-configured editor.
Scope
Support hidden, confirmed single-line input; --echo; --multiline; --force; interactive overwrite decisions; and stdin operation.
Expose an edit-session API that decrypts, accepts replacement text, validates concurrent modification, and atomically reencripts.
Keep editor selection and invocation in apps/cli; use the TOML editor setting, $VISUAL, $EDITOR, then vim.
Give the editor a permission-restricted plaintext temporary file in the safest native temporary-memory location available, then read it back and securely remove it. Never place it inside the vault.
Treat launching the selected editor as the only CLI external-process exception. TUI, GUI, iOS and watchOS code must use in-process editing.
Encrypt with destination recipient policy and create the upstream-compatible automatic Git commit only after success.
Acceptance criteria
Insert modes, confirmation mismatches, overwrite decisions, multiline content, empty content, and non-interactive input match fixtures.
Editor failure, unchanged content, cancellation and encryption failure leave both entry and Git state unchanged.
## Objective
Implement `insert/add` in the storage domain and connect `edit` to the CLI-configured editor.
## Scope
- Support hidden, confirmed single-line input; `--echo`; `--multiline`; `--force`; interactive overwrite decisions; and stdin operation.
- Expose an edit-session API that decrypts, accepts replacement text, validates concurrent modification, and atomically reencripts.
- Keep editor selection and invocation in `apps/cli`; use the TOML editor setting, `$VISUAL`, `$EDITOR`, then `vim`.
- Give the editor a permission-restricted plaintext temporary file in the safest native temporary-memory location available, then read it back and securely remove it. Never place it inside the vault.
- Treat launching the selected editor as the only CLI external-process exception. TUI, GUI, iOS and watchOS code must use in-process editing.
- Encrypt with destination recipient policy and create the upstream-compatible automatic Git commit only after success.
## Acceptance criteria
- Insert modes, confirmation mismatches, overwrite decisions, multiline content, empty content, and non-interactive input match fixtures.
- Editor failure, unchanged content, cancellation and encryption failure leave both entry and Git state unchanged.
- Tests cover editor precedence, argument handling, exit status, temporary-file permissions, cleanup and concurrent entry changes.
## Prerequisites
Safe password-store core; embedded GPG-compatible cryptography; recipient policy.
hugo
added this to the 01 - Full Rust pass CLI parity milestone 2026-08-09 18:56:56 +00:00
Implemented and pushed in 0e4cbef (Implement insert and edit sessions (#7)).
Implementation:
Added storage-owned InsertContent modes for hidden confirmed, echoed single-line, and exact multiline input, with mismatch/empty/newline validation and parsed-mode enforcement.
Added overwrite decision and --force behavior, nearest recipient-policy encryption, atomic writes, compatible commit intent, and exact rollback for existing or newly created entries.
Added in-process EditSession snapshots for existing and new entries, redacted plaintext access, unchanged detection, current-recipient reencryption, and concurrent replacement/removal/appearance detection before write.
Added typed commit/rollback errors and cleanup of newly created empty directories.
Added a CLI-only injected EditorHost boundary using resolved TOML/VISUAL/EDITOR/vim program and arguments without shell parsing. Storage and non-CLI apps never receive executable state.
Added private editor files outside the vault: Linux prefers /dev/shm, fallback uses native temp storage, files are mode 0600, bounded on read, and every saved/cancelled/failed/host-error path overwrites, truncates, syncs, removes, and cleans its directory.
Documented input, edit concurrency, commit, and editor-file contracts in docs/write-domains.md.
Issue-isolated verification:
cargo test -p ironstorage --test write_domains: 7 passed
cargo test -p ironstorage-cli: 4 passed (including 2 editor-session tests)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Objective
Implement
insert/addin the storage domain and connecteditto the CLI-configured editor.Scope
--echo;--multiline;--force; interactive overwrite decisions; and stdin operation.apps/cli; use the TOML editor setting,$VISUAL,$EDITOR, thenvim.Acceptance criteria
Prerequisites
Safe password-store core; embedded GPG-compatible cryptography; recipient policy.
Implemented and pushed in
0e4cbef(Implement insert and edit sessions (#7)).Implementation:
Issue-isolated verification:
Required repository gates all passed: