feat(coherence): grounded-open hedge arm — serve pack surfaces honestly hedged instead of over-refusing (T13 dec. 2, ADR-0254) #103

Merged
core-labs merged 1 commit from feat/grounded-open-geometry-hedge-arm into main 2026-07-23 13:56:51 +00:00
Owner

Weekly-audit 2026-07-22, T13 decision (2) ruling (Shay). Its own dedicated PR, as ruled — deliberately separate from the telemetry PR (#101) and the infra PR (#102).

Problem — a false refusal

The Shadow Coherence Gate (resolve_surface) hard-refused any open-geometry surface, even when the surface was pack-grounded and the openness was a geometric-coherence residual the pack never claimed to certify. The warmed "What is doubt?" case:

  • Pack surface: To doubt means to think maybe not. pack-grounded (en_core_meta_v1).
  • Was served: I cannot certify an answer: the geometric coherence contract is open (goldtether_residual).

The pack surface stands on its curated textual provenance; an open geometric residual says the field didn't close, not that the pack answer is wrong.

Fix — fix the reading, not the question

Route open-geometry-but-pack-grounded surfaces to a hedge arm (authoritative=False), discriminated purely by grounding provenance (structural), never by question type. The query-type "definitional/epistemic" classifier bypass was rejected as a fail-open cue-table (ADR-0252 / INV-34).

The decision lives strictly inside the gate (single source of truth). Authorized predicate:

open_conjugate ∧ pack_grounded ∧ ¬hazard → hedge_arm

realized structurally:

  • pack_groundedgrounding_provenance ∈ {pack, teaching} (mirrors chat.runtime's existing "grounded" test).
  • ¬hazard — enforced by a residual allowlist, not hazard-emptiness. Hedge iff every open token ∈ {versor_condition, goldtether_residual}.

⚠️ Correctness pivot worth a reviewer's eye

goldtether_residual — the actual token behind the refusal — is classified in code as an unresolved_hazard, not a missing_binding. A naive "unresolved_hazards empty → hedge" would have kept refusing the exact target case. So ¬hazard is a geometric-residual allowlist: any unrecognized open token (where a genuine safety/harm/imperative hazard would land), non-pack grounding, or a None assessment → unchanged hard refusal. Verified: the only ContractAssessment reaching the gate (pipeline.py:416) carries only geometric tokens; real safety/harm hazards ride separate axes (SafetyVerdict refusal, logos-morph override) that supersede this surface downstream.

Changes

  • core/cognition/surface_resolution.py — the gate branch + helpers; new authority tag grounded_open_hedge, hedged=True, walk/compose folds suppressed. Callers that omit grounding_provenance get the historical hard refusal (back-compat).
  • core/cognition/pipeline.py — thread grounding provenance into resolve_surface (read once at the gate seam, reused for the OOV telemetry; +7 lines).
  • docs/adr/ADR-0254 — the serving-physics decision + fail-closed argument (Proposed; predicate pre-authorized by your ruling).
  • tests/test_grounded_open_hedge_arm.py — RED→GREEN unit suite + real-data warmed-session integration.

Deferred (deliberate)

Unifying the hedge marker with the ADR-0038 manifold preferred_hedge_soft vocabulary — that is a separate ethics-commitment-driven mechanism; committing hedge vocabulary now would be premature (defer substrate-vocab commitment). Noted in ADR-0254.

[Verification]

  • hedge suite 15 passed (13 unit + 2 real-data)
  • warmed_session lane pin + architectural invariants (incl. INV-34) 85 passed (155.8s)
  • GSM8K wrong=0 preserved — 16 passed, 3 skipped (closed-geometry certified math path untouched)
  • pre-push gate fired live on push: smoke 180 passed (130.1s) + warmed_session lane 10 passed (138.3s) → gate PASSED

Base 19847f90, head bc838bd1. Merge on your authorization (no-merge-automation).

Weekly-audit 2026-07-22, **T13 decision (2)** ruling (Shay). Its own dedicated PR, as ruled — deliberately separate from the telemetry PR (#101) and the infra PR (#102). ## Problem — a false refusal The Shadow Coherence Gate (`resolve_surface`) hard-refused *any* open-geometry surface, even when the surface was **pack-grounded** and the openness was a geometric-coherence residual the pack never claimed to certify. The warmed `"What is doubt?"` case: - **Pack surface:** `To doubt means to think maybe not. pack-grounded (en_core_meta_v1).` - **Was served:** `I cannot certify an answer: the geometric coherence contract is open (goldtether_residual).` The pack surface stands on its curated textual provenance; an open geometric residual says the *field* didn't close, not that the *pack answer* is wrong. ## Fix — fix the reading, not the question Route open-geometry-but-**pack-grounded** surfaces to a **hedge arm** (`authoritative=False`), discriminated **purely by grounding provenance** (structural), never by question type. The query-type "definitional/epistemic" classifier bypass was **rejected** as a fail-open cue-table (ADR-0252 / INV-34). The decision lives **strictly inside the gate** (single source of truth). Authorized predicate: ``` open_conjugate ∧ pack_grounded ∧ ¬hazard → hedge_arm ``` realized structurally: - **`pack_grounded`** — `grounding_provenance ∈ {pack, teaching}` (mirrors `chat.runtime`'s existing "grounded" test). - **`¬hazard`** — enforced by a **residual allowlist**, not hazard-emptiness. Hedge iff *every* open token ∈ `{versor_condition, goldtether_residual}`. ### ⚠️ Correctness pivot worth a reviewer's eye `goldtether_residual` — the actual token behind the refusal — is classified in code as an `unresolved_hazard`, not a `missing_binding`. A naive *"`unresolved_hazards` empty → hedge"* would have **kept refusing the exact target case**. So `¬hazard` is a **geometric-residual allowlist**: any *unrecognized* open token (where a genuine safety/harm/imperative hazard would land), non-pack grounding, or a `None` assessment → **unchanged hard refusal**. Verified: the only `ContractAssessment` reaching the gate (`pipeline.py:416`) carries *only* geometric tokens; real safety/harm hazards ride separate axes (`SafetyVerdict` refusal, logos-morph override) that supersede this surface downstream. ## Changes - **`core/cognition/surface_resolution.py`** — the gate branch + helpers; new authority tag `grounded_open_hedge`, `hedged=True`, walk/compose folds suppressed. Callers that omit `grounding_provenance` get the historical hard refusal (back-compat). - **`core/cognition/pipeline.py`** — thread grounding provenance into `resolve_surface` (read once at the gate seam, reused for the OOV telemetry; +7 lines). - **`docs/adr/ADR-0254`** — the serving-physics decision + fail-closed argument (Proposed; predicate pre-authorized by your ruling). - **`tests/test_grounded_open_hedge_arm.py`** — RED→GREEN unit suite + real-data warmed-session integration. ## Deferred (deliberate) Unifying the hedge marker with the **ADR-0038** manifold `preferred_hedge_soft` vocabulary — that is a separate *ethics-commitment-driven* mechanism; committing hedge vocabulary now would be premature (defer substrate-vocab commitment). Noted in ADR-0254. ## [Verification] - hedge suite **15 passed** (13 unit + 2 real-data) - warmed_session lane pin + architectural invariants (incl. INV-34) **85 passed** (155.8s) - **GSM8K `wrong=0` preserved** — 16 passed, 3 skipped (closed-geometry certified math path untouched) - pre-push gate fired live on push: smoke **180 passed** (130.1s) + warmed_session lane **10 passed** (138.3s) → gate PASSED Base `19847f90`, head `bc838bd1`. Merge on your authorization (no-merge-automation).
core-labs added 1 commit 2026-07-23 08:33:40 +00:00
Weekly-audit 2026-07-22, T13 decision (2) ruling (Shay). The Shadow Coherence
Gate hard-refused open-geometry surfaces even when the surface was pack-grounded
and the openness was a geometric-coherence residual the pack never claimed to
certify — a false refusal (the warmed "What is doubt?" case:
"To doubt means to think maybe not. pack-grounded (en_core_meta_v1)." was
replaced by "I cannot certify an answer: ... contract is open (goldtether_residual).").

Fix the reading, not the question: route open-geometry-but-pack-grounded
surfaces to a hedge arm (authoritative=False), discriminated purely by grounding
provenance (structural), never by question type. The query-type classifier
bypass was rejected as a fail-open cue-table (ADR-0252 / INV-34).

- core/cognition/surface_resolution.py: the decision lives INSIDE the gate.
  Predicate: pack_grounded (grounding_provenance in {pack, teaching}) AND every
  open token in {versor_condition, goldtether_residual}. The ¬hazard clause is
  enforced structurally by that residual allowlist — any unrecognized open token
  (where a genuine safety/harm/imperative hazard lands), non-pack grounding, or a
  None assessment falls through to the unchanged fail-closed refusal. New
  authority tag grounded_open_hedge; hedged=True; walk/compose folds suppressed.
- core/cognition/pipeline.py: thread grounding provenance into resolve_surface
  (read once at the gate seam, reused for the OOV telemetry).
- docs/adr/ADR-0254: the serving-physics decision + fail-closed argument.
- tests/test_grounded_open_hedge_arm.py: RED->GREEN unit suite + real-data
  warmed-session integration.

Genuine safety/harm hazards are unaffected: they ride separate axes
(SafetyVerdict refusal, logos-morph override) that supersede this surface.

[Verification]: hedge suite 15 passed; warmed_session lane pin + architectural
invariants 85 passed (155.8s); GSM8K wrong=0 preserved (16 passed, 3 skipped);
smoke 180 passed (131.65s), exit 0. worktree core-wt-hedge @ base 19847f90.
core-labs merged commit da3447e95c into main 2026-07-23 13:56:51 +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#103
No description provided.