Skip to content

fix(queue): claim-stamp lookup honors OPENCODE_URL / OPENCODE_AUTH_FILE overrides (#9409) - #9739

Merged
dezren39 merged 1 commit into
mainfrom
queue/15873-9409-claim-stamp
Nov 14, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/15873-9409-claim-stamp

Conversation

@dezren39

@dezren39 dezren39 commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Fix for #9409: claim-stamp lookup honors the claimant tooling's OpenCode overrides

Codex's P2 on PR #9025, never addressed: derive_claim_model_stamp in pkgs/fleet/crates/fleet-queue/src/client.rs resolved the OpenCode server from OPENCODE_SERVER_URL and always loaded the production credential file (~/.local/state/opencode/service-prod.json), while the claimant tooling (pm-stack/opencode-claimant/claimant.py, poll.py) uses OPENCODE_URL and OPENCODE_AUTH_FILE. With overrides configured, the lookup could contact a different server or authenticate with the wrong credentials — and its fail-soft return then silently left claims unstamped.

Change (client.rs only, +79/−7):

  • resolve_opencode_base_url(env_url, env_server_url) — pure: OPENCODE_URL wins, then the legacy OPENCODE_SERVER_URL, then the shared loopback default http://127.0.0.1:13420; trims blanks/trailing slashes.
  • resolve_opencode_auth_file(env_file, home) — pure: OPENCODE_AUTH_FILE wins, then the production state file under home.
  • derive_claim_model_stamp uses both resolvers; its fail-soft contract is unchanged.

Tests: two new unit tests (opencode_base_url_honors_claimant_overrides, opencode_auth_file_honors_claimant_override) cover precedence, normalization, and defaults. Full suite: cargo test -p fleet-queue --features queue-broker = 308 passed (306 baseline + 2 new).

This also resolves the unresolved review thread on PR #9025 (discussion r4556253578) — the alignment it asked for is exactly this resolution order, matching claimant.py:53-57 and poll.py:136-139.

Task 15873 (triage) — the defect was re-verified live on current main before the fix (client.rs derive_claim_model_stamp, formerly lines 1427/1434).


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

@dezren39
dezren39 requested a review from a team as a code owner November 14, 2026 05:07
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T05:07:24.535518Z
We couldn’t complete this review. Comment @codex review to try again.
2e76e3b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fbce5ff9-f119-417e-b160-f00a764b04a1
Commits

Reviewing files that changed from the base of the PR and between a1ef9a7 and 2e76e3b.

Files selected for processing: 1

  • pkgs/fleet/crates/fleet-queue/src/client.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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