Skip to content

fix(compute): probe the native primary model as the worker gets it - #4100

Merged
freeqaz merged 4 commits into
mainfrom
fix-2903
Oct 29, 2026
Merged

freeqaz merged 4 commits into
mainfrom
fix-2903

Conversation

@freeqaz

@freeqaz freeqaz commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

On Dedicated OpenClaw with credential_source Harness authentication, a primary model authored as openai/gpt-5.4 with a catalog row whose id keeps the provider prefix (openai/gpt-5.4) and whose own baseUrl differs from models.providers.openai.baseUrl passes Compute admission. The startup model probe then fails closed with "Unable to materialize openai/gpt-5.4 for its prepared api-key route", so the Agent fails at deploy. The native worker would run it: it gets the rendered catalog (split model id, checked endpoint).

The cause: harnessProbeConfiguration copied the authored provider fragment and the authored primary row, not the row nativeRuntimeConfiguration renders for the worker. OpenClaw's probe cannot route a known model under the prefixed row id when that row's endpoint differs from the provider's.

Change

  • harnessProbeConfiguration (Kubernetes Compute) takes the Harness auth method on Dedicated OpenClaw and gives the probe the primary row as nativeRuntimeConfiguration renders it for the worker (split model id, normalized fields). The row's checked endpoint becomes the provider default, and the probe row carries no baseUrl of its own. So the unchecked provider baseUrl never reaches the probe, and the runtime's upfront credential check still runs: it skips any row that has its own baseUrl.
  • Admission renders the native catalog through the probe configuration, so the separate nativeRuntimeConfiguration call at admission is gone. The rules and messages are unchanged. Reference-setting refusals still come first.
  • The flow doc line about the probe entry is updated.

No new configuration surface and no compatibility path. Configurations that probe today get the same model and endpoint.

Verification

  • tests/conformance/kubernetes-compute.test.mjs ("native OpenClaw preparation and activation use only outbound Sandbox enrollment") now authors the primary row with the provider prefix. It asserts that the probe gets the worker's rendered primary row without its baseUrl, and that the provider default equals the worker row's checked endpoint. The test fails with main's index.ts (the probe gets the prefixed authored row) and passes with the fix.
  • Mutants, each killed by that test file: dropping the provider-default endpoint; giving the probe every rendered row; picking the wrong rendered row; not rendering at admission; not rendering at preparation; the full model reference as the row id; rendering the native catalog for embedded Agents too; rendering as if every Agent used credential_source; keeping baseUrl on the probe row.
  • On a remote test VM, at this head: the touched test file passed 390/390, and 20/20 at 2 CPUs.
  • Rendered 22 configuration shapes with the real Driver source (credential_source and api_key; split, prefixed, slash, alias and padded ids; a fallback listed first; a row-level api; a provider-only endpoint; refusals). Admission is identical to main on all 22. On all 17 accepted shapes, the probe row equals the worker's rendered row without baseUrl, and the provider default equals that row's endpoint.
  • Real probe: openclaw models status --probe in a runtime image with no network, TLS listeners on loopback standing in for every endpoint (api.openai.com included), main and this head on all 17 accepted shapes:
    • With this head, 16 of the 17 shapes reach their checked endpoint; the unchecked provider and fallback endpoints got 0 requests in all 34 runs (main and this head). The one other shape (provider-level contextWindow and cost) fails the probe the same way on main: OpenClaw refuses those provider keys in the probe config. That is outside this change.
    • Main fails closed with no request on four shapes (the prefixed-row shape above, a fallback row listed first, a row-level api, and an api_key row on the official endpoint under another provider baseUrl). This head reaches the checked endpoint in all four.
    • The upfront credential check sends its request for all five official-endpoint shapes and classifies the 401 as invalid_api_key (main: three of them).

Risks

  • Low. The probe now gets only the fields the worker's rendered row has (id, api, name, contextWindow, maxTokens, reasoning, thinkingLevelMap, cost, input; the endpoint as the provider default). Other authored row keys no longer reach the probe, as they never reached the worker.
  • Preparation of a Dedicated OpenClaw revision now renders the native catalog for the probe as well as for the worker, with the same rules and error.
  • Not changed here: the probe still gets authored provider-level keys (for example request.*) that the worker does not get.

