Skip to content

Seed Schema Commons types behind SEED_COMMONS_TYPES flag - #76

Merged
cuibonobo merged 2 commits into
mainfrom
claude/issue-59-seed-types-2178sy
Aug 21, 2026
Merged

Seed Schema Commons types behind SEED_COMMONS_TYPES flag#76
cuibonobo merged 2 commits into
mainfrom
claude/issue-59-seed-types-2178sy

Conversation

@cuibonobo

Copy link
Copy Markdown
Member

Summary

  • Adds @haverstack/commons (now published — haverstack/core#167 is resolved) as a dependency and registers all eight Draft-status org.haverstack/* types via defineCommonsTypes() in initStack(), gated behind a new SEED_COMMONS_TYPES config flag, default off.
  • defineType() is idempotent by construction, so seeding runs safely on every boot, same as the existing system-type seeding.
  • Docs: .env.example, the README.md config table, and a new docs/deployment.md#schema-commons-seeding section explain why the flag defaults off while the package is Draft status.

Test plan

  • pnpm typecheck
  • pnpm lint
  • pnpm format:check
  • pnpm test (331 passed, including 3 new cases in tests/stack.test.ts: flag off → no commons types registered, flag on → all 8 registered, and a second boot with the flag on causes no createdAt churn)

Closes #59


Generated by Claude Code

claude added 2 commits August 21, 2026 19:22
Registers the eight Draft-status org.haverstack types from
@haverstack/commons on startup when opted in, defaulting off since the
package is Draft status and registering a type is not free (GET /types,
every app's type cache). defineType() is idempotent by construction, so
this is safe on every boot.

Closes #59
…types-2178sy

# Conflicts:
#	.env.example
#	README.md
#	src/config.ts
#	tests/setup.ts
@cuibonobo
cuibonobo merged commit f9186cb into main Aug 21, 2026
4 checks passed
@cuibonobo
cuibonobo deleted the claude/issue-59-seed-types-2178sy branch August 21, 2026 20:07
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.

Decision: does the reference server seed the Schema Commons types?

2 participants