[MC-456-B] docs: persistence model — runtime read path, block shapes, served-but-stale troubleshooting#647
Conversation
… served-but-stale troubleshooting
The persistence/keying doc explained keys and migrations well but was
disk-centric: it did not document the request path or the value shapes,
which is exactly where "the file is correct but the UI looks empty"
lives. Adds three sections (all language/data-agnostic — generic
conceptKey/speakerId/GROUP placeholders, no dataset specifics):
- Block Map: every top-level (automatic) and manual_overrides (human)
block with its value shape, the manual-wins precedence rule, and the
consequence that a tool reading the top-level cognate_sets reports 0
for a hand-authored workspace even when manual_overrides is full.
- Request Path: backend port (PARSE_PORT), per-request re-read, the
/api/enrichments { "enrichments": {...} } wrapper, /api/compare/bundles
carrying grouping/forms but NOT cognate letters, how the UI joins them
by concept key, and the in-memory-snapshot / stale-client caveat for
any out-of-band rewrite.
- Troubleshooting: ordered checklist for "data on disk but not shown"
(stale client → layer/precedence → key → speaker id → surface/workspace
→ endpoint shape).
Docs only; no code or behavior change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
discarded_forms is { conceptKey: { speakerId: <reason> } } — a per-speaker
free-text exclusion reason, not an opaque value. Verified against the writer
and live data.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review — PR #647 (self-review, MC-456-B)Overview. Docs-only (+~70/−2, one file: Correctness (verified against the code/runtime, not assumed):
Fix applied during review (per AGENTS.md PR review rule 3): AGENTS.md review rules:
Risk: none to runtime — documentation only. Verdict: approve. Accurate, generic, and self-contained. Leaving merge to the maintainer. |
…cs/skills) + cross-link .claude/ is gitignored, so the skill ships as a tracked doc under docs/skills/. Generic, data/language-agnostic runbook paired with docs/data-persistence-model.md: correct concept key, manual-vs-automatic precedence, legacy-key migration, and end-to-end verification for updating cognate decision data in the main PARSE app. Linked from the persistence doc's Related Reading. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Expands
docs/data-persistence-model.md. The doc explained the concept-key invariant and migrations well, but was disk-centric — it documented neither the runtime request path nor the value shapes of each block. That is precisely the axis where the "the file is correct but the UI shows nothing" class of problem lives, so the doc could not answer it.All additions are language- and data-agnostic: generic
conceptKey/speakerId/GROUPplaceholders, no dataset- or corpus-specific lexemes. Mechanism is described generically; the only concrete names are structural (file names, endpoints, env var).Sections added
parse-enrichments.jsonBlock Map (shapes + precedence) — every top-level (automatic) andmanual_overrides(human) block with its value shape and key namespace; the manual-wins precedence rule; and the explicit consequence that a reader inspecting the top-levelcognate_setsreports0for a hand-authored workspace even thoughmanual_overridesis full.PARSE_PORT, default 8766), per-request re-read with in-memory SAFE-key promotion, theGET /api/enrichments→{ "enrichments": {…} }wrapper,GET /api/compare/bundlescarrying grouping/forms but not cognate letters, how the UI joins the two by concept key, and the in-memory-snapshot / stale-client caveat for any out-of-band rewrite (migration, external authoring/merge tool, hand edit, restore).Also: header
Last updatednote bumped; a cross-reference added from the Core Files table row to the new Block Map.Scope
Documentation only — no code or behavior change.
Verification
src/lib/decisionPersistence.ts:CognateSetMap,SpeakerFlagMap,BorrowingFlagMap,CognateDecisionMap,CanonicalLexemesByBundle,concept_merges) and the backend default-enrichments skeleton; the endpoint shapes confirmed against the live/api/enrichmentsand/api/compare/bundlesresponses.🤖 Generated with Claude Code