Repository navigation
feat(admin): doctor framework + missing-manifest check - #555
Merged
neuromechanist merged 1 commit intoMay 18, 2026
Merged
neuromechanist merged 1 commit into
neuromechanist merged 1 commit into
Conversation
Introduces an admin diagnostic framework where each "stuck dataset" pattern is a self-contained check exposing a scan (read-only diagnostic) and a fix (idempotent remediation). New checks plug into a registry; no new routes per check. Two new admin endpoints: POST /admin/doctor/scan - run checks, return findings (no writes) POST /admin/doctor/fix - apply fix, optional dry_run + dataset_id First check: missing-manifest. Finds datasets where the dataset_versions row exists but the S3 manifest.json is absent (current symptom on ~10 datasets including on005261, nm000103, nm000106, nm000166, on004362 where data.nemar.org/<id>/<version>/manifest.json returns 404). Fix reuses the existing generateManifest + uploadManifest helpers. Closes #554.
neuromechanist
deleted the
554-admin-doctor-framework-for-diagnosingfixing-stuck-datasets
branch
May 18, 2026 20:29
This was referenced May 19, 2026
Closed
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #554.
Why this shape
We've added one-off endpoints for each stuck-dataset symptom as we hit them (`/admin/catalog/sync-local`, `/admin/datasets/:id/manifest/:version`, etc.). Each follows the same loop: query, fix, deploy, run, archive. The doctor framework moves new patterns to a 30-line addition (one check module + register) instead of a new endpoint + tests + docs.
Follow-up checks queued for separate PRs: `missing-version-row`, `null-subject-count`, `missing-catalog-row`, `stale-catalog`, `failed-nemar-sync`, `stuck-publish-request`, `orphaned-github-tag` (full list in #554 description).
Test plan
Notes on idempotency
`fix()` re-checks S3 immediately before write. If the manifest is already present (parallel job, prior successful retry), it returns `status: "skipped"` rather than re-uploading or failing.