Repository navigation
Upgrade grokrouter from its old unsupported baseline to Grok Bot 0.63.0… - #6
SomeRandmGuyy wants to merge 6 commits into
Conversation
Router turns drop API-key environment variables, disable Claude Code's own tools, and doctor reports the subscription tier without the account email. Grok Bot 0.63.0 stays unreviewed until a host probe. Refs SPE-5888
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_c65393d1-4a3b-4929-a994-15a519b70a81) |
Keep plan tier tied to the CLI config directory, and pass SDK billing errors through classification. Refs SPE-5888
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1c47f305-4660-45ae-831b-76d557585e58) |
Use the default account file only when auth status omits its config directory. Refs SPE-5888
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_6153867c-a4d7-4a3b-b343-43460e4cf185) |
| const status = parseAnthropicAuthStatus(raw) || { loggedIn: false, authMethod: "", subscriptionType: "", apiProvider: "", configDirectory: "" }; | ||
| let account = {}; | ||
| let matchedAccount = false; | ||
| for (const candidate of anthropicAccountCandidates(status, process.env.HOME || "")) { |
There was a problem hiding this comment.
Stale Billing Details After Sign-Out
If Claude’s auth status fails or reports a signed-out session while an earlier login’s account file remains in HOME, doctor still reads that file. It can then show the old rateLimitTier and extraUsage alongside signedIn=false, making stale billing details look current and harder to diagnose. Read account fields only for a confirmed active login.
| for (const candidate of anthropicAccountCandidates(status, process.env.HOME || "")) { | |
| for (const candidate of status.loggedIn ? anthropicAccountCandidates(status, process.env.HOME || "") : []) { |
Prompt To Fix With AI
This is a comment left during a code review.
Path: runtime/run-provider.mjs
Line: 3340
Comment:
**Stale Billing Details After Sign-Out**
If Claude’s auth status fails or reports a signed-out session while an earlier login’s account file remains in HOME, doctor still reads that file. It can then show the old `rateLimitTier` and `extraUsage` alongside `signedIn=false`, making stale billing details look current and harder to diagnose. Read account fields only for a confirmed active login.
```suggestion
for (const candidate of status.loggedIn ? anthropicAccountCandidates(status, process.env.HOME || "") : []) {
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Skip a malformed Claude account file and keep looking for a valid one. Refs SPE-5888
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_14047f8d-9719-4104-b2a8-05c3d03c4926) |
…ytes 29110879) - patch/manifests/0.63.0.json + compatibility/0.63.0-hosts.json (unsigned) - compatibility/supported-apps.json now includes 0.63.0 - patch/router_patch.py: GROUP_DISPATCH_CANDIDATES + selection logic for seam evolution (old memberResult + new scoped snapshot) - updated validate_anchors, patch_text, patch_anchor_counts, patch_anchor_counts - planning/ROADMAP.md + STATE.md + phases/02-reviewed-063-manifest/ updated - README.md + docs/TEST-MATRIX.md updated for 0.63 support - installer version lists refreshed All requested anchors exactly 1, no routerMarker. Memory+episode seams present. Group seam variant detected in probe. xAI + Anthropic (Claude Max) OAuth paths now available on 0.63.0 via opt-in structural checks (using 0.44 template band). Phase 2 complete. Probe: captured inside stock Grok Bot 0.63.0 computer.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_393ff164-6d0f-428b-904a-60316fee3b4f) |
| "0.36.0", | ||
| "0.44.0" | ||
| "0.44.0", | ||
| "0.63.0" |
There was a problem hiding this comment.
Missing signature breaks release checks Adding 0.63.0 to the supported-version list makes the release test require
compatibility/0.63.0-hosts.json.sig, but only the unsigned registry is present. The compatibility test fails, and registry refresh cannot authorize a rotated 0.63.0 host. AGENTS.md requires host registries to be signed with the fork’s Ed25519 key before release.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: compatibility/supported-apps.json
Line: 6
Comment:
**Missing signature breaks release checks** Adding 0.63.0 to the supported-version list makes the release test require `compatibility/0.63.0-hosts.json.sig`, but only the unsigned registry is present. The compatibility test fails, and registry refresh cannot authorize a rotated 0.63.0 host. AGENTS.md requires host registries to be signed with the fork’s Ed25519 key before release.
**Context Used:** AGENTS.md ([source](https://github.com/swcstudiospace/grokrouter/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| self.assertEqual(router_patch.inspect_host(self.host, self.manifest)["patchAnchorCounts"], [1, 1, 1]) | ||
| self.assertIn("PATCHANCHORS=1,1,1", router_patch.compatibility_report(self.host, self.manifest)) | ||
| for index, seam in enumerate(router_patch.PATCH_ANCHORS): | ||
| logical_seams = list(router_patch.GROUP_DISPATCH_CANDIDATES) + list(router_patch.PATCH_ANCHORS) |
There was a problem hiding this comment.
Seam test fails This loop visits four candidate strings but indexes a three-entry
patchAnchorCounts list. The targeted test fails with three assertions and an IndexError, blocking test:patch and CI. Its fixture also contains only the old group-dispatch form, so it does not test patching the new 0.63.0 form.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_patch.py
Line: 493
Comment:
**Seam test fails** This loop visits four candidate strings but indexes a three-entry `patchAnchorCounts` list. The targeted test fails with three assertions and an `IndexError`, blocking `test:patch` and CI. Its fixture also contains only the old group-dispatch form, so it does not test patching the new 0.63.0 form.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| group_hits = sum(1 for cand in GROUP_DISPATCH_CANDIDATES if source.count(cand) == 1) | ||
| if group_hits != 1: | ||
| raise PatchError(f"Group dispatch seam: expected exactly one candidate to match once, got {group_hits}") |
There was a problem hiding this comment.
Duplicate dispatch sites pass validation If a newer, opted-in host contains one occurrence of one group-dispatch form and multiple occurrences of the other, this check accepts it because the repeated form contributes nothing to
group_hits. patch_text then patches only the single occurrence, leaving the other dispatch sites on stock inference. AGENTS.md requires the patch-seam gate to remain intact.
| group_hits = sum(1 for cand in GROUP_DISPATCH_CANDIDATES if source.count(cand) == 1) | |
| if group_hits != 1: | |
| raise PatchError(f"Group dispatch seam: expected exactly one candidate to match once, got {group_hits}") | |
| group_counts = [source.count(cand) for cand in GROUP_DISPATCH_CANDIDATES] | |
| if sorted(group_counts) != [0, 1]: | |
| raise PatchError(f"Group dispatch seam: expected exactly one candidate to match once, got {group_counts}") |
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: patch/router_patch.py
Line: 758-760
Comment:
**Duplicate dispatch sites pass validation** If a newer, opted-in host contains one occurrence of one group-dispatch form and multiple occurrences of the other, this check accepts it because the repeated form contributes nothing to `group_hits`. `patch_text` then patches only the single occurrence, leaving the other dispatch sites on stock inference. AGENTS.md requires the patch-seam gate to remain intact.
```suggestion
group_counts = [source.count(cand) for cand in GROUP_DISPATCH_CANDIDATES]
if sorted(group_counts) != [0, 1]:
raise PatchError(f"Group dispatch seam: expected exactly one candidate to match once, got {group_counts}")
```
**Context Used:** AGENTS.md ([source](https://github.com/swcstudiospace/grokrouter/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| GROUP_DISPATCH_CANDIDATES = ( | ||
| "const memberResult = await runner.run(promptForAttempt, {", | ||
| 'const scoped = await runner.run(ctx, "snapshot", {', | ||
| ) |
There was a problem hiding this comment.
Probe still requires old seam The patcher now accepts the new
scoped group-dispatch form, but host-probe.py still requires the old form, which the recorded 0.63.0 host lacks. Automatic probing therefore rejects that host. Manual manifest ingest has the opposite gap: it checks the remaining PATCH_ANCHORS without checking either group form. AGENTS.md requires patch seams to remain gated.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: patch/router_patch.py
Line: 60-63
Comment:
**Probe still requires old seam** The patcher now accepts the new `scoped` group-dispatch form, but `host-probe.py` still requires the old form, which the recorded 0.63.0 host lacks. Automatic probing therefore rejects that host. Manual manifest ingest has the opposite gap: it checks the remaining `PATCH_ANCHORS` without checking either group form. AGENTS.md requires patch seams to remain gated.
**Context Used:** AGENTS.md ([source](https://github.com/swcstudiospace/grokrouter/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| <img alt="Experimental project" src="https://img.shields.io/badge/status-experimental-ff6b2c?style=flat-square"> | ||
| <img alt="Grok Bot 0.30.0, 0.36.0 and 0.44.0" src="https://img.shields.io/badge/Grok_Bot-0.30.0_%7C_0.36.0_%7C_0.44.0-171717?style=flat-square"> | ||
| <img alt="Grok Bot 0.61.0 experimental opt-in" src="https://img.shields.io/badge/Grok_Bot_0.61.0-experimental_opt--in-8a6d00?style=flat-square"> | ||
| <img alt="Grok Bot 0.63.0 supported (probe 93e4848...)" src="https://img.shields.io/badge/Grok_Bot_0.63.0-experimental_opt--in-8a6d00?style=flat-square"> |
There was a problem hiding this comment.
Support claim precedes live acceptance The badge calls 0.63.0 “supported” based on a host probe, while fresh-Bot acceptance is still pending. AGENTS.md forbids claiming a live capability without a visible live test and redacted audit receipt; that requirement must be met before merging a support claim. The compatibility table and test matrix also still call 0.63.0 unreviewed and experimental-only, giving users conflicting installation guidance.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 16
Comment:
**Support claim precedes live acceptance** The badge calls 0.63.0 “supported” based on a host probe, while fresh-Bot acceptance is still pending. AGENTS.md forbids claiming a live capability without a visible live test and redacted audit receipt; that requirement must be met before merging a support claim. The compatibility table and test matrix also still call 0.63.0 unreviewed and experimental-only, giving users conflicting installation guidance.
**Context Used:** AGENTS.md ([source](https://github.com/swcstudiospace/grokrouter/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
The work fixes the Claude Pro/Max subscription shadowing regression (Phase B of the spec) thoroughly, with documented root cause, API-key stripping, tools disabled, redacted doctor output, and tests. However, the explicit milestone goal of upgrading to Grok Bot 0.63.0 as the new supported baseline was NOT achieved — 0.63.0 remains unreviewed/unsupported, no manifest/patch/registry exists for it, and the roadmap itself documents Phase 2 as 'Blocked' with no host probe available. The original request's core ask ('upgrade this to support Grok Bot 0.63.0... move this off old versions into 0.6x.0') is only partially satisfied: version strings were updated in docs/badges, but the actual version upgrade mechanics (Wave 1 in the workflow) and baseline cleanup replacing old versions were not completed — old versions (0.30.0/0.36.0/0.44.0) are explicitly retained as the structural template rather than retired.
Linked issues
Fixes SPE-5887 — [n1] Repo and version discovery
https://linear.app/swcstudio/issue/SPE-5887/n1-repo-and-version-discovery
Fixes SPE-5888 — [n3] Diagnose Claude Pro Max 20x auth/plan regression
https://linear.app/swcstudio/issue/SPE-5888/n3-diagnose-claude-pro-max-20x-authplan-regression
Fixes SPE-5889 — [n2] Decompose into upgrade phases
https://linear.app/swcstudio/issue/SPE-5889/n2-decompose-into-upgrade-phases
Fixes SPE-5890 — [n4] Options for version upgrade mechanics
https://linear.app/swcstudio/issue/SPE-5890/n4-options-for-version-upgrade-mechanics
Fixes SPE-5891 — [n5] Compare and select fix strategy for Claude auth path
https://linear.app/swcstudio/issue/SPE-5891/n5-compare-and-select-fix-strategy-for-claude-auth-path
Fixes SPE-5892 — [n6] Risks, missing info, and blockers
https://linear.app/swcstudio/issue/SPE-5892/n6-risks-missing-info-and-blockers
Fixes SPE-5893 — [n7] Execution plan with waves and verification
https://linear.app/swcstudio/issue/SPE-5893/n7-execution-plan-with-waves-and-verification
Notion task: https://app.notion.com/p/3ecbc1a0c7ae81b6a01be8a9b8787cd0?pvs=204
Assessment
--ignore-gsd)ultrathink graph ut-muow60ig-746ac719
Note
Medium Risk
Changes subscription billing, credential handling, and host patching for a new Grok Bot version; behavior is heavily unit-tested but live Bot acceptance remains pending.
Overview
Fixes the Anthropic path so turns bill the Claude Pro/Max subscription instead of a stray
ANTHROPIC_API_KEY. Turns now useanthropicSubscriptionEnv(API-key vars stripped,CLAUDE_CODE_OAUTH_TOKENkept), disable Claude Code tools, drop permission bypass, and cap at one structured reply; prompts and model discovery match that contract. Sign-in isclaude auth login --claudeaiwith optionalsetup-token;grokbot-router doctorprints redactedsignedIn/subscription/rateLimitTiervia--anthropic-billinginstead of rawauth status.Adds Grok Bot 0.63.0 host support from a real probe:
patch/manifests/0.63.0.json,compatibility/0.63.0-hosts.json,0.63.0insupported-apps.jsonand both installers, andGROUP_DISPATCH_CANDIDATESinrouter_patch.pyso group-member dispatch validates/patches either the pre-0.63 or 0.63+ seam. Planning/docs/README matrix are updated; 0.30/0.36/0.44 stay structural templates and live fresh-Bot acceptance is still not claimed for Max billing or 0.63.Tests cover env stripping, disabled tools, billing redaction, patch seam counts, and related error classification.
Reviewed by Cursor Bugbot for commit 062a3c4. Bugbot is set up for automated code reviews on this repo. Configure here.
The PR is not safe to merge while release and patch tests fail and group-seam checks can accept an incomplete patch.
Fix with agent prompt
Summary
The PR changes Claude subscription billing and diagnostics, and adds a recorded 0.63.0 host fingerprint, manifest, and installer version entries.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Installer checks desktop version] --> B{Version gate} B -->|Reviewed 0.63.0| C[Exact host hash, bytes and anchors] B -->|Newer, explicit opt-in| D[Structural anchors and patch dry run] C --> E[Patch host] D --> E C -. Registry refresh requires signature .-> F[Signed host registry]Reviews (5) · Last reviewed commit: "feat: add Grok Bot 0.63.0 from real host..."