E1/R7 assertion spec + arc status after Phases A and B (closes the Opus share) #118

Merged
core-labs merged 1 commit from docs/e1-r7-assertion-spec into main 2026-07-25 23:29:22 +00:00
Owner

Closes the Opus share of the curriculum-license-loop arc. Docs only — no production code. Independent of #116/#117, so it can merge in any order relative to them.

1. E1-R7-ASSERTION-SPEC.md — the Opus half of Phase E1

The code move was already specified by runtime_contracts.md ("defer the single sink emission to the pipeline serve boundary"). What to assert was not — and the default sink is None, so nothing exercises this path. A wrong move is silent, which is why the assertions are written before any code moves. This is also the seam that regressed silently for two days in the #96 register-axis incident.

Eight invariants (I1–I8) plus three mechanism rulings. The rulings are the value, and each prevents a specific silent failure:

  • M1 — stage a turn_log INDEX, not a captured TurnEvent. A captured object is the pre-override snapshot, i.e. the defect with extra steps. Re-reading turn_log at flush time picks up both back-stamps for free and cannot go stale.
  • M2 — attach_telemetry_sink must NOT flush a staged turn event. This is the opposite of what it correctly does for _pending_reboot_payload (chat/runtime.py:1488), and the asymmetry is load-bearing: the reboot payload is final when buffered, a turn event is mid-flight. Flushing on attach would emit the pre-override event and silently restore R7. Anyone mirroring the existing pattern without this ruling would reintroduce the bug while believing they had followed precedent.
  • M3 — the runtime cannot detect whether a pipeline will run, because CognitiveTurnPipeline wraps the runtime rather than the reverse. So deferral must be explicit opt-in, and the no-pipeline path (used by eval and demo code) must stay byte-identical.

Plus I5 (exception safety — a pipeline raising after chat() must not swallow the record), I6 (stream order vs _emit_correction_event, which emits at :3255 then calls chat() at :3259), and I3 (verify trace_hash by replay, never by recomputing from the record — the contract says recomputation is unsupported and correct to be so).

All ten source citations verified against HEAD.

2. Plan of record — AMENDED with four falsified premises

Original text preserved; an AMENDED block at the top supersedes it.

# Premise What Phases A/B found
1 first target = physics · modal ceiling 480 < 657, impossible; 8 of 11 bands can't reach 657. Vocabulary is the constraint, not chain count. Retarget philosophy_theology · modal
2 "the build is modest", content is the blocker MAX_PREMISE_SENTENCES = 16 caps a family at 16 chains, so §5.1's own ≈219-relation remedy collapses the band at row 17. No band can earn SERVE until compilation is query-scoped. New phase precedes all content work
3 authoring a negative yields UNKNOWN it yields a confident wrong "Yes"polarity is read by nothing, and the oracle ignores it too, so gold agrees
4 the invariant is a precaution 21 of 25 ratified deduction bands are short on distinct evidence, under a live flag

3. DIVISION-OF-WORK.md — updated for the handoff

  • §0 status table with branch names and merge order, so Sonnet can start cold without this conversation.
  • Revised order: E2 → R5–R7 → C → D → E1(code) → parity.
  • The new R5–R7 unit specified to gate level — default scope (term incidence), the narrowing fallback, the empty-scope⇒UNKNOWN rule that would otherwise flip 8,463 of 8,520 questions from unknown to declined, and why this is verdict-identical rather than the ADR-0261 §5.1 premise-dropping sin.
  • A standing "do not fix" on the deduction exposure: if a unit makes tests/test_volume_honesty.py fail, report it — do not update the inventory to match.

One correction to my own earlier text in this file. §4 told Phase C to mirror the deduction producer "exactly". That would replicate the padding — a flat CASES_PER_BAND = 720 cycling a 28-instance space. Phase C now points at the estimation producer instead (660 distinct, zero repeats) and must register in AUDIT_SOURCES.

[Verification]: uv sync --locked on canonical CPython 3.12.13; in-worktree smoke 555 passed, deductive 285 passed. This branch is off main and carries neither ADR-0264 nor the Phase B tests, so 555 is the correct baseline here — not the 569 that holds on the stacked #116/#117 branches.

