Repository navigation
fix(instances): name instances.mint_timeout_secs on a mint timeout - #20381
Conversation
A Remote Crew token mint that runs out of budget raised a bare "timed out minting token on <host>" message on both transports, so a user on a slow jump host, proxy or SSM agent had no next step. Both messages now name the likely cause for their transport and the setting that budgets the mint. A budget already at the ceiling points at the host's reachability instead, because the setting cannot go higher. Defaults are unchanged. Fixes #19882
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] ea28340 Description read[DESCRIPTION-READ] 43499d3a7e8086725f70af5e3539f35690e1f5a3fb8144f4fb4e9945c3312901 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The description says the readiness timeout "already names Not justified as shipped
What this change shipsInventory (3 items) — 2 justifiedIntent: a user whose Remote Crew token mint times out can see which setting to raise and why. FIX (#19882; the new tests fail on base).
[FIRST-PRINCIPLES-REVIEWED] ea28340 Description read[DESCRIPTION-READ] e5ccc2ac206b15a2df096a3294389c5a6f6eadec72b5258e0623ea5801d25170 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
self-added: no |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
HOLD at ea28340. I found no defect. Both mint timeouts keep their This is a hold, not a request for changes: the PR edits the dashboard-token minting files |
bolichen97
left a comment
There was a problem hiding this comment.
Readiness sweep review: read the full diff (merge-base) and the PR thread. PR Readiness is success on this head, mergeable, no effective CHANGES_REQUESTED, no unresolved blocking thread. Mint-timeout error text only; prefixes preserved; merged-tree tests 127 passed. No regression to normal use found.
Problem / Motivation
Goal: When a Remote Crew token mint times out, the error names
instances.mint_timeout_secsand the likely cause for its transport, so the user knows the next step.A Remote Crew connect runs two timed steps. The forward readiness wait already names
instances.connect_timeout_secswhen it runs out with the tunnel still connecting. The token mint does not: over SSH it raisestimed out minting token on <host> after <N>s, and over SSM it raisestimed out minting token on <target> over SSM. Neither names the setting that budgets the mint.Why it matters
A user on a slow jump host, proxy or SSM agent who raises the connect budget can then hit the mint timeout. The message gives them no setting to change, so they cannot connect without reading the source.
Not a goal
What changed (motivation → approach → change)
Symptom: both mint timeout messages end without a next step. Cause: the two
TokenMintErrortimeout branches raise a bare message.instances/token_mint.py: new_mint_timeout_advice(timeout_secs)returns the shared next step. BelowMINT_TIMEOUT_CEILING_SECSit nameskirocrew config set instances.mint_timeout_secs <value>. At the ceiling it tells the user to check that the host is reachable, because the config loader clamps the setting there. Below the ceiling it also says the one setting applies to SSH and SSM mints alike, so a value picked for a slow SSH host does not silently lower an SSM crew's budget below its 90s default.instances/token_mint.py: the SSH timeout message keeps its prefix, then says that a host reached through a jump host or proxy pays that handshake again for the mint, and that otherwise the host may not be answering, then the advice.instances/ssm_token_mint.py: the SSM timeout message keeps its prefix, adds the polling budget in seconds, names slow SSM command dispatch or a target whose SSM agent is not online, then the advice.The wording follows the hedged style that open PR #19615 gives the readiness timeout: it names both possible causes and does not assert either.
Backwards compatibility
Compatible: only the text of two exception messages grows; each keeps its existing
timed out minting token on ...prefix, so the existingmatch="timed out minting"test and any log search still match.Removes nothing: the change only adds text to two error messages.
Tests
TestTokenMintGeneric::test_mint_timeout_names_the_mint_budget_setting(SSH): a hung mint at 30s namesinstances.mint_timeout_secs, the proxy cause and that the setting covers both transports; at the 120s ceiling it says the budget is at its maximum instead.TestSsmMintOutputRedaction::test_ssm_mint_timeout_names_the_mint_budget_setting(SSM): a timed-out send-command at 90s names the setting, the polling budget and the SSM agent; at 120s it says the budget is at its maximum instead.All four cases fail on
origin/mainand pass on this branch.Manual verification
N/A: unit coverage sufficient: the change is message text on two exception branches, and both branches are driven directly by the tests.
Related Issues
Fixes #19882
Pattern harvest
Not generalizable: the readiness timeout on main still raises a bare message; open PR #19615 makes it name
instances.connect_timeout_secs, and this PR applies the same wording to the two mint timeout branches. Together they cover every Remote Crew connect timeout.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.