Skip to content

feat: v1 extensions envelope and SQLite-enforced write rules (CR1–CR2) - #16

Merged
mwhitham merged 2 commits into
mainfrom
cursor/v1-extension-db-rules-9334
Oct 15, 2026
Merged

mwhitham merged 2 commits into
mainfrom
cursor/v1-extension-db-rules-9334

Conversation

@mwhitham

Copy link
Copy Markdown
Owner

Summary

Implements contribution-readiness plan step 1 (PR 1 / CR1–CR2) before v1 npm publish:

  • Optional namespaced extensions on every v1 current record and revision (src/v1/extensions.ts, src/v1/schema.ts), with size and depth limits and tier rules (no source_id in athlete-reported extensions).
  • record_revisions.extensions_json in the initial SQLite schema, wired through read/write, export, import, and package merge.
  • SQLite enforcement triggers for direct writers (D116): two-tier wall in revision JSON and extensions, record/revision type agreement, current-revision existence, deletion flag consistency, erasure blocks, and prediction link revisions.
  • Direct-SQL tests in tests/v1-direct-sql.test.ts and round-trip tests in tests/v1-extensions.test.ts.
  • Build-history from the approved plan (D115–D128, spec section 19, progress) plus D129 recording owner approval to build before plan PR Plan a contribution-ready public foundation #15 merges.

Verification

  • pnpm check:public-data
  • pnpm typecheck
  • pnpm test (319 tests)
  • pnpm build
  • Regenerated schema/1.0.0/* and examples/demo-athlete/athlete.ath.sqlite

Notes

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 14, 2026 16:46
Co-authored-by: Michael Whitham <mwhitham@users.noreply.github.com>
Optional namespaced extensions on current records and revisions persist
through SQLite, export, and import. record_revisions.extensions_json stores
the envelope. SQLite triggers enforce the two-tier wall, revision type
agreement, deletion flags, erasure blocks, and protected link revisions.

Co-authored-by: Michael Whitham <mwhitham@users.noreply.github.com>
@mwhitham
mwhitham marked this pull request as ready for review October 15, 2026 14:09
@mwhitham
mwhitham merged commit aa48cb9 into main Oct 15, 2026
1 check 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.

2 participants