Closed general

Bloat gates: repo undelete --confirm-not-bloat + page create --because

Colby Knox · 2mo ago ·closed by Colby Knox

CLI half of wiki.adom.inc/adom/wiki/issues/106 (the wiki server half is live). From a real incident: an AI thread resurrected a bloat-deleted page with repo undelete and pushed content into it, bypassing every creation checkpoint.

1. repo undelete: surface the new server gate

The server now refuses POST /undelete without ?confirm=<owner>/<slug>, returning:

409 { code: "UNDELETE_NEEDS_CONFIRM", data: { owner, slug, deleted_by, deleted_at } }

The hint prose already names the exact retry, so nothing is broken today. The CLI should make it first-class:

  • Print the disclosure prominently: who deleted the page, when, and the bloat framing ("a soft-delete is often a judgment someone already made").
  • Add --confirm-not-bloat, which maps to ?confirm=<owner>/<slug>. Keep the flag name explicit about what the caller is asserting.
  • Without the flag: show the disclosure and exit non-zero. No interactive prompt needed; the reprimand IS the interface for AI callers.

2. page create (and first-publish flows): the bloat question

Per John's ask on the wiki issue:

  • Require --because "<why no existing home fits>" on page creation. Reject placeholder justifications the same way placeholder changelogs are rejected.
  • Print the wiki-bloat rule: before creating anything, first find where it should already live.
  • The server now returns a SIMILAR_PAGES_EXIST info hint on the FIRST publish of a slug (top related existing pages by title match). Hint passthrough shows it automatically on 1.0.33+; nothing to build for that part, but --because should print BEFORE the network call, so the AI answers the question before creating anything.

This is client-side UX only; no server change is needed for the --because gate, which is deliberate: a server-side mandatory-justification field would break every existing client.

2 Replies

Colby Knox · 2mo ago

Shipped in 1.0.80, live as latest, both halves live-tested against the staging gate end to end.

Undelete: repo undelete (and the page undelete alias) take --confirm-not-bloat, mapping to ?confirm=<owner>/<slug>. The UNDELETE_NEEDS_CONFIRM 409 renders first-class from data: "this page was soft-deleted by on . A soft-delete is often a judgment someone already made: deleting it flagged the page as bloat or superseded. Restoring it puts that content back without any creation checkpoint running", then the check-why action and the exact retry command. Without the flag the disclosure prints and the exit is non-zero; no prompt, the reprimand is the interface, per the spec.

page create: --because "<why no existing page fits>" is required, validated client-side BEFORE the network call. Minimum 20 characters, and lazy placeholders (wip, tbd, todo, test, ...) are rejected with an error that restates the question and hands back discover search. A passing justification prints along with the wiki-bloat rule ("before creating anything, first find where it should already live") ahead of the request, so the answer exists before the page does. Client-side only, as the issue specifies.

Verified live: placeholder rejected offline, real create succeeded, soft-delete, bare undelete rendered the disclosure with the real deleted_by/deleted_at from staging, --confirm-not-bloat restored it, throwaway re-deleted. SIMILAR_PAGES_EXIST needs nothing (passthrough predates 1.0.33's floor by a lot) and now has a doc row marked deliberately unmapped, pointing at --because as its client-side complement.

Colby Knox · 2mo ago

Shipped in adom-wiki-cli 1.0.80 and live-tested against the staging gate end to end (409 disclosure, confirm-path restore, --because placeholder rejection). One detail recorded from the CLI side: the page undelete alias delegates to the repo verb's enum, so --confirm-not-bloat exists on both spellings. Closing.

Log in to reply.