Skip to content

Real-install tests run in the unit suite and CI instead of only as a deliberate step #883

Description

@williamthorsen

Description

The agents package's real-library/full-install tests become deliberate-only *.int.test.ts tests — excluded from the unit suite, nmr test:coverage, and nmr ci, and run on demand via nmr test:integration with a generous timeout.

Issues

  • install-smoke.test.ts (three real-library installs) and sync-global-smoke.test.ts (a real-library init --global then sync --global) ran in the default unit suite and CI at the 5 s default timeout, where they flaked on timeout under load — install timed out in a nmr test:coverage run. Recurring: Install command tests time out under parallel load by installing the full real library #865 previously had to rationalize install-command tests to remove timeout flakes.
  • The repo's .int. integration convention (the *.int.test.ts naming, the integration/standalone vitest configs, the test:integration command) existed but was unused and not wired to the agents package.

Acceptance criteria

Must have

  • The agents real-library tests are *.int.test.ts, run under a dedicated nmr test:integration command, with a timeout generous enough that a real install does not flake.
  • Those *.int.test.ts tests do not run in the default unit suite (nmr test), in nmr test:coverage, or under nmr ci.
  • install-smoke.test.tsinstall.int.test.ts and sync-global-smoke.test.tssync-global.int.test.ts, both kept full-catalog (the three real installs and the real-library global sync retained, not scaled to a sample).
  • packages/agents/vitest.integration.config.ts and packages/agents/vitest.standalone.config.ts exist and are consistent with the package's base config.

Should have

  • The deliberate-only .int. convention is documented where the testing setup is described.

Context

Activation is presence-based: @williamthorsen/nmr (≥ 0.16.0, already present via the dep upgrade on main) selects the integration script set for any package that provides vitest.integration.config.ts — so adding that config is the activation, with no package.json script overrides and no further nmr bump. The upstream change that enables this is williamthorsen/node-monorepo-tools#422.

The other install tests (install.test.ts, etc.) build a synthetic content tree and are not real installs; the two tests above are the only real-library tests, and their value is full-catalog coverage — catching a stray template token, a bare-relative link, or a skill-count mismatch anywhere in the real library — so they stay full-catalog rather than sampled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions