Repository navigation
Commit f727061
docs(adr): ADR-0157 working calendars are organization-editable runtime data, resolved by code or refused (#35364)
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Fixes #35354
Clause-②: no
Clause-② reason: an ADR records a ruling; the enforcing changes are the
three implementation cards.
Metadata-protocol: none
## 维护者速读
-
用户能看到什么变化:用户无感;这是一份设计记录,把平台工作日历(工作日、节假日、调休)的七条裁决和你后来定的六个细节写成合同,后面三张实现卡照它做。
- 为什么做:来自「平台工作日历」专题;审批超时、服务时效和交期今天都按自然小时算,三个套件需要统一的工作日口径。
- 出错会怎样:只影响后续实现卡的依据,不改任何运行行为;写错了撤回或改这份记录即可。
- 要你做什么:审阅后合入。
## 席位核对
### What changes
- New
`docs/adr/0157-working-calendars-are-org-editable-runtime-data-resolved-by-code-or-refused.md`,
Status **Accepted (2026-11-19)**, citing ruling 7000950747 and records
7003541720 / 7003566086. D1 to D7 record the seven items of ruling
7000950747 on #35340, one D-item per Scope item of #35354, in the
ruling's own terms. Each item's former "Not ruled" line now names the
D-entry that completes it.
- D8 to D13 record the maintainer's picks on the six follow-up questions
(ruling records 7003541720 and 7003566086 on #35354):
- D8 Q1 = C: refuse past `maintained_through`; a formula due date reads
blank (plus one log line, not an error); Setup gives notice ahead of
time.
- D9 Q2 = C: the approval sweep skips and retries; the displayed due
time shows 「日历算不出」 with the reason; the publish-time lint checks only
static authoring errors, with no existence check.
- D10 Q3 = A: an off row has no periods; an on row carries the date's
full periods; one row per calendar and date; `24:00` is legal as an end,
validated by the calendar itself.
- D11 Q4 = A: count elapsed time. Skipped or repeated local times
resolve through the shared DST-safe primitive (`zonedWallClockToUtcMs`)
to the earlier candidate instant.
- D12 Q5 = A: recompute on every sweep, never stored (the approved
#35357 Scope).
- D13 Q6: no calendar-specific rule; the seed contract of ruling
6631016988 (#30081) stands.
- Open implementation points, listed but not decided: (1) whether a
write-time computed due-date column that hits a D8 refusal fails the
write or is stored blank, settled in #35356's contract review; (2)
whether `maintained_through` may be blank and what blank means, owned by
#35355.
- Enforcement names #35355 (objects, calendar service, Setup page),
#35356 (the three formula functions, pushdown refusal and lint) and
#35357 (`escalation.clock` / `escalation.calendar`).
- Follow-up recorded, not changed: the gantt view's own `skipWeekends` /
`holidays` (`ObjectGanttSchema` in
`ui/packages/types/src/zod/objectql.zod.ts`) as a second source of
truth.
- `docs/adr/0042-approval-sla-escalation.md`: one dated pointer note at
the end of §3 (2026-11-19). It names ADR-0157's second clock (D5) and
points to D9 and D12; §1 single-shot and §3 still stand. This was the
seat's L2 call (7005187995), so the governed edit reaches the maintainer
once.
- Seat L2 delta round (head `aeac9a1280`): ADR-0042 is cited in Builds
on and References, and D12's single-shot bullet is relabelled ADR-0042
§1. Open implementation point 3 (one DST rule: where the arithmetic and
the zone conversion live) and point 4 (which organisation and authority
the calendar service reads under) are added. Nits N1–N8 are fixed.
- `docs/adr/README.md` regenerated by `pnpm adr:index`
(generator-owned). Besides the new row and the counts, the regeneration
also refreshes the ADR-0137 row, whose status line on `main` had moved
without an index regeneration. Draft PR #35370 (ADR-0158) touches the
same generated file. Whichever lands second re-runs `pnpm adr:index`;
the ADR numbers do not collide.
### Tests
No code. Gates derived by `node scripts/pm/dispatch-gates.mjs
--commands` for this diff (3 paths, ADR-0042 included), run at head
`aeac9a1280` (merge base `adcb9f8e2`): 21 of 21 exit 0, reconciled by
`--ran` (21 derived, 21 run, 0 NOT MEASURED).
<details><summary>Gate verdict lines</summary>
- `check-adr-links`: 1162 relative link destination(s) under docs/adr/
resolve
- `check:adr-symbol-anchors`: 3798 anchors across 159 records resolve, 0
line anchors (the new `zonedWallClockToUtcMs`, `ClockTimeValueSchema`
and `nextUtcCalendarDay` anchors resolve)
- `check:adr-index`: docs/adr/README.md is current
- `check:doc-formula-expressions`: exit 0 after building
`@objectstack/formula` and `@objectstack/lint` under the verify lock
- the rest of the 21: exit 0
</details>
### Acceptance notes
- A1: `docs/adr/` ended at 0156 on `origin/main`, so 0157 is free.
- A2: the describe text and JSDoc on `timeoutHours` in
`ApprovalEscalationSchema` still say the platform ships no
business-hours calendar; D5 names that key.
- A3: recorded as a follow-up only.
- A4: ADR-0144 is the precedent for organization-scoped, admin-written,
audited runtime data. The seed contract is `seed.zod.ts` (D13). ADR-0049
carries "inert"; the same-release constraint comes from the #13655
ruling record 5478756633, not from ADR-0049.
- The release-pairing hold in D4 cites the ADR-0144 D9 precedent and
says it is the epic PM's placement there, not that ruling's.
### Verification
D12's single-shot bullet is ADR-0042 §1 and is unchanged (anchored at
`ApprovalService.runEscalations`); it is a ruling, cited, not a reading
of code. The ADR-0042 note is add-only and amends nothing.
Read the Decision section against ruling 7000950747 (D1–D7) and the two
ruling records on #35354 (D8–D13). Each D-item should restate one item
and add nothing the ruling did not say.
Governed (Tier H): stays draft; landing is the maintainer's.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6Ca1jJvsA1dHsPwMiQb)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: os-bill <noreply@objectstack.ai>1 parent af997d9 commit f727061
3 files changed
Lines changed: 216 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
0 commit comments