Skip to content

Verification layer & accession CMS path#13

Draft
rob-e-graham wants to merge 1 commit into
mainfrom
claude/verification-archival-cms-u7ufj8
Draft

Verification layer & accession CMS path#13
rob-e-graham wants to merge 1 commit into
mainfrom
claude/verification-archival-cms-u7ufj8

Conversation

@rob-e-graham

Copy link
Copy Markdown
Owner

Summary

  • Makes verification a first-class, visible layer across ARCHAI so visitors can always see where something sits between institutional record, verified oral history, and living community response.
  • Gives archival data a clear, gated path into the CMS: a record is only accessioned into CollectiveAccess once it is both verified and curatorially approved.

What changed

Verification layer

  • New verification field on object records with three tiers — institutional_record, verified_oral_history, community_response — and a single verified line 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).
  • Comments gain verified / verified_by / verified_at (in-place DB migration) plus PATCH /api/comments/:id/verify so a community memory can be confirmed into a verified oral history.

Accession CMS path

  • New accession field + services/accessionService.js + routes/accession.js: GET /api/accession/queue, GET /api/accession/:id (readiness/blockers), POST /api/accession/commit.
  • Commit assigns an accession number (FAMTEC.<year>.<seq>), writes the CollectiveAccess id back onto source.collectiveAccessId so provenance travels with the record, and audits the event. Unverified/unapproved records are refused with 409 + a blockers list.
  • Role capabilities updated (verification.set, accession.commit, accession.read).

UI — "clearly see when verified"

  • ✓ verified badge 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.md and a REPO_MAP.md entry.

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).
  • Manually: POST /api/accession/commit for an unverified record returns 409 with blockers; a verified + approved born-digital record (e.g. FAMTEC_2026_ARCHAI_WEB) commits and receives an accession number.

Screenshots / recordings (if UI)

  • Verified oral histories render with a green ✓ verified marker distinct from open community responses; curators toggle it from the object-detail moderation panel.

Risks / follow-up

  • The comment verify and moderation endpoints remain ungated (consistent with the existing moderation endpoints); tightening role checks there is a possible follow-up.
  • The 900+ generated nfc-pages/v/*.html are 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.
  • The CollectiveAccess commit is currently a local/mock write-back; wiring commitAccession to 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

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
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.

2 participants