Skip to content

feat(corpus): mark the《古蘭經》thematic cue interpretation-only, never [Text]#51

Merged
F-e-u-e-r merged 1 commit into
mainfrom
corpus/phase2-islam-thematic-cue
Jul 6, 2026
Merged

feat(corpus): mark the《古蘭經》thematic cue interpretation-only, never [Text]#51
F-e-u-e-r merged 1 commit into
mainfrom
corpus/phase2-islam-thematic-cue

Conversation

@F-e-u-e-r

Copy link
Copy Markdown
Owner

What

Follow-up to the Islam ADR 0008 Phase 2 work (#50). The sixth《古蘭經》record — a cross-locus thematic paraphrase (多處(如 2:25、103 章); 信道而行善者必得回報之意), not a 馬堅 verbatim excerpt — is now curated interpretation_only: true so it can never be presented as an authoritative Qur'an quotation. It routes to Surface B [Interpretation]; any [Text] claim citing it fails closed at the renderer.

This is the safety line (Option 1). Splitting the theme into concrete verse records is a separate later corpus-bump PR (Option 2, see below) — the two are sequential, not alternatives.

Mechanism

A new carried-not-trusted interpretation_only flag threads through the evidence pipeline:

presentation.json sidecar (interpretation_only: true)
  → retrieve.py PRESENTATION_FIELD_TYPES   (whitelist; type-checked only, both copies)
  → EvidenceSeed → CatalogSeed
  → render_finalizer._build_authority_unit  ← guard (the only ADR-0004 authority mint point)
       seed.interpretation_only → (None, trace-interpretation-only)
       → finalize() fails atomically; no Surface A

New trace-interpretation-only renderer-bypass reason (ADR 0004 §5, fail-closed). Cited correctly as [Interpretation] it flows to Surface B; cited as [Text] it is refused atomically.

Acceptance criteria

  • Cannot be treated as an authoritative Qur'an quote — structural renderer guard, fail-closed.
  • Clearly marked interpretation-only / thematic paraphraseinterpretation_only: true + sidecar _note + tests.
  • Not published-translation (no exact wording/edition supplied) and not generated-rendering (not a rendering of specific verses) — no representation_kind.
  • ✅ No edition-backed assurance; no BM25 default flip.
  • No retrieval behavior change — see below.

Two deliberate design choices

  1. Reference corpus file left untouched. occurrence_id is minted from source_file + source_line (ADR 0005) and source_line is a ranking tie-breaker, so editing the bullet would shift occurrence-ids / ranking. The classification therefore lives entirely in the sidecar + code → retrieval ranking, occurrence-identity, and committed reports are unchanged (4 test_committed_*_reproducible pass).
  2. Minimal sidecar entry (interpretation_only only; no rights/representation_kind). Reports count only representation_metadata_records / rights_metadata_records, so a bare classification flag moves no counted field — and a thematic cue is not a quotable excerpt, so this is also the honest shape.

Verification

  • pytest: 405 passed, 1 skipped (pre-existing conditional skip); 4 new tests (1 curation + 3 renderer-guard).
  • ruff: clean.
  • Both presentation.json and both retrieve.py copies byte-identical.

Relationship / follow-up

🤖 Generated with Claude Code

…ext]

Follow-up to ADR 0008 Phase 2 (Islam). The sixth《古蘭經》record — a cross-locus thematic paraphrase (多處/如 2:25、103 章; 信道而行善者必得回報之意), not a 馬堅 verbatim excerpt — is curated interpretation_only via the A1 presentation.json sidecar. A new carried-not-trusted interpretation_only flag (whitelisted + type-checked only in the portable retriever) threads through the evidence seed -> catalog to the finalizer, which refuses to mint a Surface-A [Text] authority unit from such a seed (new trace-interpretation-only bypass; fail-closed, ADR 0004 §5). The cue routes to Surface B and can never be presented as an authoritative Qur'an quotation.

Not published-translation (no exact published wording/edition) and not generated-rendering (not a rendering of specific verses); no new evidence record, no representation_kind, no edition-backed assurance, no BM25 default flip. The reference corpus file is left untouched on purpose: occurrence_id is minted from source_file+source_line (ADR 0005) and source_line is a ranking tie-breaker, so editing the bullet would shift ids/ranking. Classification lives entirely in the sidecar + code, so retrieval ranking / occurrence-identity / committed reports are unchanged (4 reproducibility tests pass). Splitting into concrete 2:25 / Sūrah 103 evidence records is deferred (option 2).

