Skip to content

feat(setup): select coding agent integrations#2168

Open
azizur100389 wants to merge 5 commits into
abhigyanpatwari:mainfrom
azizur100389:codex/setup-coding-agent
Open

feat(setup): select coding agent integrations#2168
azizur100389 wants to merge 5 commits into
abhigyanpatwari:mainfrom
azizur100389:codex/setup-coding-agent

Conversation

@azizur100389

Copy link
Copy Markdown
Contributor

Summary

  • add repeatable/comma-separated --coding-agent\ selection to \gitnexus setup`n- validate canonical agent names before writing any configuration
  • gate each selected platform's MCP, skills, and hooks while preserving no-flag behavior
  • localize the new help option and add single-, multi-, and invalid-selection regressions

Supported values: \cursor, \claude, \�ntigravity, \opencode, \codex.

Validation


  • px tsc --noEmit`n- focused setup/help tests: 62 passed
  • real CLI invalid-selection smoke test
  • full suite: 10,925 passed; the sole failing literal-collector assertion is reproducible on unchanged main

Fixes #2105

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

@azizur100389 is attempting to deploy a commit to the NexusCore Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

✨ PR Autofix

Found fixable formatting / unused-import issues across 30 changed lines. Comment /autofix on this PR to apply them, or run npm run lint:fix && npm run format locally.

{"schema":"gitnexus.pr-autofix/v2","state":"fixes-available","pr_number":2168,"changed_lines":30,"head_sha":"ef3675b373b10d530810b4b8496b318b249778c4","run_id":"27347716531","apply_command":"/autofix"}

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

CI Report

All checks passed

Pipeline Status

Stage Status Details
✅ Typecheck success tsc --noEmit
✅ Tests success unit tests, 3 platforms
✅ E2E success gitnexus-web changes only

Test Results

Tests Passed Failed Skipped Duration
11536 11520 0 16 571s

✅ All 11520 tests passed

16 test(s) skipped — expand for details
  • COBOL pipeline benchmark > scales with file count
  • C++ ADL emit benchmark > emit phase scales sub-quadratically with co-scaled files and sites
  • C++ pipeline benchmark > scales with file count
  • C# pipeline benchmark > scales with file count — namespaces spread across the solution
  • C# pipeline benchmark > scales with file count — all types in one (global) namespace bucket
  • C# pipeline benchmark > scales with file count — all types in one (named) namespace bucket
  • Go pipeline benchmark > scales with file count (workers enabled)
  • Go pipeline benchmark — worker pool (issue Worker idle timeout kills long Go scope extraction and surfaces as Napi::Error during analyze #1848) > does not quarantine the large generated Go file on sub-batch idle timeout
  • Go structural interface detection benchmark > scales linearly with interface × struct count
  • Go structural interface detection split-phase benchmark > separates index-build and detection time
  • PHP pipeline benchmark > scales with file count (workers enabled)
  • Ruby pipeline benchmark > scales with file count (workers enabled)
  • Rust pipeline benchmark > scales with file count (workers enabled)
  • Vue pipeline benchmark > scales with component count
  • run.cjs direct-exec entrypoint (fix(cli): steer docs, skills, and hooks through a CLI-neutral project-local runner (#1939) #1945) > resolves a .cmd shim via the Windows shell branch, passing args and exit code
  • buildTypeEnv > known limitations (documented skip tests) > Ruby block parameter: users.each { |user| } — closure param inference, different feature

Code Coverage

Tests

Metric Coverage Covered Base Delta Status
Statements 76.16% 38369/50374 N/A% 🟢 ███████████████░░░░░
Branches 64.03% 23829/37212 N/A% 🟢 ████████████░░░░░░░░
Functions 81.82% 4138/5057 N/A% 🟢 ████████████████░░░░
Lines 79.85% 34623/43357 N/A% 🟢 ███████████████░░░░░

📋 View full run · Generated by CI

@magyargergo magyargergo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

  1. setup.ts — explicitly selecting an undetected agent (gitnexus setup -c codex without ~/.codex) exits 0 and still prints "MCP is ready!" (entry point: the gated setupCodex call at setup.ts:1026; unconditional message: setup.ts:1074-1077, unchanged lines). Risk + adversarial lanes; coordinator-verified [code-read].
  2. setup.ts:98 — programmatic ''/[] input selects all agents while the CLI-shaped [''] errors. Correctness + adversarial; coordinator-verified [code-read].
  3. setup.ts:89satisfies readonly EditorId[] checks membership, not completeness; a future EditorId member 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.

Comment thread gitnexus/src/cli/setup.ts
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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Comment thread gitnexus/src/cli/setup.ts Outdated
Comment thread gitnexus/src/cli/setup.ts Outdated
@azizur100389

Copy link
Copy Markdown
Contributor Author

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.

@azizur100389

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Include --coding-agent on setup command

2 participants