core/docs/adr/ADR-0123a-inference-shape-synonym.md
Shay 54e6bfc0d0
docs: reorganize docs landscape
Implements the 4-phase documentation reorganization master plan.

- Consolidation: Merged brief/, handoff/, planning/, and decisions/ into briefs/, handoffs/, plans/, and adr/ respectively (101 ADRs relocated)
- Root Cleanup: Relocated HANDOFF-gpt55-*.md and key top-level docs (runtime_contracts.md, etc.) to canonical folders. Added superseded alerts.
- Indices & Navigation: Created docs/README.md navigation document, docs/sessions/README.md index, docs/adr/README.md index
- Note: Also includes prior commit adding ADR-0200+ corpus hygiene governance (ADR-0225, dependency map, backfilled cross-references)
2026-06-30 16:59:36 -07:00

2.6 KiB

ADR-0123a — all_three_pass_rate Synonym in inference_shape (ADR-0109 Amendment)

Status: Accepted Date: 2026-05-22 Author: CORE agents + reviewers Amends: ADR-0109 Depends on: ADR-0109, ADR-0123, ADR-0124


Context

Under ADR-0109, threshold verification rules are lane-shape-aware. ADR-0123 re-mapped the symbolic_logic lane to inference_shape because it emits inference-style metrics.

However, the inference_shape checker (_check_inference_shape) was written expecting the exact metric key all_pass_rate. The symbolic_logic lane actually emits all_three_pass_rate instead of all_pass_rate. This metric mismatch caused evaluation to fail closed.

A widening bridge was implemented in ADR-0124 to accept all_three_pass_rate as a synonym for all_pass_rate. This amendment formally documents this contract widening and codifies the synonym precedence rules.


Decision

Document and verify the synonym behavior within the inference_shape checker in core/capability/expert_demo.py.

The inference_shape checker accepts either all_pass_rate or all_three_pass_rate as the load-bearing pass-rate metric.

Precedence Rules

If both metric keys are present in the results payload:

  1. The primary key all_pass_rate takes precedence.
  2. The check evaluates the value of all_pass_rate, ignoring the value of all_three_pass_rate.

The threshold (ALL_PASS_RATE_MIN = 0.95) applies to whichever key is active.


Invariants

no_unregistered_synonyms

Only all_pass_rate and all_three_pass_rate are recognized as pass-rate keys under inference_shape. Any third synonym key (e.g. foo_bar_rate) is refused, causing the gate to fail closed.


Acceptance Evidence

Accepted when:

  • A unit test class TestInferenceShapeAcceptsSynonyms in tests/test_lane_shape_thresholds.py asserts that:
    • _check_inference_shape successfully accepts all_three_pass_rate alone.
    • _check_inference_shape successfully accepts all_pass_rate alone.
    • Any third synonym is rejected.
    • When both are present, all_pass_rate has precedence (e.g., if all_pass_rate is below threshold and all_three_pass_rate is 1.0, the check fails).

Consequences

  • The inference_shape is now a 2-key synonym shape, making future lanes that produce either key eligible without further changes.
  • The gate remains secure against unregistered synonyms.

Out of scope

  • Introducing any new shapes or new checkers.
  • Changing threshold values.
  • Modifying threshold rules of other shapes.