Skip to content

fix(code): negotiate terminal model budgets without automatic retries - #10

Draft
erikleblansch wants to merge 4 commits into
mainfrom
feature/terminal-compute-budget
Draft

erikleblansch wants to merge 4 commits into
mainfrom
feature/terminal-compute-budget

Conversation

@erikleblansch

@erikleblansch erikleblansch commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Scope and source

PR #5 is merged into main. This candidate normally merges that milestone, preserving its banner and original public-proof evidence. Exact Code head 714904a3ec452b8e10d8b40be6ac85107606ca3b, tree 457494284a3301acd5c177e3cd9ac2c3c19d684f. Both native smoke profiles pin reviewed core 6a517b576baa17e7329661ee0476d1848081d114 (core PR #210); distinct model identities and resource budgets remain unchanged. Public-code core 2a1b4ad3 and immutable driver f27576eb are unchanged.

  • Native preflight and every provider request negotiate execution_error_version:1.
  • Only a negotiated, correlated, admitted conversation can retain a cleanup-confirmed execution_budget_exceeded; map it to HTTP422 without inventing a model result. Busy/other failures/uncertain cleanup retain prior behavior. Legacy clients remain compatible.
  • Fix a separately reproduced native configuration bug: pinned OpenCode drops agent.temperature:0 unless the model advertises temperature capability. Both custom profiles now advertise it, so the existing zero request actually selects greedy_v1. No prompt, model, budget or permission change; this is a generation-policy forwarding correction, not a solved 4B stall.
  • Correct the synthetic error fixture to echo only the policy actually present in its request, never invent one from negotiated support.

Actual native-runtime checks

Existing source-built pinned OpenCode v1.18.34 was run through the production launcher/provider with synthetic core/model replies and no model/download/host-network changes. invalid_output, wire_truncated and execution_budget_exceeded each issued exactly one coding request, no retry and no approvals; all observed greedy_v1. Session/process/socket/temp cleanup passed, original disposable project unchanged. The budget failure has one confirmed cleanup and no completed/incomplete model result.

The first probe failed because the synthetic fixture falsely injected a policy; its result remains failed. After the fixture correction, an intermediate probe passed but observed no selected policy. After the separate config fix, the final local report native-errors-budget-greedy-df481-20261004.json passes with SHA256 a08f26ab2c61b2653949dadf06f45b9402066383ee651d573a5b14f9623e3786. It was captured on the explicitly modified df481 candidate, not represented as an unchanged earlier commit or as real inference.

76 focused Node checks pass (one optional upstream-source test skipped because that worktree lacks the upstream checkout; root independently read the exact pinned upstream implementation), plus 22 smoke contracts. The earlier 93 focused consumer checks remain scoped evidence. Historical default-setting fixture bytes are unchanged; only the explicit temperature-capability delta is allowed by its regression. Core post-merge diagnostic/subscriber tests also pass.

No 4B coding-quality, native-editor or confidential private-peer success claim. Original native run 37218791500 remains failed. The new exact-source trial below also failed; its improved terminal handling is distinct from coding success.

Source-quality follow-up

The original core a5246942 Quality run 37225595367 remains failed: strict Clippy rejected two 103-line diagnostic functions. Its original job 111504476222 log is preserved with SHA-256 1ef3aca56b4052b9b56e2f9a469543e07cfdb1718d5a8706750c286f40f6d41c. No model trial was dispatched for that pair.

Core 6a517b576baa17e7329661ee0476d1848081d114, tree 8a2b328bc35d1455d9f88d87671881b05a3757aa, extracts the existing snapshot parser and moves byte-identical Python test assertions into a constant. It does not change validation, model behavior, resources or acceptance criteria. Eight targeted diagnostic tests and formatter/diff checks pass locally; no local modern-Clippy pass is claimed. The Code follow-up changes only two native source pins, their two test expectations and these documented bindings; its 22 smoke contracts and all five source checks pass. All five required core source checks now pass, including strict Clippy, workspace tests, namespace-proof reporting and the integration harness. The explicitly manual KVM source-workflow job was skipped as designed; the informational aggregate CodeQL check is neutral while all four actual analyses pass.

Original native 4B result: failed, with a more precise boundary

After all exact source checks and one guarded HTTP204 dispatch, run 37228603308, job 111513342870, attempt 1 completed FAILED on Code 714904a3ec452b8e10d8b40be6ac85107606ca3b / core 6a517b576baa17e7329661ee0476d1848081d114. Original ZIP SHA-256 fabcc8ba08f47f28f85614b645679654b70f83f02c85c4f8be8722c0d1d5978c (9,154 bytes, 11 files); original job-log SHA-256 6de3c4d41e1346582dc045248b25bbbf353125691f7c4e2ec191be8a8bb0e27f (67,048 bytes).

  • Actual pinned runtime build and all 50 provisioning downloads completed (8,312,769,415 bytes; original model revision cdbee75f17c01a7cc42f958dc650907174af0554).
  • One real provider request reached generation with a 4,572-token prompt. The first forward began at 19,672 ms; the retained terminal observation has no completed first forward, no first token and zero generated tokens. The 600-second compute deadline ended the request. CPU observation reports AVX2 and no AVX512-BF16/AMX features; this is not proof of the exact slow kernel or root cause.
  • The genuine runtime received exactly one execution_budget_exceeded, with one confirmed cleanup and no retry. This proves the scoped terminal-budget behavior against a real core/model attempt, not successful inference. There were no tool calls, read/edit/test approvals, completed native turn, edited fixture or passing independent check.
  • Runtime/project, private inputs, provision/service units, QEMU and scratch cleanup passed. Disposable-host owned changes were restored; normalized route/DNS observations match while raw route/DNS bytes differ. No raw model text was exported.
  • The fixture's original_test_unchanged:false is its untouched pre-verification default: this run never reached the independent-check phase. The legacy pack flag code_contains_uncommitted_changes:true is not evidence of an unexpected checkout edit; the separate source receipt binds the exact clean Code checkout.

The original 372187 failure remains unchanged. This new run was not restarted; no follow-up dispatch is authorized by this result. Native coding quality, native-editor success and confidential private-peer execution remain unproven.

@erikleblansch
erikleblansch changed the base branch from feature/opencode-integration to main October 4, 2026 18:36
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