Skip to content

feat(database): write endpoints — add / update / delete - #183

Merged
chmmou merged 1 commit into
mainfrom
feature/database-write
May 20, 2026
Merged

feat(database): write endpoints — add / update / delete#183
chmmou merged 1 commit into
mainfrom
feature/database-write

Conversation

@chmmou

@chmmou chmmou commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

Wires add_database / update_database / delete_database via the shared kaswrite seam.

Key asymmetries

  • Password key split: --password maps to database_password on add, database_new_password on update (the same split ftpuser/sambauser carry).
  • delete_database prompt verb is the louder "permanently delete" rather than the bare "delete" every other slice uses — the action drops the database AND every row it contains.

Read-side extension

get_databases decoder picks up the in_progress flag the KAS API surfaces on every entry. New IN_PROGRESS column on the list view; appended to the singular detail when non-empty. Existing read tests re-pin against the refreshed d0123460 fixture snapshot.

Closes #122

Wire add_database / update_database / delete_database via the shared
kaswrite seam. update and delete are gated by the #109 confirmation
prompt; add is reversible and not prompted. All three honour
--dry-run (#132) and emit a #131 audit record; the password is
redacted in both. update sends only the explicitly-set flags (keyed
on cobra Changed). add_database takes no database_login — KAS
generates it and the command prints it on success.

The password key splits between actions: --password maps to
database_password on add and to database_new_password on update (the
same _new_password split the ftpuser/sambauser slices carry).
delete_database's confirmation prompt uses the louder verb
"permanently delete" because the action drops the database AND every
row it contains — the loudest data-loss surface of the v0.2.0 write
phase.

The read path was extended to decode the in_progress flag the KAS
API surfaces on every get_databases entry (new IN_PROGRESS column on
the list view; appended to the singular detail when present).
Existing read-side tests now pin against the refreshed d0123460
fixture snapshot.

Closes #122
@chmmou
chmmou merged commit c2508a3 into main May 20, 2026
6 checks passed
@chmmou
chmmou deleted the feature/database-write branch May 20, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(database): write endpoints — add / update / delete

1 participant