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
feat(runtime): resolve a reference timezone onto ExecutionContext (#1993)
* feat(runtime): resolve reference timezone onto ExecutionContext (#1978)
ADR-0053 Phase 2 foundation. Adds `ExecutionContext.timezone` (optional IANA
zone) and resolves it once per request in resolveExecutionContext, precedence
user preference -> org default -> UTC:
- user override: sys_user_preference (user_id, key='timezone')
- org default: tenant-scoped sys_setting (namespace='localization',
key='timezone', scope='tenant') — one org per physical tenant (ADR-0002),
so no tenant_id filter
- invalid IANA zone ignored, falls through; every read defensive via tryFind,
never blocks auth
Pure plumbing, no behavior change: nothing reads ctx.timezone yet and an
absent value resolves to UTC (today's behavior). Foundation consumed by the
rest of Phase 2 — tz-aware today()/daysFromNow() (#1980), datetime rendering
(#1981), analytics bucketing (#1982). A discoverable `localization` settings
manifest for the org default is a follow-up; the resolver already reads the
row if present.
Tests: user pref > org default > UTC; invalid zone falls through; anonymous
leaves it unset. Runtime suite green (387), spec kernel green (682).
Closes#1978.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(spec): classify 4 liveness properties left unclassified by #1990/#1992
Pre-existing red on the spec-liveness gate (not from this branch's timezone
change): #1990 added flow.successMessage/errorMessage + action.errorMessage
and #1992 added action.undoable, none classified in the ledgers.
- flow.successMessage → live (service-automation/src/engine.ts:1292)
- flow.errorMessage → live (service-automation/src/engine.ts:1348)
- action.errorMessage → live (objectui toast, error counterpart of successMessage)
- action.undoable → experimental: declared + demoed in #1992 but no runtime
reader yet in framework or objectui (objectui has an UndoManager but does not
key off the action's `undoable` flag). Promote to live once a consumer lands.
Greens the liveness gate (was red on main too).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds `ExecutionContext.timezone` (optional IANA zone) and resolves it once per request in `resolveExecutionContext`, with precedence **user preference → org default → `UTC`**:
9
+
10
+
- User override: `sys_user_preference` row `(user_id, key='timezone')`.
11
+
- Org default: the tenant-scoped `sys_setting``(namespace='localization', key='timezone', scope='tenant')` — one org per physical tenant (ADR-0002), so no tenant_id filter is needed.
12
+
- An invalid IANA zone is ignored and resolution falls through; every read is defensive and never blocks auth.
13
+
14
+
This is **pure plumbing with no behavior change**: nothing reads `ctx.timezone` yet, and an absent value resolves to `UTC` (today's behavior). It is the foundation the rest of ADR-0053 Phase 2 consumes — tz-aware `today()`/`daysFromNow()` (#1980), datetime rendering (#1981), and analytics bucketing (#1982). A discoverable `localization` settings manifest for the org default is a follow-up; the resolver already reads the row if present.
Copy file name to clipboardExpand all lines: packages/spec/liveness/action.json
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,14 @@
64
64
"status": "live",
65
65
"note": "objectui toast."
66
66
},
67
+
"errorMessage": {
68
+
"status": "live",
69
+
"note": "objectui toast (error counterpart of successMessage; added #1990)."
70
+
},
71
+
"undoable": {
72
+
"status": "experimental",
73
+
"note": "Declared + demoed in #1992 (example-crm reassign) but no runtime reader yet: neither service-automation nor objectui consume the action's `undoable` flag (objectui has an UndoManager but does not key off this field). Promote to live once a consumer is wired."
0 commit comments