Adopt pm-cli 2026.7.28 and replace hand-rolled api doubles with the real SDK test harness

Merged
UN
3mo ago
+84-87

Bumps pm-cli to 2026.7.28 (peer >=2026.7.28, dev ^2026.7.28) across package.json, manifest.json, and the module version constant, and migrates the activation tests off hand-rolled api doubles.

Both test/smoke.test.ts and test/atomic.test.ts constructed a fake api object and called activate(api) directly, which asserts the extension against itself: the real pm host can reject a registration outright and the suite stays green while the shipped extension is broken. pm-cli 2026.7.28 makes the real harness hard-fail on host-owned flag collisions, so migrating to createExtensionTestHarness converts a silent production break into a red test.

  • smoke.test.ts: the capabilities test now activates through pm's real engine via createExtensionTestHarness, asserting activation.failed is empty plus the linear sync/linear validate command contracts, the linear/linear-sync importers, the linear exporter, the preflight override, the schema item fields, and the importer/exporter flags.
  • atomic.test.ts: the captureImporter hand-rolled double is replaced with harness.runImporter so the linear-sync importer is exercised through real dispatch.

All existing behavioural assertions are preserved (migration, not rewrite).

Closes pm-linear-itg9. See https://github.com/unbraind/pm-linear/blob/main/.agents/pm/chores/pm-linear-itg9.toon

Summary by Sourcery

Adopt pm-cli 2026.7.28 and migrate extension activation/importer tests to the official pm-cli SDK test harness for real host-engine validation.

Build:

  • Bump pm-linear extension version to 2026.7.28 and align pm-cli peer/dev dependency constraints and manifest metadata with pm-cli 2026.7.28.

Documentation:

  • Roll the changelog forward to 2026.7.28 with a note about eliminating any via real Linear GraphQL and SDK handler types.

Tests:

  • Replace hand-rolled activation api doubles in smoke tests with createExtensionTestHarness, asserting clean activation and the expected commands, schema fields, importers, exporter, preflight override, and flags.
  • Exercise the linear-sync importer through createExtensionTestHarness.runImporter instead of a custom capture helper so dry-run behavior is validated against the real dispatch engine.

Chores:

  • Record the pm-linear-itg9 chore artifacts under .agents/pm/ for tracking this change.

Summary by cubic

Upgrades to @unbrained/pm-cli 2026.7.28 and replaces hand-rolled API doubles with the real SDK test harness to validate activation and importer dispatch end to end. Regenerates the 2026.7.28 changelog after closing pm-linear-itg9 and widens .gitattributes JSON merge fence to fix CI and reduce merge conflicts.

  • Dependencies

    • Bump @unbrained/pm-cli to peer >=2026.7.28 and dev ^2026.7.28.
    • Update extension version to 2026.7.28 in package.json, manifest.json, and the module constant.
  • Refactors

    • Migrate tests to createExtensionTestHarness:
      • smoke.test.ts: activate via the real engine; assert clean activation; verify linear sync/linear validate command contracts, linear/linear-sync importers, linear exporter, preflight override, schema fields, and importer/exporter flags.
      • atomic.test.ts: replace the importer double with harness.runImporter to exercise linear-sync through real dispatch; confirm --dry-run never writes.