Both presentation.json copies stay byte-identical; 405 passed, 1 skipped, ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@F-e-u-e-r
F-e-u-e-r merged commit 3d85dea into main Jul 6, 2026
4 checks passed
@F-e-u-e-r
F-e-u-e-r deleted the corpus/phase2-islam-thematic-cue branch July 6, 2026 19:58
F-e-u-e-r pushed a commit that referenced this pull request Jul 15, 2026
…G + test adjacency with #51)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
F-e-u-e-r pushed a commit that referenced this pull request Jul 15, 2026
Cross-model review (gpt-5.6-sol ultra) finding, owner-adjudicated: ADR 0008
defines Phase 1 = metadata-only/no new records and Phase 2 = new witness
records + tracked corpus bump, so calling these metadata-only passes 'Phase 2'
contradicted the ADR. Renames the #48 entry, the already-merged #51 entry in
the Unreleased section, and the test comment. PR titles updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
F-e-u-e-r added a commit that referenced this pull request Jul 15, 2026
…ta (#48)

* feat(corpus): ADR 0008 Phase 2 -- Hinduism canon-scope metadata

Conservative canon-scope backfill for the three existing Hinduism generated-
rendering records -- no new records, no textual-witness / edition claim.

- 廣林奧義書 1.4.10 -> canon_scope: sruti, corpus_family: upanishads
- 薄伽梵歌 2:48 / 4:7 -> canon_scope: smriti, corpus_family: bhagavad_gita
- Existing representation_kind (generated-rendering) / rendering_mode
  (meaning-rendering) / provenance / rights kept intact.
- test_corpus_curation: pins the Hinduism canon_scope/corpus_family (enum
  membership from policies/corpus-metadata.v1.json); no witness/edition claim.

Metadata only: representation_kind/rights were already present, so no report
metadata count changes and no report regeneration -- rankings/metrics unchanged.
Both presentation.json copies byte-identical. 402 passed, ruff clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHay815trwtRFTwkdCWpbM

* test(corpus): pin raw sidecars + allowlist against span_assurance_tier smuggling

Cross-model review (gpt-5.6-sol ultra) finding: the parsed-record assertNotIn
checks are vacuous for span_assurance_tier because the portable retriever's
PRESENTATION_FIELD_TYPES allowlist (deliberately) omits the field and silently
drops it at parse time. Pin both layers with a raw-JSON guard over both sidecar
copies. Negative-control verified: a smuggled tier fails the test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs(corpus): rename the metadata backfill to ADR 0008 Phase 1 backfill

Cross-model review (gpt-5.6-sol ultra) finding, owner-adjudicated: ADR 0008
defines Phase 1 = metadata-only/no new records and Phase 2 = new witness
records + tracked corpus bump, so calling these metadata-only passes 'Phase 2'
contradicted the ADR. Renames the #48 entry, the already-merged #51 entry in
the Unreleased section, and the test comment. PR titles updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Feuer <feuer@shsl.world>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
F-e-u-e-r pushed a commit that referenced this pull request Jul 15, 2026
…cency with #51/#48; adopt Phase 1 backfill naming)

Conflict resolution keeps both sides (main first, PR second) in CHANGELOG.md
and tests/test_corpus_curation.py, and renames this PR's entry + test comment
per the owner-adjudicated ADR 0008 phase-label finding. Verified on the merged
tree: 442 passed / 1 skipped, ruff clean, fixtures OK, sidecars byte-identical,
and all 8 committed benchmark reports regenerate byte-identically (JSON) /
identically sans machine-specific timing lines (MD).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
F-e-u-e-r pushed a commit that referenced this pull request Jul 15, 2026
…fix stale prose per review)

Keeps both sides (main first) in CHANGELOG.md and tests/test_corpus_curation.py.
Review-driven fixes folded in per the round-A dispositions: Phase 1 backfill
naming; the CHANGELOG count wording now states 12 lexical / 13 bm25 (set by the
Christianity backfill; corpus_family is not report-counted); the stale 'no
sidecar disclosure' prose about the 6th Qur'an record now points at the #51
interpretation_only decision, and the test additionally pins that the untagged
record IS that cue (assertIs interpretation_only True).

Verified on the merged tree: 443 passed / 1 skipped, ruff clean, fixtures OK,
sidecars byte-identical, baseline + bm25 reports regenerate byte-identically.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
F-e-u-e-r added a commit that referenced this pull request Jul 16, 2026
The Unreleased/Added section skipped from #51 straight to the corpus
Phase 1 backfill entries; the security (#52/#53), safety-routing
(#54/#55 ADR 0009, #56 ADR 0010), and observability (#57) work had no
entries. Backfills all six in merge order, style-matched to the
surrounding entries, content distilled from the merged PRs.

Co-authored-by: Feuer <feuer@shsl.world>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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