core/core/capability
Shay dec98ea0d0
feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195)
Bundles the three pieces needed to consummate the promotion after
the reviewer signature lands:

  1. Wire the expert tier in the capability ledger
  2. Path-stability fix (digest filesystem-independence)
  3. Reviewer-registry allow-list extension (regression fix for #194)

Result: mathematics_logic is now the first expert-tier domain in
the capability ledger.

  $ ledger_report() -> mathematics_logic row:
      status:    "expert"
      predicates: { seeded, grounded, reasoning_capable,
                    audit_passed, expert: True }
      expert_reason: "ADR-0120-math composer admitted"

1. Ledger wiring (core/capability/reporting.py):
   - _EXPERT_DOMAIN_STATUSES extends to 6 tiers with "expert"
     after "audit-passed" (strict super-tier).
   - New _EXPERT_COMPOSERS dict — per-domain registry of composer
     module names. Currently only mathematics_logic ->
     core.capability.expert_promotion_math.
   - New `expert` predicate computation gated on audit_passed;
     calls registered composer's evaluate_math_expert_promotion()
     and reads promote_admitted as the verdict. Fail-closed on
     exception or missing composer.
   - status = "expert" when predicate True.
   - predicates dict gains "expert" key; row gains expert_reason.

2. Path-stability fix (composite_math_gate.py + expert_promotion_math.py):
   - New _rel(path) helpers return repo-root-relative POSIX
     strings instead of str(absolute_path).
   - claim_digest now commits to relative paths, so operator A
     on ~/work/core and operator B on /srv/checkouts/core compute
     the SAME digest for identical evidence.
   - Without this fix no signature would ever match across
     filesystems — a real bug that would have blocked every
     signing attempt.

3. Allow-list regression fix (core/capability/reviewers.py):
   - ALLOWED_TOP_LEVEL_KEYS extended with "math_expert_claims".
   - PR #194 added the section to docs/reviewers.yaml but didn't
     extend the allow-list, silently breaking the audit_passed
     predicate for ALL 3 prior domains (loader rejected the file).
     This PR's test_allowed_top_level_keys_includes_math_expert_claims
     regression-pins the fix.

Reviewer signature (operator-only action by shay-j) carried in
docs/reviewers.yaml:
  math_expert_claims:
    - domain_id: mathematics_logic
      signed_by: shay-j
      claim_digest: "94149794e8c19896851e062cf1f921cfa9ba04770b674bc3b4c33023f7c7331b"

The auto-mode safeguard correctly blocked the agent from self-
signing during PR construction; the signature was performed by the
reviewer directly and brought into this PR. Future signatures stay
human-only.

Tests: 12/12 new ledger-flip tests + 174/174 across full obligation
auditor / composer / composite-gate / expert-demo / reviewer-registry
regression. Updated #194's awaiting-state snapshot to reflect the new
promote_admitted=True state on main.

GSM8K (honest disclosure, not gating): still 0/50 admission, wrong=0,
safety_rail_intact=True, substrate=candidate_graph. Probe lift is
future work (bounded pronoun coref is the highest-leverage item —
~28% of refusals route through it). The promotion does not depend
on GSM8K per ADR-0131.
2026-05-23 18:55:34 -07:00
..
__init__.py feat(capability): implement ADR-0093 — Domain Pack Contract v1 wired in 2026-05-21 18:33:23 -07:00
adversarial.py feat(ADR-0114a.8): adversarial auditor — Obligation #8 wired, PASSING; surfaces 2 known parser-layer gaps (#192) 2026-05-23 16:11:37 -07:00
composite_math_gate.py feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
depth_curve.py feat(ADR-0114a.6): depth-curve auditor — Obligation #6 wired for B3 (assertion holds, coverage gap named) (#190) 2026-05-23 16:19:58 -07:00
domain_contract_predicates.py feat(packs): implement ADR-0097 — Mathematics-Logic Reasoning-Capable 2026-05-21 18:51:58 -07:00
domains.py Add chain-first capability ledger and domain seeds (#97) 2026-05-20 21:33:24 -07:00
expert_demo.py feat: ADR-0119.8 — gsm8k_math overall lane gate (gsm8k_capability_shape) 2026-05-22 19:45:44 -07:00
expert_promotion_math.py feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
ood_ratio.py feat(ADR-0114a.2): OOD-ratio auditor — Obligation #2 wired for B3, ratio=1.00 (#193) 2026-05-23 16:25:28 -07:00
pack_provenance.py feat(ADR-0114a.10): pack-provenance auditor — Obligation #10 wired for B3, PASSING 2026-05-23 15:44:53 -07:00
perturbation_b3.py feat(ADR-0114a.5): reasoning-isolation perturbation suite — Obligation #5 wired for B3, PASSING 130/130 preserving, 68/68 breaking (#191) 2026-05-23 16:07:59 -07:00
README.md feat: ADR-0113 rename expert-demoaudit-passed; reserve expert namespace (ADR-0114 GSM8K roadmap) 2026-05-22 15:36:10 -07:00
reporting.py feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
reviewers.py feat(ADR-0120 math, ledger flip): mathematics_logic → expert tier (first-ever) (#195) 2026-05-23 18:55:34 -07:00
sources.py Add chain-first capability ledger and domain seeds (#97) 2026-05-20 21:33:24 -07:00

Capability Reports

Phase A-C adds read-only capability reports. These commands do not mutate packs, execute dynamic validators, or flip dormant runtime flags.

Available commands:

  • core capability chains --json
  • core capability flags --json
  • core capability ledger --json
  • core capability artifact --lane cognition --split public --version v1 --json
  • core capability domain-contract --pack-id en_core_cognition_v1 --json
  • core capability evidence-plan --json

Day-1 output is expected to be low-status:

Domain Expected status Primary blocker
systems_software reasoning-capable audit-passed still gated by domain eval thresholds and replay/provenance evidence
mathematics_logic reasoning-capable audit-passed still gated by domain eval thresholds and replay/provenance evidence
physics reasoning-capable audit-passed still gated by domain eval thresholds and replay/provenance evidence
hebrew_greek_textual_reasoning reasoning-capable audit-passed still gated by eval thresholds and replay/provenance evidence
philosophy_theology reasoning-capable audit-passed still gated by eval thresholds and replay/provenance evidence

Status is generated from predicates. A blocked row lifts only when the named gap is closed and the next status predicate passes.