Verification layer & accession CMS path#13
Draft
rob-e-graham wants to merge 1 commit into
Draft
Conversation
Make verification a first-class, visible layer across ARCHAI and give archival data a clear, gated path into the CMS. Verification tiers (institutional record / verified oral history / community response) with a single `verified` line that visitors read from. New verificationService + /api/verification routes; comments gain verified/verified_by/verified_at so a community memory can be confirmed into a verified oral history (PATCH /api/comments/:id/verify). Accession CMS path: a record is only accessioned once it is BOTH verified AND curatorially approved. New accessionService + /api/accession routes (queue, readiness, commit) assign an accession number, write the CollectiveAccess id back onto source, and fail loudly (409 + blockers) for unconfirmed records. Verified badges surface in the visitor template, the main app visitor view, and the curator moderation view (with Verify/Unverify action). Standalone test (npm run test:verification, no server/db needed) covers the gate, queue, commit, and full verify -> approve -> accession path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyJTv8jZfmMG21H5cyj9bQ
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
What changed
Verification layer
verificationfield on object records with three tiers —institutional_record,verified_oral_history,community_response— and a singleverifiedline visitors read from (schemas/objectSchemas.js,data/mockObjects.js).services/verificationService.js+routes/verification.js:GET /api/verification/summary,POST /api/verification/set(curator). Legacy records without the field fall back safely (published → confirmed institutional record).verified/verified_by/verified_at(in-place DB migration) plusPATCH /api/comments/:id/verifyso a community memory can be confirmed into a verified oral history.Accession CMS path
accessionfield +services/accessionService.js+routes/accession.js:GET /api/accession/queue,GET /api/accession/:id(readiness/blockers),POST /api/accession/commit.FAMTEC.<year>.<seq>), writes the CollectiveAccess id back ontosource.collectiveAccessIdso provenance travels with the record, and audits the event. Unverified/unapproved records are refused with409+ ablockerslist.verification.set,accession.commit,accession.read).UI — "clearly see when verified"
✓ verifiedbadge in the NFC visitor template, the main app visitor comment view, and the curator moderation view — which also gains a Verify / Unverify action.Docs
docs/VERIFICATION_AND_ACCESSION.mdand aREPO_MAP.mdentry.How to test
cd backend-archai && npm run test:verification— standalone, no server or database required. Covers the summary, the accession gate (unverified → blocked), the queue, a successful commit (accession number + CMS id write-back), and the full verify → approve → accession path (16 checks).POST /api/accession/commitfor an unverified record returns409with blockers; a verified + approved born-digital record (e.g.FAMTEC_2026_ARCHAI_WEB) commits and receives an accession number.Screenshots / recordings (if UI)
✓ verifiedmarker distinct from open community responses; curators toggle it from the object-detail moderation panel.Risks / follow-up
nfc-pages/v/*.htmlare not regenerated in this PR — the badge lands in the source template (nfc-pages/nfc-visitor-template.html); regenerate pages separately to roll it out.commitAccessionto a live CA create call is the next step when the CA API contract is finalized.🤖 Generated with Claude Code
https://claude.ai/code/session_01SyJTv8jZfmMG21H5cyj9bQ
Generated by Claude Code