Skip to content

fix(runtime): re-anchor source patches for T3 0.1.11 and current Nightly - #154

Merged
dizys merged 12 commits into
dizys:mainfrom
0libote:fix/nightly-runtime-patch-drift
Nov 22, 2026
Merged

dizys merged 12 commits into
dizys:mainfrom
0libote:fix/nightly-runtime-patch-drift

Conversation

@0libote

@0libote 0libote commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

The Nightly legs of the native-runtime matrix have been failing since upstream moved ahead of our patch anchors, and the next run would fail the Stable leg too.

What's happening

The image builds patched T3 runtimes from the exact upstream tag. Each source patch fails closed when its anchor no longer matches, and three of them no longer do:

  • agent-resources — upstream renamed linkAntigravityUserSkills → linkAntigravityUserConfig in antigravityAuthSupport.ts (it now links AGENTS.md, GEMINI.md and config/skills.json itself; our bridge links the same AGENTS.md/GEMINI.md targets, so the two coexist on Linux builds).
  • gateway-context — upstream removed customModelCapabilityOverrides entirely from contracts/src/server.ts and ws.ts.
  • antigravity-sign-in — upstream implemented headless Antigravity sign-in natively in v0.1.11 (codeLogin spawning agy acp --login, a respond flow, and a credentials interaction for the code). Our backport patch duplicates it and can no longer apply.

The failing PR-#153 checks showed only the first failure because patches apply in registry order and stop at the first drift. The Stable leg only looked healthy because it was downloading a previously published patched artifact for 0.1.10; that artifact predates the current upstream tree and no source build of 0.1.10 can reproduce it.

The fix

  • Re-anchor agent-resources on the renamed linkAntigravityUserConfig call (the inserted linkAntigravityUserResources bridge is unchanged).
  • Re-anchor gateway-context on threadFind (schema + ws capability flags), which is unique and stable in both new versions.
  • Remove the antigravity-sign-in patch and its antigravity-terminal-login.ts asset: v0.1.11 ships the feature natively.
  • Bump the bundled ARG T3_VERSION 0.1.10 → 0.1.11 (current stable) so both the bundle and the Stable matrix leg build from source under the new patch revision.

The patch revision changes with this edit, so CI will do a full source build for both Stable (0.1.11) and Nightly on the next run, then cache the artifacts as usual.

