Repository navigation
Conversation
Pre-v1.40.2 writers replaced only the exact [mcp_servers.qmax] header, so a
[mcp_servers.qmax.env] table elsewhere in ~/.codex/config.toml survived. The
next inline env = { ... } defined env twice and Codex failed to load with
'invalid configuration'. PR #223 fixed the writer; these tests pin it:
- a stale env table separated from the qmax header by other tables is removed,
unrelated bytes are preserved, and a second write is idempotent
- a config the old writer already broke is refused and left unchanged
QualityMax ReviewVerdict: COMMENT · Confidence: evidence-backed scan Re-review: Open the QualityMax check and select Re-review after it completes. Files eligible: 1 · Files reviewed: 1 · Files with findings: 0 · Findings: 0 · Inline cards: 0 Priority findings
Review gates
Important files
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 1 file(s). No code-health findings. Full report · Commit 407c98e |
|
| Gate | Result |
|---|---|
| 🔍 AI diff review | ✅ Clean · gemini-3.1-flash-lite · completed · 1 eligible / 1 reviewed · gemini-3.1-flash-lite |
| 🔍 SAST | completed · 1 eligible / 1 reviewed · qwen3.7-plus |
| 🔍 Canonical PR review delivery | completed · 0 eligible / 0 reviewed · exact-head review #6069150078 and overview #7183824151 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
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Why
qmax-code v1.40.0 broke
~/.codex/config.tomlin the field. Its writer replaced only the exact[mcp_servers.qmax]header, so a separate[mcp_servers.qmax.env]table further up the file (with other tables in between) survived. The next write appended an inlineenv = { ... }, which definedenvtwice, and Codex refused to start:#223 (shipped in v1.40.2) already fixes the writer. The existing test only covers an
envtable placed right after the qmax header, so nothing pins the non-adjacent layout seen in practice.What
Test-only change in
internal/agent/codex_config_test.go:TestCodexMCPRemovesNonAdjacentEnvTable: a stale[mcp_servers.qmax.env]separated from[mcp_servers.qmax]by other server and project tables is removed. Unrelated bytes are unchanged, the output is valid TOML, the new env wins, and a second write is idempotent.TestWriteCodexMCPEntryLeavesDuplicateEnvConfigUnchanged: a config the old writer already broke is refused and left byte-for-byte unchanged.Verification
go test ./...passes.[mcp_servers.qmax](len(path) == 2),TestCodexMCPRemovesNonAdjacentEnvTablefails.