Repository navigation
docs(cli),test(runtime): relax NOT NULL is needs_confirm in the drift table, and a Turso remote publish reports the relax it cannot apply - #33387
Merged
Conversation
…eds_confirm, and a Turso remote publish reports the relax it cannot apply The cli.mdx classification table listed relaxing NOT NULL as safe; the differ classes relax_not_null needs_confirm (ADR-0113 D5) and dev auto-reconcile never applies it. The table now lists it there, adds widen_date_to_datetime to the safe row, and says what the publish of an object applies. The plan example and the dev self-heal callout follow. The publish column-changes harness gains a Turso REMOTE case: the relax needs the SQLite table rebuild that transport does not run, so the publish answers success with the object-column-changes-not-applied advisory naming the column, and the column keeps NOT NULL. Claude-Session: https://claude.ai/code/session_016WV4cw787kMeaX7oyz7DDC Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
|
domain:server#5 · os-elon-musk · session_016WV4cw787kMeaX7oyz7DDC ACCEPT · area A4 · head 11c91b4 · 2026-11-14T18:38Z
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Elon · project thread
Part of #32883
Clause-②: no
Metadata-protocol: none
维护者速读
cli.mdx的漂移分类表把「放宽 NOT NULL」从safe改到needs_confirm,safe行补上widen_date_to_datetime,表后加一段说明发布对象时会应用哪些列变更;同时修正示例输出与开发态自愈提示里的同一错误。另在发布列变更测试中加了一个 Turso 远程用例。relax_not_null判为needs_confirm,开发态自动迁移从不应用它);Turso 远程跳过表重建后是否真的回报object-column-changes-not-applied此前没有端到端钉子。content/docs/deployment/cli.mdx分类表(约 1277 行)及其后新增段落;packages/runtime/src/domains/meta-object-publish-column-changes.test.ts末尾新增的 describe。pnpm --filter @objectstack/runtime exec vitest run src/domains/meta-object-publish-column-changes.test.ts,预期 4 个用例全部通过。skip-changeset标签,由席位挂)。What changes
Docs (
content/docs/deployment/cli.mdx) — each claim checked againstorigin/main4c9104e:relax NOT NULLmoves from thesaferow toneeds_confirm(schema-drift.tspushes bothrelax_not_nullarms withcategory: 'needs_confirm'; ADR-0113 D5). Thesaferow gainswiden_date_to_datetime(category: 'safe'inschema-drift.ts). Theneeds_confirmrow says dev auto-reconcile never applies it (reconcileAndWarnDriftappliescategory === 'safe'only).safecolumn change and arelax_not_nullwhose field declaresstorage: { notNull: false }; index changes stay withos migrate apply; a change the database cannot apply leaves the publish a success with theobject-column-changes-not-appliedwarning naming each column (isPublishedColumnChangeinsql-driver-schema-sync.ts;ensureObjectStorageandpublishedColumnChangesNotAppliedNoticeinmetadata-protocol).relax_not_nullunder theSafeheading (the CLI renders it underNeeds confirmationwith~,CATEGORY_METAincli/src/utils/schema-migrate.ts), and the dev self-heal callout gave "you just made a field optional" as an auto-applied safe change.Test (
packages/runtime/src/domains/meta-object-publish-column-changes.test.ts) — a new top-level describe in the existing publish column-changes harness: a Turso REMOTE driver (libsql://URL over an@libsql/clientfile client, the double the driver's remote-face pins and the runtime ownership-guard pin use) publishestitlefromstorage.notNull: truetofalse. The relax needs the SQLite table rebuild that transport does not run, so the driver reports itskipped; the test asserts the publish still answers success, carries exactly onewarningadvisory with ruleobject-column-changes-not-appliednaming'title' (relax_not_null), and the column still readsnotnull = 1in the database file.Placement: the card names
packages/drivers/driver-turso/**tests, but the advisory is produced by@objectstack/metadata-protocol, whichdriver-tursodoes not depend on, so an end-to-end pin cannot live there. It sits in the runtime harness that already owns the publish wiring, as a top-level describe (ruling record 6583487846: a new pin for a component with a shared harness file goes into that file).Tests
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-object-publish-column-changes.test.tsat 11c91b4: Test Files 1 passed (1), Tests 4 passed (4); lock VERDICT command-exit 0. The log shows the Turso arm took the skip path:relax_not_null on leave_request.title is unsupported on the Turso REMOTE transport — skipped: it needs the SQLite table rebuild, ....pnpm --filter @objectstack/runtime typecheck: exit 0 (tsc --noEmitandcheck:test-typecheckOK, test layer debt held).@objectstack/driver-tursoresolves tosrc/in the runtime vitest config, so no dist rebuild is involved):scripts/ablation-replace.mjsreplaced theskipped.push(d);on theneeds-table-rebuildarm ofTursoDriver.applyMigrationEntries(anchor hits 1, blob 22c770ffb78c to 168795236a53). Result: the Turso test red,expected [] to deeply equal [ 'warning' ], Tests 1 failed / 3 passed. Restored: blob back to 22c770ffb78c (HEAD),git diff HEADempty.@objectstack/runtimesuite was not run locally (the diff adds one describe to one test file and changes no source);Test Coreruns it in CI.Verification
Derived gate families at 11c91b4 (81 commands)
Changeset: none. Nothing here publishes:
content/docs/**is in no package, and the runtime test file is outsidepackages/runtimefiles[](dist, README, CHANGELOG). Built-output check: test symbols 0 hits inpackages/runtime/dist, positive controlDriverPlugin4 files. So the PR needs theskip-changesetlabel, which the seat attaches.Left on the card: N1 (ADR-0113 D5 sentence) is its own governed-path draft PR on
claude/area-A4-32883-adr; N2 and N3 (MySQL-only) and the optional N6 are not done here.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cw787kMeaX7oyz7DDC