Skip to content

Health shows the namespace's memory report and projection failures, and an admin runs repairs there - #395

Merged
zlareb1 merged 10 commits into
mainfrom
feat/dashboard-health-maintenance
Nov 8, 2026
Merged

zlareb1 merged 10 commits into
mainfrom
feat/dashboard-health-maintenance

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • New Feature

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Health shows the namespace's memory report, its search gates and its waiting extractions; a namespace admin applies expiry, re-embeds, removes an extractor's facts, rolls back, snapshots and restores there, and an org admin retries or dismisses projection failures.

Why

memory.health, calibration.get, memory.extraction_status, memory.sweep_expired, memory.reindex, facts.expire_by_adapter, namespace.rollback, namespace.snapshot, namespace.restore and ops.projection_failures.list/retry/resolve were callable only over HTTP, MCP or the SDKs, and server/operations/dashboard.py listed them as pending a dashboard control.

Scope and risk

  • Health → Namespace (a viewer of the namespace; memory.health, calibration.get and memory.extraction_status are VIEWER): live, recalled and silent memories and those expiring within 7 days; the search gates and the calibration tier that set them; the newest 50 extraction batches in any state, with how many of them wait and how many failed. Each section reads on its own, so one failed read leaves the others and offers its own Retry.
  • Health → Repairs (a namespace admin; the writes are ADMIN): apply expiry (a dry run first, then a confirmation that counts what is due, or a note that the due memories are all locked, "or more" on a full scan; a pass whose scan or insert failed wrote nothing and says so, one whose search mirror failed says its memories expired but the search index did not follow, with the error type, as an error toast, and a full pass of 500 that expired something says to run it again), re-embed up to 200 memories made by another embedding model (none to do, or a full run, says so), remove the graph facts one extractor wrote (the memories stay), roll the namespace back to a time (a dry run first; the confirmation counts what is reinstated and what was created since and is deleted, and says when only the first 5,000 keys are covered, as the result toast does), download a snapshot and restore one (the confirmation, marked dangerous, names the file's memory count and when it was taken; for a snapshot of this namespace it says its memories replace their current versions, deleted ones come back and its grants are active again, including any revoked since; for a snapshot of another namespace or org, which it names, that its memories are written here and its members get the grants they had there; the result counts the memories written and those skipped as erased). Each confirmation names the namespace; each write toasts its counts, and a failure toasts with its request id.
  • Health → Projection failures (an org admin claim, as the ops are ORG_ADMIN, like Operation mix): the open failures with their memories and error (a full page of 100 reads 100+ open), Retry failures (the newest 50; the toast counts what each came to: fixed, failed again, given up, waiting for a later pass while model calls are held, the row is too new or the org is under erasure, or with no retry; a retry that fixed nothing and failed again toasts as an error; one only given up does not) and a per-row Dismiss; the toolbar stays above the empty and error states, and a namespace switch clears the list before the new one is read.
  • A tab that a namespace switch hides (Namespace and Repairs follow the role on the namespace) falls back to Extraction quality. The page's subtitle covers every tab.
  • The root .gitignore ignores /node_modules/, where a vitest run started from the repository root writes its cache.
  • The JSON download helper moves from Erasures.tsx to frontend/src/lib/download.ts, which the snapshot download shares.
  • Each tab reads only when opened, so the route's read budget is unchanged. The new client (frontend/src/api/maintenance.ts) is imported directly, not through api.ts; npm run budget passes.
  • Docs: the dashboard page's Health row names the new tabs, and the backup and recovery page points to Repairs for snapshot, restore and rollback.
  • No server change; the twelve ops leave DASHBOARD_PENDING and PENDING_AT_MOST, and the reach manifest is regenerated.

Known gap, not changed here

  • When the expiry sweep's search mirror fails, nothing retries it: the next pass no longer selects the expired key, though the comment in server/memory/app/expiry.py::run_pass says it does. The dashboard reports the failure instead of promising the repair; the server fix is tracked in The expiry sweep never retries a search mirror that failed #399.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: revert; nothing is stored.

Tests

  • vitest: NamespaceHealth.test.tsx (the report, the gates' tier, recent extractions; one failed section with its Retry while the others stay; no queued transcript), Repairs.test.tsx (dry run before apply; nothing due and a declined confirmation write nothing; an apply whose insert failed and one whose search mirror failed; a full pass and a preview of only locked rows; re-embed with nothing to do and with a full run; rollback preview and apply; remove an extractor's facts; restore behind a dangerous confirmation; a restore that skipped erased memories; a snapshot of another namespace and of another org), ProjectionFailures.test.tsx (retry and dismiss; each retry outcome counted by its reason; a retry held by model calls; empty, with the toolbar; a failed read and its Retry; a namespace switch drops the old rows), Health.workers.test.tsx (a switch that hides the open Repairs tab selects Extraction quality; fails without the fallback); tsc -b, the build and npm run budget clean.
  • Playwright: route budget, list tables, focus rings and shell layout pass for /admin/health.
  • tests/unit/test_op_surfaces.py, tests/unit/test_op_reach_census.py, op_reach_census --check, test_doc_links.py, test_public_copy.py.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. I checked each tab's gate against its ops' declared roles.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Generated files are regenerated in this PR, not by hand (the reach manifest).
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

zlareb1 and others added 10 commits November 8, 2026 00:01
…s, and an admin runs repairs there

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ailure tabs

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…s own, and a hidden tab falls back

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…t from another namespace, and keep the failures toolbar

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…s only what it wrote

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ror, and its counts say what they cover

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…y by its outcome, and the root ignores node_modules

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 force-pushed the feat/dashboard-health-maintenance branch from f91439a to b390d31 Compare November 8, 2026 00:04
@zlareb1
zlareb1 merged commit d062110 into main Nov 8, 2026
38 checks passed
@zlareb1
zlareb1 deleted the feat/dashboard-health-maintenance branch November 8, 2026 00:29
@zlareb1 zlareb1 mentioned this pull request Nov 12, 2026
3 tasks done
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