On Dedicated OpenClaw the startup model probe copied the authored primary
catalog row and provider fragment. A row authored with the provider prefix
(openai/<id>) and its own baseUrl passed admission, but OpenClaw's probe
refused to route a known model in that shape, so the Agent failed at deploy
while the native worker (which gets the split id) would have worked.

The probe now gets the primary row nativeRuntimeConfiguration renders for
the worker (split id, checked and normalized endpoint) and that endpoint as
the provider default, so the unchecked provider baseUrl never reaches it.
Admission renders the native catalog through the probe configuration.
@freeqaz
freeqaz requested a review from a team as a code owner October 29, 2026 20:33
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The native startup probe uses the worker’s rendered primary model row and normalized endpoint.

Example: Dedicated OpenClaw selects openai/gpt-5.4 with catalog id openai/gpt-5.4 and a row-specific endpoint.

  • Before: The probe receives the prefixed authored row and can refuse model materialization although the worker receives a usable split ID.
  • After: The probe receives id gpt-5.4 and uses the checked row endpoint as its provider default.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is source-supported and has useful lifecycle coverage; inspectable runtime evidence is limited to the author’s written experiment account.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is outside the ordinary contributor proof gate; its body reports Compute-rendered configuration exercised through OpenClaw models status --probe, including checked-endpoint traffic and zero provider-default traffic, but supplies no raw trace.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An admitted Dedicated OpenClaw configuration can fail deployment because the startup probe receives a model representation different from the worker’s.
Reason: The collaborator-authored repair aligns startup validation with supported worker behavior without adding configuration or changing a public Driver contract.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a concrete probe/worker configuration mismatch still present on main, and no introduced correctness defect was found.

Priority: P2
Reviewed head: 49e7f5378155054b4954d7439c810e1c54ed743a

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The preparation fixture verifies generated configuration, while the reported real-CLI comparison has no attached output demonstrating the routing results.
Agent review details

How this fits together

Kubernetes Compute turns an admitted Agent configuration and Harness authentication snapshot into worker configuration and startup-probe environment settings; the runtime probe must succeed before the Harness becomes ready.

flowchart TD
  A[Agent configuration] --> B[Kubernetes Compute admission]
  B --> C[Native catalog renderer]
  C --> D[Worker model catalog]
  C --> E[Primary model probe configuration]
  E --> F[OpenClaw startup probe]
  F --> G[Checked model endpoint]
Loading

Technical review

Best possible solution:

Use the existing native catalog renderer as the single owner of model IDs and endpoints for both worker execution and startup probing.

Do we have a high-confidence way to reproduce the issue?

Source confirms that main supplies different model-row shapes to probe and worker; the author reports a real-CLI failure for the prefixed known-model case, but this review did not execute it.

Is this the best way to solve the issue?

The patch is a focused repair because it reuses the worker’s validated representation, preserves reference-refusal ordering, and leaves embedded and Codex paths unchanged.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2fccf59d2738.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • sunnymodi: Raw commit 378658b adds docs/flows/harness-execution-topology.md:146 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 378658bafdb3; files: docs/flows/harness-execution-topology.md)

Review metrics

Metric Value Why it matters
Patch scope Production +27/-16; tests +15/-3; documentation +2/-1 The focused change extends an existing lifecycle case and reuses existing production rendering.

Labels

Label changes:

  • add P2: A limited native-model configuration can fail deployment despite being usable by the worker; no broad outage or urgent regression is established.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A limited native-model configuration can fail deployment despite being usable by the worker; no broad outage or urgent regression is established.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted output from the reported four-run CLI comparison to make the routing evidence independently inspectable.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 29, 2026, 4:48 PM ET / 20:48 UTC.

The startup probe row carried its own baseUrl, so the runtime's upfront
credential check, which skips rows with a baseUrl, no longer ran on
Dedicated OpenClaw, even for the standard api_key shape. Give the probe the
rendered row without its baseUrl; the provider default already carries the
same checked endpoint (finding 2904).
@freeqaz
freeqaz merged commit 78b0a08 into main Oct 29, 2026
41 checks passed
@freeqaz
freeqaz deleted the fix-2903 branch October 29, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant