Skip to content

The health line counts every stop class from the one EmissionStop classification - #5616

Merged
joelteply merged 5 commits into
canaryfrom
cormac/stops-from-one-classification
Oct 31, 2026
Merged

joelteply merged 5 commits into
canaryfrom
cormac/stops-from-one-classification

Conversation

@joelteply

@joelteply joelteply commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The health line counts every stop class from the one EmissionStop classification

Aris's three 963-token cuts inside thinking on the M5 (2026-10-30, build
b7879d8, evidence ~/.continuum/evidence/2026-10-30-think-cuts/) read
"think-only 0" on the hour line. health_ledger::note_think_only() ran only where
a generation ENDED inside its reasoning (contribute.rs ~887); a length cut with
reasoning returns earlier through the thought_cut branch and a length cut in the
answer through truncated_not_an_answer, so neither was ever counted. The
classification also sat inside if let Some(reg) = &self.working_set, so a
generation without a working set was never classified at all.

  • continuum-vitals: Stop {Landed, ThinkEnded, CutAnswer, CutThink, ThinkBudget},
    one StopCounters per ledger fed only by note_stop, its own reader
    (snapshot_stops_and_reset, read_stops) per the ledger's no-wider-tuple rule;
    think_only is gone from the ledger, the positional tuple and CitizenHealth.
  • continuum-cognition: EmissionStop::counted maps the four classifier verdicts
    (a Landed turn with reasoning and no answer is ThinkEnded) with an exhaustive
    match beside the enum; contribute.rs classifies every completed generation once,
    before any branch and outside the working-set guard, counts it there, and the
    scattered note_think_only call is deleted.
  • continuum-core: the hour line, the citizen.health.hour probe and the
    health-read JSON report every stop class ("stops": {...}); no other consumer
    reads think_only (git grep).

Tests: every_stop_class_is_counted_once_in_its_own_counter,
a_snapshot_without_reset_keeps_the_hour_and_the_tick_starts_the_next_at_zero
(vitals); a_length_cut_inside_reasoning_is_counted_as_a_cut_think drives a
Length + reasoning-only response through contribute() with no working set and
fails with the note_stop call removed (mutation); the citizen_health line tests
rewritten to the stop terms. Agreed in #continuum-dev (Fable; Codex b492dbb7).

Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Measured

  • Source and tests, not deployed. Local tests at 4ff0ef7 on enrico: continuum-vitals health_ledger 2/2, continuum-cognition working_set+verdict 53/53 plus the new cut-think test, continuum-core citizen_health 11/11.
  • Owed after deploy. On the first node deploy carrying this (the M5 round, owner Fable), the hour line must show cut-think > 0 for the 963-token cuts on Aris's build, against the 10-30 baseline of think-only 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…ssification

Aris's three 963-token cuts inside thinking on the M5 (2026-10-30, build
b7879d8, evidence ~/.continuum/evidence/2026-10-30-think-cuts/) read
"think-only 0" on the hour line. health_ledger::note_think_only() ran only where
a generation ENDED inside its reasoning (contribute.rs ~887); a length cut with
reasoning returns earlier through the thought_cut branch and a length cut in the
answer through truncated_not_an_answer, so neither was ever counted. The
classification also sat inside `if let Some(reg) = &self.working_set`, so a
generation without a working set was never classified at all.

- continuum-vitals: Stop {Landed, ThinkEnded, CutAnswer, CutThink, ThinkBudget},
  one StopCounters per ledger fed only by note_stop, its own reader
  (snapshot_stops_and_reset, read_stops) per the ledger's no-wider-tuple rule;
  think_only is gone from the ledger, the positional tuple and CitizenHealth.
- continuum-cognition: EmissionStop::counted maps the four classifier verdicts
  (a Landed turn with reasoning and no answer is ThinkEnded) with an exhaustive
  match beside the enum; contribute.rs classifies every completed generation once,
  before any branch and outside the working-set guard, counts it there, and the
  scattered note_think_only call is deleted.
- continuum-core: the hour line, the citizen.health.hour probe and the
  health-read JSON report every stop class ("stops": {...}); no other consumer
  reads think_only (git grep).

Tests: every_stop_class_is_counted_once_in_its_own_counter,
a_snapshot_without_reset_keeps_the_hour_and_the_tick_starts_the_next_at_zero
(vitals); a_length_cut_inside_reasoning_is_counted_as_a_cut_think drives a
Length + reasoning-only response through contribute() with no working set and
fails with the note_stop call removed (mutation); the citizen_health line tests
rewritten to the stop terms. Agreed in #continuum-dev (Fable; Codex b492dbb7).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE (Fable) at exact 4ff0ef7. Verified exactly-once by reading the PR's contribute.rs: between Ok(response) and note_stop (line 477) the only early return is response.generation_error() (line 400), an errored generation the health line already counts as dropped, so every completed generation is classified and counted once; the old note_think_only at ~887 is deleted; the regression test drives a length cut inside reasoning with no working set. Two notes, non-blocking, fix here or card: (1) Landed with 0 answer and 0 reasoning tokens maps to Landed; an empty generation is its own outcome (it said and did nothing), worth a class or a typed outcome so it is not read as work; (2) say in Stop's doc that an errored generation is counted in generations_dropped, not here, so a reader of the line knows where it went.

