feat(setup): select coding agent integrations#2168
Conversation
|
@azizur100389 is attempting to deploy a commit to the NexusCore Team on Vercel. A member of the Team first needs to authorize it. |
✨ PR AutofixFound fixable formatting / unused-import issues across 30 changed lines. Comment |
CI Report✅ All checks passed Pipeline Status
Test Results
✅ All 11520 tests passed 16 test(s) skipped — expand for details
Code CoverageTests
📋 View full run · Generated by CI |
magyargergo
left a comment
There was a problem hiding this comment.
Tri-review digest — PR #2168
Methods & engine breakdown. Codex (the one non-Claude engine; live, returned a clean no-findings report) + 3 completed Claude persona lanes (risk, correctness, adversarial). The dedicated test/CI lane ended mid-investigation; its domain was covered by the other lanes plus coordinator verification that the vitest project glob test/**/*.test.ts includes the new test file and the green coverage job ran it. Claude-lane agreement below is "consistent across personas," not independent confirmation.
What's solid (validated). The no-flag path is provably byte-identical to the prior full setup — selectedCodingAgents(undefined) returns all five agents and the gated call sequence matches the pre-PR order element-for-element (confirmed by Codex and three Claude lanes). Validation runs before any filesystem write: -c "", -c ,, -c " , " all fail closed with exit code 1 and zero side effects. Case/whitespace normalization, repeat/comma accumulation, and Set dedup are correct. No short-flag collision (query's -c, --context is a different subcommand). Agent names are validated against a static allowlist before any use — no injection surface. i18n keys are complete in en + zh-CN (the localization exhaustiveness test passes). All acceptance criteria of #2105 are met. CI is fully green (the Vercel failure is authorization noise).
Findings — all P3, none merge-blocking (details inline):
setup.ts— explicitly selecting an undetected agent (gitnexus setup -c codexwithout~/.codex) exits 0 and still prints "MCP is ready!" (entry point: the gatedsetupCodexcall at setup.ts:1026; unconditional message: setup.ts:1074-1077, unchanged lines). Risk + adversarial lanes; coordinator-verified[code-read].setup.ts:98— programmatic''/[]input selects all agents while the CLI-shaped['']errors. Correctness + adversarial; coordinator-verified[code-read].setup.ts:89—satisfies readonly EditorId[]checks membership, not completeness; a futureEditorIdmember would be silently skipped even on the no-flag path. Risk + correctness; coordinator-verified[code-read].
Lower-priority notes. README/help drift: the quickstart and uninstall docs don't mention the new flag, and the setup command description still implies unconditional all-platform setup; uninstall has no matching selectivity (harmless — it skips unconfigured entries). Test gaps: the new test file doesn't pin the no-flag default (covered by pre-existing setup.test.ts), and nothing exercises the string-form input branch or -c "" through a real Commander parse.
Refuted suspicions (validation worked): partial writes on invalid input, exit-code swallowing through the lazy-action wrapper, collector first-call crash, flag collisions, mixed-case duplicate flags, no-flag reordering.
Automated multi-tool review digest (Codex + Claude persona lanes, coordinator-verified). Please verify findings before acting on them.
| if (selected.has('claude')) await setupClaudeCode(result); | ||
| if (selected.has('antigravity')) await setupAntigravity(result); | ||
| if (selected.has('opencode')) await setupOpenCode(result); | ||
| if (selected.has('codex')) await setupCodex(result); |
There was a problem hiding this comment.
[P3] Explicitly selected but undetected agent exits 0 and prints "MCP is ready!" [code-read]
Trigger: gitnexus setup -c codex on a machine without ~/.codex. setupCodex pushes Codex (not installed) to result.skipped (setup.ts:823), the summary prints MCP configured for: none, the unconditional next-steps block (setup.ts:1074-1077, unchanged in this PR) still says "MCP is ready!", and the process exits 0 — so a scripted gitnexus setup -c codex && ... masks the failure.
The unconditional message is pre-existing, but -c changes a skip from best-effort to explicit user intent. Suggested: when an explicitly selected agent lands only in result.skipped, print a warning naming it (and consider a nonzero exit), or gate the next-steps block on something actually being configured.
|
Addressed the review findings in 8ce386a.\n\n- Empty string and empty-array inputs now fail validation consistently; only an absent option selects all agents.\n- Replaced the membership-only tuple check with an exhaustive Record<EditorId, EditorId>, so future EditorId additions fail typecheck until represented.\n- Explicit selections that configure nothing now exit nonzero with a clear diagnostic, and the command no longer prints MCP is ready in that state.\n- Added regressions for empty programmatic inputs, explicitly selected missing agents, and the no-flag all-detected-agents default.\n- Documented --coding-agent/-c in both README command surfaces.\n\nValidation: 35/35 focused tests pass; npx tsc --noEmit passes; pre-commit formatting/typecheck passes. The complete local Windows suite was also run with an isolated temp directory: 9,672 tests passed, while 13 unrelated timing/worker tests failed. The earlier Ubuntu hook-concurrency failure was outside this setup diff; no tests were weakened or bypassed. Fresh CI is now running on the pushed commit. |
|
The remaining CI failure is unrelated to this PR's setup-agent changes: est/unit/hooks.test.ts → Plugin: hook does not exceed MAX_INFLIGHT under simultaneous bursts, where the timing-sensitive assertion accounted for 7/10 processes. The focused setup tests (35/35), typecheck, lint, Windows, macOS, benchmarks, and all other Ubuntu tests passed. I have not changed or weakened the concurrency test. GitHub does not permit me to rerun the workflow from the fork (Must have admin rights), so please rerun the failed Ubuntu job when convenient. |
Summary
Supported values: \cursor, \claude, \�ntigravity, \opencode, \codex.
Validation
px tsc --noEmit`n- focused setup/help tests: 62 passed
Fixes #2105