Validation

  • A fetch-and-apply harness ran the whole registry against v0.1.11 and 0.1.12-nightly.20261121.5038: all 8 remaining patches apply cleanly to both (previously 3 failed on each).
  • Unit suites pass: 115/115 patch tests, 146/146 plan/gateway tests, plus native-publish-smoke clean.
  • scripts/bump-versions.sh --check passes with the 0.1.11 pin (it is upstream's latest release).

Also carried here: the cloudflared 2026.11.1 pin from #153 (cherry-picked). The newer bundled runtime enforces T3 Code's 2026.10.3 relay-client floor, so this PR is not green without it — the image's Connect status never reaches "available" with the old 2026.5.2 catalogue pin. If #153 merges first, this commit is identical and merges trivially.

Upstream 0.1.11 renamed linkAntigravityUserSkills to
linkAntigravityUserConfig, dropped customModelCapabilityOverrides, and
absorbed headless Antigravity sign-in natively (codeLogin), so the
fail-closed agent-resources and gateway-context anchors no longer
matched and the antigravity-sign-in backport became redundant. Re-anchor
both patches, drop the backport, and move the bundled runtime pin to
0.1.11 so source builds work again on both matrix legs.
Upstream 0.1.12-nightly.20261121.5038 asks each hub account for its
routed models before reading quota. The cliproxy smoke fixture had no
handler, so every request fell into its error-tracking assert. Answer
with an empty model list, which upstream treats as the older-hub
behavior the smoke already asserts.
The integration smoke still exercised our removed backport's contract.
Follow the native flow instead: the login spawn keeps the browser
suppression helper (only the display is stripped), a malformed sign-in
link fails the stream instead of being ignored, the credentials field
is upstream's code field, and the runtime no longer advertises
customModelCapabilityOverrides, which upstream removed in 0.1.11.
Upstream removed customModelCapabilityOverrides, so the patched runtime
no longer advertises it and the smoke asserts false on both sides of
the upgrade; gatewayModelLimits stays the patched-runtime proof.
Upstream's ProviderAuthState makes interaction optional and drops it
when none is offered; the backport used to publish an explicit null.
The customModelCapabilityOverrides advertisement is this repo's own
gateway-capabilities patch, not an upstream key; the earlier flip to
false confused it with the upstream schema key that gateway-context
used as an anchor before this PR re-anchored it.
T3 Code requires a relay client >= 2026.10.3 and rejects the image's
2026.5.2 shim, falling into a log-spamming install loop and leaving the
tunnel down. Pin 2026.11.1 (latest stable) and make the smoke test fail
if the pin ever drops below T3 Code's floor again.
0.1.11 replaced the compiled MINIMUM_OPENCODE_VERSION constant with an
embedded driver-compat manifest; take the broken-range boundary as the
floor T3 enforces. 1.14.19 stays the floor, so the catalogue and the
installed 1.19.6 still meet it. Also carry the cloudflared 2026.11.1
bump from dizys#153: the newer bundled runtime enforces its 2026.10.3 relay
floor, so without it the image's Connect status is never 'available'.

@dizys dizys left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Muse Wonder Full responding on behalf of dizys

Approved. #153 is merged, and this branch is now updated onto the new main with no conflict and an unchanged diff, as expected for the identical carried commit.

The previous head was green on every leg. Holding the merge until the updated head finishes CI, since the Nightly legs resolve todays upstream Nightly rather than the 20261121 one the green run used. Will merge as soon as checks pass, or bring any new patch drift back here.

claude_url_complete slept a fixed 14s and asserted once. On the
2026-11-22 runs every smoke leg failed that check while the following
checks drove the same sign-in session to completion, so the URL is
captured, just later than 14s. Poll the session state for up to 90s
instead of racing the login render.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@dizys

dizys commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Note

🤖 Muse Wonder Full responding on behalf of dizys

Pushed one maintainer commit, 87c7e85, to this branch: the smoke check Claude sign-in captures a complete OAuth URL now polls for the capture (up to 90s) instead of a fixed sleep 14 plus a one-shot assertion.

Why: on the updated head, every finished smoke leg failed only that check, while the next checks drove the same Claude sign-in session to completion. The tree is otherwise identical to the previously green run (same tree hash, same Claude 2.1.330), so the login render has simply started taking longer than 14s and the check was racing it. No product code changes in this commit.`

The 90s poll still timed out on core arm64 while the same session
completed in the following check, so the login render can take longer
than that on current runners. Poll for up to five minutes, and on
timeout leave a redacted note (session state, whether code_challenge
was seen, response size) in the failure summary, since check()
discards output and the failure was otherwise blind.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@dizys

dizys commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Note

🤖 Muse Wonder Full responding on behalf of dizys

Second maintainer commit, 488c998: the OAuth capture poll now allows five minutes, and records a redacted note in the smoke failure summary on timeout.

The 90s poll was not enough: core (arm64) exhausted it at 93s, then the same session completed in the following check (a pasted code reached the prompt). So the capture does arrive; it is slower than either the old fixed 14s or 90s. I cancelled the rest of that superseded run. If five minutes still fails, the summary will now show the session state and whether code_challenge was ever seen, which separates a slow render from a changed capture format.`

Anthropic changed the claude auth login URL server side: it no longer
carries code_challenge and state as query parameters, but one opaque
?z- token with the challenge kept server side (verified against a
clean 2.1.330 login render). Setup captures the new URL fine and the
session completes, so only the smoke completeness assertion was
obsolete. Accept the legacy long form only with its challenge and
state, or the opaque form with a full length token, and report the
captured form in the timeout diagnostic.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@dizys

dizys commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Note

🤖 Muse Wonder Full responding on behalf of dizys

Root cause found, and it was not timing. Third maintainer commit, 775c367, fixes the smoke assertion.

The new diagnostic showed session state=awaiting-code, code_challenge seen=no: Setup captured a URL and the session completed, but the URL no longer contains code_challenge. I reproduced a clean claude auth login render with 2.1.330 locally: Anthropic now returns a short opaque authorize URL (https://claude.ai/oauth/authorize?z-<token>) with the PKCE challenge kept server side, where the long query form was still in use during yesterdays green run.

So the product capture is working; only the smoke definition of a complete URL was stale. The check now accepts the legacy long form only with its code_challenge and state, or the opaque form with a full length token, and still rejects truncated captures of either. The polling and redacted diagnostics from the earlier commits stay.`

@dizys
dizys merged commit af0f2ed into dizys:main Nov 22, 2026
14 checks passed
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.

2 participants