Skip to content

WP10b: maintenance review UI — console Review page + review routes + WP10a carry-ins#4

Merged
Wuesteon merged 5 commits into
mainfrom
wp10b-review-ui
Jul 16, 2026
Merged

WP10b: maintenance review UI — console Review page + review routes + WP10a carry-ins#4
Wuesteon merged 5 commits into
mainfrom
wp10b-review-ui

Conversation

@Wuesteon

Copy link
Copy Markdown
Owner

Implements WP10b per the claimed packet (plan: docs/superpowers/plans/2026-07-17-wp10b-review-ui.md; design: spec §8.1 of docs/superpowers/specs/2026-07-16-sleep-time-maintenance-design.md).

What's in it

  • Console review routes (routes/review.py): five auth-gated endpoints — queue / decide / promote / maintenance status / maintenance run (dry-run default) — all reaching the engine only through EngineGateway; CAS double-decides surface as HTTP 409 with the lifecycle outcome passed through. Registered before the static catch-all (the 405-swallowing regression class).
  • Review page (ui/src/pages/Review.tsx): entity-grouped pending proposals with per-kind evidence (near-dup texts + cosine, summarize sources + proposed text, evict score evidence), Approve / Keep / Edit-then-approve / Promote, batch approve per group, run-maintenance buttons (apply behind a confirm). Optimistic decisions with 409 "already decided elsewhere" refresh; non-409 anomaly outcomes surface a notice; a monotonic request token guards imperative reloads against cross-namespace state bleed.
  • WP10a carry-in cleanups (all four from the recorded list): summarizer budget-check ordering, CLI missing-namespace guard (exit 2, no file created), Store.path on the ABC, apply/auto-spawn asymmetry documented in the tool docstrings on both surfaces.
  • Docs: README review-flow section + CHANGELOG under [Unreleased]. Commits ui/package-lock.json (none existed) to pin the typecheck/build gates.

Design note

Queue reads deliberately go through the gateway rather than the read-only inspect_sql path sketched in spec §8.1: WP10a implemented review_queue with lazy expiry of overdue proposals (a write), so a raw read path would fork that behavior. Recorded in the plan.

Verification

  • Core suite: 284 passed · console suite: 152 passed (own venv) · tsc --noEmit clean · vite build clean.
  • 14 new route tests (real staged proposals, double-decide 409, promote-flips-tier verified by a second read, auth 401s, reserved/unknown-ns 404s) + 2 new core tests (budget spy, CLI guard).
  • Adversarial whole-diff review ran before commit; all 4 findings (1 important, 2 minor, 1 nit — stale-response bleed, swallowed errors, discarded 409 body, anomaly-as-success) fixed in the final commits.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y8dLVL6RXWPxNNPMx1jr17

Wuesteon and others added 5 commits July 17, 2026 00:23
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8dLVL6RXWPxNNPMx1jr17
Budget check ahead of summarizer invocation (a hit budget never pays for an
Ollama generation); CLI --namespace against a missing DB exits 2 without
creating an empty file; Store.path declared on the ABC; the apply/auto-spawn
asymmetry documented in memory_maintenance_run on both surfaces and in
spawn_maintenance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8dLVL6RXWPxNNPMx1jr17
…e gateway

Five auth-gated /views routes mirroring the views-router pattern (reserved-ns
+ existence guard, late require_auth import), registered before the static
catch-all. All engine access through EngineGateway; CAS already-decided/
already-applied outcomes map to HTTP 409 with the body passed through. Queue
reads go through the gateway deliberately — review_queue lazily expires
overdue proposals, so a raw read-only path would fork that behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8dLVL6RXWPxNNPMx1jr17
…nd verbs

Status header with dry-run/apply-behind-confirm maintenance buttons; entity
groups with batch approve; per-kind evidence cards (near-dup texts + cosine,
summarize sources + proposed text, evict score evidence); Approve / Keep /
Edit-then-approve / Promote. Decisions are optimistic with 409 'already
decided elsewhere' refresh; non-409 anomaly outcomes (expired/not_found/
invalid_decision) surface a notice instead of passing as success; a monotonic
request token guards imperative reloads against cross-namespace state bleed;
ApiError now carries the parsed error body so the 409 pass-through is usable.
Commits ui/package-lock.json (none existed) so typecheck/build are pinned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8dLVL6RXWPxNNPMx1jr17
@Wuesteon
Wuesteon merged commit f082f4e into main Jul 16, 2026
6 checks passed
@Wuesteon
Wuesteon deleted the wp10b-review-ui branch July 16, 2026 16:49
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.

1 participant