feat(cognition): fail-closed linguistic governance + trilingual constraint pipeline #96

Merged
core-labs merged 1 commit from feat/linguistic-governance-fail-closed-ir into main 2026-07-20 23:23:54 +00:00
Owner

Summary

Closes residual linguistic-governance debt on the answer-authority path and lands the typed trilingual constraint → field → articulation stack from the Linguistic Cognition dossier (without overwriting Accepted ADR-0246–0252).

  • Fail-closed types: CoherenceRefusal, ContractViolation, FieldFailure, ConstraintViolation with failure_class, violated_condition, residual_state, refusal_reason.
  • ProofTrace: ordered atoms → operators → closure; citation keys are only step_id and kind:symbol (no raw payload-value whitelist bypass).
  • Shadow Gate: contract_assessment is None or open geometry → typed abstention; no certified fluent runtime answer.
  • Semantic primitives: Entity, Quantity, Container, Event, Operator, Relation, TemporalFrame, IdentityBridge, ConservationLaw, AmbiguityManifold (+ MissingReferent).
  • Layers A/B/C: English surface candidates; Hebrew multi-class event manifold; Koine relation-time with MissingReferent (no fabricated referents).
  • Field integration: structure-sensitive Cl(4,1) embedding via embed_point + construction-closed rotors (no unitize_versor in generate/); outcomes: Coherent / Ambiguous / CoherenceRefusal.
  • Articulation firewall: claims must cite valid keys and every content token must be certified by cited steps.

Test plan

  • uv run pytest tests/test_linguistic_governance_phases.py tests/test_surface_resolution.py -q → 31 passed
  • uv run core test --suite smoke -q → 180 passed
  • E2E: Alice has 5 books. → coherent; sold 3 apples. → refusal; Alice sold Bob 3 apples. → ambiguous
  • Firewall regressions: payload-value refs ("2") and valid-ref + uncertified content → HALLUCINATED
  • Structure-sensitive embed: Alice vs Bob same counts → different fields; INV-02b unitize ban green

Residual debt

Full HE event lexicon / full Koine coverage beyond Phase-4 fixtures; legacy math/meaning_graph IR not yet unified under core.semantic_primitives; no new ADR (avoid 0246–0252 collision).

[Verification]: Smoke suite passed locally (~138s, 180 passed); governance unit suite 31 passed.

## Summary Closes residual linguistic-governance debt on the answer-authority path and lands the typed trilingual constraint → field → articulation stack from the Linguistic Cognition dossier (without overwriting Accepted ADR-0246–0252). - **Fail-closed types:** `CoherenceRefusal`, `ContractViolation`, `FieldFailure`, `ConstraintViolation` with `failure_class`, `violated_condition`, `residual_state`, `refusal_reason`. - **ProofTrace:** ordered atoms → operators → closure; citation keys are only `step_id` and `kind:symbol` (no raw payload-value whitelist bypass). - **Shadow Gate:** `contract_assessment is None` or open geometry → typed abstention; no certified fluent runtime answer. - **Semantic primitives:** Entity, Quantity, Container, Event, Operator, Relation, TemporalFrame, IdentityBridge, ConservationLaw, AmbiguityManifold (+ MissingReferent). - **Layers A/B/C:** English surface candidates; Hebrew multi-class event manifold; Koine relation-time with MissingReferent (no fabricated referents). - **Field integration:** structure-sensitive Cl(4,1) embedding via `embed_point` + construction-closed rotors (no `unitize_versor` in `generate/`); outcomes: Coherent / Ambiguous / CoherenceRefusal. - **Articulation firewall:** claims must cite valid keys **and** every content token must be certified by cited steps. ## Test plan - [x] `uv run pytest tests/test_linguistic_governance_phases.py tests/test_surface_resolution.py -q` → 31 passed - [x] `uv run core test --suite smoke -q` → 180 passed - [x] E2E: `Alice has 5 books.` → coherent; `sold 3 apples.` → refusal; `Alice sold Bob 3 apples.` → ambiguous - [x] Firewall regressions: payload-value refs (`"2"`) and valid-ref + uncertified content → HALLUCINATED - [x] Structure-sensitive embed: Alice vs Bob same counts → different fields; INV-02b unitize ban green ## Residual debt Full HE event lexicon / full Koine coverage beyond Phase-4 fixtures; legacy math/meaning_graph IR not yet unified under `core.semantic_primitives`; no new ADR (avoid 0246–0252 collision). [Verification]: Smoke suite passed locally (~138s, 180 passed); governance unit suite 31 passed.
core-labs added 1 commit 2026-07-20 23:17:13 +00:00
Close residual answer-authority debt: typed CoherenceRefusal/ContractViolation/
FieldFailure, structured ProofTrace (atoms→operators→closure), and Shadow Gate
paths that refuse certified answers when contract_assessment is None or geometry
is open. Add shared semantic primitives and Layers A/B/C (English/Hebrew/Koine)
as constraint producers only, with Cl(4,1) structure-sensitive embedding (no
unitize in generate/), three field outcomes, and an articulation firewall that
blocks payload-value citation bypass and uncertified content.
core-labs merged commit 25504c9d0b into main 2026-07-20 23:23:54 +00:00
core-labs deleted branch feat/linguistic-governance-fail-closed-ir 2026-07-20 23:23:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: core-labs/core#96
No description provided.