Closes the Opus share of the curriculum-license-loop arc. **Docs only** — no production code. Independent of #116/#117, so it can merge in any order relative to them. ## 1. `E1-R7-ASSERTION-SPEC.md` — the Opus half of Phase E1 The code move was already specified by `runtime_contracts.md` (*"defer the single sink emission to the pipeline serve boundary"*). What to **assert** was not — and the default sink is `None`, so nothing exercises this path. A wrong move is silent, which is why the assertions are written before any code moves. This is also the seam that regressed silently for two days in the #96 register-axis incident. Eight invariants (I1–I8) plus three mechanism rulings. **The rulings are the value**, and each prevents a specific silent failure: - **M1 — stage a `turn_log` INDEX, not a captured `TurnEvent`.** A captured object is the pre-override snapshot, i.e. the defect with extra steps. Re-reading `turn_log` at flush time picks up both back-stamps for free and cannot go stale. - **M2 — `attach_telemetry_sink` must NOT flush a staged turn event.** This is the *opposite* of what it correctly does for `_pending_reboot_payload` (`chat/runtime.py:1488`), and the asymmetry is load-bearing: the reboot payload is final when buffered, a turn event is mid-flight. Flushing on attach would emit the pre-override event and **silently restore R7**. Anyone mirroring the existing pattern without this ruling would reintroduce the bug while believing they had followed precedent. - **M3 — the runtime cannot detect whether a pipeline will run**, because `CognitiveTurnPipeline` wraps the runtime rather than the reverse. So deferral must be explicit opt-in, and the no-pipeline path (used by eval and demo code) must stay byte-identical. Plus I5 (exception safety — a pipeline raising after `chat()` must not swallow the record), I6 (stream order vs `_emit_correction_event`, which emits at `:3255` then calls `chat()` at `:3259`), and I3 (verify `trace_hash` by **replay**, never by recomputing from the record — the contract says recomputation is unsupported *and correct to be so*). All ten source citations verified against HEAD. ## 2. Plan of record — AMENDED with four falsified premises Original text preserved; an `AMENDED` block at the top supersedes it. | # | Premise | What Phases A/B found | |---|---|---| | 1 | first target = `physics · modal` | ceiling **480 < 657**, impossible; 8 of 11 bands can't reach 657. Vocabulary is the constraint, not chain count. Retarget `philosophy_theology · modal` | | 2 | "the build is modest", content is the blocker | `MAX_PREMISE_SENTENCES = 16` caps a family at 16 chains, so §5.1's own ≈219-relation remedy collapses the band at row 17. **No band can earn SERVE until compilation is query-scoped.** New phase precedes all content work | | 3 | authoring a negative yields UNKNOWN | it yields a confident wrong **"Yes"** — `polarity` is read by nothing, and the oracle ignores it too, so gold agrees | | 4 | the invariant is a precaution | 21 of 25 **ratified** deduction bands are short on distinct evidence, under a live flag | ## 3. `DIVISION-OF-WORK.md` — updated for the handoff - **§0 status table** with branch names and merge order, so Sonnet can start cold without this conversation. - **Revised order: E2 → R5–R7 → C → D → E1(code) → parity.** - The new **R5–R7 unit specified to gate level** — default scope (term incidence), the narrowing fallback, the empty-scope⇒UNKNOWN rule that would otherwise flip 8,463 of 8,520 questions from `unknown` to `declined`, and why this is verdict-*identical* rather than the ADR-0261 §5.1 premise-dropping sin. - A standing **"do not fix"** on the deduction exposure: if a unit makes `tests/test_volume_honesty.py` fail, report it — do not update the inventory to match. **One correction to my own earlier text in this file.** §4 told Phase C to mirror the deduction producer *"exactly"*. That would replicate the padding — a flat `CASES_PER_BAND = 720` cycling a 28-instance space. Phase C now points at the **`estimation`** producer instead (660 distinct, zero repeats) and must register in `AUDIT_SOURCES`. [Verification]: `uv sync --locked` on canonical CPython 3.12.13; in-worktree smoke **555 passed**, deductive **285 passed**. This branch is off `main` and carries neither ADR-0264 nor the Phase B tests, so 555 is the correct baseline here — not the 569 that holds on the stacked #116/#117 branches.
core-labs added 1 commit 2026-07-25 23:20:25 +00:00
Closes the Opus share of the curriculum-license-loop arc. Three deliverables,
all docs -- no production code.

1. E1-R7-ASSERTION-SPEC.md -- the Opus half of Phase E1. The code move was
   already specified by runtime_contracts.md ("defer the single sink emission
   to the pipeline serve boundary"); what to ASSERT was not, and the default
   sink is None, so nothing exercises the path. Eight invariants (I1-I8) plus
   three mechanism rulings (M1-M3), each with the silent failure it prevents.

   The three mechanism rulings are the value. M1: stage a turn_log INDEX, not
   a captured TurnEvent -- a captured copy is the pre-override snapshot, i.e.
   the defect with extra steps. M2: attach_telemetry_sink must NOT flush a
   staged turn event, which is the OPPOSITE of what it correctly does for
   _pending_reboot_payload; the reboot payload is final when buffered, a turn
   event is mid-flight, and flushing on attach would silently restore R7. M3:
   the runtime cannot detect whether a pipeline will run (the pipeline wraps
   the runtime), so deferral must be explicit opt-in and the no-pipeline path
   must stay byte-identical.

   All ten source citations verified against HEAD.

2. Plan of record AMENDED with four falsified premises from Phases A/B, with
   the original text preserved:
   - physics·modal was the wrong first target -- its ceiling is 480 against a
     657 threshold, and 8 of 11 bands cannot reach 657 at all. Vocabulary is
     the constraint, not chain count. Retarget: philosophy_theology·modal.
   - MAX_PREMISE_SENTENCES=16 caps a family at 16 chains, so ADR-0262 §5.1's
     own remedy (~219 relations) collapses the band at row 17. No curriculum
     band can earn SERVE until premise compilation is query-scoped. New
     implementation phase precedes ALL content work.
   - authoring a negative today serves a confident wrong "Yes", not UNKNOWN.
   - 21 of 25 ratified deduction bands are short on distinct evidence.

3. DIVISION-OF-WORK updated for the handoff: §0 status table with branch names
   and merge order, the revised order (E2 -> R5-R7 -> C -> D -> E1(code) ->
   parity), the new R5-R7 unit specified to gate-level detail, and a standing
   "do not fix" on the deduction ledger exposure.

   One correction to my own earlier text: §4 told Phase C to mirror the
   deduction producer "exactly". That would replicate the padding -- a flat
   CASES_PER_BAND=720 cycling a 28-instance space. Phase C now points at the
   `estimation` producer instead (660 distinct, zero repeats), and must
   register in AUDIT_SOURCES.

[Verification]: uv sync --locked on canonical CPython 3.12.13; in-worktree
smoke 555 passed, deductive 285 passed (this branch is off main and carries
neither ADR-0264 nor the Phase B tests, so 555 is the correct baseline here,
not the 569 that holds on the stacked A+B branches).
core-labs merged commit bc8276d693 into main 2026-07-25 23:29:22 +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#118
No description provided.