Skip to content

fix(capabilities): use canonical catalog opt-in - #597

Merged
artiphishle merged 1 commit into
mainfrom
fix/595-canonical-capability-opt-in
Oct 8, 2026
Merged

artiphishle merged 1 commit into
mainfrom
fix/595-canonical-capability-opt-in

Conversation

@artiphishle

Copy link
Copy Markdown
Collaborator

Summary

  • use src/capabilities/index.ts as the sole local capability-catalog opt-in
  • preserve unrelated package.json#ankh metadata and reject stale published capability metadata
  • run packed catalog parity only when published ankh.capabilities exists

Validation

  • bun test src/tools/package/resolvePackageCapabilitiesAsync.test.ts src/tools/workflows/releaseVerification.test.ts
  • bun run build
  • bun run typecheck
  • bun run lint (0 errors; 42 existing warnings)
  • bun run knip:check (existing configuration hint)
  • bun test (177 passed; 6 existing macOS temporary-directory realpath failures in APM packed-artifact tests)
  • bun run changeset:status
  • bun run format:check
  • bun run docs:check

Closes #595

Copy link
Copy Markdown
Collaborator Author

Review on c4617b4: the stale-metadata and unrelated-ankh.structure fixes are correct, but there is one merge blocker.

resolvePackageCapabilitiesAsync() now treats the existence of src/capabilities/index.ts as requiring package.json#ankh. That breaks the intentional @ankhorage/api case documented by the rollout audit: API publishes a public empty static CAPABILITIES surface for composition, while executable operations are dynamically projected and the package intentionally has no static ankh.capabilities discovery metadata.

Required behavior:

  • source absent + no ankh.capabilities -> no materialization;
  • source absent + stale ankh.capabilities -> deterministic error;
  • source present + ankh discovery metadata -> materialize/synchronize;
  • source present + no ankh discovery metadata -> allow the public/source catalog to exist without forcing static discovery metadata (API-like dynamic-only package).

Please replace the current "canonical source requires package.json ankh discovery metadata" regression with an API-like source-only regression, and keep packed parity conditional on actual published ankh.capabilities.

No package-name special case. After that, rebase on current main because this draft is already behind active Devtools work and rerun full CI.

Copy link
Copy Markdown
Collaborator Author

Review status: the canonical opt-in design is correct and matches Doctor: src/capabilities/index.ts is the capability-participation signal, unrelated ankh.* metadata is preserved, stale ankh.capabilities without a source catalog is rejected, and packed parity is skipped only when no published capability metadata exists.

Keep this PR Draft until PR #604 is integrated and the full suite is green. This PR is also the required base for issue #601 because both touch the packed parity/release-template path; #601 should build on the rebased #597 result rather than create a competing release.yml implementation.

@artiphishle
artiphishle marked this pull request as ready for review October 8, 2026 18:58
@artiphishle
artiphishle force-pushed the fix/595-canonical-capability-opt-in branch from c4617b4 to 1ed4b47 Compare October 8, 2026 19:00
@artiphishle
artiphishle force-pushed the fix/595-canonical-capability-opt-in branch from 1ed4b47 to 61db66f Compare October 8, 2026 19:02
@artiphishle
artiphishle merged commit 2df87bd into main Oct 8, 2026
2 checks passed
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.

fix(capabilities): use canonical catalog opt-in

1 participant