Skip to content

Cloud Native: name the step a refused Native call came from - #32525

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/native-refusal-step
Nov 2, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/native-refusal-step

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Why. A capture's cloud.machines reply showed link_route: "link (native failed: refused(400))". NativeDeviceEnrollmentError.refused is thrown from four places (device revoke, owner ops such as host.enroll/host.network.bind, the signed Native reads, and the host.network.target read), so the reason didn't say which call got the 400.

What.

  • refused(Int) becomes refused(Int, step: String). The step is the owner op name, or METHOD /path with device and mesh ids swapped for {device}/{mesh} (via NativeDeviceScope.step). It never holds an id or a token.
  • NativeDeviceEnrollmentError now conforms to CustomStringConvertible. Every other case prints exactly what it printed before, and refused prints refused(400) at POST /v1/devices/{device}/signed/tunnel (or ... at host.network.target).
  • The two tests that build refused are updated. CloudNativeFirstLauncherTests now checks the literal route string link (native failed: refused(400) at host.network.target).

Risk. None. Only the error's detail changes; nothing branches on the status or the step.

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Makes NativeDeviceEnrollmentError.refused carry the step that got the status, so the cloud.machines link route says which call was refused instead of just refused(400).

  • refused(Int) becomes refused(Int, step: String); the step is an owner op name or a METHOD /path template with device and mesh ids replaced by {device}/{mesh}.
  • NativeDeviceEnrollmentError now conforms to CustomStringConvertible, printing every case exactly as before except refused, which prints e.g. refused(400) at POST /v1/devices/{device}/signed/tunnel or refused(400) at host.network.target.
  • Only error detail changes; nothing branches on the status or the step.

Written for commit 049281f. Summary will update on new commits.

View guided diff Turn on auto-fix

NativeDeviceEnrollmentError.refused now carries the step that got the
status (an owner op name or a METHOD /path template with ids replaced),
and the error describes itself as "refused(400) at <step>", so the
cloud.machines link_route says which call was refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-b3ddf8ea0a5ba6fad749
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 049281f: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr32525 -f ref=lane/native-refusal-step -f platform=macos -f backend_mode=local

Shipped in:

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5-5 medium): SHIP at 049281f

Visual verdict: unchanged by this diff

I checked that the only behavioural comparison on this error, CloudNativeRouteHolder's != .signedOut, is unaffected, and that no source code pattern-matches .refused. The step strings are owner op literals (host.enroll, host.network.bind, host.network.target), a fixed DELETE template, or NativeDeviceScope.step. That helper turns dev_/mesh_ segments into {device}/{mesh}, and the tenant and bearer stay out of the path, so no token or tenant gets into the string. The new description prints the other cases the same way the default enum description did. All three test sites are updated, and the route string test now expects refused(400) at host.network.target.

Follow-ups: none

@blacksmith-sh

blacksmith-sh Bot commented Nov 2, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)/
test_every_compile_job_names_its_warm_sources (main.ThisTree.test_every_compile_job
_names_its_warm_sources)
View Logs
the short nightly decide gate must use the pooled Linux route with a Blacksmith fallbac
k/
the short nightly decide gate must use the pooled Linux route with a Blacksmith fallbac
k
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo
teamleaderleo merged commit 069f8c0 into feat-cmux-next Nov 2, 2026
161 of 173 checks passed
@teamleaderleo
teamleaderleo deleted the lane/native-refusal-step branch November 2, 2026 19:06
teamleaderleo added a commit that referenced this pull request Nov 2, 2026
Resolves #32525's step-named refusals with this branch's refusal logging and
the platform target route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 049281f5 Deployed Nov 2, 2026 by teamleaderleo via namespace autofix #12624
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant