Repository navigation
fix(queue): claim-stamp lookup honors OPENCODE_URL / OPENCODE_AUTH_FILE overrides (#9409) - #9739
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou'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. View limit details
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Fix for #9409: claim-stamp lookup honors the claimant tooling's OpenCode overrides
Codex's P2 on PR #9025, never addressed:
derive_claim_model_stampinpkgs/fleet/crates/fleet-queue/src/client.rsresolved the OpenCode server fromOPENCODE_SERVER_URLand always loaded the production credential file (~/.local/state/opencode/service-prod.json), while the claimant tooling (pm-stack/opencode-claimant/claimant.py,poll.py) usesOPENCODE_URLandOPENCODE_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_URLwins, then the legacyOPENCODE_SERVER_URL, then the shared loopback defaulthttp://127.0.0.1:13420; trims blanks/trailing slashes.resolve_opencode_auth_file(env_file, home)— pure:OPENCODE_AUTH_FILEwins, then the production state file under home.derive_claim_model_stampuses 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).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.