agent-orchestrator/packages/cli/__tests__/commands
Madhav Kumar 2fa27412ea
fix: align first-run project identity (#2039)
* fix: align first-run project identity

* test(cli): canonicalize tmpDir with realpathSync for macOS

The new "writes a flat local config and returns the global project
identity" test failed on macOS because os.tmpdir() returns /var/... while
the project path stored in the global registry is canonicalized to
/private/var/... by registerProjectInGlobalConfig and loadConfig. Wrap
the comparison operand in realpathSync to match the prior art in the
PR's own integration test (cli-first-run-config.integration.test.ts:31).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(cli): address PR review feedback

Three small follow-ups raised by reviewers on #2039:

- Remove stale findFreePort mock in autoCreateConfig test — the function
  no longer calls findFreePort, so the mock setup was dead code
- Drop misleading "⚠ Could not register project in global config" warning
  printed immediately before rethrowing. The yellow warning visually
  signalled a recoverable-and-continuing flow, but the function now
  throws fatally. Let the thrown error propagate to the caller for
  presentation; the registerProjectInGlobalConfig error message is
  descriptive enough on its own
- Add trailing newline to cli-first-run-config.integration.test.ts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: suraj-markup <sk9261712674@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 21:58:04 +05:30
..
completion.test.ts refactor(core): storage redesign — projectId-based paths, JSON metadata (#1466) 2026-04-28 17:55:53 +05:30
dashboard.test.ts feat(windows): complete Windows support (#1025) 2026-05-09 00:10:53 +05:30
doctor.test.ts feat(notifier): make notifier system robust with manual harness and desktop setup (#1736) 2026-05-19 14:48:40 +05:30
events.test.ts feat(core): activity events for recovery, metadata corruption, agent-report (#1692) 2026-05-18 17:27:36 +05:30
migrate-storage.test.ts feat(cli): wire activity events into CLI commands and supervisor lifecycle (#1698) 2026-05-18 21:04:25 +05:30
notify.test.ts feat(notifier): make notifier system robust with manual harness and desktop setup (#1736) 2026-05-19 14:48:40 +05:30
open.test.ts feat(windows): complete Windows support (#1025) 2026-05-09 00:10:53 +05:30
plugin.test.ts feat: add $schema support to agent-orchestrator.yaml (#1373) 2026-04-26 19:42:45 +05:30
project.test.ts feat(cli): wire activity events into CLI commands and supervisor lifecycle (#1698) 2026-05-18 21:04:25 +05:30
report.test.ts refactor(core): storage redesign — projectId-based paths, JSON metadata (#1466) 2026-04-28 17:55:53 +05:30
review-check.test.ts Add multi-project storage, resolution, and project settings support (#1343) 2026-04-21 17:45:55 +05:30
review.test.ts Add orchestrator-driven code review board (#1871) 2026-05-19 11:47:57 +05:30
send.test.ts feat: enable worker→orchestrator dialogue via `ao send` with auto-sender prefix (#1787) 2026-05-10 21:50:43 +05:30
session.test.ts feat(windows): complete Windows support (#1025) 2026-05-09 00:10:53 +05:30
setup.test.ts feat(notifier): make notifier system robust with manual harness and desktop setup (#1736) 2026-05-19 14:48:40 +05:30
spawn.test.ts feat(cli): wire activity events into CLI commands and supervisor lifecycle (#1698) 2026-05-18 21:04:25 +05:30
start-stop-instrumentation.test.ts feat(cli): wire activity events into CLI commands and supervisor lifecycle (#1698) 2026-05-18 21:04:25 +05:30
start.test.ts fix: align first-run project identity (#2039) 2026-05-23 21:58:04 +05:30
status.test.ts Add orchestrator-driven code review board (#1871) 2026-05-19 11:47:57 +05:30
update-instrumentation.test.ts feat(cli): wire activity events into CLI commands and supervisor lifecycle (#1698) 2026-05-18 21:04:25 +05:30
update.test.ts Fix ao update workspace rebuild (#2033) 2026-05-23 15:40:18 +05:30