Skip to content

O5 on the phase-D cumulative SDK: #407 merged onto #416 + #417 (opt-in Gemma reopened thoughts) - #418

Merged
jonathan308 merged 48 commits into
mainfrom
astra/conformance-o5-v
Nov 14, 2026
Merged

jonathan308 merged 48 commits into
mainfrom
astra/conformance-o5-v

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 13, 2026 •

Copy link
Copy Markdown

Summary

#407 (O5: Gemma reopened thoughts, off by default, on with DARKBLOOM_GEMMA_REOPENED_THOUGHTS=1) on the phase-D cumulative SDK, for provider 0.10.13 phase D (provider #2116, which re-pins #2089).

Commit What
1c8168d49a Merges #407 f96a2ee5f5 onto #416 eaed116569 (#409 + #413 + #411 + #408 on main 859f641529). It adds exactly #407's lines: for each of #407's 7 files, the +/- lines are identical to #407's own diff against main. One mechanical conflict, .github/test-shards.json: #408's gemma-quoted-number-enabled and #407's gemma-reopened-thought-enabled extra groups are both kept, each as its own run (the shard tool refuses one run that mixes different env).
73dcc01913 Merges #417 e8b588dd (#416 + GLM token constraints). The phase-D SDK pin is main after #416, then #417, then #407. #417 shares no file with #407.
b7ae6040bc Review fixes (SHOULD-FIX 2 and nits 5–6, below). One enabled/disabled test case. The reference states the exact switch values, the stray-close rule, and where `<turn
16aebe836a (head) Merges #417's new head e29eeebd8e, which carries #416's new head c1f8525d04 = SDK main 4342a661ac (#414) + #416. test-shards.json takes #417's map (#414's four native shards + hosted audio shard, with #416's groups) as is, and adds #407's gemma-reopened-thought-enabled group with its own extra run in shard 2, beside gemma-quoted-number-enabled. #414's seven hosted audio tests are untouched. Against #417's head this adds exactly #407's lines plus the reviewed test case and reference text.

#416 touches none of #407's files. #408's Gemma changes are in tool-argument parsing (GemmaFunctionParser, GemmaArgumentStreamer), not in the reasoning parser.

Merge order: #416 → #417 → #418, each on green at its posted head. If the owner merges them as plain merge commits, the final main commit (F) has this head's tree. Provider #2116 pins this head and re-pins to F (gitlink only).

#407's red CI: the audio failure is pre-existing and unrelated to #407

#407's shard 10 failed AudioReaderRetryTests.swift:53. That assertion checks that the Float bit patterns of a retried decode of audio_only.mov equal those of a baseline decode. The same assertion fails on the unchanged base and predates #407:

Head What it is Run (attempt) Runner
f084cbc899 #406 PR head, 07:13Z 43384176733 (1, 2); attempt 3, hosted: the test passed Darkbloom sandbox
55078288da #406 final head; its merge is main 859f641529 43397981028 (1); attempt 2, hosted: passed Darkbloom sandbox
bb013bd81a #410: tree 712d86ab87 = main 859f641529's tree 43496480293 (job 132135430015) Darkbloom sandbox
cccf49e79b, 1e736f037b, d65ae8b61c #409, #414, #415 43491518604, 43520395494, 43520208338 Darkbloom sandbox
f96a2ee5f5 #407 43485258980 (1, 2) Darkbloom sandbox

The test's failures follow the runner class. Before #414, Fork Tests asked the Darkbloom plane only for pull requests; push and dispatch runs used GitHub-hosted xcode-27. Since 11-12 12:00Z:

  • Darkbloom sandboxes: 9 of 10 executions of this test failed. The one pass was feat(mtp): opt in to grammar-aware per-row speculation #409 894949e486.
  • Hosted xcode-27: this test never failed, and the same commits pass there: f084cbc899 (attempt 3), 55078288da (attempt 2), and main's push run 43408681875.

The hosted platform reader is not proven deterministic either. On hosted run 43515150576 (#415 at 3d6cc05e92), the diagnostic matrix test from #412 (not one of the strict tests) saw different sample-buffer partitions between two reader passes. Only the PCM values matched there.

Signature:

#407 changes Gemma text parsing only:

  • the reasoning parsers and the visibility of the tool-frame scanner
  • one test file
  • one extra test process
  • docs

It touches nothing on the AVFoundation/audio path.

Tracked separately: #414 (now on main) runs the seven strict audio tests in a hosted job, with no assertion changed. The cause in native decoding is not established. This PR changes no audio code, assertion, hash or tolerance.

Evidence: a per-job survey of every Fork Tests shard job since 11-12 12:00Z, the failing logs, and cmp.py, which reports differing indices and ULP sizes from an assertion line.

Evidence for this head

Merge Danger

Door: Two-way. Unset, or any value other than 1, keeps today's parsing. Blast radius: Gemma 4 reasoning parsing only, and only with the switch set. Merge after #416 and #417 (this PR contains both).

AI disclosure: prepared by Claude (Opus 5.5) under the repository owner's direction; #407's change is Astra's (Codex), unchanged here except the review test and docs in b7ae6040bc.

jonathan308 and others added 30 commits November 13, 2026 10:07
Add a Gemma-only regression and an isolated opt-in test process. The default process checks existing behavior. Test execution is pending the build hold.

AI-assisted: test and CI-map changes prepared with Codex.
Add a Gemma-only regression and an isolated opt-in test process. The default process checks existing behavior. Test execution is pending the build hold.

AI-assisted: test and CI-map changes prepared with Codex.
jonathan308 and others added 14 commits November 13, 2026 13:22
Composition with #409 (4A grammar-aware MTP), both opt-in:
- CBv2MTPConfig carries both constrainedSpeculation and freeSpanSpeculation.
- Planning: history eligibility admits constrained rows when grammar
  verification is on or the constraint offers free spans; drafting admits
  them when grammar verification is on or the row is in a free span.
- A row takes exactly one path per round: a row whose committed state is
  an opted-in free span keeps the pure same-state preview (masked window,
  per-token confirmation at finalize); grammar verification (retained raw
  logits, ordinary sampler per committed position) owns every other
  constrained row.
- The free-span window mask applies only when a free-span row is in the
  batch, and raw logits are retained only when a grammar-verified row is,
  so either opt-in alone behaves exactly as its own PR.
Composition: a request with a reasoning budget stays target-only. Its
guard sits in mtpHistoryEligible, which mtpBasicEligible includes, so a
budgeted row neither drafts nor keeps assistant history, exactly as on
#411 alone (where mtpBasicEligible gated both). Budgeted requests carry no
token constraint (EngineV2 refuses the pair), so they never reach grammar
verification or free spans.
test-shards.json: both new groups kept (native-reasoning-budget from
#411, gemma-quoted-number-enabled from #408), each scheduled once.
Both opt-ins on, in every verification mode: the protected-span request
decodes exactly the constrained oracle's tokens, and a mixed batch keeps
the constrained and the ordinary row equal to their non-speculative runs.
A naive composition that lets a free-span row also take grammar
verification confirms its tokens twice and fails the protected span.
The native-tracked engine refused every token constraint in
validateRequest, so a provider could not constrain a GLM-5.3-Flash answer
(a JSON response_format grammar) at all.

The GLM page-bank profiles that qualify logprob capture qualify token
constraints for the same reason: every target row samples with the
engine's ordinary sampler, which masks a constrained row as on a generic
engine, and a constrained row never drafts or verifies
(EngineLoopV2.mtpBasicEligible; grammar-aware and free-span speculation
already exclude native engines). CBv2NativeExecutionContract gains
supportsTokenConstraints (those profiles), EngineV2 acceptsTokenConstraints,
and validateRequest refuses a constraint only where neither holds. MiMo
profiles and contract-less tracked engines still refuse
(grammarOptInCannotBypassNativeContractRefusal still holds).

Tests: on the protected GLM engine a constrained row follows its
constraint (never the greedy token), proposes no draft, and the next plain
request still speculates (serial and rectangular verification); a
constrained row beside a plain row keeps both streams exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the cumulative SDK #416 (#409 + #413 + #411 + #408 on main
859f641). test-shards.json: gemma-reopened-thought-enabled kept
beside gemma-quoted-number-enabled as its own extra run in the same
shard (the shard tool refuses one run mixing different env). Every
other file merges unchanged: the merge adds exactly #407's lines.
The phase-D SDK pin is main after #416, #417 and #407. #417 is #416's
head plus two commits and shares no file with #407: clean merge, no
change to either side.
From the independent review of this change: a constraint that opts into
chained decode (the provider's JSON answers do) would chain on GLM's
protected engine, where a lone constrained row has no MTP step to break the
chain. The redraw of an invalidated successor then evaluates outside the
native work protocol the step launches follow (no requireNativeWork /
nativeWorkSubmitted, no withError). Constrained rows now chain only on
untracked engines, as grammar-aware and free-span speculation already
exclude native engines; on GLM each constrained step is confirmed on the
host before the next is built.

Test: a chaining constraint at temperature 0.8 on the protected engine
follows its sequence, a cancel mid-row stops on its prefix, no constrained
successor is ever redrawn, and native work is quiescent at shutdown. The
contract comment states the cohort cost: GLM's target has no row-exact
fallback, so no row of a decode step with a constrained row drafts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the O5 merge (SHOULD-FIX 2, nits 5-6): enabled, the collected
parser runs the streaming state machine, so a <channel|> that no
<|channel> opened is a stray marker and the text before it stays in the
answer, where today's collected parser routes it to reasoning. The new
case pins both processes. The reference now says that any value other
than 1 keeps today's handling, that callers pre-opening the thought in
the prompt should leave the switch off, and where enabled parsing drops
<turn|> and <eos>.
@jonathan308 jonathan308 changed the title O5 on the cumulative SDK: #407 merged onto #416 (opt-in Gemma reopened thoughts) O5 on the phase-D cumulative SDK: #407 merged onto #416 + #417 (opt-in Gemma reopened thoughts) Nov 14, 2026
jonathan308 and others added 4 commits November 13, 2026 16:08
…the cumulative SDK

Only .github/test-shards.json conflicted. Resolution = #414's replanned map
(4 native shards + the hosted audio shard, hosted_tests, rest run in shard
4) byte for byte, plus what this branch had added to the old map, each once:
- groups native-reasoning-budget (#411) and gemma-quoted-number-enabled
  (#408, extra pass with DARKBLOOM_GEMMA_SCHEMA_COERCION=1), unchanged;
- a run for each group (shards 1 and 2) and one units run in shard 3 for
  CBv2FreeSpanTests + QwenFreeSpanHistoryTests (#413, was its own shard) and
  CBv2GrammarNonFiniteTests + CBv2GrammarQwen4Tests (#409, was the rest run);
- estimated_seconds of those three shards raised accordingly.
Every other #414 file is main's version; no Swift file differs from the
cumulative head eaed116. Checked: test_shards.py load_map/resolve_runs
(36 groups each used once, one rest run, no unit listed twice; each new
suite selected by exactly one main run); test_shards_test.py 27/27 OK.
… (delta review)

From the delta review (APPROVE WITH NITS): the protected-engine test now
asserts chainedStepCount == 0 (the property the fix makes) beside the redraw
count, and drops its cancel half, which raced a fast 8-token row; the
loop's header comment states the native-tracked exception, and the
contract comment is two lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test-shards.json: #417's map (#414's four native shards and hosted
audio shard, with #416's two groups) taken as is, plus #407's
gemma-reopened-thought-enabled group and one extra run beside
gemma-quoted-number-enabled in shard 2 (+15 s estimate, as for that
run). The seven hosted audio tests are unchanged. Every other file
merges cleanly; against #417's head this adds exactly #407's lines,
the reviewed test case and the reference text.
@jonathan308
jonathan308 marked this pull request as ready for review November 14, 2026 00:56
@jonathan308
jonathan308 merged commit f41a5f9 into main Nov 14, 2026
21 checks passed
jonathan308 added a commit that referenced this pull request Nov 14, 2026
Brings in main at f41a5f9 (#407 to #418: opt-in native reasoning
budgets, grammar-aware MTP verification and free spans, GLM token
constraints, Gemma parsing options, and CI routing #414).

One conflict, in fork.yaml: main and this branch each add a paragraph to
the core runtime description. Both are kept: the canonical prefill grid
paragraph, then main's reasoning budget paragraph. CBv2Contracts.swift,
EngineV2.swift, EngineLoopV2.swift and CONTRACT-DECISIONS.md merged
without a conflict. Every ordinary submission path (submit,
submitWithRetirement, submitWithNativeRetirement and the first-token
deadline submit) still cancels a running continuation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant