agent-orchestrator/packages/cli/__tests__
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
..
commands fix: align first-run project identity (#2039) 2026-05-23 21:58:04 +05:30
lib feat(cli): support AO_PUBLIC_URL for reverse-proxied dashboards (#1757) 2026-05-20 23:09:04 +05:30
options refactor CLI version wiring for diff coverage 2026-04-02 17:34:19 +05:30
scripts Fix ao update workspace rebuild (#2033) 2026-05-23 15:40:18 +05:30
index.test.ts feat(cli): install-aware ao update, startup notifier, doctor version check (#1156) 2026-04-13 11:46:26 +05:30
program.test.ts feat(notifier): make notifier system robust with manual harness and desktop setup (#1736) 2026-05-19 14:48:40 +05:30