Repository navigation
Conversation
QualityMax ReviewVerdict: COMMENT · Confidence: evidence-backed scan Re-review: Open the QualityMax check and select Re-review after it completes. Files eligible: 3 · Files reviewed: 3 · Files with findings: 0 · Findings: 0 · Inline cards: 0 Priority findings
Review gates
Important files
Change diagram — Flowflowchart TD
Input[User Command: /set or /settings] --> Reconcile[reconcileCloudSession]
Reconcile --> CheckConfig{Config.CloudSync == false?}
CheckConfig -- Yes --> Stop[stopCloudSession]
CheckConfig -- No --> Start[startCloudSession]
Stop --> Done[Session Inactive]
Start --> Active[Session Active]
Review lifecycleUse the inline cards to inspect evidence and suggested remediation. Re-run the QualityMax review after pushing a fix; unchanged cards are identified by their stable finding marker. Dismiss with a reason through the existing QualityMax/GitHub review feedback flow. 0 prior card(s) are stale/resolved on this head. Proof legend: GROUNDED deterministic scanner evidence · MODEL-ONLY advisory model judgment · MODEL-REVIEWED patch model judgment, not reproduction. QualityMax project results are available in the configured project. Receipt · commit |
QualityMax Code HealthGrade A · 100/100 · PASS — 0 finding(s) in 3 file(s). No code-health findings. Full report · Commit 431b9c0 |
|
| Gate | Result |
|---|---|
| 🔍 AI diff review | ✅ Clean · gemini-3.1-flash-lite · completed · 3 eligible / 3 reviewed · gemini-3.1-flash-lite |
| 🔍 SAST | completed · 3 eligible / 3 reviewed · qwen3.7-plus |
| 🔍 Canonical PR review delivery | completed · 0 eligible / 0 reviewed · exact-head review #6081619243 and overview #7205797886 confirmed |
| 🔍 Repository runtime evidence | completed · 0 eligible / 0 reviewed · runtime execution passed for the assessed revision |
| 🔍 Runtime evidence policy | completed · 0 eligible / 0 reviewed · admissible runtime evidence satisfies this advisory runtime-only policy |
| 🧪 Repo Tests | ✅ 1591/1591 passed (go) |
| 🤖 AI Tests | ❌ blocked before sandbox execution (sandbox_concurrency_limit; go_test) |
Powered by QualityMax — AI-Powered Test Automation
There was a problem hiding this comment.
🟡 Changes recommended
The regression test calls Stop() directly and leaves REPL consent wiring untested; same-run Run coverage is needed to verify that abandoned sessions neither complete nor upload and new sessions upload only post-opt-in messages.
1 open issue
What changed in this PR
This PR makes cloud session tracking respect consent changes in the terminal REPL, keeping messages entered while sync is disabled out of later uploads.
Changes:
- Clear the active tracker on opt-out and establish fresh history and token boundaries on re-enable.
- Leave the consent preference unset when the first-time prompt encounters a read error.
- Add regression tests for interrupted consent and history isolation across opt-out and project changes.
| File | Description |
|---|---|
internal/session/cloud_session.go |
Handle consent read errors and reset tracking without uploading on opt-out. |
internal/session/cloud_session_test.go |
Test interrupted prompts and post-opt-in upload boundaries. |
internal/repl/repl.go |
Reconcile cloud tracking after command and settings changes. |
Review effort: Balanced
| reconcileCloudSession := func() { | ||
| cfg := ag.AppConfig | ||
| if cfg != nil && cfg.CloudSync != nil && !*cfg.CloudSync { | ||
| stopCloudSession() |

Turning off cloud sync clears the active tracker immediately. Turning it back on starts a new session at the current history and token offsets. Messages entered while sync was disabled stay local, including when the user switches projects before enabling sync again.
A read error at the first-time consent prompt leaves the preference unset so the user can answer later. Pressing Enter still selects the displayed default.
Tests exercise the HTTP requests across opt-out and re-enable, scoped history across projects, and an interrupted prompt. Ran
go test ./...andgo vet ./....