You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
schema sync: removing a literal defaultValue from a field leaves the physical column DEFAULT on every SQL database an earlier release created, so unset writes keep storing the old default #36245
Filing gate ① · Source: fleet · found by seat 4's area a4-B while building #35123 to the maintainer's ruling B (record 7073270426). Measured; fork report on #35123: 7073430021.
What happens
When a field's metadata drops a literal defaultValue, schema sync does not remove the physical DEFAULT the column got when an earlier release created the table. The removal does nothing on any existing SQL database, and nothing says so. An insert that leaves the field unset still stores the old default.
The case in hand: sys_notification_preference.digest was created with DEFAULT 'none', which is also in the 18.0.0 upgrade fixture. Ruling B on #35123 removes that default so that an unset digest stores empty (follow the organisation) and 'none' means an explicit off. On an upgraded database, every writer that leaves digest unset would still store 'none'. Those writers are the Setup grid, the page, the API, flows and agents. That is the silent opt-out the ruling rejected.
Measured on main a5a5312, with a real SqlDriver on a file database over two boots (a4-B's dev).
Done when
Schema sync drops a physical column DEFAULT that the metadata no longer declares, and changes one whose declared literal changed. A fresh database and an upgraded one then agree.
Pins:
A field whose defaultValue is removed between two boots stores null on an unset insert after the second boot.
#35123 ships with a stopgap: a before-insert hook on sys_notification_preference writes digest null when the caller leaves it unset. When this card merges, remove that hook and its pin in the same PR (or a follow-up named here).
reach: every object whose literal defaultValue is removed or changed after a release created its table. Measured on one, the rest read from code.
Business reason: a metadata change that looks applied has no effect on customers' existing databases, so behaviour differs between new and upgraded installations.
Reader: the SQL driver / schema-sync lane (packages/plugins/driver-sql or wherever column sync lives).
Dedupe: physical column DEFAULT, defaultValue removed, schema sync retrofit → none.
Grade: p2. The one live case (#35123) has a stopgap; the class is silent.
Triage: lands in domain:server (schema sync, SQL drivers) · pm:queue; rationale: area:data · Bug · when metadata drops or changes a literal defaultValue, schema sync leaves the old physical column DEFAULT on every database an earlier release created. Every unset insert keeps storing the old value, and nothing says so. Measured on sys_notification_preference.digest (#35123 ruling B ships a stopgap hook); every other such field is read from code. Data is silently wrong, which is p1 under the 2026-11-21 standard → p1 (was p2) · size M.
Claim: PM loop round 1 · 2026-11-22T22:56Z
Session: session_01JQwxbZeHNsF3RWcWpj7rGj
Thread session: session_01JQwxbY6wSVQZ9QBM4hLeYw
Account: os-warren
Branch: the card thread's own branch, named at its first push; the seat amends this claim then
Worktree: objectstack-issue-36245
Domain: domain:server
Seat: repo:objectstack#1
Area: card thread #36245 (w1-T1)
File surface: packages/drivers/driver-sql/**, the #35123 stopgap before-insert hook on sys_notification_preference and its pin, one changeset (stop on breach; explain in the report)
Container & model: M, mode:thread, model: opus — dispatch-gates --tier: no path-derived mandate, default tier (M, design judgement); the thread's first report states the served tier, effort: high
Clause-②: no
Metadata-protocol: none
Responsibility: the platform's schema sync in objectstack (packages/drivers/driver-sql) leaves the old column DEFAULT | no platform path covers it today | every deployment whose table an earlier release created reaches it; measured on sys_notification_preference.digest (#35123 ruling B, stopgap hook on main)
Thread-read: 7073817365
Premise: holds as filed (measured on main a5a5312 by the filer); the card thread re-measures on current main before code and stops on a miss
Serial constraints cleared: no open PR names #36245 or #35123's stopgap; no in-flight claim on packages/drivers/driver-sql/** from this seat
{
"issue": 36245,
"status": "done",
"branch": "claude/project-thread-a7tzee",
"pr": "https://github.com/objectstack-ai/objectstack/pull/36564",
"session": "session_01JQwxbY6wSVQZ9QBM4hLeYw",
"premise_still_valid": true,
"summary": "Premise measured on main d463c46f (SQLite file, Postgres 16, MariaDB 10.11; two SqlDriver boots, autoMigrate off and safe): a removed literal defaultValue and a changed one both kept the old column DEFAULT, unset inserts stored it, and detectManagedDrift answered []. Fix: diffManagedTable reports a literal DEFAULT the field no longer declares (drop_column_default) and one whose declared literal changed (new op set_column_default), both safe; applied in place on Postgres/MySQL (ALTER COLUMN SET/DROP DEFAULT) and by the SQLite rebuild; Turso remote answers needs-table-rebuild. Expressions (NOW, sequences), tokens, object and multi-value defaults and temporal literals are never touched. DEVIATION from the dispatch: the #35123 stopgap hook is kept, because a plain production boot never applies safe drift (reconcileAndWarnDrift), so removing it would reopen the silent digest opt-out on upgraded production databases until os migrate apply runs; the card allows a follow-up, see open_questions. No Claim: comment exists on the card (thread dispatch); the card assignee was not written.",
"tests": "New src/sql-driver-36245-stale-literal-default.test.ts: 39/39 passed with OS_TEST_POSTGRES_URL (PG 16.x local) and OS_TEST_MYSQL_URL (MariaDB 10.11 local) set, all three cells exercised. pnpm --filter @objectstack/driver-sql test (SQLite cells) under the lock: Test Files 269 passed | 13 skipped, Tests 4539 passed | 262 skipped, VERDICT command-exit 0. Same with live PG: 4 failures, all three-way timezone-skew guards (local server is UTC), none in drift/default suites. driver-turso test: 103 files, 2647 tests passed. Ablation 1 (drop arm disabled, fix committed first, scripts/ablation-replace.mjs anchor 1 to 0, blob c1c48d28 to cb129bf6): 5 red incl. expected 'none' to be null; restored blob == HEAD. Ablation 2 (kept literal read as different, blob c1c48d28 to 36666e6a): 9 red incl. kept-default detectManagedDrift toEqual([]) on every cell; restored blob == HEAD. Tests import ./index.js (src), so no dist leg was needed.",
"gates": "Local derived set (dispatch-gates --commands, 73 families) run at f0e393b6: 69 exit 0; check:facade-delegation-only exit 1 (sql-driver.ts 10073 over ceiling 10071 from my doc lines) fixed in 3862c8b1 and re-run exit 0 (10069 lines); 3 exit 3 PREREQUISITE NOT MET = NOT MEASURED: check-plugin-teardown-shape --self-test (shallow clone), check:dual-build-cjs-loads and check:lean-entry-closure (need a full build). --ran reconciliation: 73 derived, 70 run, 3 UNRUN (the three above). check:nul-bytes exit 0 at 3862c8b1. pnpm --filter driver-sql typecheck / driver-turso typecheck exit 0. PR check-runs at 3862c8b1 when reported: Lint & Repo Gates success, Test UI success, Dogfood Regression Gate success, Live E2E UI success; Build Core and Test Core 1-10 in_progress; Temporal Conformance (live PG + MySQL) skipped on the PR run. Gate results: /mnt/project-files/issue-36245/gate-results-f0e393b6.tsv.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "5 — mcp__github__issue_read x2 (get, get_comments on #36245), mcp__github__pull_request_read x1 (get_check_runs #36564), plus 2 schema loads via ToolSearch; no write tool",
"api_writes": "2 relay strokes — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST issues/36564/assignees os-warren, run 45083192230, body 7941 bytes read back identical) and this os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/36245/comments via post-stamped); plus git push x3 (not REST)",
"open_questions": [
{
"question": "Remove the #35123 before-insert hook on sys_notification_preference now, as the dispatch says, or keep it until production boots apply the dropped DEFAULT?",
"options": [
"A — remove it now: fresh databases, dev, publish, artifact boot and os migrate apply are correct; a plain production boot only logs the drift, so an upgraded production database that never runs os migrate apply keeps storing 'none' (the explicit opt-out) for every unset digest — the outcome ruling 7073270426 rejected. Work: one small follow-up PR.",
"B — keep it (this PR): the seat files a follow-up card carrying the hook removal, blocked on a maintainer decision whether a production boot may apply safe column-DEFAULT drift (today it alters no existing column by design); the hook's comment is repointed there. Work: one card now, removal later.",
"C — the messaging service applies its own object's safe column changes once at boot (like the package-install relax of #33724): removes the hook now, but is a new production-boot DDL door, a policy change needing a ruling."
],
"recommendation": "B, because it is the only option that keeps the ruling's no-silent-opt-out guarantee on upgraded production databases today and costs nothing until the boot policy is decided; A trades a measured silent data-semantics regression for a cleanup."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"class: none · reach: n/a · noted in PR Acceptance notes, not filed: a field that GAINS a defaultValue after its table exists keeps no DEFAULT (outside the ruling's two verbs; MySQL TEXT cannot carry one); a NOW() default the field no longer declares is a physical expression and is left alone; a changed temporal literal is never compared · dedupe words: column DEFAULT added later, NOW default removed, temporal default changed · carrier: none"
]
}
Activity
objectstack-fleet commentedon Nov 22, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(schema sync, SQL drivers) ·pm:queue; rationale: area:data · Bug · when metadata drops or changes a literaldefaultValue, schema sync leaves the old physical columnDEFAULTon every database an earlier release created. Every unset insert keeps storing the old value, and nothing says so. Measured onsys_notification_preference.digest(#35123 ruling B ships a stopgap hook); every other such field is read from code. Data is silently wrong, which is p1 under the 2026-11-21 standard → p1 (was p2) · size M.fix(messaging): a member's own "no digest" or "no quiet hours" beats …
objectstack-fleet commentedon Nov 22, 2026
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj
Claim: PM loop round 1 · 2026-11-22T22:56Z
Session:
session_01JQwxbZeHNsF3RWcWpj7rGjThread session:
session_01JQwxbY6wSVQZ9QBM4hLeYwAccount:
os-warrenBranch: the card thread's own branch, named at its first push; the seat amends this claim then
Worktree:
objectstack-issue-36245Domain:
domain:serverSeat:
repo:objectstack#1Area: card thread
#36245(w1-T1)File surface:
packages/drivers/driver-sql/**, the #35123 stopgap before-insert hook onsys_notification_preferenceand its pin, one changeset (stop on breach; explain in the report)Container & model:
M,mode:thread,model: opus — dispatch-gates --tier: no path-derived mandate, default tier (M, design judgement); the thread's first report states the served tier,effort: highClause-②: no
Metadata-protocol: none
Responsibility: the platform's schema sync in objectstack (
packages/drivers/driver-sql) leaves the old column DEFAULT | no platform path covers it today | every deployment whose table an earlier release created reaches it; measured onsys_notification_preference.digest(#35123 ruling B, stopgap hook on main)Thread-read: 7073817365
Premise: holds as filed (measured on main a5a5312 by the filer); the card thread re-measures on current main before code and stops on a miss
Serial constraints cleared: no open PR names #36245 or #35123's stopgap; no in-flight claim on
packages/drivers/driver-sql/**from this seatobjectstack-fleet commentedon Nov 22, 2026
repo:objectstack#1 · os-warren · session_01JQwxbY6wSVQZ9QBM4hLeYw
os-dev-report
{ "issue": 36245, "status": "done", "branch": "claude/project-thread-a7tzee", "pr": "https://github.com/objectstack-ai/objectstack/pull/36564", "session": "session_01JQwxbY6wSVQZ9QBM4hLeYw", "premise_still_valid": true, "summary": "Premise measured on main d463c46f (SQLite file, Postgres 16, MariaDB 10.11; two SqlDriver boots, autoMigrate off and safe): a removed literal defaultValue and a changed one both kept the old column DEFAULT, unset inserts stored it, and detectManagedDrift answered []. Fix: diffManagedTable reports a literal DEFAULT the field no longer declares (drop_column_default) and one whose declared literal changed (new op set_column_default), both safe; applied in place on Postgres/MySQL (ALTER COLUMN SET/DROP DEFAULT) and by the SQLite rebuild; Turso remote answers needs-table-rebuild. Expressions (NOW, sequences), tokens, object and multi-value defaults and temporal literals are never touched. DEVIATION from the dispatch: the #35123 stopgap hook is kept, because a plain production boot never applies safe drift (reconcileAndWarnDrift), so removing it would reopen the silent digest opt-out on upgraded production databases until os migrate apply runs; the card allows a follow-up, see open_questions. No Claim: comment exists on the card (thread dispatch); the card assignee was not written.", "tests": "New src/sql-driver-36245-stale-literal-default.test.ts: 39/39 passed with OS_TEST_POSTGRES_URL (PG 16.x local) and OS_TEST_MYSQL_URL (MariaDB 10.11 local) set, all three cells exercised. pnpm --filter @objectstack/driver-sql test (SQLite cells) under the lock: Test Files 269 passed | 13 skipped, Tests 4539 passed | 262 skipped, VERDICT command-exit 0. Same with live PG: 4 failures, all three-way timezone-skew guards (local server is UTC), none in drift/default suites. driver-turso test: 103 files, 2647 tests passed. Ablation 1 (drop arm disabled, fix committed first, scripts/ablation-replace.mjs anchor 1 to 0, blob c1c48d28 to cb129bf6): 5 red incl. expected 'none' to be null; restored blob == HEAD. Ablation 2 (kept literal read as different, blob c1c48d28 to 36666e6a): 9 red incl. kept-default detectManagedDrift toEqual([]) on every cell; restored blob == HEAD. Tests import ./index.js (src), so no dist leg was needed.", "gates": "Local derived set (dispatch-gates --commands, 73 families) run at f0e393b6: 69 exit 0; check:facade-delegation-only exit 1 (sql-driver.ts 10073 over ceiling 10071 from my doc lines) fixed in 3862c8b1 and re-run exit 0 (10069 lines); 3 exit 3 PREREQUISITE NOT MET = NOT MEASURED: check-plugin-teardown-shape --self-test (shallow clone), check:dual-build-cjs-loads and check:lean-entry-closure (need a full build). --ran reconciliation: 73 derived, 70 run, 3 UNRUN (the three above). check:nul-bytes exit 0 at 3862c8b1. pnpm --filter driver-sql typecheck / driver-turso typecheck exit 0. PR check-runs at 3862c8b1 when reported: Lint & Repo Gates success, Test UI success, Dogfood Regression Gate success, Live E2E UI success; Build Core and Test Core 1-10 in_progress; Temporal Conformance (live PG + MySQL) skipped on the PR run. Gate results: /mnt/project-files/issue-36245/gate-results-f0e393b6.tsv.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "5 — mcp__github__issue_read x2 (get, get_comments on #36245), mcp__github__pull_request_read x1 (get_check_runs #36564), plus 2 schema loads via ToolSearch; no write tool", "api_writes": "2 relay strokes — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST issues/36564/assignees os-warren, run 45083192230, body 7941 bytes read back identical) and this os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/36245/comments via post-stamped); plus git push x3 (not REST)", "open_questions": [ { "question": "Remove the #35123 before-insert hook on sys_notification_preference now, as the dispatch says, or keep it until production boots apply the dropped DEFAULT?", "options": [ "A — remove it now: fresh databases, dev, publish, artifact boot and os migrate apply are correct; a plain production boot only logs the drift, so an upgraded production database that never runs os migrate apply keeps storing 'none' (the explicit opt-out) for every unset digest — the outcome ruling 7073270426 rejected. Work: one small follow-up PR.", "B — keep it (this PR): the seat files a follow-up card carrying the hook removal, blocked on a maintainer decision whether a production boot may apply safe column-DEFAULT drift (today it alters no existing column by design); the hook's comment is repointed there. Work: one card now, removal later.", "C — the messaging service applies its own object's safe column changes once at boot (like the package-install relax of #33724): removes the hook now, but is a new production-boot DDL door, a policy change needing a ruling." ], "recommendation": "B, because it is the only option that keeps the ruling's no-silent-opt-out guarantee on upgraded production databases today and costs nothing until the boot policy is decided; A trades a measured silent data-semantics regression for a cleanup." } ], "security_findings": "none", "out_of_scope_findings": [ "class: none · reach: n/a · noted in PR Acceptance notes, not filed: a field that GAINS a defaultValue after its table exists keeps no DEFAULT (outside the ruling's two verbs; MySQL TEXT cannot carry one); a NOW() default the field no longer declares is a physical expression and is left alone; a changed temporal literal is never compared · dedupe words: column DEFAULT added later, NOW default removed, temporal default changed · carrier: none" ] }fix(driver-sql): a column's literal DEFAULT follows the field's decla…
fix(driver-sql): removing a field default stores NULL on MySQL 8, and…