feat(toolchain): wire CodeGraph and OpenSrc by default - #762
Conversation
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
3 finding(s) — 🟡 3 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:383 |
The installer overwrites a repository's pre-existing codegraph MCP definition and the uninstaller later deletes it as though Guardex |
| 🟡 medium | src/cli/commands/claude.js:520-522 |
The check accepts any truthy MCP entry instead of verifying the managed server specification. |
| 🟡 medium | src/toolchain/index.js:570-575 |
The backup stops reflecting the pre-install state after the first run. |
Provider codex · commit 67dce55
67dce55 to
27aa584
Compare
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟡 1 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:423-426 |
Stale MCP ownership state survives when .mcp.json is missing. |
Provider codex · commit 27aa584
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
2 finding(s) — 🟡 1 medium · 🔵 1 low
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:427-429 |
An orphaned ownership record is retained when .mcp.json has been removed. |
| 🔵 low | src/cli/commands/claude.js:658-660 |
Uninstall reports that managed servers were pruned even when uninstallMcpServer returned preserved and changed nothing. |
⚠️ 2 finding(s) could not be anchored to the diff
These line numbers are outside the reviewed hunks, so GitHub cannot host them as inline comments.
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:427-429 |
An orphaned ownership record is retained when .mcp.json has been removed. |
| 🔵 low | src/cli/commands/claude.js:658-660 |
Uninstall reports that managed servers were pruned even when uninstallMcpServer returned preserved and changed nothing. |
Provider codex · commit 77b1b32 ·
Install both companion CLIs, configure CodeGraph MCP safely for Codex and Claude, and distribute OpenSrc routing guidance and skills.\n\nConstraint: Preserve existing global Codex config with Guardex backups before external writes.\nTested: node --test test/claude-install.test.js test/status.test.js; node --test test/setup.test.js; npm run lint; npm run package:check
Restore repository MCP definitions during uninstall, validate exact managed specs, and rotate CodeGraph config backups on retries.\n\nTested: node --test test/claude-install.test.js\nTested: node --test test/setup.test.js\nTested: npm run lint\nTested: npm run package:check
Clear orphaned ownership metadata when repository MCP configuration disappears so later installs cannot restore obsolete user definitions.\n\nTested: node --test test/claude-install.test.js\nTested: npm run lint
Do not count user-modified MCP definitions as removed during Claude integration uninstall.\n\nTested: node --test test/claude-install.test.js\nTested: npm run lint
1d729ee to
0dc1635
Compare
|
Review findings addressed and verified after rebasing onto current
Verification: targeted Claude/setup/status tests passed; full suite passed (1118 pass, 0 fail, 1 skip); format, lint, package check, and Trivy HIGH/CRITICAL gate passed. |
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟠 1 high
⛔ Merge gate: blocked — 1 blocking finding(s) (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟠 high | src/cli/commands/claude.js:407-413 |
Reinstalling after a user edits a managed MCP definition discards that edit and retains stale ownership metadata. |
Provider codex · commit 0dc1635
Preserve user MCP edits made after the initial managed installation. Tested: node --test --test-reporter=dot test/claude-install.test.js
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟡 1 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:364-366 |
MCP definitions are compared using property-order-sensitive JSON serialization. |
Provider codex · commit 2cccbbc
Avoid reinstall churn when JSON object keys are reordered. Tested: node --test --test-reporter=dot test/claude-install.test.js
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
2 finding(s) — 🟠 1 high · 🟡 1 medium
⛔ Merge gate: blocked — 1 blocking finding(s) (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟠 high | src/toolchain/index.js:615-617 |
A failed CodeGraph installer leaves partially modified global Codex configuration in place. |
| 🟡 medium | src/cli/commands/claude.js:397-399 |
An unchanged MCP configuration can retain stale ownership metadata from a deleted and recreated .mcp.json. |
Provider codex · commit 803121c
Restore global Codex files after installer failure and invalidate MCP ownership when the config file is recreated. Tested: node --test --test-reporter=dot test/claude-install.test.js test/setup.test.js
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟡 1 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:423-424 |
Stale ownership state is reused after .mcp.json has been replaced. |
Provider codex · commit 120f964
Constraint: Preserve exact user-owned managed definitions during later uninstall. Tested: node --test --test-reporter=dot test/claude-install.test.js; npx biome lint src/cli/commands/claude.js test/claude-install.test.js; git diff --check
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟡 1 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/toolchain/index.js:594-596 |
The configuration check mistakes one TOML section for a complete CodeGraph installation. |
Provider codex · commit 703520a
Constraint: Treat Codex MCP registration as complete only when its global AGENTS.md also exists. Tested: node --test --test-reporter=dot test/claude-install.test.js test/setup.test.js; npx biome lint src/toolchain/index.js test/setup.test.js; git diff --check
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
2 finding(s) — 🟠 1 high · 🟡 1 medium
⛔ Merge gate: blocked — 1 blocking finding(s) (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟠 high | src/cli/commands/claude.js:34 |
The gitguardex skill source path no longer points to the existing packaged skill directory. |
| 🟡 medium | src/toolchain/index.js:593-595 |
The already-configured check accepts any CodeGraph section header without verifying that it contains a usable command and arguments. |
Provider codex · commit 930fe3c
- HIGH src/cli/commands/claude.js:34 The gitguardex skill source path no longer points to the existing packaged skill directory. The previous implementation loaded it from `.claude/skills/gitguardex`, so installations will silently report a source-missing entry and omit the core gitguardex skill.
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟠 1 high
⛔ Merge gate: blocked — 1 blocking finding(s) (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟠 high | src/toolchain/index.js:648-658 |
The CodeGraph detector ignores valid TOML inline and parent-table definitions. |
Provider codex · commit fd1721c
- HIGH src/toolchain/index.js:658 The CodeGraph detector ignores valid TOML inline and parent-table definitions. Configurations such as `mcp_servers.codegraph = { command = "codegraph", args = ["serve", "--mcp"] }` or `[mcp_servers]\ncodegraph = {...}` are treated as missing, so the installer may append a second definition for the same key; the subsequent textual verification can accept that duplicate even though it makes the Codex TOML invalid.
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟡 1 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:452 |
A truthy non-object mcpServers value is accepted and then mutated as though it were a map. |
Provider codex · commit f72c986
Prevent false-success installs when .mcp.json or mcpServers is not an object.\n\nTested: node --test --test-reporter=dot test/claude-install.test.js\nTested: node --test --test-reporter=dot test/setup.test.js\nTested: npx biome lint src/cli/commands/claude.js test/claude-install.test.js src/toolchain/index.js test/setup.test.js
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
2 finding(s) — 🟡 2 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:489 |
Installing a partially mismatched managed MCP server discards all user-defined fields on that server. |
| 🟡 medium | src/toolchain/index.js:653 |
The hand-written TOML scanner treats table-looking lines inside multiline strings as actual sections. |
Provider codex · commit fd7c36a
Keep user-defined MCP fields while repairing managed keys and ignore CodeGraph-looking TOML inside multiline strings.\n\nTested: node --test --test-reporter=dot test/claude-install.test.js\nTested: node --test --test-reporter=dot test/setup.test.js\nTested: npx biome lint src/cli/commands/claude.js test/claude-install.test.js src/toolchain/index.js test/setup.test.js
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
2 finding(s) — 🟠 1 high · 🟡 1 medium
⛔ Merge gate: blocked — 1 blocking finding(s) (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟠 high | src/cli/commands/claude.js:373 |
Conflicting MCP transport fields are incorrectly treated as compatible. |
| 🟡 medium | src/cli/commands/claude.js:450-453 |
A JSON null root is silently converted into an empty object. |
Provider codex · commit 72b6382
- HIGH src/cli/commands/claude.js:373 Conflicting MCP transport fields are incorrectly treated as compatible. A definition such as `{type:"http",url:"https://attacker",command:"gx",args:["mcp","serve"]}` passes this subset comparison, so installation and checks can accept a remote server instead of the intended local stdio command; the merge path also preserves these conflicting fields. Compatibility and installation must reject or remove transport fields that conflict with each managed specification.
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟡 1 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/cli/commands/claude.js:580-588 |
Uninstall cannot restore pre-existing MCP definitions containing conflicting transport fields. |
Provider codex · commit 3ea165e
Reject null MCP roots and reconstruct sanitized managed definitions before restoring their user-owned transport fields.\n\nTested: node --test --test-reporter=dot test/claude-install.test.js\nTested: npx biome lint src/cli/commands/claude.js test/claude-install.test.js
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
1 finding(s) — 🟡 1 medium
✅ Merge gate: pass — no blocking findings (blocks on high/critical).
| Severity | Location | Finding |
|---|---|---|
| 🟡 medium | src/toolchain/index.js:738-739 |
Bracket depth is counted inside quoted TOML strings, so valid CodeGraph sections can be misclassified as unconfigured. |
Provider codex · commit 2cf5dc4
Count array delimiters only outside quoted values when validating CodeGraph MCP sections.\n\nTested: node --test --test-reporter=dot test/setup.test.js\nTested: npx biome lint src/toolchain/index.js test/setup.test.js
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
✅ No findings. Nothing worth an inline comment in this diff.
Provider codex · commit ddb08aa
NagyVikt
left a comment
There was a problem hiding this comment.
🛡️ GitGuardex code-assist
✅ No findings. Nothing worth an inline comment in this diff.
Provider codex · commit ddb08aa
Summary
Test plan