Explain Kiro CLI requirement when no fetch strategy is available - #2465
Conversation
7cbdd58 to
a96e849
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7cbdd58b06
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try await fetcher.fetchResolvedCookie(logger: logger) | ||
| }, | ||
| clearCached: { cached in | ||
| _ = CookieHeaderCache.clearIfCurrent(provider: .ollama, expected: cached) |
There was a problem hiding this comment.
Honor failed conditional clears before storing fallback cookies
When the cached Ollama cookie expires while another refresh or login has already replaced the cache, clearIfCurrent returns false, but this path discards that result and fetchAutomatic continues to import and store a browser cookie unconditionally. In that race the older in-flight refresh can overwrite the newer cache entry, switching the app back to a stale or different browser session; treat a failed conditional clear as a retry/abort before allowing storeResolved to run.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 11:59 PM ET / August 2, 2026, 03:59 UTC. ClawSweeper reviewWhat this changesReplace Kiro’s generic unavailable-fetch message with install and login instructions for the local Kiro CLI, plus a focused regression test. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain The patch is a narrow, correct repair for Kiro users whose only fetch strategy is unavailable because Priority: P3 Review scores
Verification
How this fits togetherCodexBar selects a provider-specific usage fetch strategy and presents its failure message in the app when no strategy can run. Kiro has one local CLI strategy, so an unavailable flowchart LR
A[Kiro enabled] --> B[Kiro fetch plan]
B --> C[Local Kiro CLI strategy]
C --> D{kiro-cli discoverable?}
D -->|No| E[Unavailable strategy error]
D -->|Yes| F[Kiro usage probe]
F --> G[Usage snapshot or probe error]
E --> H[CodexBar error display]
G --> H
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the provider-specific fallback while adding a redacted live capture that shows a Kiro refresh without Do we have a high-confidence way to reproduce the issue? Yes, from source: Kiro registers only a CLI strategy, whose availability check requires Is this the best way to solve the issue? Yes. A Kiro-only fallback message is the narrowest repair because it preserves every other provider’s existing generic error and aligns the unavailable-strategy path with Kiro’s existing CLI and login diagnostics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e0b3d50922f0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
Problem
When Kiro is enabled but
kiro-cliis not installed or is not discoverable, CodexBar only reports:No available fetch strategy for kiro.This is not actionable for users. Kiro usage is currently collected exclusively through the local Kiro CLI, which also requires the user to complete
kiro-cli login(including enterprise/IAM login flows).Cause
The Kiro fetch strategy advertises itself as available only when
kiro-clican be resolved. If it is unavailable, the genericProviderFetchError.noAvailableStrategymessage is surfaced without provider-specific guidance.Solution
Add a Kiro-specific error message that explains the CLI requirement, links to the Kiro CLI documentation, and tells the user to run
kiro-cli login.Other providers retain the existing generic error message.
Validation
swift test --filter KiroStatusProbeTests(56 tests passed)make check(passed; SwiftFormat and SwiftLint reported no violations)