Skip to content

fix(messaging): a member's own "no digest" or "no quiet hours" beats the organization's default - #36326

Merged
os-zhuang merged 7 commits into
mainfrom
claude/area-a4B-35123
Nov 22, 2026
Merged

os-zhuang merged 7 commits into
mainfrom
claude/area-a4B-35123

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread
Fixes #35123
Clause-②: no
Metadata-protocol: none
Ruling: 7073270426 on #35123 (maintainer, verbatim: 「B 没设的项继续跟随组织」), building ruling 6996036362 (「成员自己的选择优先」); interim hook per the seat's answer to fork 7073430021, F1 carried by #36245.

维护者速读

  • 用户能看到什么变化:成员在“通知设置”页选「不汇总」或清空免打扰时段并保存,从此真的不再收到组织默认的汇总或免打扰;没动过的那一项继续跟随组织,升级当天没有任何人的通知发生变化。
  • 为什么做:落实「成员自己的选择优先」,解决成员退不出组织默认汇总和免打扰的问题(本卡已升为 p1)。
  • 出错会怎样:最坏情况是某位成员的汇总或免打扰仍跟随组织,或一条旧数据被误当成本人选择;都只影响通知的送达时间,不丢通知,可通过撤回本 PR 恢复原行为。
  • 要你做什么:请你审阅、批准并亲手合并。L1 ACCEPT 7076146202,契约 PASS 7076382062(座位 7,head 621aa11);一个不阻塞的问题(一次性转换只应改转换开始前的那批「不汇总」行)和两个可选项另立 fix(messaging): the one-time digest conversion rewrites only rows that held none before its claim (follow-up of #36326) #36369 跟进。

What changes

Ruling 7073270426 (report letter B): a notification preference's digest and quiet_hours are each three states in storage, and one rule decides them. The most specific preference that sets a field decides it. A preference that leaves a field empty decides nothing for that field, so the walk goes on: the person's topic row, then their own wildcard row, then the organization's default, then the built-in default.

State digest quiet_hours
not set (follows the next row) empty empty
explicitly off (decides: off) none { "off": true }
a value (decides) daily / weekly a window { tz?, start, end }
  • Object definition (notification-preference.object.ts): digest loses defaultValue: 'none', so a row nobody chose a digest for stores empty, and a stored none is the explicit "send each one right away" its description already promised. Both field helps now state the three states, in all 11 locales.
  • Resolver (preference-resolver.ts): parseDigest admits none as a decision. parseQuietHours reads { off: true } as the explicit off, and off: true wins over any other key. resolveDigest and resolveQuietHours stop at the first row that sets the field (!== undefined) rather than at the first truthy value. The door (effectiveFor) answers a member's explicit off as { value: 'none' / null, source: 'own' }.
  • One-time conversion (preference-digest-conversion.ts, wired at kernel:ready): every stored digest = 'none', in every organization, becomes empty, ONCE. Before this release a stored none never took effect, so no one's effective digest changes at upgrade. Run-once route: a sys_migration ledger row (messaging-preference-digest-none-unset), read and written through the engine, with DATA_MIGRATION_FLAG_OBJECT imported from @objectstack/spec/system and the id spelled locally. plugin-auth's membership-backfill-ledger.ts is the precedent. The row is CLAIMED before the first rewrite, so no later boot runs again, whatever fails mid-pass. Each rewrite is a compare-and-set (where: { id, digest: 'none' }, multi: true), so a value written since the read is left alone. With no ledger on the kernel, or a ledger it cannot read, the pass does not run and says so at warn. Per-row failures are named at error with the fix. ⛔ It is deliberately NOT the every-boot shape of preference-user-conversion.ts: after this release a none is a real choice, and an every-boot pass would erase it.
  • The Notification Settings page (myPreferences.ts, NotificationSettingsPage.tsx): "No digest" (不汇总) is always offered and saves none. Clearing the quiet-hours window and pressing Save stores { off: true }, never empty. A half-filled window still cannot be saved. The digestNoOff and quietHoursNoClear notes are removed from all 11 locale bundles. The quiet-hours control (ui/packages/fields) is untouched: the page never hands it the marker, because the door answers an explicit off as null with source: 'own'.
  • Docs: content/docs/data-modeling/field-types.mdx states the three states and the rule once.

Why { "off": true } for "no quiet hours, by choice" (for the contract review)

  • A marked value, not {}. {} and null are what a cleared widget or an API caller writes for each other. One written for the other would silently turn "off" back into "follow the organization". Nothing produces { off: true } by clearing something.
  • It stays an object, so the column's one JSON shape family holds and the existing JSON-string read path (parseQuietHours parses strings) covers it unchanged.
  • It is inert to the field control. ui/packages/fields readQuietHours already reads any unknown key as unreadable: it shows the value as stored and never rewrites it unless the person replaces it. So the Setup grid cannot silently drop it.
  • It names its meaning. off: true reads as "off" in a raw row, an export or an audit diff, where {} reads as "nothing".
  • Precedence is declared: off: true wins over any start / end beside it. Mixing them is not a supported write, but if it happens it reads as the stronger statement.

Deviations

  • Interim owner-side hook, TEMPORARY, carried by 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 (preference-digest-unset.ts, bound in messaging-service-plugin.ts). A SQL database created by an earlier release keeps the old physical column default (digest varchar(255) default 'none'), and schema sync never retrofits a column default on an existing table. On such a database, an insert that omits digest would get none from the database, which now means the member's explicit "no digest". The hook writes digest: null on every insert that leaves it unset, so the database default never fires. It comes out in the change that lands 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, and the code comment says so.
  • ⚠️ A write that skips engine hooks still stores none on a database that carries the legacy column DEFAULT. That covers raw SQL and a bulk load straight into the table. Such a none reads as the person's explicit "no digest" until 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 lands.
  • File surface: beyond claim revisions 7073295574 and 7073458517, the diff touches docs/audits/2026-08-tenant-audit-write-call-sites.counts/services/service-messaging.md, regenerated by node scripts/tenant-audit-census.mjs --write for the three new write call sites (the gate's own fix line). It also touches the 11 service-messaging *.objects.generated.ts bundles: en was regenerated by check-i18n-bundles.mjs --write, and the 10 translated helps were extended by hand. packages/spec/** is untouched.
  • Clause-②: no. No published accept set widens or narrows: the digest select still accepts the same three values, quiet_hours was already free JSON, and no export is added to or removed from the package index (the new modules are internal). The meaning of a stored none changes, which the one-time conversion covers. Metadata-protocol: none, because sys_notification_preference rows are data, not authored metadata.
  • After a member's explicit "no quiet hours" ({ off: true }), the digest takes its time zone from the next preference row in the walk that holds a quiet-hours window (normally the organization default), so it still flushes at midnight in that zone (for example Europe/Berlin); with no window on any row it stays on UTC (L1 R1 7075548155, fix b, at 621aa11e59; pinned in preference-resolver.test.ts with a UTC control, ablation red then restored). ADR-0030 l.93-94 still reads true: the digest still takes a quiet_hours.tz, now from the nearest row that holds a window.

Tests

Pins (service-messaging, app-shell) at 1c5040c
  • preference-resolver.test.ts (fake engine), new describe "a member's explicit off beats the organization default":
    • member none beats an org daily default, and an org weekly default (it.each);
    • member { off: true } beats the org window, including when the column holds it as a JSON string;
    • CONTROL: no member row follows the org default;
    • CONTROL: a member row with the field null, undefined or '' follows the org default, and {} is not the off;
    • a member who sets one field keeps following the org on the other, and follows a later org change;
    • a topic row's explicit choice beats the member's own wildcard row;
    • an org default row that is explicitly off is no default;
    • multi-org: the same person in org_a (opted out) and org_b (unset): org_b keeps the digest.
  • preference-digest-three-states.integration.test.ts (real ObjectQL + SqlDriver better-sqlite3 FILE database; boot 1 with the legacy object, boot 2 with the new one, same file):
    • upgraded database: an insert that leaves the digest unset stores null (the premise is asserted first: boot 1 stores none); an explicit none stays none;
    • the conversion rewrites the legacy none in org_a and org_b, including an org default row, leaves daily alone, and records sys_migration with { status: converted, converted: 3, failed: [] }, with no error logged;
    • a none written after the conversion is still none after a second boot (already-run), both an updated row and a fresh insert;
    • with no ledger on the kernel the pass does not run, warns once, and leaves the row as stored;
    • the door (effectiveFor) answers the member's explicit off as own, and a member row that leaves both unset follows the org (default).
  • myPreferences.test.ts / NotificationSettingsPage.test.tsx: "No digest" is offered while an org digest is in force and saves digest: 'none'; a cleared window saves quiet_hours: { off: true }; a half-filled window cannot be saved.

Runs, under the verify lock:

  • pnpm --filter @objectstack/service-messaging exec vitest run --maxWorkers=2: VERDICT command-exit 0, Test Files 80 passed (80), Tests 1075 passed (1075).
  • pnpm --filter @objectstack/service-messaging typecheck: exit 0.
  • pnpm --filter @object-ui/app-shell exec vitest run --root ../.. --maxWorkers=2 packages/app-shell/src/console/notification-settings: Test Files 3 passed (3), Tests 46 passed (46).
  • pnpm --dir ui exec vitest run --maxWorkers=2 scripts/: Test Files 172 passed, 2 skipped (174).
Ablations: each pin's subject mutated through scripts/ablation-replace.mjs (WRAP mode, run under the lock), each restored to the HEAD blob with an empty git diff HEAD
# Subject mutated Red
A1 parseDigest admits none → removed 5 failed: none beats daily, none beats weekly, topic row, multi-org, door pin
A2 parseQuietHours off: true line deleted 3 failed: off beats window, JSON-string off, door pin
A3 unset read as none (null / '' → 'none') 4 failed: CONTROL field-unset, one-field-follows, multi-org, door CONTROL
A4 the hook's data.digest = null deleted 1 failed: upgraded database, unset stores null
A5 early already-run check removed stayed GREEN (42/42): the claim's duplicate ledger id re-reads as already-run, so the early check is a second guard, not the pin's subject
A5b the claim written under another id ('ablated-' + startedAt) 2 failed: records itself; a none written after the conversion survives a second boot
A6 conversion read scoped to tenantId: 'org_a' 1 failed: rewrites every organization's legacy none
A7 quietHoursStored(null) returns the draft 2 failed: stored as { off: true } (unit), cleared window saves the off (page)
A8 digestChoices drops none 3 failed: offered while org digest in force (unit), page offers and saves none, current value none

The service-messaging subjects are imported from src by relative path, so no dist/ was involved; the app-shell subjects likewise. A8's first attempt was NOT MEASURED (lock queue-timeout 99) and was re-run with the result shown.

Acceptance notes

  • The page has no "follow the organization again" action for digest and quiet hours. Writing the field empty would do it, but the ruling did not ask for one. The Setup grid can still clear the field.
  • The plugin's wiring of the hook and the conversion is exercised by messaging-service-plugin.test.ts's boot tests (green), not by a dedicated pin. The pins drive the modules directly.
  • If the ledger insert fails after the read, the pass does not run, and the next boot tries again. A none written between those boots would then be converted. This is logged at error with the fix.
  • Carried by fix(messaging): the one-time digest conversion rewrites only rows that held none before its claim (follow-up of #36326) #36369: contract review 7076382062 S1 (the one-time conversion should rewrite only the pre-claim snapshot of none rows), plus the optional "follow the organization again" page action and the shared QUIET_HOURS_OFF spelling.

Verification

  • Read first, by risk: packages/services/service-messaging/src/preference-digest-conversion.ts (the run-once claim and the compare-and-set), packages/services/service-messaging/src/preference-resolver.ts (parseDigest / parseQuietHours and the two walks), packages/services/service-messaging/src/preference-digest-unset.ts (the temporary hook).
  • Two minutes: pnpm --filter @objectstack/service-messaging exec vitest run --maxWorkers=2 src/preference-digest-three-states.integration.test.ts src/preference-resolver.test.ts, expect 2 files and 42 tests green, including "a none written after the conversion is still none after a second boot".
Local gates (dispatch-gates --commands at 1c5040c, 109 commands)
  • node scripts/pm/dispatch-gates.mjs --commands: 109 derived. At 1c5040c, 105 ran in one pass with each exit code captured before any pipe: all exit 0. Four ran on their own: pnpm --dir ui exec vitest run scripts/ (under the lock, maxWorkers=2) exit 0, 172 passed and 2 skipped; pnpm --filter @objectstack/spec run check:skill-examples exit 0 after building the client-react closure; pnpm check:type-check-debt exit 0; pnpm check:dual-build-cjs-loads UNRUN.
  • --ran reconciliation: 109 derived, 108 run, 0 NOT-MEASURED, 1 UNRUN (check:dual-build-cjs-loads). That is a declared narrowing: its prerequisite is a full pnpm build of the monorepo, so the CI Lint and Repo Gates job carries it.
  • Earlier reds, fixed in this branch: check:tenant-audit-census (census regenerated), check:engine-double-contract and check:objectql-double-limit (the doubles were replaced by a real engine in the integration file).
  • node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0. check:i18n: in sync.
  • NOT MEASURED: app-shell type-check, because the ui closure was not built (the unresolved modules are the @object-ui/* packages). The only notification-settings diagnostic is the existing apiFetch line, unchanged from origin/main. CI Type Check UI carries it.

Generated by Claude Code

…he organisation default (#35123)

Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1
Co-authored-by: Claude <noreply@anthropic.com>
…e unset-digest hook and the one-time conversion (#35123)

Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1
Co-authored-by: Claude <noreply@anthropic.com>
…s in every locale (#35123)

Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1
Co-authored-by: Claude <noreply@anthropic.com>
…registers the ledger (#35123)

Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1
Co-authored-by: Claude <noreply@anthropic.com>
… engine; census recounted (#35123)

Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/service-messaging, touching 44 documentable anchor(s).

45 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 1cd47628e64beb49eec35ae77dcd3d049f5d010c.

⛔ 15 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 anchor(s) matched too much of the corpus to be a work list: organization_id (literal, 41 pages)
  • 7 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 67 of 249 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 1cd47628e64beb49eec35ae77dcd3d049f5d010c → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 126eda98e7a8b51d4bc76bdc2e250a2ec3835c68 — the merge of head 621aa11e59e26ee578e05d2a999f54a1b8a486a6 into base 1cd47628e64beb49eec35ae77dcd3d049f5d010c, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 126eda98e7a8b51d4bc76bdc2e250a2ec3835c68 && git checkout 126eda98e7a8b51d4bc76bdc2e250a2ec3835c68
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1cd47628e64beb49eec35ae77dcd3d049f5d010c 621aa11e59e26ee578e05d2a999f54a1b8a486a6 && git checkout -B drift-repro 1cd47628e64beb49eec35ae77dcd3d049f5d010c && git merge --no-ff 621aa11e59e26ee578e05d2a999f54a1b8a486a6

node scripts/docs-audit/affected-docs.mjs --json 1cd47628e64beb49eec35ae77dcd3d049f5d010c

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 1cd47628e64beb49eec35ae77dcd3d049f5d010c → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

Final head declared (area a4-B) · 2026-11-22T06:45Z: 1c5040c142f65c8c25c0a45acd6f7c641833ca7f (Fixes #35123; ruling B 7073270426; dev report 7075210312; claim revisions 7073295574, 7073458517, 7075251258 on #35123).

  • digest and quiet hours are three states: unset follows the organisation row; none / { off: true } is the member's explicit off and beats the organisation default; a value decides. digest loses defaultValue: 'none'; run-once conversion of legacy none to unset through sys_migration row messaging-preference-digest-none-unset; temporary beforeInsert hook preference-digest-unset.ts until 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.
  • Declarations: Clause-②: no, Metadata-protocol: none, patch changeset (service-messaging, app-shell, i18n); packages/spec untouched.
  • Dev evidence at this head: service-messaging 80 files / 1075 tests passed; app-shell notification-settings 46 passed; ui scripts 172 passed / 2 skipped; 8 ablations red then restored (A5 green, explained in the report); 108 of 109 gate families exit 0, the UNRUN check:dual-build-cjs-loads carried by CI.
  • check-governed-merges: NOT governed by path, 1028 changed lines ≤ 3000. Landing per the seat's 06:40Z split: L1-a, then seat 7's contract review, the seat's four pieces, maintainer merges.
  • Checks at this head (pr-state): 61 success · 9 expected skip (check-expected-skips OK) · 0 failed · 0 pending · mergeable_state clean.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5

L1 verdict (L1-a): REWORK, one item, waiting on the seat's answer at head 1c5040c142f65c8c25c0a45acd6f7c641833ca7f (Fixes #35123, ruling B 7073270426 on top of 6996036362, declaration 7075520575, dev report 7075210312). This is a full read of origin/main...1c5040c142: 36 files, +898/−130.

席位核对

Shape and gates (l1-face CLEAN, 13 items):

  • The PR is an open draft with Fixes #35123 and no other closing keyword.
  • Declarations: Clause-②: no, Metadata-protocol: none. One changeset covers service-messaging, app-shell and i18n as patches.
  • CI: 61 success, 9 expected skip, 0 failed, 0 pending. mergeable_state is clean.
  • No battery is owed: there is no ! and no (narrowing) arm.
  • Clause-② no reads right. The digest select accepts the same three values. quiet_hours was already free JSON. No export is added. The meaning change of a stored none is covered by the conversion.

Against ruling B. Items 1 to 6 are built as ruled.

  • digest loses defaultValue: 'none', and both field descriptions state the three states.
  • parseDigest admits none, parseQuietHours reads { off: true } (it wins over other keys), and both walks stop on !== undefined.
  • The door answers an explicit off as own.
  • The one-time conversion goes through a sys_migration claim made before the first rewrite, with a compare-and-set per row. It does not run without a ledger, and it is not the every-boot shape.
  • The page offers "No digest" and saves a cleared window as { off: true }. Save stays disabled until the window is touched, so opening the page writes nothing. The two notes are gone in 11 locales, and no reference to them is left.
  • packages/spec is untouched.
  • The changeset carries the ruling's "pick it again" sentence.
  • The temporary hook is the seat's F2 from fork 7073430021. It has the carrier 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 (open), and both the code and the PR body name it. beforeInsert runs once per row (engine.ts:4796), so a bulk insert is covered.
  • Every pin the ruling lists is present. Ablations A1 to A8 each turned red, except A5, whose green result is explained. The integration file uses a real ObjectQL and SqlDriver on a file database across two boots.
  • field-types.mdx is updated. I found no other published sentence this change makes false: the protocol.mdx digest rows describe the spec protocol schema, not this object.

R1 (visible behaviour, so the seat's call; no code until it answers): an explicit "no quiet hours" also moves the member's digest to UTC midnight.

  • preference-resolver.ts:225-227: the digest window takes its time zone from the resolved quiet-hours row (digestDeferral(cadence, nowMs, qh?.tz)). ADR-0030 records this coupling at l.93-94: "digest windows currently use quiet_hours.tz → UTC".
  • Here is the case. An organization sets daily digest and a 22:00-07:00 window with tz: Europe/Berlin. A member saves "no quiet hours" on the page. Their own row now decides quiet hours as 'off', windowOf returns no window, and their organization digest flushes at 00:00 UTC (01:00 or 02:00 Berlin) instead of Berlin midnight. Before this PR the member could not opt out, so the walk always reached the organization's window and its tz.
  • No pin covers this, and neither the PR body nor the changeset says it.
  • What could close it (the seat chooses, and per common.md it goes on to the maintainer if the seat reads it as a behaviour decision):
    • (a) Keep the behaviour as ADR-0030 already describes it. Add one pin, a sentence in the changeset and the PR body, and a carrier card for "digest time zone independent of quiet hours" (the ADR's deferred sys_user time-zone fallback has no card that I could find).
    • (b) Take the digest time zone from the next row that holds a window, past an explicit off. That is a code change plus a pin.
  • Both choices are small. I have not picked one.

Next. The seat answers R1, and then a4-B makes the matching change. I read only that delta and give ACCEPT. After that, seat 7 runs the contract review, the seat adds the four pieces, and Leehom merges.

…n the organization window's time zone (#35123)

The digest took its time zone from the resolved quiet-hours row, so a
member's own { off: true } (no window) moved their organization digest to
00:00 UTC. The digest zone now comes from the next channel-wildcard row in
the walk that holds a window, past the explicit off; quiet hours stay off
for the member, and with no window on any row the digest stays on UTC.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5pb2t8Z8C64PkPyVt1
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

Final head declared (area a4-B, delta) · 2026-11-22T07:47Z: 621aa11e59e26ee578e05d2a999f54a1b8a486a6 (Fixes #35123; answers L1-a REWORK 7075548155 R1 with the seat's fix (b); dev report 7076099772 on #35123).

  • One commit on 1c5040c142, 3 files +46 −2: the digest's time zone now comes from PreferenceResolver.resolveDigestZoneWindow, which walks the same rows (member topic, member *, default topic, default *) and stops at the first row holding a window, passing unset rows and the explicit off; its tz, or UTC when that window has none or no row holds one. Quiet hours themselves resolve as before.
  • Pin (preference-resolver.test.ts): org daily digest + 22:00–07:00 Europe/Berlin, member { off: true } ⇒ no quiet-hours deferral, digest notBefore at Berlin midnight. UTC control: no window anywhere ⇒ UTC midnight. Ablation (call site back to qh?.tz) turns the Berlin pin red (1 failed / 38 passed), control green; restored to the HEAD blob, git diff HEAD empty.
  • Runs at this head under the verify lock: resolver file 39 passed; service-messaging 80 files / 1077 tests passed (1075 + 2); typecheck exit 0. Gate families for the three changed paths: 65 of 67 exit 0, the 2 UNRUN (check:dual-build-cjs-loads, check:i18n) carried by CI Lint & Repo Gates, green here.
  • Changeset and PR body each carry the sentence (body patched, read back identical). ADR-0030 l.93-94 still reads true (the digest still takes a quiet_hours.tz; the ADR names no row), so no carrier card.
  • Checks at this head (pr-state): 61 success · 9 expected skip · 0 failed · 0 pending · mergeable_state clean.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5nbzs5iP1HcMCFhZo5

L1 verdict (L1-a): ACCEPT at head 621aa11e59e26ee578e05d2a999f54a1b8a486a6 (Fixes #35123, declaration 7076123944). This is a delta read of 1c5040c142..621aa11e59: one commit, 3 files, +46/−2.

席位核对

R1 (digest time zone after an explicit "no quiet hours"): closed, as the seat chose (b) at 06:49Z.

  • preference-resolver.ts: the digest deferral now takes its zone from resolveDigestZoneWindow. It walks the same order as resolveQuietHours (own topic, own *, org topic, org *) but stops only at a row that holds a window, so it walks past an explicit off as well as an unset field. Quiet hours themselves still stop at the member's off, unchanged.
  • The pin: an org daily digest with a 22:00-07:00 Europe/Berlin window, and the member at { off: true }. There is no quiet-hours deferral (CONTROL in the same test: without the member row the deferral is 07:00 Berlin). The digest notBefore is 2026-01-02T23:00Z, which is Berlin midnight; I checked the arithmetic. CONTROL: with no window on any row, the digest stays at UTC midnight.
  • Ablation: the call site put back to qh?.tz turns the Berlin pin red (1 failed / 38 passed), with the control green, restored to the HEAD blob.
  • service-messaging: 80 files / 1077 tests passed (1075 + 2) at this head.
  • The changeset and the PR body each carry the sentence. ADR-0030 l.93-94 ("digest windows currently use quiet_hours.tz → UTC") still reads true, so no carrier is owed.

Gates at this head: 62 success, 11 skipped, 0 failed. Check Changeset was rerun after the body edit and completed success at 07:49:14Z. mergeable_state is clean.

The full read in 7075548155 stands for everything else.

Next. Seat 7 runs the contract review. Then the seat adds the four pieces and the maintainer merges.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1

Final head for seat 7 L2 · 2026-11-22T07:50Z: 621aa11e59e26ee578e05d2a999f54a1b8a486a6 (declarations 7075520575 and 7076123944, L1-a ACCEPT 7076146202, ruling B 7073270426). The seat adds the four pieces after seat 7's record; the maintainer merges.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract-review-claim: session_01QsR2jTeURPvEm465RcoYEC · head 621aa11 · 2026-11-22T08:04Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 621aa11e59e26ee578e05d2a999f54a1b8a486a6
Local-runs: none

Read: card #35123 body and all 14 comments (rulings 6996036362 and 7073270426, forks 7073149058 and 7073430021, dev reports 7075210312 and 7076099772, claim revisions), PR #36326 body and all 8 comments (L1-a REWORK 7075548155, L1-a ACCEPT 7076146202), the net diff c30ce97cd7..621aa11e59 (36 files, +942 −130; the merge base is current main), and the 74 check-runs on this head (63 success, 11 skipped, 0 failed, 0 pending).

① Derived judgments

The question is whether Clause-②: no and Metadata-protocol: none are true against the diff. They are. Each surface the diff moves:

  • @objectstack/service-messaging package index: unchanged, right. src/index.ts is not in the diff. Its preference exports are named (PreferenceResolver, PREFERENCE_OBJECT, quietHoursDeferral, and the Effective* / QuietHours types), so the new QUIET_HOURS_OFF in preference-resolver.ts and the new modules preference-digest-conversion.ts and preference-digest-unset.ts are not reachable from the package entry. The PR body's "no export is added" holds.
  • Exported object NotificationPreference: a value change, not a shape change, right. digest loses defaultValue: 'none'. The select still accepts exactly none, daily and weekly, and quiet_hours is still a free Field.json. No consumer in the repo reads NotificationPreference.fields.digest. Nothing that was accepted is refused, and nothing new is accepted, so there is no widening and no narrowing.
  • Data door for sys_notification_preference: same accept set, right. A create that leaves digest out now stores and returns empty instead of none. What changes is the meaning of the stored none, which becomes the explicit off. That is a change of meaning on data, not on a contract shape. The changeset discloses it in full: the conversion, the "pick it again" sentence the ruling asked for, and the note that a hook-skipping write still stores none. { "off": true } was already a valid JSON value. No server-side quiet_hours validator exists anywhere in packages/ (grep at head), so nothing new is refused.
  • Door effectiveFor / effectivePreferencesFor: type unchanged, right. general.digest stays EffectiveSetting of 'none' | DigestCadence. general.quietHours stays QuietHours | null, because windowOf maps 'off' back to null. Two value pairs become reachable that were not before: none with source own, and null with source own. Both fit the published type. The door itself came in with console: a personal Notification Settings page in the Account app over sys_notification_preference (per topic × channel, digest, quiet hours) #34728, whose changeset .changeset/34728-notification-settings.md is still pending at this head (P4), so no release has published it.
  • @object-ui/i18n key surface: two keys narrowed, right to carry as no. notificationSettings.digestNoOff and notificationSettings.quietHoursNoClear are removed from all 11 bundles. They came in with the same unreleased console: a personal Notification Settings page in the Account app over sys_notification_preference (per topic × channel, digest, quiet hours) #34728 changeset, so no release ever carried them, and git grep at head finds zero references left. Locale dictionaries are also not a contract under the ADR-0150 reading (spec, protocol, SDK, a door's request or response).
  • @object-ui/app-shell myPreferences.ts: internal, right. OverridingDigest is removed, digestChoices() drops its argument, quietHoursSaveable now also guards null, and quietHoursStored and QUIET_HOURS_OFF are added. The package is private: true, and its index does not re-export the module.
  • Translation bundles (*.objects.generated.ts): help text only, right. Only the help strings of digest and quiet_hours change. Labels and option keys are unchanged.
  • Metadata-protocol: none: right. sys_notification_preference rows are data. The object definition is a shipped system object, not something a metadata author writes. packages/spec is untouched (ruling item 6), and so is the spec's NotificationPreferencesSchema (api/protocol.zod.ts), which is a separate layer. Spec property liveness and Check Changeset are success.
  • Against ruling 7073270426. Items 1 to 6 are built as ruled: three states per field; digest without a default; { "off": true } as the marked value the ruling leaned towards; a one-time conversion claimed in sys_migration before the first rewrite; page, resolver and locales changed in one PR; packages/spec untouched. Every pin the ruling lists is present. The L1 R1 rework holds. resolveDigestZoneWindow walks the same four rows as resolveQuietHours, stops only at a row that holds a window, and is pinned with a UTC control. ADR-0030 l.93-94 still reads true.

S1 (should-fix) — the one-time conversion can rewrite a none chosen after the fix is live. In preference-digest-conversion.ts, the pass re-reads where: { digest: 'none' } after each batch until no unseen row is left. The compare-and-set only checks that the row still holds none. So during the pass, any row that newly holds none is also rewritten to empty: a new row inserted with an explicit none, or a snapshot row whose member re-picks none. So is a row written with none by a not-yet-upgraded node in a rolling deploy. The window is the length of the boot pass, so it is narrow, but it is exactly what the ruling's item 4 forbids ("⛔ … from then on none is a member's real choice"). Fix: take the id set before the claim and rewrite only that snapshot (page by an id cursor instead of re-reading the filter). That also covers the dev's own Acceptance note: when the claim fails, the next boot can convert a none written in between. Non-blocking: it can be carried on a follow-up card together with that note. Nothing in this head makes it worse after the pass.

② Semver level

  • .changeset/35123-member-digest-quiet-hours-opt-out.md: patch for @objectstack/service-messaging, @object-ui/app-shell and @object-ui/i18n. These are exactly the three released packages the diff moves. content/docs/** and docs/audits/** publish nothing.
  • With Metadata-protocol: none and no widening or breaking arm, patch is the level AGENTS.md (Post-Task Checklist 3) prescribes for a bug fix in a released package. No BREAKING banner or ADR-0087 marker is owed.
  • Clause-②: no is line-initial in both the PR body and the changeset body, and it is true for the reasons in ①. Check Changeset is success at this head (rerun after the 07:4xZ body edit).

③ Boundary flags

No must-fix. One should-fix (S1), non-blocking and carried on a follow-up card.

Implemented-by: claude/area-a4B-35123
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv

席位核对

Awaiting the maintainer's merge (builds ruling 7073270426) · 2026-11-22T08:18Z · head 621aa11e59e26ee578e05d2a999f54a1b8a486a6

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

messaging: a member's own 'none' digest or empty quiet hours falls back to the organisation default

2 participants