feat: package the official versioned API contract #299
No reviewers
Labels
No labels
activitypub
admin
api
architecture
articles
auth
bug
cleanup
cli
comments
compatibility
config
contacts
content
database
deployment
design
dev-env
diagnostics
docs
documentation
email
enhancement
feature
federation
feed
health
homepage
implementation
integration
logging
mastodon
media
navigation
npm-packages
openapi
opengraph
packages
passkeys
preview
priority:high
priority:low
priority:medium
production
proof
proxy
public-routes
public-ui
release
safety
slug-api
slug-auth
slug-core
slug-federation
slug-media
slug-template
social
sources
status:active
status:canceled
status:done
status:inprogress
status:waiting
syndication
tailwind
template
test
web
webauthn
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit!299
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-a0aa9f9e-api-contract"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Generated sites currently maintain their own OpenAPI definition and advertise only the ambiguous legacy API version. This moves the official contract into @evcraddock/slug-api: generated sites import and serve that document and explicitly advertise
slugkit-management-apicontract1.1.0in/api/v1/meta.The API package exports the document and ships a static
openapi.jsonplus a digest manifest mapping contract version to package version. Contract versions remain independent of package/template versions; legacy sites without a declaration stay unknown. Build and Git-history guards detect artifact drift, immutable-version reuse, and version bumps inconsistent with the reviewed change classification. CI fetches full history for these checks and retains deterministic tests only. Release helper tests now exclude integration tests as well.Validation:
./scripts/pre-pr.sh(build, formatting, lint, types, full local tests); package dry-run; actual npm tarball extraction verifies document equality, package mapping and SHA-256 digest. Focused tests cover served identity, metadata opt-in, static artifact identity and release-policy failures.Release order: publish slug-core 0.1.2 before slug-api 0.2.0, then publish the template artifact with its pinned dependencies. This PR does not publish packages or deploy sites. Archive hosting, slugkit.com adoption, Doctor conformance and CLI compatibility remain separate tasks.
Task: task-a0aa9f9e
Review update
fa79cc7701against task task-a0aa9f9e.