…d ones go (Fable on #5616)

- Stop::Empty: a generation that landed with no answer, no call and no reasoning
  said and did nothing, so it is never read as landed work (EmissionStop::counted
  maps Landed with 0/0 to it); the hour line, the probe and the JSON carry it.
- Stop's doc: an errored generation never completed and is counted in
  generations_dropped, not as a stop.
- Test every_emission_stop_maps_to_exactly_one_counted_stop covers every
  EmissionStop variant and both Landed sub-cases.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE (Fable) at exact c7cba13, unconditional. Verified git diff 4ff0ef786 c7cba13f8: Stop::Empty for a landed generation with no answer and no reasoning, ordered after ThinkEnded (working_set.rs:388-389), carried through the counters, the line, the probe and JSON; Stop's doc says errored generations are counted in generations_dropped. Merge when CI is green.

…rs read through read_stops/snapshot_stops_and_reset (source-hygiene unwired_machinery 43 -> 42)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE (Fable) at exact 8698f4b. Verified git diff c7cba13f8 8698f4b4d: only visibility (StopCounters and the ledger's stops field crate-private); readers go through read_stops / snapshot_stops_and_reset. Merge when green.

@joelteply

Copy link
Copy Markdown
Contributor Author

Review BLOCK at exact 8698f4b (also present at c7cba13).

P2: contribute.rs counts the stop after send_read_receipt(ws).await (lines416,477). Cancellation during the read receipt loses the terminal count for a generation that already completed and disarmed its drop witness. Classify/count before post-generation awaits and add a suspended-receipt cancellation test.

P2: working_set.rs counted() uses measured token counts as presence (lines386-387). The supported OpenAI stream without usage returns zero counts despite nonempty reasoning or answer content; this is now classified Empty. Determine terminal class from channel presence/typed outcome independently of optional token usage. Test both reasoning-only and answer-only no-usage responses.

Source review only; no local build. Latest visibility-only change does not address either finding.

…ponse carries (Codex on #5616)

- Counted right after the generation loop, before send_read_receipt's await: a
  turn cancelled while its receipt is suspended no longer loses the stop of a
  generation that already completed.
- The class comes from presence, not token usage: counted_stop(length cut,
  think-budget hit, answered, reasoned), where answered = trimmed text or a call
  (content tool-use or native tool_calls) and reasoned = non-blank reasoning. A
  stream that reports no usage is no longer read as empty. EmissionStop::counted
  (token-based) is removed.

Tests: a_turn_cancelled_at_its_read_receipt_still_counts_its_stop (a receipt that
never returns; the turn is dropped inside it; fails with the count moved after the
await), a_response_without_usage_is_counted_by_what_it_carries (answer-only and
reasoning-only with output_tokens 0; fails with answered derived from tokens),
every_completed_generation_maps_to_exactly_one_counted_stop. Local: cognition
working_set+verdict 57/57, core citizen_health 11/11, vitals 39/39,
source-hygiene 69/69.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE (Fable) at exact d3b085b. Verified: the count is at contribute.rs:453, after the generation loop's break (view, response) (411) and before send_read_receipt(ws).await (460), so a turn cancelled at the receipt keeps its stop; counted_stop (working_set.rs:386) classifies from presence (length cut, budget hit, answered = trimmed text or a call, reasoned = non-blank reasoning), with the token-derived counted removed; the match is total and a length cut without an answer is CutThink.

…he hour line (Codex on #5616)

EmissionStop::classify now takes presence (an answer is text or a call), never the answer
token share, so a length cut carrying an answer with usage missing is a cut in the answer for
the policy and the counter alike. The hour line's Stop is EmissionStop::counted(answered,
reasoned), a projection of that one class; the standalone counted_stop is deleted. The
reasoning count stays a measurement for the think-budget hit (missing usage reads 0 and never
claims one).

Tests: the classifier test checks policy and counter class together per case; the end-to-end
no-usage test adds Codex's case (Length, answer present, usage 0 -> cut_answer). Mutation:
mapping (cut, answered) to CutMidThought fails both. continuum-cognition --lib: 949 passed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE (Fable) at exact 53bb462. Verified git diff d3b085b0f 53bb46245: one classification. EmissionStop::classify(hit_cap, answered) takes presence (trimmed text, content or a call) computed once in contribute.rs and passed to both classify_with_budget and counted; counted_stop is deleted; the hour line's Stop is a projection of the one class. The emission amounts still come from the server's count split by channel bytes, which is right: presence decides the class, measurement decides the size.

@github-actions github-actions Bot added size: XL and removed size: L labels Oct 31, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE scoped fixes at exact53bb46245aab4ea4be6a00cb941dbafecce0f710. One presence-aware EmissionStop now drives policy/probes/counter projection; independent counted_stop deleted; count precedes read-receipt await. Regression coverage addresses missing usage, receipt cancellation, and agreement between policy and counters. Prior review blockers resolved. Source review only; author-reported 949-test and mutation results not independently executed here. Exact-head CI remains merge gate.

joelteply added a commit that referenced this pull request Oct 31, 2026
…ners are callable (no stand-in policy); the solver row is cambrian-flex, the classifier row #5616's single classify; the hard events those runs must include, asserting progress and conservation from owner receipts (Codex)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 7f02511 into canary Oct 31, 2026
18 checks passed
@joelteply
joelteply deleted the cormac/stops-from-one-classification branch October 31, 2026 01:23
joelteply added a commit that referenced this pull request Oct 31, 2026
* The proving ground's harness shape (for review before code): continuum-proving crate, the world as NodeProfile data (the flow sim's M5 constants become the first profile), one EngineModel trait, discrete events, production through its seams with no copies, first slice = the think-cut known-bad failing and option C passing

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Harness shape: admission and residency are unavailable until their owners are callable (no stand-in policy); the solver row is cambrian-flex, the classifier row #5616's single classify; the hard events those runs must include, asserting progress and conservation from owner receipts (Codex)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Harness shape: node capacity is measured input (slice 2's observation); allocation decisions are the ResourceDaemon's through cambrian-flex (Codex)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant