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
Working calendars ②: sys_work_calendar objects, calendar service and Setup page #35355
③ maintainer-directed task · Source: maintainer ruling on #35340 (comment #35340 (comment); sub-cards approved 2026-11-19 06:03Z 「同意」「都是 p1」).
Blocked by #35354 (ADR). Ships in the same release as ③ and ④.
维护者速读
问题: 平台没有地方存工作日、工作时段、节假日和调休。
要做: 建两张日历对象、一个计算服务,并在 Setup 里给管理员维护。
不做会怎样: 公式函数和审批时钟没有数据可读。
你要做的: 无。
Scope
sys_work_calendar: code, name, weekly working pattern, HH:mm working periods per weekday (several allowed), required timezone (valueDomain: 'iana_time_zone', prefilled from the org's effective time zone), is_default (one per org), maintained_through date.
sys_work_calendar_exception: calendar, date, kind (off / on), optional periods, note. One table for holidays, 调休 make-up workdays and shutdowns.
Packages may reference a calendar by code and seed rows (follow sys_exchange_rate, ADR-0144).
Calendar service: resolve (explicit code → org default → refuse, never fall back to wall-clock); isWorkingTime, addWorkingDays, addWorkingHours, workingDaysBetween; computing past maintained_through warns or refuses per the ADR; cache with invalidation on writes.
Refuse periods that cross midnight.
Setup page to maintain calendars and exceptions, plus import of exception rows.
Done when
Objects, service and Setup page land with tests (incl. a 调休 make-up Saturday and a National Day week), and ③ ④ consume the service.
Non-goals
Business-unit inheritance, CN holiday data package, shift rostering.
Correction to comment 7019156888: its wording that split A's halves are 'independently green' was not measured when written; this report measures each half on its own (per_half below).
{
"issue": 35355,
"status": "done",
"correction": "Correction to comment 7019156888: its wording that split A's halves are 'independently green' was not measured when written; this report measures each half on its own (per_half below).",
"branch": "claude/issue-35355-work-calendar-objects-service (PR-A) + claude/issue-35355-work-calendar-objects-setup (PR-B)",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35642",
"prs": {
"PR-A": {
"number": 35641,
"url": "https://github.com/objectstack-ai/objectstack/pull/35641",
"draft": true,
"base": "main",
"head": "0d042101815ac405e447d89681c5c0eb284fabec",
"closing": "Part of #35355",
"lines": "1852 changed (+1713 -139), 19 files, against origin/main e01b8bed05 — GitHub reads the same 1852",
"declarations": "Clause-②: yes (widening) · Metadata-protocol: none (no authorable key moved; changeset all patch under the level axis)"
},
"PR-B": {
"number": 35642,
"url": "https://github.com/objectstack-ai/objectstack/pull/35642",
"draft": true,
"base": "claude/issue-35355-work-calendar-objects-service (stacked on PR-A)",
"head": "c3e3d1be1e4a29c7c97e51cdf8ced17562112c39",
"closing": "Fixes #35355 · Blocked-by: #35641",
"lines": "1806 changed (+1794 -12), 45 files, against PR-A's head (its PR diff, as GitHub reads it); 3658 cumulative against origin/main while PR-A is open",
"declarations": "Clause-②: yes (widening) · Metadata-protocol: added · Skills-docs: none — REASON (administrator data; authors reach it through #35356/#35357)"
}
},
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "Split A taken. origin/main (e01b8bed05) merged once into the branch, then cut by layer. PR-A #35641 (base main): the pure arithmetic and the wall-clock move in @objectstack/spec/data, three ledger codes, the work-calendar service and write hooks in @objectstack/objectql (its tests declare the objects as fixtures, no platform-objects import), regenerated references. PR-B #35642 (stacked on PR-A's branch, Blocked-by #35641, Fixes #35355): the two objects, eleven-locale bundles, Setup and import, census, inventory and the Setup-tree pin. Each half was built, tested and gated on its own tree and is green; both are drafts opened through the relay, each under 3000 changed lines as its PR diff.",
"per_half": {
"PR-A @ 0d04210181 (own worktree, build closure turbo cli/examples)": {
"typecheck": "spec, core, platform-objects, objectql, cli: exit 0",
"tests": "spec 858 files / 27407 passed, 1 todo; core 153 / 3655; objectql 617 / 13933; platform-objects (unchanged, consumer check) 124 / 2061; cli --project unit 431 / 6158 — every VERDICT command-exit 0",
"gates": "dispatch-gates --commands: 132 families, 132 exit 0; --ran: '132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'",
"verdict": "green alone"
},
"PR-B @ c3e3d1be1e (own worktree /home/user/objectstack-issue-35355-setup, own install and build)": {
"typecheck": "spec, core, platform-objects, objectql, cli: exit 0",
"tests": "platform-objects 124 / 2063; cli --project unit 431 / 6158; spec 858 / 27407 (1 todo); objectql 617 / 13933; core 153 / 3655 (first attempt exit 99, lock never acquired; re-run exit 0) — every VERDICT command-exit 0",
"gates": "dispatch-gates --commands: 137 families, 137 exit 0; check:skill-examples and check:dual-build-cjs-loads first exit 3 (no client dists in the new worktree), re-run exit 0 after turbo build ./packages/**; --ran: '137 derived, 137 run, 0 NOT-MEASURED, 0 UNRUN'",
"verdict": "green alone (on top of PR-A, which it is cut from)"
},
"ablations": "Seven, one per mechanism, run earlier on the same subject blobs both heads carry (spec work-calendar.ts 43ffb37ceaa3, objectql work-calendar-service.ts 224551c0926f; test blobs c14261ed88e5 and 258d3882f7ab unchanged): crossing-midnight 1 red, requireMaintained 2 red, zone-to-UTC 6 red, default lookup 1 red, tenantId 1 red, cache drop 1 red, insert judge 3 red; each restore proven blob == HEAD and git diff HEAD empty"
},
"line_budget": {
"PR-A": "1852 vs origin/main",
"PR-B": "1806 vs PR-A head (its base); 3658 cumulative vs origin/main",
"whole_before_split": "3647 vs origin/main e01b8bed05"
},
"readings": {
"A0": "sys_exchange_rate is declared in packages/platform-objects/src/system/sys-exchange-rate.object.ts, registered by PlatformObjectsPlugin's first manifest, seeded in examples/app-showcase, read by objectql engine-references-and-master-detail.ts (homeAmountServing.rateOn) with the row's own org elevated ({...context, isSystem: true, tenantId: organizationId}); its codes sit under the @objectstack/objectql ledger entry. Mirrored: managedBy system-data, organization-scoped, audited, read elevated in the named org.",
"A1": "nextUtcCalendarDay lives in packages/spec/src/data/calendar-day.ts and core re-exports it (core datetime.ts). zonedWallClockToUtcMs depends only on Intl.DateTimeFormat and wallClockToUtcMs, so it moves to spec without pulling core; moved to packages/spec/src/data/wall-clock.ts with bodies byte-identical (cmp against BASE), core datetime.ts re-exports wallClockToUtcMs, zonedWallClockToUtcMs and WallClockParts. formula depends on spec and cel-js only, so #35356 can import it.",
"A2": "Setup pages are SETUP_NAV_CONTRIBUTIONS entries of type object in packages/platform-objects/src/apps/setup-nav.contributions.ts (group_configuration), labels in apps/translations/LOCALE.ts; a row import is userActions: { import: true } on the object (the generic sys_import_job door), whose lookup resolver accepts id, display/title field, name and the target's unique fields, so the exception file names a calendar by code or name.",
"A3": "New codes register in ERROR_CODE_LEDGER (packages/spec/src/api/error-code-ledger.zod.ts) under the stamping package, enforced by the ledger test and check:error-code-provenance; the three ERR_WORK_CALENDAR_* codes are stamped by the spec/data error classes, so they sit under @objectstack/spec."
},
"choices": {
"P2": "maintained_through is required (a blank never reads as no holidays); maintained_from is required too, as the past-side bound (see past_side).",
"P3": "Suggested route taken: zonedWallClockToUtcMs (unchanged) and the pure arithmetic (isWorkingTime, addWorkingDays, workingDaysBetween, addWorkingHours, parseWorkPeriods, buildWorkCalendar) live in @objectstack/spec/data; the service in objectql does resolution, refusal and caching. No formula copy.",
"P4": "Reads run elevated in the organization the caller names: { isSystem: true, tenantId: organizationId } for the calendar and its exceptions, the exchange-rate reader's shape. A system-context caller working across orgs names the org per call in WorkCalendarRef.organizationId (the record's own org; the approval sweep passes the request's organization_id). An undefined org reads unscoped (single posture) and more than one match is refused ambiguous, never picked.",
"past_side": "Refused like D8 through a new required field maintained_from: a computation that needs a date before it is refused ERR_WORK_CALENDAR_NOT_MAINTAINED. Covered-by-weekly-pattern was not taken.",
"lead_time": "60 days (WORK_CALENDAR_MAINTENANCE_LEAD_DAYS): CN holidays are published around November, so a calendar maintained through Dec 31 shows from Nov 1.",
"declarations_measured": "Clause-②: yes (widening), carried by PR-A: ApiErrorSchema.code's closed enum gains 3 members and spec/data gains exports; PR-B declares it too since it is stacked on PR-A. Metadata-protocol per half: PR-A none (no authorable key or object), PR-B added (the two new platform objects)."
},
"service_api": {
"service_name": "work-calendar (WORK_CALENDAR_SERVICE in @objectstack/spec/data); class WorkCalendarService in @objectstack/objectql",
"async (for #35357, approvals)": [
"resolve(ref: WorkCalendarRef) returns Promise of WorkCalendar",
"isWorkingTime(ref: WorkCalendarRef, at: number | Date) returns Promise of boolean",
"addWorkingDays(ref: WorkCalendarRef, day: string /* YYYY-MM-DD */, days: number) returns Promise of string",
"workingDaysBetween(ref: WorkCalendarRef, start: string, end: string) returns Promise of number /* start excluded, end included */",
"addWorkingHours(ref: WorkCalendarRef, start: number | Date, hours: number) returns Promise of number /* epoch ms */",
"invalidate(): void",
"WorkCalendarRef = { organizationId: string | undefined; calendar?: string | null }"
],
"sync pure (for #35356, formula; @objectstack/spec/data)": [
"isWorkingTime(cal: WorkCalendar, at: number | Date): boolean",
"addWorkingDays(cal: WorkCalendar, day: string, days: number): string",
"workingDaysBetween(cal: WorkCalendar, start: string, end: string): number",
"addWorkingHours(cal: WorkCalendar, start: number | Date, hours: number): number",
"isWorkingDay(cal: WorkCalendar, day: string): boolean ; workingPeriodsOn(cal: WorkCalendar, day: string): readonly WorkPeriod[]",
"buildWorkCalendar(row: Record of string to unknown, exceptionRows: readonly rows): WorkCalendar",
"parseWorkPeriods(text: unknown): { ok: true, periods } | { ok: false, reason: malformed | crosses_midnight | empty_period | overlap, message }",
"zonedWallClockToUtcMs(parts: WallClockParts, timeZone: string): number"
],
"refusals": [
"WorkCalendarUnresolvedError — ERR_WORK_CALENDAR_UNRESOLVED, status 400, reason not_found | no_default | ambiguous",
"WorkCalendarNotMaintainedError — ERR_WORK_CALENDAR_NOT_MAINTAINED, status 400, fields calendar, date, maintainedFrom, maintainedThrough",
"WorkCalendarInvalidError — ERR_WORK_CALENDAR_INVALID, status 400 (a stored row that fails the calendar's own rules)",
"isWorkCalendarRefusal(err): boolean"
]
},
"tests": "See per_half; new pins are PR-A's spec work-calendar.test.ts (13) and objectql work-calendar-service.test.ts (15), unchanged from the first round.",
"gates": "See per_half. CI check-runs: pending at open on both PRs; not waited for. overlap-check before each push: PR-A exit 0 (clean with #35583, #35581, #34817); PR-B exit 1 (textual conflicts with #35581 and #34223 in additive lists and the Setup-tree pin; origin/main clean).",
"dogfood_battery": "n/a — no `!` in either title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "6 this round + 1 earlier: pr_create #35641 (POST /repos/objectstack-ai/objectstack/pulls, POST .../issues/35641/assignees), pr_create #35642 (POST .../pulls, POST .../issues/35642/assignees), this os-dev-report (POST .../issues/35355/comments); earlier round: POST .../issues/35355/comments (7019156888). All through the relay or post-stamped.mjs; reads only otherwise (GET pulls, GET the claim comment).",
"deviations": [
"PR-B's base is PR-A's branch (stacked), so its PR diff is 1806 lines; measured against origin/main it is 3658 while PR-A is open. After PR-A lands, PR-B is retargeted to main and main merged into it.",
"PR-A's body links PR-B by a head-branch search URL, not by number: PR-B did not exist at PR-A's create, and a dev writes a PR body only at pr_create (os-dev.md); the seat's issue_patch may swap in #35642.",
"check:closing-target-claim on PR-B needs a Claim on #35355 naming claude/issue-35355-work-calendar-objects-setup; the current claim names PR-A's branch. Seat action; expected red until then.",
"Changeset levels re-measured per half under the level axis: PR-A Metadata-protocol none, so spec/objectql/core patch; PR-B added, so platform-objects minor, spec and cli patch. The first round's single changeset graded spec and objectql minor.",
"Clause-② declared by the claim as no (additive); measured yes (widening) on both halves.",
"Files beyond code, each a baseline or pin the change requires: regenerated api-surface, export-origins and content/docs references (PR-A); cli ownership inventory, tenancy census, bundle-ownership list and Setup-tree pin (PR-B); 3 ADR anchors (PR-A).",
"The ten non-English translations are machine-made by the agent, not reviewed by native speakers; PR-B's body says so.",
"Commits follow the order's model-free trailer, not the harness reminder's model-named one; PR-A's history carries three wip-titled commits (be23d9090b, 64687aa7e8, 9182347362) (squash on merge).",
"PR-B's first core test attempt hit the shared lock's queue timeout (exit 99, a sibling and PR-A's cli run held it); re-run green. Two PR-B gates first answered exit 3 for missing client dists; re-run green after the build."
],
"open_questions": [
{
"question": "P2: a blank maintained_through — required?",
"options": [
"A required (built): a blank never reads as no holidays from here on (D3)",
"B optional, blank = maintained for ever"
],
"recommendation": "A, because D3 forbids reading a blank as no holidays."
},
{
"question": "The past-side bound: a new required maintained_from field (not in D1's field list)?",
"options": [
"A required maintained_from, refused like D8 (built)",
"B bound by the earliest exception row (implicit, moves when a row is deleted)",
"C no past bound, weekly pattern answers (not this card's call per comment 7005998663)"
],
"recommendation": "A, because it is explicit and refuses the same way D8 does."
},
{
"question": "P3: the arithmetic in @objectstack/spec/data despite Prime Directive #2 (no business logic in spec)?",
"options": [
"A spec/data beside calendar-day.ts and the ADR-0053 primitive (built), formula calls it synchronously",
"B a new small runtime package both formula and objectql depend on"
],
"recommendation": "A, recorded as an exception on the calendar-day.ts precedent; B adds a package and a new dependency edge for formula."
},
{
"question": "P4: reads elevated in the organization the caller names?",
"options": [
"A { isSystem: true, tenantId: organizationId } per call, the exchange-rate reader's shape; undefined org reads unscoped and two matches are refused ambiguous (built)",
"B the caller's own session"
],
"recommendation": "A, because system sweeps (the approval escalation) have no user session."
},
{
"question": "The Setup lead time: 60 days?",
"options": [
"A 60 days (built): CN holidays are published around November, so a calendar maintained through Dec 31 shows from Nov 1",
"B 30 days",
"C 90 days"
],
"recommendation": "A; 30 misses a November publication, 90 flags most calendars all autumn."
},
{
"question": "D7 time-zone prefill: server-side on create only?",
"options": [
"A server-side fill from the org's Localization zone in the write hook (built); the Console form is not prefilled",
"B add a client-side form-default mechanism"
],
"recommendation": "A; B needs a new mechanism and a formula-side timezone() belongs to #35356."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: overlap with open drafts #35581 (sys_unit) and #34223 in shared additive lists and the Setup-tree pin; whichever lands second rebases and re-counts the pin."
],
"worktrees": "/home/user/objectstack-issue-35355 and /home/user/objectstack-issue-35355-setup, both clean and pushed; node_modules removed and worktrees removed after this report"
}
Claim amendment · area data-1 · 2026-11-19T20:50Z (amends claim 7013077388)
The card lands as two PRs, a split by layer that the seat approved to keep each diff under 3000 lines:
Branch: claude/issue-35355-work-calendar-objects-service (PR #35641, Part of #35355: the spec/data arithmetic and the wall-clock move, the three ledger codes, the objectql service and write hooks, and the regenerated references)
Branch: claude/issue-35355-work-calendar-objects-setup (PR #35642, Fixes #35355, Blocked-by #35641: the two objects, the locale bundles, Setup and import, the census, the inventory and the Setup-tree pin)
File surface, added beyond the claim: the baselines and pins that the objects and exports require (scripts/adr-anchors/**, packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, regenerated content/docs/references/api/**, scripts/platform-object-tenancy-census.json, packages/cli/src/utils/organization-ownership-inventory.ts, and the cli Setup-tree pin test).
Clause-②: yes (widening), as measured on both halves; this replaces the claim's no (additive).
Claim: re-posted by the same holder · area data-1 · 2026-11-19T21:19Z (restates claim 7013077388 with both branches of the seat-approved split, as amendment 7021881794 records; no change of holder)
Area: data-1
Session: session_01Utp6Ca1jJvsA1dHsPwMiQb
Account: os-bill
Seat: repo:objectstack#5
Branches: claude/issue-35355-work-calendar-objects-service (PR #35641, Part of #35355), claude/issue-35355-work-calendar-objects-setup (PR #35642, Fixes #35355)
File surface: as claim 7013077388 plus amendment 7021881794.
{
"issue": 35355,
"status": "done",
"round": "patch round on split A: the Type Check UI red on PR-A (job 135862276380)",
"branch": "claude/issue-35355-work-calendar-objects-service (PR-A) + claude/issue-35355-work-calendar-objects-setup (PR-B)",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35641",
"prs": {
"PR-A": {
"number": 35641,
"head": "ad45d084f4e820b0b0c99ad29beb89cdd8fb9082",
"previous_head": "0d04210181",
"lines": "1887 changed (+1748 -139), 20 files, against origin/main; GitHub reads the same 1887"
},
"PR-B": {
"number": 35642,
"head": "320ed52d8829c20f16e3862c204c61a0c5b43ced",
"previous_head": "c3e3d1be1e",
"lines": "1806 changed (+1794 -12), 45 files, against PR-A's head (its PR diff; GitHub reads the same 1806); 3693 cumulative (+3542 -151, 65 files) against origin/main while PR-A is open"
}
},
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "The red was ui check:spec-symbols. @objectstack/spec/data now exports isWorkingDay and addWorkingDays, and @object-ui/plugin-gantt's scheduler declares module-local functions under the same two names. Fixed by two reasoned ALLOW entries in ui/scripts/check-spec-symbol-derivation.mjs (+35 lines; no gantt file touched, no behaviour change). Each entry gives the reason and points to ADR-0157's Follow-up 'The gantt view's own calendar'. ALLOW was chosen over a rename to a declared dialect for four reasons. First, the script offers both routes without ranking them. Second, its ALLOW governance says a same-name symbol that differs ON PURPOSE belongs there with the purpose written down. Third, the helpers are module-local functions, so the rename would only rename private code to dodge a name the follow-up will retire anyway. Fourth, ratchet 3 fails the entries once the follow-up deletes the helpers. The two functions really differ: spec addWorkingDays never counts the start day and answers a day key, while the gantt's counts a working start day and answers the exclusive midnight. For example, Thursday plus 2 with weekends off gives Saturday midnight in the gantt and Monday in the spec. The fix is one commit on PR-A (ad45d084f4). PR-A's new head was then merged into PR-B (320ed52d88) and pushed.",
"tests": "check:spec-symbols: before the edit exit 1, naming the two gantt functions (the same text as the CI log); after, exit 0 with '24 declared dialects, 0 untriaged collisions'. PR-B: on the c3e3d1be1e copy of the script exit 1 with the same two symbols; at 320ed52d88 exit 0; the restore was proven by an empty git diff HEAD. The script's own suites are the 30 test files that name it (ui/scripts/__tests__ plus the package spec-symbol pins). First run: 28 passed, and 2 could not load because @objectstack/formula was unbuilt in the fresh worktree, which is NOT MEASURED rather than red. After building formula those 2 passed (11 tests). Total: 30 files and 539 tests passed, VERDICT 0.",
"gates": "Re-derived: PR-A 133 families (the 132 measured at 0d04210181 plus `pnpm --dir ui exec vitest run scripts/`); PR-B 138 (137 plus the same family). Declared narrowing: this round re-ran only the families that read the one changed file plus the new family. The other 132 and 137 were measured green at the previous heads, and CI runs all of them. Run at ad45d084f4, all exit 0: check:nul-bytes, check:issue-citations, node scripts/check-issue-citations.mjs, ui check:new-line-citations, ui check:spec-symbols. The new family `pnpm --dir ui exec vitest run scripts/` first reported 1 failure in unit-registry-absence-collision, because @objectstack/client was unbuilt in the new worktree. After building client that test passed 15/15. Also at ad45d084f4 I ran the Type Check UI steps 25-32, which the red had skipped on both old heads (action-forward-parity, designer-field-key-parity, icon-record-names, i18n-keys, i18n-drift, type-check:scripts, type-check:vitest-config, type-check:e2e); all exit 0. Run at 320ed52d88, all exit 0: the same five gates, and the ui scripts family with 171 files passed and 2 skipped, 5092 tests passed. NOT MEASURED locally: Type Check UI steps 33-35 (the ui packages type-check over the affected scope, the setup build, type-check:vitest-setup). They were skipped on both old heads and are running in CI now. dispatch-gates warned that the tree is 9 commits behind origin/main and that scripts/pm/ensure-pm-labels.sh changed; main was not merged again (one merge, as ordered). overlap-check: PR-A exit 0 (main, #35581 and #34817 merge clean). PR-B exit 1 (#35581 and #34223 conflict as before; main, #35641, #35636 and #34817 merge clean).",
"ci_reds": {
"PR-A at 0d04210181": "Type Check UI (135862276380), step 'Verify spec-named symbols are derived, not hand-written'. Fixed here. No other failure: 59 success, 10 skipped.",
"PR-B at c3e3d1be1e": "The same red: Type Check UI (135874306172), same step, same two symbols. Fixed by the merge. Also 'PR-body guards (claim · duplicate · Part-of · single-writer path)' (135870257386): check:closing-target-claim, because the Claim on #35355 names the service branch, not claude/issue-35355-work-calendar-objects-setup.",
"PR-A at ad45d084f4 (read once, not waited for)": "No failure so far: 28 success, 9 skipped, 30 in progress.",
"PR-B at 320ed52d88 (read once, not waited for)": "One failure, PR-body guards (135889342525): the same check:closing-target-claim red. It needs a seat action: a Claim comment on #35355 with a Branch: line naming the setup branch, then a re-run (no push needed). Otherwise 7 success, 8 skipped, 18 in progress.",
"masked": "On both old heads, Type Check UI stopped at step 24, so steps 25-35 never ran. Steps 25-32 are green locally at ad45d084f4; steps 33-35 have their first reading in this CI run."
},
"dogfood_battery": "n/a — no `!` in either title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "1 this round: this os-dev-report (POST /repos/objectstack-ai/objectstack/issues/35355/comments) through post-stamped.mjs and the relay. Two git pushes (not REST). Reads only otherwise (GET check-runs, job logs, pulls).",
"deviations": [
"Both PR bodies still give the readings and line counts of the previous heads (PR-A 1852 at 0d04210181; PR-B cumulative 3658 at c3e3d1be1e). A dev does not PATCH a PR body after pr_create, so the seat may refresh them: PR-A 1887 at ad45d084f4, PR-B 1806 own and 3693 cumulative at 320ed52d88.",
"The fix is a ui/scripts change in the private ui root package. It publishes nothing, so no changeset was added; PR-A's existing changeset is unchanged.",
"Both worktrees were removed after the last report, so they were re-created for this round (install, then builds of spec, formula and the client closure) and are removed again after this report.",
"PR-B's merge commit carries no trailers, the same as the earlier merge commit on this branch."
],
"open_questions": [],
"open_questions_note": "None new. The six design choices for the contract L2 stand as listed in comment 7021836813 and PR-A's body.",
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: ADR-0157's Follow-up 'The gantt view's own calendar' now has two ALLOW entries that ratchet 3 retires when it lands."
]
}
Claim amendment · area data-1 · 2026-11-19T21:40Z (amends claim 7013077388, amendment 7021881794 and re-claim 7022517146; answers L1-a R1 on #35641, 7022981176)
File surface, added: ui/scripts/check-spec-symbol-derivation.mjs (PR #35641, commit ad45d08), two reasoned ALLOW entries only. The reason: the new @objectstack/spec/data exports isWorkingDay and addWorkingDays collide by name with the gantt scheduler's module-local helpers, which differ on purpose (the gantt counts a working start day and returns the exclusive midnight). Both entries point at ADR-0157's Follow-up "The gantt view's own calendar", and ratchet 3 retires them when that lands. No gantt file is touched.
Claim amendment · area data-1 · 2026-11-19T21:59Z (amends claim 7013077388 and amendments 7021881794, 7022993369; carries the seat's fix-round rulings on contract reviews 7023325199 and 7023289876)
File surface, added for PR #35641 (claude/issue-35355-work-calendar-objects-service): packages/formula/** (the working-time arithmetic, the period parser, buildWorkCalendar and the three error classes move there from packages/spec/src/data/; the primitive, types, constants and codes stay in spec), and packages/spec/src/contracts/** (the service contract becomes IWorkCalendarService). This lifts the claim's fence on packages/formula/** for this move only: #35356 is unclaimed and has no branch, and its formula functions are still its own.
File surface, added for PR #35642 (claude/issue-35355-work-calendar-objects-setup): the create form's seed defaults in ui/packages/plugin-form/** (the time-zone prefill, beside the currency prefill), content/docs/ui/apps.mdx (the two Setup pages), and tests on the real objects beside packages/rest/src/import-exchange-rate-csv.test.ts.
Follow-up filed and nested: #35657 (ADR-0157 D1 note for maintained_from, kept out of both PRs so neither is Tier H).
Ruling record · seat 5 (repo:objectstack#5), relayed by area data-1 · 2026-11-19T22:00Z · on contract reviews 7023325199 (PR #35641, FAIL) and 7023289876 (PR #35642, PASS with S1/S2), the six design choices in dev report 7021836813
P3, where the arithmetic lives: the counting logic, the period parser, buildWorkCalendar and the three error classes move to @objectstack/formula (an edge @objectstack/objectql and plugin-approvals already have). Spec keeps zonedWallClockToUtcMs, the types, the constants and the ledger codes. No new dependency edge.
P4, elevated reads: right for a named organization. An absent organization is refused ERR_WORK_CALENDAR_UNRESOLVED before any read outside the single posture; single is unchanged. The write hooks take the organization from the session.
The 60-day lead: right; its jsdoc stops asserting a publication date.
Also ruled: the service contract is IWorkCalendarService in packages/spec/src/contracts/ (the objectql class keeps its name). Semver stays patch (Metadata-protocol none). D4 is procedural as the ADR prescribes: #35641 and #35642 land back to back, and both bodies say "Not released alone; pair #35641/#35642".
Order: #35641's fix round, L1-a delta, contract delta, land; then #35642 retargeted to main, its fix round, L1-a, contract delta, land.
{
"issue": 35355,
"status": "done",
"round": "fix round 1 on PR-A #35641 (contract review 7023325199, ruling record 7023403692, claim amendment 7023393749); PR-B #35642's branch not touched",
"branch": "claude/issue-35355-work-calendar-objects-service",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35641",
"head": "e8af40289106e5f37f73c64a18ee48254d982d5f",
"previous_head": "ad45d084f4e820b0b0c99ad29beb89cdd8fb9082",
"commits_this_round": [
"e6e77b623d (the fix round)",
"743be6587f (a test title)",
"e8af402891 (the hooks take every writer's organization from the session; the read double's tenant scoping split out)"
],
"lines": "2168 changed (+2029 -139), 25 files, against merge base e01b8bed0 of origin/main; under the 3000 budget (was 1887 at ad45d084f4)",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "M1: outside the single posture, WorkCalendarService.resolve refuses an absent (or empty) organizationId with ERR_WORK_CALENDAR_UNRESOLVED, reason no_organization, before any read. That includes the cache. The posture comes from resolveEnginePosture through enginePostureOf(engine). When no posture option is passed, the service and the hooks read the posture of the engine they run on, so the plugin wires nothing extra. The rule is stated in the WorkCalendarRef jsdoc, the service header and the ADR anchor. single is unchanged. The same rule binds the hooks' elevated reads: the one-default check and timezoneOf, on insert and on update. The hooks take the organization from the session. S1: the period parser, buildWorkCalendar, the four counts, isWorkingDay, workingPeriodsOn, exceptionDayOf, calendarDayOf, isWorkCalendarRefusal and the three error classes moved to packages/formula/src/work-calendar.ts. The test moved with git mv. Spec keeps zonedWallClockToUtcMs, the types, the constants and the codes. Its module header states Prime Directive #2 as schemas/types/constants only. No new dependency edge: objectql already depends on formula, and formula already depends on spec. The two gantt ALLOW entries are dropped, and ui/scripts/check-spec-symbol-derivation.mjs is back to its main bytes. S2: IWorkCalendarService, WorkCalendarRef and WORK_CALENDAR_SERVICE are in packages/spec/src/contracts/work-calendar-service.ts. The objectql class keeps its name and implements the contract. N1: the jsdoc now says 'usually published (around or after November)'. N2: #35642 is named, with 'Not released alone; pair #35641/#35642', in the changeset and the PR body. N3: buildWorkCalendar returns a calendar frozen down to its periods. The changeset adds '@objectstack/formula': patch, and spec stays patch. PR-A's body was refreshed through post-stamped --body with --ack-through=7023325199 and read back to its footer.",
"tests": "At e8af402891, under os-verify-lock, VERDICT command-exit 0. Build: objectql plus its closure. Typecheck exit 0: spec, formula, objectql, core. @objectstack/formula: Test Files 69 passed (69), Tests 1902 passed. @objectstack/objectql (--project local): 617 passed (617), Tests 13941 passed. @objectstack/spec (--project local): 857 passed (857), Tests 27394 passed, 1 todo. An earlier run before check:generated --fix had scripts/export-origins.test.ts red (2), as expected; after the regeneration that file passed 24/24. ui check:spec-symbols exit 0, with 0 untriaged collisions. New pins: objectql work-calendar-service.test.ts has 23 tests; formula work-calendar.test.ts has 14. Ablations at e8af402891 use scripts/ablation-replace.mjs: each anchor went 1 to 0, each blob moved, and each restore was proven by blob == HEAD plus an empty git diff HEAD. The subjects are imported by relative source path, so there is no dist leg. Results: resolve guard off, 3 red (isolated, group, engine posture); session rule off, 3 red; insert-hook guard off, 1 red; update-hook guard off, 1 red; outer freeze off, 1 red; period freeze off, 1 red.",
"gates": "dispatch-gates --commands at e8af402891 derived 132 families. Each ran with its exit code captured before any pipe, and all 132 exited 0. --ran with per-family exit codes reads: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN' (a DERIVED zero). Outside the list: check-platform-checklist --changed-from origin/main exit 0; overlap-check VERDICT clean exit 0 (main and #34817 merge clean); check-nul-bytes OK. The first pass at 743be6587f had 2 reds and 2 PREREQUISITE NOT MET. The first red was check:system-context-census: the insert hook's isSystem branch was a new elevation read that no row of the page owns. Fixed by dropping the branch, since the hooks take every writer's organization from the session. The second red was check:where-matcher, which could not lift the double's matcher because tenant scoping shared its callback. Fixed by moving the scoping to its own step. The 2 PREREQUISITE NOT MET were skill-examples (client-react unbuilt; built, then exit 0) and dual-build-cjs-loads (exit 0 on the final pass, with 124 entries across 72 packages loading). dispatch-gates warns that the tree is 23 commits behind origin/main and that 3 gate scripts changed there (check-skills-token-ratchet, check-governed-merges, ensure-pm-labels). CI runs the current copies.",
"ci": "At e8af402891, read twice, without waiting. First read: 58 success, 10 skipped, 1 in progress (Test Core 10/10). Second read, after the body refresh: 60 success, 12 skipped, 2 in progress (Check Changeset and PR-body guards, re-triggered by the body edit). No failure, so no CI red. TypeScript Type Check, Type Check UI, Build Core, Test UI 16/16, Test Core 1-9 and every Lint and Type Check lane are green.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 this round, through post-stamped.mjs and the fleet-write relay: PATCH the PR-A body (pulls/35641), and POST this os-dev-report (issues/35355/comments). git push is not a REST write. Reads only otherwise: GET pulls/35641, issues/35641/comments, check-runs.",
"deviations": [
"The ledger entry stays under '@objectstack/spec'. The ruling says to move it if the stamping package changes. The three code constants stay in spec, and check:error-code-provenance attributes a code to the package whose constant spells it, while formula's classes stamp it by reference. The provenance gate is green at the head.",
"main was not merged. #35581 and #35583 landed on main and share three files with this branch (api-surface/data.json, export-origins/data.json, spec/src/data/index.ts). A plain git merge-file of each is clean, the merged api-surface/data.json is exactly main's plus this PR's entries, and overlap-check is clean. Whoever merges main locally regenerates the two artifacts, because the repository's merge driver flags them.",
"The hooks take every writer's organization from the session, system writers included, after the census gate refused an isSystem branch as an unlisted elevation read. Seeds and imports write under their row's organization as tenantId (metadata-protocol seed-loader, {...SEED_WRITE_EXECUTION_CONTEXT, tenantId: rowOrganization}), so their session names it. The one real-engine test that seeded with { isSystem: true } and a row organization now passes tenantId as the loader does.",
"enginePostureOf is exported from work-calendar-service.ts, not from the objectql index. The service and hooks default to the engine's posture, so plugin.ts only changes its WORK_CALENDAR_SERVICE import.",
"The gate run was restarted once at 743be6587f after a test title was renamed; it is reported only at e8af402891."
],
"open_questions": [],
"security_findings": "withheld",
"out_of_scope_findings": [
"carrier: none · noted, not filed: dispatch-gates reports this branch 23 commits behind origin/main; nothing in that range conflicts with it."
]
}
{
"issue": 35355,
"status": "done",
"round": "fix round 2 on PR-A #35641: S3 from contract delta 7026479156 (PASS), seat ruling 'refuse'; PR-B #35642's branch not touched; main not merged again",
"branch": "claude/issue-35355-work-calendar-objects-service",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35641",
"head": "f502d9238ccaf3ceee589ee56b4858727a61c807",
"previous_head": "28fca759a93407cb2f86f55fea3f55cf715d8324",
"commits_this_round": [
"f502d9238c fix(objectql): refuse a calendar default on a create placed in another organization (one commit, as ordered)"
],
"lines": "2204 changed (+2065 -139), 25 files, against merge base 03865ae995 of origin/main; under the 3000 budget (this round vs 28fca759a9: work-calendar-service.ts +25 -2, its test +22 -2, changeset +1 -1)",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "S3 is closed as ruled. In the calendar beforeInsert hook, a create whose row's organization_id differs from the session's organization is marked elsewhere by insertReadOrganization. If that create sets is_default: true, it is refused at the door before any read. The refusal is the hook's existing envelope, 400 VALIDATION_FAILED, with one fields[] entry: is_default, ADR-0114 code invalid_value. No new ledger code. The reason tells the writer what to do: create it while working in that organization, or create it without Default and set Default afterwards by editing it. The edit is judged in the stored row's own organization. The refusal joins the hook's other problems in one envelope, so a create that also has a bad period gets both. A mismatched create without a default passes as before, with no read and no time-zone fill; that gap is loud through #35642's required timezone. The module header now says a future seed that sets a calendar's default must load pinned to its organization, or set the default by an update afterwards. The changeset's write-door bullet names the refusal. N4 is unchanged (accepted). Public wording stays neutral.",
"tests": "At f502d9238c, under os-verify-lock, VERDICT command-exit 0: @objectstack/objectql (--project local): Test Files 617 passed (617), Tests 13947 passed. That is +6 over the previous head's 13941, from the work-calendar-service.test.ts edits. work-calendar-service.test.ts: 24/24. objectql typecheck (tsc --noEmit plus check:test-typecheck) exit 0. Before the build, I built the dependency closure (pnpm --filter '@objectstack/objectql^...' build), because this is a fresh worktree. Pins changed: '{single,isolated}: a member's create reads in the session's organization' used to assert the silent pass. It now asserts the refusal: 400 VALIDATION_FAILED, is_default invalid_value, the message does not name the other organization's calendar, zero reads, and timezoneOf never asked. CONTROL: the same create with is_default false passes with zero reads and no time-zone fill. 'a system writer reads in its session's organization too': with no session organization, a default is refused, a plain create passes, and neither reads. New pin: 'a default set by an update is judged in the stored row's organization'. It covers the route the refusal names, and reads exactly once, in org_b. Ablation through scripts/ablation-replace.mjs on the committed head: anchor `if (scope.elsewhere && data.is_default === true) {` replaced by `if (false) {`. The anchor went 1 to 0 and the blob moved from a38ad0325a46 to f1d09d133bfb. Result: 3 failed | 21 passed (both member pins and the system-writer pin). Restored: blob == HEAD (a38ad0325a46) and git diff HEAD is empty. The subject is imported by relative source path, so there is no dist leg.",
"gates": "Declared narrowing: this round re-ran the families that read the three changed files. The other derived families were 132/132 exit 0 at e8af402891, and the contract delta found the merge to be mechanical. CI runs the full farm. At f502d9238c, each exit was captured before any pipe, and all exited 0: check:system-context-census ('OK — 195 elevation read sites…the generated register…matches the tree'; no new isSystem read), check:where-matcher, check:objectql-double-limit, check:engine-double-contract, check:query-options-erasure, check:error-code-casing, check:dispatcher-error-vocabulary, check:adr-anchors, check-nul-bytes, check-changeset-no-major, check-empty-changeset, check-closing-keyword-parity. overlap-check: VERDICT clean exit 0.",
"ci": "Read once at f502d9238c, right after the push, without waiting: 20 queued and 3 skipped, with no conclusion yet. That is in_progress, an honest value. The previous head 28fca759a9, per contract delta 7026479156, had 60 success, 10 skipped, none failed.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "1 this round: this os-dev-report (POST issues/35355/comments) through post-stamped.mjs and the fleet-write relay. One git push (not REST). Reads only otherwise: GET issues/comments/7026479156, check-runs.",
"deviations": [
"PR-A's body was not refreshed this round, because the order did not ask for it. Its Tests and Gates sections still cite e8af402891, and its write-door bullet does not name the new refusal; the changeset does. The seat can refresh it, or I can on request.",
"The worktree had been removed after round 1. I recreated it from origin's branch tip 28fca759a9: git worktree add -B, fast-forward from the local e8af402891, which is an ancestor of that tip. Then install, then the build closure."
],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: #35642 · noted, not filed: carried from contract delta 7026479156 for PR-B's round. #35642's tests on the real objects should add a real-engine pin that drives the calendar update hook under a walled posture, isolated or group, through the engine's provider. In that pin the hook's organization comes from the stored row. Today that path is pinned only through the hook-handler double ('a default set by an update is judged in the stored row's organization' and the isolated update leg)."
]
}
{
"issue": 35355,
"status": "done",
"round": "PR-B #35642 fix round after #35641 merged: main merged in, S1, S2, (a), (b) traced, (c) one line, N1, N2; N3 accepted as is",
"branch": "claude/issue-35355-work-calendar-objects-setup",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35642",
"head": "a21b8adc1c954b2ed4e2b5b4c0aa43a47480c482",
"previous_head": "320ed52d8829c20f16e3862c204c61a0c5b43ced",
"commits_this_round": [
"b154176724 Merge origin/main (PR-A's files set to main; sys_unit rows first in the additive lists; Setup-tree pin re-counted to 34)",
"06d62d2d7c regenerate the tenancy census (the deferred merge artifacts; api-surface and export-origins regenerate to main's bytes)",
"0ca2bf43fa plugin-form: required time-zone field opens on the organization zone (S1)",
"5f038a75f3 platform-objects: timezone help in 11 locales (S1), exception periods help built from WORK_CALENDAR_PERIODS_HELP (N1)",
"adc0b885ba rest: tests on the real objects (S2) and the update-hook pin ((a))",
"5a8eb4eca3 objectql: one-line rewording of the other-organization default refusal ((c))",
"03fb5f71cf docs: apps.mdx Setup pages (N2); changeset pair sentence and two new packages",
"a21b8adc1c rest test: calendar code in a const, for the error-code casing guard (the CI red on 03fb5f71cf)"
],
"lines": "2229 changed (+2202 -27), 55 files, against origin/main ed906d567a; under the 3000 budget. Before this round's items, the merged head measured +1793 -12 against main.",
"ci": "check-runs on a21b8adc1c, read once at 03:23Z: 61 success, 9 skipped, none failed, none in progress (Lint · docs & code guards success, Check Changeset success, PR-body guards success)",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "Step 0: origin/main merged in. PR-A's files take main's bytes, including two files main had dropped. The additive lists put #35581's sys_unit rows first, then the calendar rows, and the Setup-tree pin is re-counted to 34. The deferred census is regenerated in the next commit. S1: the create form seeds a required iana_time_zone text field with no declared default from useLocalization().timezone, beside the currency seed, and all seven seed call sites pass it. Optional zone fields are not seeded. The timezone help in all 11 locales says the form opens with the organization zone and a create that leaves it out takes the same zone. S2 and (a): one new rest test file drives the real objects through the create and import doors. It covers the zone fill (with a CONTROL), the code shape, the (calendar, date) key, the import with one bad row refused alone, and the update hook. Under group, one read runs in the stored row's org (org_b) and the edit is refused; under isolated the row is not reached, with zero reads. (c) is one line in objectql. N1 builds the exception help from WORK_CALENDAR_PERIODS_HELP. N2 adds both pages to apps.mdx. The changeset and the body say 'Not released alone; pair #35641/#35642' with #35641 merged. The body is refreshed, with the stale closing-guard text dropped, and read back identical.",
"tests": "Under os-verify-lock, VERDICT command-exit 0 unless stated. rest src/import-work-calendar-csv.test.ts plus its precedent at a21b8adc1c: Test Files 2 passed (2), Tests 10 passed (10); the new file has 7 cases. ui organizationZoneSeed-35355.test.tsx plus recordCurrencySeed-27188.test.ts: 2 files, 10 tests passed. ui packages/plugin-form/ in full: Test Files 237 passed, 3 failed (240), Tests 2674 passed, 1 skipped. The 3 failed at import ('Failed to resolve import @objectstack/client', unbuilt) and never ran. After building that closure they re-ran: 3 files, 16 tests passed. platform-objects: 125 files, 2094 tests passed. objectql work-calendar-service.test.ts: 24 passed. cli unit, the Setup-tree pin (34) plus the inventory test: 2 files, 28 tests passed. Typecheck exit 0 for objectql, platform-objects, rest and plugin-form; rest and plugin-form first gave exit 2 (TS2307, unbuilt workspace deps) and passed after their closures were built. Ablations, each through scripts/ablation-replace.mjs with restore proven by blob == HEAD and empty git diff HEAD: O1, the update hook reads the session org: objectql rebuilt, marker in dist; 1 failed / 6 passed, the group pin red; restored, rebuilt, marker absent. O2, no zone fill: 4 failed / 3 passed, the fill case plus three cases whose fixtures rely on the fill; restored, marker absent. U1, no seed: 3 failed / 3 passed. U2, the seed ignores required: 3 failed / 3 passed, the optional field seeded.",
"gates": "dispatch-gates --commands at a21b8adc1c: 132 families, exit captured before any pipe. 127 gave exit 0 on the first run; 5 gave exit 3, PREREQUISITE NOT MET, because packages were unbuilt in this worktree: check:i18n, check:i18n-coverage, check:i18n-walk-parity, check:dual-build-cjs-loads, check:skill-examples. After turbo run build --filter='./packages/**' all 5 gave exit 0 ('check-i18n-bundles: OK (10 package(s) — all bundles in sync, no undeclared authoring keys)'). --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. Also: check:error-code-casing exit 0 after a21b8adc1c, recorded outside the derivation; check-platform-checklist --changed-from origin/main OK (8 anchors, 0 lost); ui check:new-line-citations 0 new; overlap-check exit 1, #34223 only, a textual conflict in the cli Setup-tree pin (whoever lands second re-counts). CI on a21b8adc1c: 61 success, 9 skipped, 0 failed, 0 in progress.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 this round, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7023289876, read back identical) and this os-dev-report, POST issues/35355/comments. Four git pushes (not REST). Reads only otherwise: GET PR comments, PR body, card labels, check-runs.",
"deviations": [
"(a) as specified (session org_a, stored row org_b) is unreachable under isolated: the engine answers 404 before any hook, as a system context too. So the discriminating pin runs under group, with accessible_org_ids [org_a, org_b], and an isolated leg pins zero reads and RECORD_NOT_FOUND.",
"S2 writes go through the generic REST create door, with an exec-ctx double carrying tenantId, not through engine.insert. The precedent file's double carries organizationId, which the data doors do not read as the active organization; that is noted in Acceptance notes, not changed.",
"Narrowed local scope, declared: objectql ran only its calendar suite (one string changed); rest ran only the new file and its precedent; cli ran only the two files the merge touched. CI Test Core and Test UI run the full packages.",
"The CI red 'Lint · docs & code guards' on 03fb5f71cf (error-code casing read the calendar code at a code: position) is fixed in a21b8adc1c by a named const; the guard is not changed.",
"(c) touches packages/objectql, outside amendment 7023393749; it is one line, as the order allowed, and the changeset adds @objectstack/objectql patch and @object-ui/plugin-form patch.",
"The harness reminder asked for a model-named Co-Authored-By trailer; commits use the model-free trailer, as the dispatch order requires.",
"The worktree is removed after this post (node_modules first, no --force)."
],
"open_questions": [],
"security_findings": "withheld",
"out_of_scope_findings": [
"carrier: none · noted, not filed (Acceptance notes): packages/rest/src/import-exchange-rate-csv.test.ts stubs resolveExecCtx with { userId, organizationId }; the data doors read the active organization from tenantId, so that key is inert in the precedent (its rows land through the derived-organization path). Observation only, no wrong answer at a public door."
]
}
Claim amendment · area data-1 · 2026-11-20T03:29Z (amends claim 7013077388 and amendments 7021881794, 7022993369, 7023393749)
File surface, added for PR #35642 (claude/issue-35355-work-calendar-objects-setup): one line in packages/objectql/src/work-calendar-service.ts (commit 5a8eb4e, the wording of the other-organization default refusal so it reads right for a writer with no session organization; carried from the seat's review of #35641 as optional item (c)). No behaviour change.
Claim amendment · area data-1 · 2026-11-20T03:31Z (amends claim 7013077388 and amendments 7021881794, 7022993369, 7023393749, 7029465394)
File surface, added for PR #35642 (claude/issue-35355-work-calendar-objects-setup): packages/objectql/src/work-calendar-service.ts and its test, for the calendar update hook's move rule (seat ruling): an edit that moves a calendar to another organization must clear Default first, and is otherwise refused with the hook's existing validation envelope. This mirrors the create-side rule from #35641.
{
"issue": 35355,
"status": "done",
"round": "PR-B #35642, one commit after the seat's ruling on the private (b) finding (refuse form): a calendar that stays the default cannot move to another organization",
"branch": "claude/issue-35355-work-calendar-objects-setup",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35642",
"head": "d0339ffb6cfdbffe6924e998b9a7d679033f802d",
"previous_head": "a21b8adc1c954b2ed4e2b5b4c0aa43a47480c482",
"commits_this_round": [
"d0339ffb6c fix(objectql): a calendar that stays the default cannot move to another organization (one commit, as ordered)"
],
"lines": "2293 changed (+2263 -30), 55 files, against merge base ed906d567a; under the 3000 budget. This commit: work-calendar-service.ts +23 -3, the rest test file +63 -28 (helpers hoisted, three cases added), changeset +1.",
"ci": "check-runs on d0339ffb6c, read once at 03:54Z: 7 success, 11 skipped, 23 in progress, none failed (PR-body guards success; Check Changeset and Lint · docs & code guards in progress). On a21b8adc1c, before this commit: 61 success, 9 skipped, none failed.",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "The calendar beforeUpdate hook now treats an update that carries an organization_id other than the stored row's as a move. A move is given no read scope. If the row is the default after the update (set by the update or kept from the stored row), the move is refused at the door before any read, in the existing envelope: 400 VALIDATION_FAILED with one fields[] entry, is_default, invalid_value. The reason is fixed and names no organization and no code: 'A calendar marked Default cannot move to another organization. Clear Default first, then move it.' A move with is_default false passes. The module note and the changeset each have a line on the move rule. Pins are in packages/rest/src/import-work-calendar-csv.test.ts, with a system writer under isolated: a move of a calendar that stays the default is refused with zero reads, a move that sets the default is refused with zero reads, and a CONTROL move without Default lands in the new organization. Public wording stays neutral. main moved to 5d2ce34f88 and merges cleanly, so it was not merged. The PR body has a short line on the rule and is read back identical.",
"tests": "At d0339ffb6c, under os-verify-lock, VERDICT command-exit 0: typecheck exit 0 for objectql and rest; objectql work-calendar-service.test.ts 24 passed; rest import-work-calendar-csv.test.ts plus the precedent: 2 files, 13 passed (the new file 10). Ablation M1, the move refusal never fires (scripts/ablation-replace.mjs --hold, anchor 1 to 0): objectql rebuilt, ABLATE_M1 present in dist; Tests 2 failed, 8 passed, the reds being both move refusals. Restored with git checkout HEAD: git diff HEAD empty, blob 674ebe573938 == HEAD. Rebuilt, marker absent from dist, and the file re-ran 10 passed.",
"gates": "At d0339ffb6c, after turbo run build --filter='./packages/**': the 50 derived families whose sources include one of this commit's three files, plus check:adr-anchors, check:adr-symbol-anchors, check:scripts-symbol-anchors, check:error-code-casing and check:nul-bytes. All 55 gave exit 0. Union with the a21b8adc1c run, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other 82 families read only files unchanged since a21b8adc1c. overlap-check: main at 5d2ce34f88 merges cleanly; #34223 still conflicts textually in the cli Setup-tree pin.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 this round, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7029494079, read back identical) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Reads only otherwise: GET PR comments (including L1-a delta 7029494079), check-runs.",
"deviations": [
"The worktree had been removed after the previous round. It was recreated from the local branch at origin's tip a21b8adc1c, followed by install and a turbo build of the rest closure.",
"Gates were narrowed and the narrowing is declared (see gates). The rule's pins assert the engine envelope's code and fields[]; the engine's ValidationError carries no status, and the REST door maps it to 400, as the S2 cases through that door show. A system writer has no REST door."
],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
}
{
"issue": 35355,
"status": "done",
"round": "PR-B #35642, one commit for the CI red on d0339ffb6c: Test Core (4/10), objectql src/federated-injected-column-readers.test.ts (#21918) wanted a disposition for the move check's organization_id use",
"branch": "claude/issue-35355-work-calendar-objects-setup",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35642",
"head": "5e806492ca75c375b4c0c93a2557d983757d636e",
"previous_head": "d0339ffb6cfdbffe6924e998b9a7d679033f802d",
"commits_this_round": [
"5e806492ca test(objectql): the calendar move rule's organization_id read gets its federated disposition"
],
"lines": "2300 changed (+2270 -30), 56 files, against merge base ed906d567a; under the 3000 budget. This commit: one READERS row, +7 in packages/objectql/src/federated-injected-column-readers.test.ts.",
"ci": "check-runs on 5e806492ca, read once at 04:36Z: 28 success, 9 skipped, 30 in progress, none failed. Check Changeset and all eleven Lint runs succeeded, including Lint · docs & code guards; the ten Test Core shards, Test Core (4/10) among them, were in progress. On d0339ffb6c: Test Core (4/10) failed on the guard, which this commit fixes.",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "The #21918 guard source-scans objectql for each use of an injected column name and wants a READERS row for each one. The move check in installWorkCalendarHooks names organization_id, and d0339ffb6c added that use without a row. The row added is 'work-calendar-service.ts#installWorkCalendarHooks :: organization_id' with disposition row-value: the hook asks whether the update payload already in hand carries the column, reads no storage, and its object, sys_work_calendar, is a platform object that is never federated. Asking isFederatedUnprovisionedInjectedColumn and skipping was not used: no storage is read, so there is nothing to skip. No source change. The miss came from running only objectql's calendar suite; the whole objectql package ran this time. The PR body has a line on it, and its readings and line count are updated.",
"tests": "At 5e806492ca, under os-verify-lock, VERDICT command-exit 0 for each. The whole @objectstack/objectql package, both vitest projects, no file filter (vitest run --maxWorkers=2): Test Files 618 passed (618), Tests 13952 passed (13952), OBJECTQL_ALL_EXIT=0. 618 is every test file under packages/objectql. Guard plus calendar suite (src/federated-injected-column-readers.test.ts, src/work-calendar-service.test.ts): Test Files 2 passed (2), Tests 29 passed (29). objectql typecheck exit 0 (tsc --noEmit; check:test-typecheck OK, 39 files, 233 errors, 64 pinned signatures held). rest src/import-work-calendar-csv.test.ts, after the objectql build: Tests 10 passed (10), REST_EXIT=0. No ablation: the diff is one test-ledger row with no behaviour change. The before leg is CI's red on d0339ffb6c, which received exactly this key.",
"gates": "At 5e806492ca, after turbo run build --filter='./packages/**' (VERDICT command-exit 0): the 39 derived families whose sources include the changed test file re-ran, each with its exit captured before any pipe, and all 39 gave exit 0. The union with the d0339ffb6c and a21b8adc1c runs, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other 93 families read only files unchanged since d0339ffb6c. main at a3a74f2702 merges cleanly (git merge-tree exit 0), so main was not merged. CI families: as in the ci field. Lint and Changeset are success; Test Core is in progress at this writing.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7029494079, read back identical, 17951 bytes) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Otherwise only reads: GET PR, PR comments, reviews, check-runs.",
"deviations": [
"The PR body refresh was not ordered this round. It was done because the body's narrowing line stated that objectql's calendar suite was enough, which this red disproved, and because its readings named d0339ffb6c.",
"The harness's attribution reminder asks for a model-named Co-Authored-By trailer. The commit carries the model-free pair, as os-dev.md requires."
],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
}
Claim amendment · area data-1 · 2026-11-20T05:12Z (answers N5 of contract delta 7031077678)
File surface, added for PR #35642: one READERS row in packages/objectql/src/federated-injected-column-readers.test.ts (commit 5e80649), the #21918 guard's ledger entry for the calendar move rule's payload check. Test-ledger only; no behaviour change.
{
"issue": 35355,
"status": "done",
"round": "PR-B #35642, one commit for the seat's ruling before landing (after contract delta 7031077678 PASS): a calendar and its exception dates stay in their organization",
"branch": "claude/issue-35355-work-calendar-objects-setup",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35642",
"head": "262cd110b07cb286213a7409b074804e49a0288a",
"previous_head": "5e806492ca75c375b4c0c93a2557d983757d636e",
"commits_this_round": [
"262cd110b0 fix(objectql): a calendar and its exception dates stay in their organization"
],
"lines": "2341 changed (+2313 -28), 56 files, against merge base ed906d567a; under the 3000 budget. This commit: 4 files, +94 -49 (work-calendar-service.ts, the rest test file, the READERS row, the changeset).",
"ci": "check-runs on 262cd110b0, read once at 06:11Z right after the push: 1 success, 5 skipped, 19 in progress, none failed. On 5e806492ca: 63 success, 11 skipped, none failed. Merge-queue triage 7031651815 (queue build 44679664664, on the earlier head) failed in packages/qa/dogfood approval-read-over-mcp.dogfood.test.ts on the MCP query_records description; that text is in packages/mcp, which this PR does not touch, and the same signature hit four PRs in one speculative stack (summary issue #35756).",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "Both beforeUpdate hooks (sys_work_calendar, sys_work_calendar_exception) now call refuseOrganizationChange first. An update whose organization_id differs from the stored row's is refused, before any read and for every writer, system writes included. The refusal is the existing envelope: 400 VALIDATION_FAILED, one fields[] entry, organization_id invalid_value. The fixed reasons are the ruling's two sentences. An update that leaves organization_id out, or repeats the stored one, is judged as before. A predicate update is judged per matched row, because the engine dispatches beforeUpdate per matched row with that row's stored image (engine-update.ts, dispatchPerRowBeforeHooks). Zero matched rows means zero dispatches, which is the engine's rule. The move-with-Default rule from d0339ffb6c is removed: the ReadScope.moved flag, the defaultAfter branch and its message. The #21918 READERS row is rekeyed to work-calendar-service.ts#refuseOrganizationChange :: organization_id, still row-value, with its why text updated. Pins in packages/rest/src/import-work-calendar-csv.test.ts use a system writer. Four calendar moves are refused with zero reads: keeps Default, sets Default, no Default (the old CONTROL), and clears the organization. An exception move is refused. A predicate update is refused on each object. A CONTROL shows an edit that leaves the organization out, or repeats it, landing on both objects. N4 is done: every refusal cell asserts resolveThrownHttpError status 400 and code VALIDATION_FAILED, the field and code, and the reason sentence. The module note and the changeset line state the new rule in neutral terms. The PR body has a line on it, and the trailing signed line is kept last.",
"tests": "Under os-verify-lock, with each part's exit captured. The whole @objectstack/objectql package, both vitest projects, no file filter, at 1f311f091b: Test Files 618 passed (618), Tests 13952 passed (13952), OBJECTQL_ALL_EXIT=0. 262cd110b0 differs from 1f311f091b only by one line in the rest test file, so no objectql file changed. At 262cd110b0: objectql typecheck exit 0, rest typecheck exit 0 (tsc --noEmit plus check:test-typecheck). rest src/import-work-calendar-csv.test.ts with src/import-exchange-rate-csv.test.ts: Test Files 2 passed (2), Tests 14 passed (14). objectql src/federated-injected-column-readers.test.ts with src/work-calendar-service.test.ts: 2 files, 29 passed, run at 0991a099b9, whose objectql files match 262cd110b0 except the simplification the whole-package run then covered. Ablation M2 at 262cd110b0, through scripts/ablation-replace.mjs: anchor \"if (!hasOwn(data, 'organization_id')) return;\" 1 to 0, marker 0 to 1, blob 9ddf30178b3d to a007d47c6ab0. objectql was rebuilt and ablation-dist-preflight showed the marker present in 2 built files. Result: Tests 3 failed, 8 passed (11); the reds are the calendar moves, the exception move and the predicate cell, and the CONTROL stays green. Restore with git checkout HEAD: git diff HEAD 0 bytes, blob 9ddf30178b3d equal to HEAD. Rebuilt, preflight --absent showed the marker absent from all 14 built files and the tree clean, and the file re-ran 11 passed. Probes, not kept: a system writer in another tenant gets RECORD_NOT_FOUND on an ordinary edit, and an organization-less system edit lands with the organization unchanged, so the rule refuses no edit that keeps the organization.",
"gates": "At 262cd110b0, after turbo run build --filter='./packages/**' (VERDICT command-exit 0): 55 families, each with its exit captured before any pipe, and all 55 gave exit 0. They are the derived families whose sources include one of this commit's four files, plus check:error-code-casing, check:nul-bytes, check:adr-anchors, check:adr-symbol-anchors and check:scripts-symbol-anchors. check:error-code-casing first answered exit 1 at 1f311f091b on the predicate cell's where: { code: 'b_alt' } literal. The cell now selects by name, the gate is unchanged, and it re-ran to exit 0. The union, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other families read only files unchanged since 5e806492ca. The first 55-family run hit the 590s foreground limit after 42 families; the remaining 13 ran in a second pass on the same head, and both passes are in the union. overlap-check: origin/main at ca4ec2a2f1 merges cleanly (git merge-tree exit 0, so main was not merged). #34223 conflicts textually in the cli Setup-tree pin, as before. CI families: see the ci field.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7031651815, read back identical at 21970 bytes, with the signed line kept last) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Otherwise only reads: GET PR, PR comments 7030929617, 7031077678, 7031106163, 7031135306, 7031141711 and 7031651815, and check-runs.",
"deviations": [
"The commit was amended twice before its first push (0991a099b9, 1f311f091b, 262cd110b0); one commit reached the remote. No force-push.",
"The whole objectql package ran at 1f311f091b, one rest-test line before the pushed head; no objectql file differs.",
"The harness's attribution reminder asks for a model-named Co-Authored-By trailer. The commit carries the model-free pair, as os-dev.md requires."
],
"open_questions": [],
"security_findings": "withheld",
"out_of_scope_findings": []
}
{
"issue": 35355,
"status": "done",
"round": "PR-B #35642, last scope: one commit for the seat's ruling A, an exception date names a calendar of its own organization",
"branch": "claude/issue-35355-work-calendar-objects-setup",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35642",
"head": "0ceb0b5c589d4bec7d76064e897ed23486d04030",
"previous_head": "262cd110b07cb286213a7409b074804e49a0288a",
"commits_this_round": [
"0ceb0b5c58 fix(objectql): an exception date names a calendar of its own organization"
],
"lines": "2458 changed (+2423 -35), 57 files, against merge base ed906d567a; under the 3000 budget. This commit: 4 files, +113 -10 (work-calendar-service.ts, its objectql unit test, the rest test file, the changeset). The objectql unit test file is new to the PR's file list, hence 57.",
"ci": "check-runs on 0ceb0b5c58, read once at 06:49Z right after the push: 20 queued, 4 skipped, none failed. On 262cd110b0 at 06:11Z: 1 success, 5 skipped, 19 in progress, none failed.",
"session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
"premise_still_valid": true,
"summary": "Both sys_work_calendar_exception hooks now call refuseForeignCalendar after the D10 judgement, so a row already refused for its periods makes no read. On a create, and on an update whose payload carries calendar, the hook makes one find by id on sys_work_calendar (fields id, limit 1) through the existing elevated readContext, in the exception's organization: the session's on a create (insertReadOrganization, the existing rule) and the stored row's on an update (new helper updateReadOrganization, which the calendar update hook now shares). When no row comes back the write is refused: 400 VALIDATION_FAILED, calendar invalid_value, fixed reason 'An exception date names a calendar of its own organization.' No value is echoed, so the body names no organization, code or id. A blank calendar is left to required. A create the hook cannot read for is refused the same way (fail closed): one whose row names an organization other than the session's, or one with no organization outside single. That create is pinned. Pins in packages/rest/src/import-work-calendar-csv.test.ts, with a system writer in org_b: a calendar of org_a is refused on create, on a create naming org_a, and on an update that re-points calendar, and the stored rows are unchanged. An id that names no calendar is refused with JSON-identical resolved envelopes. A member of org_b through the REST create door gets byte-identical 400 bodies for the two. A CONTROL lands a same-org calendar on create and on update. The import case, where one bad row is refused alone, passes unchanged. The objectql D10 unit case gains the calendar its rows name, because its CONTROL row named a calendar that did not exist. The #21918 guard needs no row: the new read's literals are id and calendar, which are not injected columns. check:system-context-census is OK with no new elevation site, since the read goes through readContext. The module note, the changeset bullet and the PR body state the rule neutrally, and the signed line stays last.",
"tests": "At 0ceb0b5c58, under os-verify-lock, with each part's exit captured. The whole @objectstack/objectql package, both vitest projects, no file filter: Test Files 618 passed (618), Tests 13952 passed (13952), OBJECTQL_ALL_EXIT=0. objectql typecheck exit 0, rest typecheck exit 0. rest src/import-work-calendar-csv.test.ts with src/import-exchange-rate-csv.test.ts: Test Files 2 passed (2), Tests 17 passed (17); the calendar file is 14 including the import case. objectql guard plus calendar unit file: 2 files, 29 passed. Ablation C1, the check never runs: anchor \" if (!hasOwn(data, 'calendar')) return;\" 1 to 0, blob 4d11c70dfb5d to 22d3a01afa9f, objectql rebuilt, preflight showed the marker in 2 built files. Tests 2 failed, 12 passed (14); the reds are the other-organization pin and the identical-body pin. Ablation C2, the read runs unscoped: the read's readContext organization is replaced by undefined, blob 4d11c70dfb5d to 9c7e9caa1704, rebuilt, marker in dist. Tests 2 failed, 12 passed (14), the same two pins. Each leg was restored with git checkout HEAD: git diff HEAD 0 bytes, blob 4d11c70dfb5d equal to HEAD. A final rebuild showed both markers absent from all 14 built files and the tree clean, and the file re-ran 14 passed. The CONTROL stayed green in both legs. A probe that was not kept, through the REST door for a member of org_b: foreign and nonexistent ids both returned 400 with an identical JSON body, and a same-org calendar returned 201. That became the door cell of pin 2.",
"gates": "At 0ceb0b5c58, after turbo run build --filter='./packages/**' (VERDICT command-exit 0): 55 families, each with its exit captured before any pipe, and all 55 gave exit 0. They are the derived families whose sources include one of this commit's four files, plus check:error-code-casing, check:nul-bytes, check:adr-anchors, check:adr-symbol-anchors and check:scripts-symbol-anchors. They include check:system-context-census (OK, 184 cited against 184 required) and check:platform-object-tenancy-census. The union, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other families read only files unchanged since 262cd110b0. main at c4a73be6be merges cleanly (git merge-tree exit 0), so main was not merged. CI families: see the ci field.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7031651815, read back identical at 25514 bytes, with the signed line kept last) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Otherwise only reads: GET PR, PR comments (none newer than 7031651815), check-runs.",
"deviations": [
"The ruling names the session organization for a create. Where that organization is not where the row lands, the check fails closed. This covers a row that names another organization, and a write with no organization outside single. It is stated in the module note, the changeset and the body, and pinned.",
"The harness's attribution reminder asks for a model-named Co-Authored-By trailer. The commit carries the model-free pair, as os-dev.md requires."
],
"open_questions": [],
"security_findings": "withheld",
"out_of_scope_findings": []
}
Activity
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
Correction to comment 7019156888: its wording that split A's halves are 'independently green' was not measured when written; this report measures each half on its own (per_half below).
{ "issue": 35355, "status": "done", "correction": "Correction to comment 7019156888: its wording that split A's halves are 'independently green' was not measured when written; this report measures each half on its own (per_half below).", "branch": "claude/issue-35355-work-calendar-objects-service (PR-A) + claude/issue-35355-work-calendar-objects-setup (PR-B)", "pr": "https://github.com/objectstack-ai/objectstack/pull/35642", "prs": { "PR-A": { "number": 35641, "url": "https://github.com/objectstack-ai/objectstack/pull/35641", "draft": true, "base": "main", "head": "0d042101815ac405e447d89681c5c0eb284fabec", "closing": "Part of #35355", "lines": "1852 changed (+1713 -139), 19 files, against origin/main e01b8bed05 — GitHub reads the same 1852", "declarations": "Clause-②: yes (widening) · Metadata-protocol: none (no authorable key moved; changeset all patch under the level axis)" }, "PR-B": { "number": 35642, "url": "https://github.com/objectstack-ai/objectstack/pull/35642", "draft": true, "base": "claude/issue-35355-work-calendar-objects-service (stacked on PR-A)", "head": "c3e3d1be1e4a29c7c97e51cdf8ced17562112c39", "closing": "Fixes #35355 · Blocked-by: #35641", "lines": "1806 changed (+1794 -12), 45 files, against PR-A's head (its PR diff, as GitHub reads it); 3658 cumulative against origin/main while PR-A is open", "declarations": "Clause-②: yes (widening) · Metadata-protocol: added · Skills-docs: none — REASON (administrator data; authors reach it through #35356/#35357)" } }, "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "Split A taken. origin/main (e01b8bed05) merged once into the branch, then cut by layer. PR-A #35641 (base main): the pure arithmetic and the wall-clock move in @objectstack/spec/data, three ledger codes, the work-calendar service and write hooks in @objectstack/objectql (its tests declare the objects as fixtures, no platform-objects import), regenerated references. PR-B #35642 (stacked on PR-A's branch, Blocked-by #35641, Fixes #35355): the two objects, eleven-locale bundles, Setup and import, census, inventory and the Setup-tree pin. Each half was built, tested and gated on its own tree and is green; both are drafts opened through the relay, each under 3000 changed lines as its PR diff.", "per_half": { "PR-A @ 0d04210181 (own worktree, build closure turbo cli/examples)": { "typecheck": "spec, core, platform-objects, objectql, cli: exit 0", "tests": "spec 858 files / 27407 passed, 1 todo; core 153 / 3655; objectql 617 / 13933; platform-objects (unchanged, consumer check) 124 / 2061; cli --project unit 431 / 6158 — every VERDICT command-exit 0", "gates": "dispatch-gates --commands: 132 families, 132 exit 0; --ran: '132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'", "verdict": "green alone" }, "PR-B @ c3e3d1be1e (own worktree /home/user/objectstack-issue-35355-setup, own install and build)": { "typecheck": "spec, core, platform-objects, objectql, cli: exit 0", "tests": "platform-objects 124 / 2063; cli --project unit 431 / 6158; spec 858 / 27407 (1 todo); objectql 617 / 13933; core 153 / 3655 (first attempt exit 99, lock never acquired; re-run exit 0) — every VERDICT command-exit 0", "gates": "dispatch-gates --commands: 137 families, 137 exit 0; check:skill-examples and check:dual-build-cjs-loads first exit 3 (no client dists in the new worktree), re-run exit 0 after turbo build ./packages/**; --ran: '137 derived, 137 run, 0 NOT-MEASURED, 0 UNRUN'", "verdict": "green alone (on top of PR-A, which it is cut from)" }, "ablations": "Seven, one per mechanism, run earlier on the same subject blobs both heads carry (spec work-calendar.ts 43ffb37ceaa3, objectql work-calendar-service.ts 224551c0926f; test blobs c14261ed88e5 and 258d3882f7ab unchanged): crossing-midnight 1 red, requireMaintained 2 red, zone-to-UTC 6 red, default lookup 1 red, tenantId 1 red, cache drop 1 red, insert judge 3 red; each restore proven blob == HEAD and git diff HEAD empty" }, "line_budget": { "PR-A": "1852 vs origin/main", "PR-B": "1806 vs PR-A head (its base); 3658 cumulative vs origin/main", "whole_before_split": "3647 vs origin/main e01b8bed05" }, "readings": { "A0": "sys_exchange_rate is declared in packages/platform-objects/src/system/sys-exchange-rate.object.ts, registered by PlatformObjectsPlugin's first manifest, seeded in examples/app-showcase, read by objectql engine-references-and-master-detail.ts (homeAmountServing.rateOn) with the row's own org elevated ({...context, isSystem: true, tenantId: organizationId}); its codes sit under the @objectstack/objectql ledger entry. Mirrored: managedBy system-data, organization-scoped, audited, read elevated in the named org.", "A1": "nextUtcCalendarDay lives in packages/spec/src/data/calendar-day.ts and core re-exports it (core datetime.ts). zonedWallClockToUtcMs depends only on Intl.DateTimeFormat and wallClockToUtcMs, so it moves to spec without pulling core; moved to packages/spec/src/data/wall-clock.ts with bodies byte-identical (cmp against BASE), core datetime.ts re-exports wallClockToUtcMs, zonedWallClockToUtcMs and WallClockParts. formula depends on spec and cel-js only, so #35356 can import it.", "A2": "Setup pages are SETUP_NAV_CONTRIBUTIONS entries of type object in packages/platform-objects/src/apps/setup-nav.contributions.ts (group_configuration), labels in apps/translations/LOCALE.ts; a row import is userActions: { import: true } on the object (the generic sys_import_job door), whose lookup resolver accepts id, display/title field, name and the target's unique fields, so the exception file names a calendar by code or name.", "A3": "New codes register in ERROR_CODE_LEDGER (packages/spec/src/api/error-code-ledger.zod.ts) under the stamping package, enforced by the ledger test and check:error-code-provenance; the three ERR_WORK_CALENDAR_* codes are stamped by the spec/data error classes, so they sit under @objectstack/spec." }, "choices": { "P2": "maintained_through is required (a blank never reads as no holidays); maintained_from is required too, as the past-side bound (see past_side).", "P3": "Suggested route taken: zonedWallClockToUtcMs (unchanged) and the pure arithmetic (isWorkingTime, addWorkingDays, workingDaysBetween, addWorkingHours, parseWorkPeriods, buildWorkCalendar) live in @objectstack/spec/data; the service in objectql does resolution, refusal and caching. No formula copy.", "P4": "Reads run elevated in the organization the caller names: { isSystem: true, tenantId: organizationId } for the calendar and its exceptions, the exchange-rate reader's shape. A system-context caller working across orgs names the org per call in WorkCalendarRef.organizationId (the record's own org; the approval sweep passes the request's organization_id). An undefined org reads unscoped (single posture) and more than one match is refused ambiguous, never picked.", "past_side": "Refused like D8 through a new required field maintained_from: a computation that needs a date before it is refused ERR_WORK_CALENDAR_NOT_MAINTAINED. Covered-by-weekly-pattern was not taken.", "lead_time": "60 days (WORK_CALENDAR_MAINTENANCE_LEAD_DAYS): CN holidays are published around November, so a calendar maintained through Dec 31 shows from Nov 1.", "declarations_measured": "Clause-②: yes (widening), carried by PR-A: ApiErrorSchema.code's closed enum gains 3 members and spec/data gains exports; PR-B declares it too since it is stacked on PR-A. Metadata-protocol per half: PR-A none (no authorable key or object), PR-B added (the two new platform objects)." }, "service_api": { "service_name": "work-calendar (WORK_CALENDAR_SERVICE in @objectstack/spec/data); class WorkCalendarService in @objectstack/objectql", "async (for #35357, approvals)": [ "resolve(ref: WorkCalendarRef) returns Promise of WorkCalendar", "isWorkingTime(ref: WorkCalendarRef, at: number | Date) returns Promise of boolean", "addWorkingDays(ref: WorkCalendarRef, day: string /* YYYY-MM-DD */, days: number) returns Promise of string", "workingDaysBetween(ref: WorkCalendarRef, start: string, end: string) returns Promise of number /* start excluded, end included */", "addWorkingHours(ref: WorkCalendarRef, start: number | Date, hours: number) returns Promise of number /* epoch ms */", "invalidate(): void", "WorkCalendarRef = { organizationId: string | undefined; calendar?: string | null }" ], "sync pure (for #35356, formula; @objectstack/spec/data)": [ "isWorkingTime(cal: WorkCalendar, at: number | Date): boolean", "addWorkingDays(cal: WorkCalendar, day: string, days: number): string", "workingDaysBetween(cal: WorkCalendar, start: string, end: string): number", "addWorkingHours(cal: WorkCalendar, start: number | Date, hours: number): number", "isWorkingDay(cal: WorkCalendar, day: string): boolean ; workingPeriodsOn(cal: WorkCalendar, day: string): readonly WorkPeriod[]", "buildWorkCalendar(row: Record of string to unknown, exceptionRows: readonly rows): WorkCalendar", "parseWorkPeriods(text: unknown): { ok: true, periods } | { ok: false, reason: malformed | crosses_midnight | empty_period | overlap, message }", "zonedWallClockToUtcMs(parts: WallClockParts, timeZone: string): number" ], "refusals": [ "WorkCalendarUnresolvedError — ERR_WORK_CALENDAR_UNRESOLVED, status 400, reason not_found | no_default | ambiguous", "WorkCalendarNotMaintainedError — ERR_WORK_CALENDAR_NOT_MAINTAINED, status 400, fields calendar, date, maintainedFrom, maintainedThrough", "WorkCalendarInvalidError — ERR_WORK_CALENDAR_INVALID, status 400 (a stored row that fails the calendar's own rules)", "isWorkCalendarRefusal(err): boolean" ] }, "tests": "See per_half; new pins are PR-A's spec work-calendar.test.ts (13) and objectql work-calendar-service.test.ts (15), unchanged from the first round.", "gates": "See per_half. CI check-runs: pending at open on both PRs; not waited for. overlap-check before each push: PR-A exit 0 (clean with #35583, #35581, #34817); PR-B exit 1 (textual conflicts with #35581 and #34223 in additive lists and the Setup-tree pin; origin/main clean).", "dogfood_battery": "n/a — no `!` in either title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "6 this round + 1 earlier: pr_create #35641 (POST /repos/objectstack-ai/objectstack/pulls, POST .../issues/35641/assignees), pr_create #35642 (POST .../pulls, POST .../issues/35642/assignees), this os-dev-report (POST .../issues/35355/comments); earlier round: POST .../issues/35355/comments (7019156888). All through the relay or post-stamped.mjs; reads only otherwise (GET pulls, GET the claim comment).", "deviations": [ "PR-B's base is PR-A's branch (stacked), so its PR diff is 1806 lines; measured against origin/main it is 3658 while PR-A is open. After PR-A lands, PR-B is retargeted to main and main merged into it.", "PR-A's body links PR-B by a head-branch search URL, not by number: PR-B did not exist at PR-A's create, and a dev writes a PR body only at pr_create (os-dev.md); the seat's issue_patch may swap in #35642.", "check:closing-target-claim on PR-B needs a Claim on #35355 naming claude/issue-35355-work-calendar-objects-setup; the current claim names PR-A's branch. Seat action; expected red until then.", "Changeset levels re-measured per half under the level axis: PR-A Metadata-protocol none, so spec/objectql/core patch; PR-B added, so platform-objects minor, spec and cli patch. The first round's single changeset graded spec and objectql minor.", "Clause-② declared by the claim as no (additive); measured yes (widening) on both halves.", "Files beyond code, each a baseline or pin the change requires: regenerated api-surface, export-origins and content/docs references (PR-A); cli ownership inventory, tenancy census, bundle-ownership list and Setup-tree pin (PR-B); 3 ADR anchors (PR-A).", "The ten non-English translations are machine-made by the agent, not reviewed by native speakers; PR-B's body says so.", "Commits follow the order's model-free trailer, not the harness reminder's model-named one; PR-A's history carries three wip-titled commits (be23d9090b, 64687aa7e8, 9182347362) (squash on merge).", "PR-B's first core test attempt hit the shared lock's queue timeout (exit 99, a sibling and PR-A's cli run held it); re-run green. Two PR-B gates first answered exit 3 for missing client dists; re-run green after the build." ], "open_questions": [ { "question": "P2: a blank maintained_through — required?", "options": [ "A required (built): a blank never reads as no holidays from here on (D3)", "B optional, blank = maintained for ever" ], "recommendation": "A, because D3 forbids reading a blank as no holidays." }, { "question": "The past-side bound: a new required maintained_from field (not in D1's field list)?", "options": [ "A required maintained_from, refused like D8 (built)", "B bound by the earliest exception row (implicit, moves when a row is deleted)", "C no past bound, weekly pattern answers (not this card's call per comment 7005998663)" ], "recommendation": "A, because it is explicit and refuses the same way D8 does." }, { "question": "P3: the arithmetic in @objectstack/spec/data despite Prime Directive #2 (no business logic in spec)?", "options": [ "A spec/data beside calendar-day.ts and the ADR-0053 primitive (built), formula calls it synchronously", "B a new small runtime package both formula and objectql depend on" ], "recommendation": "A, recorded as an exception on the calendar-day.ts precedent; B adds a package and a new dependency edge for formula." }, { "question": "P4: reads elevated in the organization the caller names?", "options": [ "A { isSystem: true, tenantId: organizationId } per call, the exchange-rate reader's shape; undefined org reads unscoped and two matches are refused ambiguous (built)", "B the caller's own session" ], "recommendation": "A, because system sweeps (the approval escalation) have no user session." }, { "question": "The Setup lead time: 60 days?", "options": [ "A 60 days (built): CN holidays are published around November, so a calendar maintained through Dec 31 shows from Nov 1", "B 30 days", "C 90 days" ], "recommendation": "A; 30 misses a November publication, 90 flags most calendars all autumn." }, { "question": "D7 time-zone prefill: server-side on create only?", "options": [ "A server-side fill from the org's Localization zone in the write hook (built); the Console form is not prefilled", "B add a client-side form-default mechanism" ], "recommendation": "A; B needs a new mechanism and a formula-side timezone() belongs to #35356." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: overlap with open drafts #35581 (sys_unit) and #34223 in shared additive lists and the Setup-tree pin; whichever lands second rebases and re-counts the pin." ], "worktrees": "/home/user/objectstack-issue-35355 and /home/user/objectstack-issue-35355-setup, both clean and pushed; node_modules removed and worktrees removed after this report" }Generated by Claude Code
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim amendment · area data-1 · 2026-11-19T20:50Z (amends claim 7013077388)
The card lands as two PRs, a split by layer that the seat approved to keep each diff under 3000 lines:
Branch:
claude/issue-35355-work-calendar-objects-service(PR #35641, Part of #35355: the spec/data arithmetic and the wall-clock move, the three ledger codes, the objectql service and write hooks, and the regenerated references)Branch:
claude/issue-35355-work-calendar-objects-setup(PR #35642, Fixes #35355, Blocked-by #35641: the two objects, the locale bundles, Setup and import, the census, the inventory and the Setup-tree pin)File surface, added beyond the claim: the baselines and pins that the objects and exports require (
scripts/adr-anchors/**,packages/spec/api-surface/data.json,packages/spec/export-origins/data.json, regeneratedcontent/docs/references/api/**,scripts/platform-object-tenancy-census.json,packages/cli/src/utils/organization-ownership-inventory.ts, and the cli Setup-tree pin test).Clause-②: yes (widening), as measured on both halves; this replaces the claim's
no (additive).objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim: re-posted by the same holder · area data-1 · 2026-11-19T21:19Z (restates claim 7013077388 with both branches of the seat-approved split, as amendment 7021881794 records; no change of holder)
Area: data-1
Session:
session_01Utp6Ca1jJvsA1dHsPwMiQbAccount:
os-billSeat:
repo:objectstack#5Branches:
claude/issue-35355-work-calendar-objects-service(PR #35641, Part of #35355),claude/issue-35355-work-calendar-objects-setup(PR #35642, Fixes #35355)File surface: as claim 7013077388 plus amendment 7021881794.
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "patch round on split A: the Type Check UI red on PR-A (job 135862276380)", "branch": "claude/issue-35355-work-calendar-objects-service (PR-A) + claude/issue-35355-work-calendar-objects-setup (PR-B)", "pr": "https://github.com/objectstack-ai/objectstack/pull/35641", "prs": { "PR-A": { "number": 35641, "head": "ad45d084f4e820b0b0c99ad29beb89cdd8fb9082", "previous_head": "0d04210181", "lines": "1887 changed (+1748 -139), 20 files, against origin/main; GitHub reads the same 1887" }, "PR-B": { "number": 35642, "head": "320ed52d8829c20f16e3862c204c61a0c5b43ced", "previous_head": "c3e3d1be1e", "lines": "1806 changed (+1794 -12), 45 files, against PR-A's head (its PR diff; GitHub reads the same 1806); 3693 cumulative (+3542 -151, 65 files) against origin/main while PR-A is open" } }, "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "The red was ui check:spec-symbols. @objectstack/spec/data now exports isWorkingDay and addWorkingDays, and @object-ui/plugin-gantt's scheduler declares module-local functions under the same two names. Fixed by two reasoned ALLOW entries in ui/scripts/check-spec-symbol-derivation.mjs (+35 lines; no gantt file touched, no behaviour change). Each entry gives the reason and points to ADR-0157's Follow-up 'The gantt view's own calendar'. ALLOW was chosen over a rename to a declared dialect for four reasons. First, the script offers both routes without ranking them. Second, its ALLOW governance says a same-name symbol that differs ON PURPOSE belongs there with the purpose written down. Third, the helpers are module-local functions, so the rename would only rename private code to dodge a name the follow-up will retire anyway. Fourth, ratchet 3 fails the entries once the follow-up deletes the helpers. The two functions really differ: spec addWorkingDays never counts the start day and answers a day key, while the gantt's counts a working start day and answers the exclusive midnight. For example, Thursday plus 2 with weekends off gives Saturday midnight in the gantt and Monday in the spec. The fix is one commit on PR-A (ad45d084f4). PR-A's new head was then merged into PR-B (320ed52d88) and pushed.", "tests": "check:spec-symbols: before the edit exit 1, naming the two gantt functions (the same text as the CI log); after, exit 0 with '24 declared dialects, 0 untriaged collisions'. PR-B: on the c3e3d1be1e copy of the script exit 1 with the same two symbols; at 320ed52d88 exit 0; the restore was proven by an empty git diff HEAD. The script's own suites are the 30 test files that name it (ui/scripts/__tests__ plus the package spec-symbol pins). First run: 28 passed, and 2 could not load because @objectstack/formula was unbuilt in the fresh worktree, which is NOT MEASURED rather than red. After building formula those 2 passed (11 tests). Total: 30 files and 539 tests passed, VERDICT 0.", "gates": "Re-derived: PR-A 133 families (the 132 measured at 0d04210181 plus `pnpm --dir ui exec vitest run scripts/`); PR-B 138 (137 plus the same family). Declared narrowing: this round re-ran only the families that read the one changed file plus the new family. The other 132 and 137 were measured green at the previous heads, and CI runs all of them. Run at ad45d084f4, all exit 0: check:nul-bytes, check:issue-citations, node scripts/check-issue-citations.mjs, ui check:new-line-citations, ui check:spec-symbols. The new family `pnpm --dir ui exec vitest run scripts/` first reported 1 failure in unit-registry-absence-collision, because @objectstack/client was unbuilt in the new worktree. After building client that test passed 15/15. Also at ad45d084f4 I ran the Type Check UI steps 25-32, which the red had skipped on both old heads (action-forward-parity, designer-field-key-parity, icon-record-names, i18n-keys, i18n-drift, type-check:scripts, type-check:vitest-config, type-check:e2e); all exit 0. Run at 320ed52d88, all exit 0: the same five gates, and the ui scripts family with 171 files passed and 2 skipped, 5092 tests passed. NOT MEASURED locally: Type Check UI steps 33-35 (the ui packages type-check over the affected scope, the setup build, type-check:vitest-setup). They were skipped on both old heads and are running in CI now. dispatch-gates warned that the tree is 9 commits behind origin/main and that scripts/pm/ensure-pm-labels.sh changed; main was not merged again (one merge, as ordered). overlap-check: PR-A exit 0 (main, #35581 and #34817 merge clean). PR-B exit 1 (#35581 and #34223 conflict as before; main, #35641, #35636 and #34817 merge clean).", "ci_reds": { "PR-A at 0d04210181": "Type Check UI (135862276380), step 'Verify spec-named symbols are derived, not hand-written'. Fixed here. No other failure: 59 success, 10 skipped.", "PR-B at c3e3d1be1e": "The same red: Type Check UI (135874306172), same step, same two symbols. Fixed by the merge. Also 'PR-body guards (claim · duplicate · Part-of · single-writer path)' (135870257386): check:closing-target-claim, because the Claim on #35355 names the service branch, not claude/issue-35355-work-calendar-objects-setup.", "PR-A at ad45d084f4 (read once, not waited for)": "No failure so far: 28 success, 9 skipped, 30 in progress.", "PR-B at 320ed52d88 (read once, not waited for)": "One failure, PR-body guards (135889342525): the same check:closing-target-claim red. It needs a seat action: a Claim comment on #35355 with a Branch: line naming the setup branch, then a re-run (no push needed). Otherwise 7 success, 8 skipped, 18 in progress.", "masked": "On both old heads, Type Check UI stopped at step 24, so steps 25-35 never ran. Steps 25-32 are green locally at ad45d084f4; steps 33-35 have their first reading in this CI run." }, "dogfood_battery": "n/a — no `!` in either title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1 this round: this os-dev-report (POST /repos/objectstack-ai/objectstack/issues/35355/comments) through post-stamped.mjs and the relay. Two git pushes (not REST). Reads only otherwise (GET check-runs, job logs, pulls).", "deviations": [ "Both PR bodies still give the readings and line counts of the previous heads (PR-A 1852 at 0d04210181; PR-B cumulative 3658 at c3e3d1be1e). A dev does not PATCH a PR body after pr_create, so the seat may refresh them: PR-A 1887 at ad45d084f4, PR-B 1806 own and 3693 cumulative at 320ed52d88.", "The fix is a ui/scripts change in the private ui root package. It publishes nothing, so no changeset was added; PR-A's existing changeset is unchanged.", "Both worktrees were removed after the last report, so they were re-created for this round (install, then builds of spec, formula and the client closure) and are removed again after this report.", "PR-B's merge commit carries no trailers, the same as the earlier merge commit on this branch." ], "open_questions": [], "open_questions_note": "None new. The six design choices for the contract L2 stand as listed in comment 7021836813 and PR-A's body.", "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: ADR-0157's Follow-up 'The gantt view's own calendar' now has two ALLOW entries that ratchet 3 retires when it lands." ] }Generated by Claude Code
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim amendment · area data-1 · 2026-11-19T21:40Z (amends claim 7013077388, amendment 7021881794 and re-claim 7022517146; answers L1-a R1 on #35641, 7022981176)
File surface, added:
ui/scripts/check-spec-symbol-derivation.mjs(PR #35641, commit ad45d08), two reasoned ALLOW entries only. The reason: the new@objectstack/spec/dataexportsisWorkingDayandaddWorkingDayscollide by name with the gantt scheduler's module-local helpers, which differ on purpose (the gantt counts a working start day and returns the exclusive midnight). Both entries point at ADR-0157's Follow-up "The gantt view's own calendar", and ratchet 3 retires them when that lands. No gantt file is touched.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim amendment · area data-1 · 2026-11-19T21:59Z (amends claim 7013077388 and amendments 7021881794, 7022993369; carries the seat's fix-round rulings on contract reviews 7023325199 and 7023289876)
File surface, added for PR #35641 (
claude/issue-35355-work-calendar-objects-service):packages/formula/**(the working-time arithmetic, the period parser,buildWorkCalendarand the three error classes move there frompackages/spec/src/data/; the primitive, types, constants and codes stay in spec), andpackages/spec/src/contracts/**(the service contract becomesIWorkCalendarService). This lifts the claim's fence onpackages/formula/**for this move only: #35356 is unclaimed and has no branch, and its formula functions are still its own.File surface, added for PR #35642 (
claude/issue-35355-work-calendar-objects-setup): the create form's seed defaults inui/packages/plugin-form/**(the time-zone prefill, beside the currency prefill),content/docs/ui/apps.mdx(the two Setup pages), and tests on the real objects besidepackages/rest/src/import-exchange-rate-csv.test.ts.Follow-up filed and nested: #35657 (ADR-0157 D1 note for
maintained_from, kept out of both PRs so neither is Tier H).objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Ruling record · seat 5 (repo:objectstack#5), relayed by area data-1 · 2026-11-19T22:00Z · on contract reviews 7023325199 (PR #35641, FAIL) and 7023289876 (PR #35642, PASS with S1/S2), the six design choices in dev report 7021836813
maintained_throughrequired: right.maintained_from: right. ADR-0157 D1 owes a dated note naming it; filed as ADR-0157 D1: add a dated note naming the calendar's maintained_from field (the past-side bound) #35657, outside both PRs.buildWorkCalendarand the three error classes move to@objectstack/formula(an edge@objectstack/objectqlandplugin-approvalsalready have). Spec keepszonedWallClockToUtcMs, the types, the constants and the ledger codes. No new dependency edge.ERR_WORK_CALENDAR_UNRESOLVEDbefore any read outside thesingleposture;singleis unchanged. The write hooks take the organization from the session.Also ruled: the service contract is
IWorkCalendarServiceinpackages/spec/src/contracts/(the objectql class keeps its name). Semver stayspatch(Metadata-protocolnone). D4 is procedural as the ADR prescribes: #35641 and #35642 land back to back, and both bodies say "Not released alone; pair #35641/#35642".Order: #35641's fix round, L1-a delta, contract delta, land; then #35642 retargeted to
main, its fix round, L1-a, contract delta, land.fix(spec, formula, objectql): working-calendar arithmetic in formula,…
objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "fix round 1 on PR-A #35641 (contract review 7023325199, ruling record 7023403692, claim amendment 7023393749); PR-B #35642's branch not touched", "branch": "claude/issue-35355-work-calendar-objects-service", "pr": "https://github.com/objectstack-ai/objectstack/pull/35641", "head": "e8af40289106e5f37f73c64a18ee48254d982d5f", "previous_head": "ad45d084f4e820b0b0c99ad29beb89cdd8fb9082", "commits_this_round": [ "e6e77b623d (the fix round)", "743be6587f (a test title)", "e8af402891 (the hooks take every writer's organization from the session; the read double's tenant scoping split out)" ], "lines": "2168 changed (+2029 -139), 25 files, against merge base e01b8bed0 of origin/main; under the 3000 budget (was 1887 at ad45d084f4)", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "M1: outside the single posture, WorkCalendarService.resolve refuses an absent (or empty) organizationId with ERR_WORK_CALENDAR_UNRESOLVED, reason no_organization, before any read. That includes the cache. The posture comes from resolveEnginePosture through enginePostureOf(engine). When no posture option is passed, the service and the hooks read the posture of the engine they run on, so the plugin wires nothing extra. The rule is stated in the WorkCalendarRef jsdoc, the service header and the ADR anchor. single is unchanged. The same rule binds the hooks' elevated reads: the one-default check and timezoneOf, on insert and on update. The hooks take the organization from the session. S1: the period parser, buildWorkCalendar, the four counts, isWorkingDay, workingPeriodsOn, exceptionDayOf, calendarDayOf, isWorkCalendarRefusal and the three error classes moved to packages/formula/src/work-calendar.ts. The test moved with git mv. Spec keeps zonedWallClockToUtcMs, the types, the constants and the codes. Its module header states Prime Directive #2 as schemas/types/constants only. No new dependency edge: objectql already depends on formula, and formula already depends on spec. The two gantt ALLOW entries are dropped, and ui/scripts/check-spec-symbol-derivation.mjs is back to its main bytes. S2: IWorkCalendarService, WorkCalendarRef and WORK_CALENDAR_SERVICE are in packages/spec/src/contracts/work-calendar-service.ts. The objectql class keeps its name and implements the contract. N1: the jsdoc now says 'usually published (around or after November)'. N2: #35642 is named, with 'Not released alone; pair #35641/#35642', in the changeset and the PR body. N3: buildWorkCalendar returns a calendar frozen down to its periods. The changeset adds '@objectstack/formula': patch, and spec stays patch. PR-A's body was refreshed through post-stamped --body with --ack-through=7023325199 and read back to its footer.", "tests": "At e8af402891, under os-verify-lock, VERDICT command-exit 0. Build: objectql plus its closure. Typecheck exit 0: spec, formula, objectql, core. @objectstack/formula: Test Files 69 passed (69), Tests 1902 passed. @objectstack/objectql (--project local): 617 passed (617), Tests 13941 passed. @objectstack/spec (--project local): 857 passed (857), Tests 27394 passed, 1 todo. An earlier run before check:generated --fix had scripts/export-origins.test.ts red (2), as expected; after the regeneration that file passed 24/24. ui check:spec-symbols exit 0, with 0 untriaged collisions. New pins: objectql work-calendar-service.test.ts has 23 tests; formula work-calendar.test.ts has 14. Ablations at e8af402891 use scripts/ablation-replace.mjs: each anchor went 1 to 0, each blob moved, and each restore was proven by blob == HEAD plus an empty git diff HEAD. The subjects are imported by relative source path, so there is no dist leg. Results: resolve guard off, 3 red (isolated, group, engine posture); session rule off, 3 red; insert-hook guard off, 1 red; update-hook guard off, 1 red; outer freeze off, 1 red; period freeze off, 1 red.", "gates": "dispatch-gates --commands at e8af402891 derived 132 families. Each ran with its exit code captured before any pipe, and all 132 exited 0. --ran with per-family exit codes reads: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN' (a DERIVED zero). Outside the list: check-platform-checklist --changed-from origin/main exit 0; overlap-check VERDICT clean exit 0 (main and #34817 merge clean); check-nul-bytes OK. The first pass at 743be6587f had 2 reds and 2 PREREQUISITE NOT MET. The first red was check:system-context-census: the insert hook's isSystem branch was a new elevation read that no row of the page owns. Fixed by dropping the branch, since the hooks take every writer's organization from the session. The second red was check:where-matcher, which could not lift the double's matcher because tenant scoping shared its callback. Fixed by moving the scoping to its own step. The 2 PREREQUISITE NOT MET were skill-examples (client-react unbuilt; built, then exit 0) and dual-build-cjs-loads (exit 0 on the final pass, with 124 entries across 72 packages loading). dispatch-gates warns that the tree is 23 commits behind origin/main and that 3 gate scripts changed there (check-skills-token-ratchet, check-governed-merges, ensure-pm-labels). CI runs the current copies.", "ci": "At e8af402891, read twice, without waiting. First read: 58 success, 10 skipped, 1 in progress (Test Core 10/10). Second read, after the body refresh: 60 success, 12 skipped, 2 in progress (Check Changeset and PR-body guards, re-triggered by the body edit). No failure, so no CI red. TypeScript Type Check, Type Check UI, Build Core, Test UI 16/16, Test Core 1-9 and every Lint and Type Check lane are green.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 this round, through post-stamped.mjs and the fleet-write relay: PATCH the PR-A body (pulls/35641), and POST this os-dev-report (issues/35355/comments). git push is not a REST write. Reads only otherwise: GET pulls/35641, issues/35641/comments, check-runs.", "deviations": [ "The ledger entry stays under '@objectstack/spec'. The ruling says to move it if the stamping package changes. The three code constants stay in spec, and check:error-code-provenance attributes a code to the package whose constant spells it, while formula's classes stamp it by reference. The provenance gate is green at the head.", "main was not merged. #35581 and #35583 landed on main and share three files with this branch (api-surface/data.json, export-origins/data.json, spec/src/data/index.ts). A plain git merge-file of each is clean, the merged api-surface/data.json is exactly main's plus this PR's entries, and overlap-check is clean. Whoever merges main locally regenerates the two artifacts, because the repository's merge driver flags them.", "The hooks take every writer's organization from the session, system writers included, after the census gate refused an isSystem branch as an unlisted elevation read. Seeds and imports write under their row's organization as tenantId (metadata-protocol seed-loader, {...SEED_WRITE_EXECUTION_CONTEXT, tenantId: rowOrganization}), so their session names it. The one real-engine test that seeded with { isSystem: true } and a row organization now passes tenantId as the loader does.", "enginePostureOf is exported from work-calendar-service.ts, not from the objectql index. The service and hooks default to the engine's posture, so plugin.ts only changes its WORK_CALENDAR_SERVICE import.", "The gate run was restarted once at 743be6587f after a test title was renamed; it is reported only at e8af402891." ], "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": [ "carrier: none · noted, not filed: dispatch-gates reports this branch 23 commits behind origin/main; nothing in that range conflicts with it." ] }Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "fix round 2 on PR-A #35641: S3 from contract delta 7026479156 (PASS), seat ruling 'refuse'; PR-B #35642's branch not touched; main not merged again", "branch": "claude/issue-35355-work-calendar-objects-service", "pr": "https://github.com/objectstack-ai/objectstack/pull/35641", "head": "f502d9238ccaf3ceee589ee56b4858727a61c807", "previous_head": "28fca759a93407cb2f86f55fea3f55cf715d8324", "commits_this_round": [ "f502d9238c fix(objectql): refuse a calendar default on a create placed in another organization (one commit, as ordered)" ], "lines": "2204 changed (+2065 -139), 25 files, against merge base 03865ae995 of origin/main; under the 3000 budget (this round vs 28fca759a9: work-calendar-service.ts +25 -2, its test +22 -2, changeset +1 -1)", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "S3 is closed as ruled. In the calendar beforeInsert hook, a create whose row's organization_id differs from the session's organization is marked elsewhere by insertReadOrganization. If that create sets is_default: true, it is refused at the door before any read. The refusal is the hook's existing envelope, 400 VALIDATION_FAILED, with one fields[] entry: is_default, ADR-0114 code invalid_value. No new ledger code. The reason tells the writer what to do: create it while working in that organization, or create it without Default and set Default afterwards by editing it. The edit is judged in the stored row's own organization. The refusal joins the hook's other problems in one envelope, so a create that also has a bad period gets both. A mismatched create without a default passes as before, with no read and no time-zone fill; that gap is loud through #35642's required timezone. The module header now says a future seed that sets a calendar's default must load pinned to its organization, or set the default by an update afterwards. The changeset's write-door bullet names the refusal. N4 is unchanged (accepted). Public wording stays neutral.", "tests": "At f502d9238c, under os-verify-lock, VERDICT command-exit 0: @objectstack/objectql (--project local): Test Files 617 passed (617), Tests 13947 passed. That is +6 over the previous head's 13941, from the work-calendar-service.test.ts edits. work-calendar-service.test.ts: 24/24. objectql typecheck (tsc --noEmit plus check:test-typecheck) exit 0. Before the build, I built the dependency closure (pnpm --filter '@objectstack/objectql^...' build), because this is a fresh worktree. Pins changed: '{single,isolated}: a member's create reads in the session's organization' used to assert the silent pass. It now asserts the refusal: 400 VALIDATION_FAILED, is_default invalid_value, the message does not name the other organization's calendar, zero reads, and timezoneOf never asked. CONTROL: the same create with is_default false passes with zero reads and no time-zone fill. 'a system writer reads in its session's organization too': with no session organization, a default is refused, a plain create passes, and neither reads. New pin: 'a default set by an update is judged in the stored row's organization'. It covers the route the refusal names, and reads exactly once, in org_b. Ablation through scripts/ablation-replace.mjs on the committed head: anchor `if (scope.elsewhere && data.is_default === true) {` replaced by `if (false) {`. The anchor went 1 to 0 and the blob moved from a38ad0325a46 to f1d09d133bfb. Result: 3 failed | 21 passed (both member pins and the system-writer pin). Restored: blob == HEAD (a38ad0325a46) and git diff HEAD is empty. The subject is imported by relative source path, so there is no dist leg.", "gates": "Declared narrowing: this round re-ran the families that read the three changed files. The other derived families were 132/132 exit 0 at e8af402891, and the contract delta found the merge to be mechanical. CI runs the full farm. At f502d9238c, each exit was captured before any pipe, and all exited 0: check:system-context-census ('OK — 195 elevation read sites…the generated register…matches the tree'; no new isSystem read), check:where-matcher, check:objectql-double-limit, check:engine-double-contract, check:query-options-erasure, check:error-code-casing, check:dispatcher-error-vocabulary, check:adr-anchors, check-nul-bytes, check-changeset-no-major, check-empty-changeset, check-closing-keyword-parity. overlap-check: VERDICT clean exit 0.", "ci": "Read once at f502d9238c, right after the push, without waiting: 20 queued and 3 skipped, with no conclusion yet. That is in_progress, an honest value. The previous head 28fca759a9, per contract delta 7026479156, had 60 success, 10 skipped, none failed.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1 this round: this os-dev-report (POST issues/35355/comments) through post-stamped.mjs and the fleet-write relay. One git push (not REST). Reads only otherwise: GET issues/comments/7026479156, check-runs.", "deviations": [ "PR-A's body was not refreshed this round, because the order did not ask for it. Its Tests and Gates sections still cite e8af402891, and its write-door bullet does not name the new refusal; the changeset does. The seat can refresh it, or I can on request.", "The worktree had been removed after round 1. I recreated it from origin's branch tip 28fca759a9: git worktree add -B, fast-forward from the local e8af402891, which is an ancestor of that tip. Then install, then the build closure." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: #35642 · noted, not filed: carried from contract delta 7026479156 for PR-B's round. #35642's tests on the real objects should add a real-engine pin that drives the calendar update hook under a walled posture, isolated or group, through the engine's provider. In that pin the hook's organization comes from the stored row. Today that path is pinned only through the hook-handler double ('a default set by an update is judged in the stored row's organization' and the isolated update leg)." ] }Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "PR-B #35642 fix round after #35641 merged: main merged in, S1, S2, (a), (b) traced, (c) one line, N1, N2; N3 accepted as is", "branch": "claude/issue-35355-work-calendar-objects-setup", "pr": "https://github.com/objectstack-ai/objectstack/pull/35642", "head": "a21b8adc1c954b2ed4e2b5b4c0aa43a47480c482", "previous_head": "320ed52d8829c20f16e3862c204c61a0c5b43ced", "commits_this_round": [ "b154176724 Merge origin/main (PR-A's files set to main; sys_unit rows first in the additive lists; Setup-tree pin re-counted to 34)", "06d62d2d7c regenerate the tenancy census (the deferred merge artifacts; api-surface and export-origins regenerate to main's bytes)", "0ca2bf43fa plugin-form: required time-zone field opens on the organization zone (S1)", "5f038a75f3 platform-objects: timezone help in 11 locales (S1), exception periods help built from WORK_CALENDAR_PERIODS_HELP (N1)", "adc0b885ba rest: tests on the real objects (S2) and the update-hook pin ((a))", "5a8eb4eca3 objectql: one-line rewording of the other-organization default refusal ((c))", "03fb5f71cf docs: apps.mdx Setup pages (N2); changeset pair sentence and two new packages", "a21b8adc1c rest test: calendar code in a const, for the error-code casing guard (the CI red on 03fb5f71cf)" ], "lines": "2229 changed (+2202 -27), 55 files, against origin/main ed906d567a; under the 3000 budget. Before this round's items, the merged head measured +1793 -12 against main.", "ci": "check-runs on a21b8adc1c, read once at 03:23Z: 61 success, 9 skipped, none failed, none in progress (Lint · docs & code guards success, Check Changeset success, PR-body guards success)", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "Step 0: origin/main merged in. PR-A's files take main's bytes, including two files main had dropped. The additive lists put #35581's sys_unit rows first, then the calendar rows, and the Setup-tree pin is re-counted to 34. The deferred census is regenerated in the next commit. S1: the create form seeds a required iana_time_zone text field with no declared default from useLocalization().timezone, beside the currency seed, and all seven seed call sites pass it. Optional zone fields are not seeded. The timezone help in all 11 locales says the form opens with the organization zone and a create that leaves it out takes the same zone. S2 and (a): one new rest test file drives the real objects through the create and import doors. It covers the zone fill (with a CONTROL), the code shape, the (calendar, date) key, the import with one bad row refused alone, and the update hook. Under group, one read runs in the stored row's org (org_b) and the edit is refused; under isolated the row is not reached, with zero reads. (c) is one line in objectql. N1 builds the exception help from WORK_CALENDAR_PERIODS_HELP. N2 adds both pages to apps.mdx. The changeset and the body say 'Not released alone; pair #35641/#35642' with #35641 merged. The body is refreshed, with the stale closing-guard text dropped, and read back identical.", "tests": "Under os-verify-lock, VERDICT command-exit 0 unless stated. rest src/import-work-calendar-csv.test.ts plus its precedent at a21b8adc1c: Test Files 2 passed (2), Tests 10 passed (10); the new file has 7 cases. ui organizationZoneSeed-35355.test.tsx plus recordCurrencySeed-27188.test.ts: 2 files, 10 tests passed. ui packages/plugin-form/ in full: Test Files 237 passed, 3 failed (240), Tests 2674 passed, 1 skipped. The 3 failed at import ('Failed to resolve import @objectstack/client', unbuilt) and never ran. After building that closure they re-ran: 3 files, 16 tests passed. platform-objects: 125 files, 2094 tests passed. objectql work-calendar-service.test.ts: 24 passed. cli unit, the Setup-tree pin (34) plus the inventory test: 2 files, 28 tests passed. Typecheck exit 0 for objectql, platform-objects, rest and plugin-form; rest and plugin-form first gave exit 2 (TS2307, unbuilt workspace deps) and passed after their closures were built. Ablations, each through scripts/ablation-replace.mjs with restore proven by blob == HEAD and empty git diff HEAD: O1, the update hook reads the session org: objectql rebuilt, marker in dist; 1 failed / 6 passed, the group pin red; restored, rebuilt, marker absent. O2, no zone fill: 4 failed / 3 passed, the fill case plus three cases whose fixtures rely on the fill; restored, marker absent. U1, no seed: 3 failed / 3 passed. U2, the seed ignores required: 3 failed / 3 passed, the optional field seeded.", "gates": "dispatch-gates --commands at a21b8adc1c: 132 families, exit captured before any pipe. 127 gave exit 0 on the first run; 5 gave exit 3, PREREQUISITE NOT MET, because packages were unbuilt in this worktree: check:i18n, check:i18n-coverage, check:i18n-walk-parity, check:dual-build-cjs-loads, check:skill-examples. After turbo run build --filter='./packages/**' all 5 gave exit 0 ('check-i18n-bundles: OK (10 package(s) — all bundles in sync, no undeclared authoring keys)'). --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. Also: check:error-code-casing exit 0 after a21b8adc1c, recorded outside the derivation; check-platform-checklist --changed-from origin/main OK (8 anchors, 0 lost); ui check:new-line-citations 0 new; overlap-check exit 1, #34223 only, a textual conflict in the cli Setup-tree pin (whoever lands second re-counts). CI on a21b8adc1c: 61 success, 9 skipped, 0 failed, 0 in progress.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 this round, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7023289876, read back identical) and this os-dev-report, POST issues/35355/comments. Four git pushes (not REST). Reads only otherwise: GET PR comments, PR body, card labels, check-runs.", "deviations": [ "(a) as specified (session org_a, stored row org_b) is unreachable under isolated: the engine answers 404 before any hook, as a system context too. So the discriminating pin runs under group, with accessible_org_ids [org_a, org_b], and an isolated leg pins zero reads and RECORD_NOT_FOUND.", "S2 writes go through the generic REST create door, with an exec-ctx double carrying tenantId, not through engine.insert. The precedent file's double carries organizationId, which the data doors do not read as the active organization; that is noted in Acceptance notes, not changed.", "Narrowed local scope, declared: objectql ran only its calendar suite (one string changed); rest ran only the new file and its precedent; cli ran only the two files the merge touched. CI Test Core and Test UI run the full packages.", "The CI red 'Lint · docs & code guards' on 03fb5f71cf (error-code casing read the calendar code at a code: position) is fixed in a21b8adc1c by a named const; the guard is not changed.", "(c) touches packages/objectql, outside amendment 7023393749; it is one line, as the order allowed, and the changeset adds @objectstack/objectql patch and @object-ui/plugin-form patch.", "The harness reminder asked for a model-named Co-Authored-By trailer; commits use the model-free trailer, as the dispatch order requires.", "The worktree is removed after this post (node_modules first, no --force)." ], "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": [ "carrier: none · noted, not filed (Acceptance notes): packages/rest/src/import-exchange-rate-csv.test.ts stubs resolveExecCtx with { userId, organizationId }; the data doors read the active organization from tenantId, so that key is inert in the precedent (its rows land through the derived-organization path). Observation only, no wrong answer at a public door." ] }Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim amendment · area data-1 · 2026-11-20T03:29Z (amends claim 7013077388 and amendments 7021881794, 7022993369, 7023393749)
File surface, added for PR #35642 (
claude/issue-35355-work-calendar-objects-setup): one line inpackages/objectql/src/work-calendar-service.ts(commit 5a8eb4e, the wording of the other-organization default refusal so it reads right for a writer with no session organization; carried from the seat's review of #35641 as optional item (c)). No behaviour change.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim amendment · area data-1 · 2026-11-20T03:31Z (amends claim 7013077388 and amendments 7021881794, 7022993369, 7023393749, 7029465394)
File surface, added for PR #35642 (
claude/issue-35355-work-calendar-objects-setup):packages/objectql/src/work-calendar-service.tsand its test, for the calendar update hook's move rule (seat ruling): an edit that moves a calendar to another organization must clear Default first, and is otherwise refused with the hook's existing validation envelope. This mirrors the create-side rule from #35641.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "PR-B #35642, one commit after the seat's ruling on the private (b) finding (refuse form): a calendar that stays the default cannot move to another organization", "branch": "claude/issue-35355-work-calendar-objects-setup", "pr": "https://github.com/objectstack-ai/objectstack/pull/35642", "head": "d0339ffb6cfdbffe6924e998b9a7d679033f802d", "previous_head": "a21b8adc1c954b2ed4e2b5b4c0aa43a47480c482", "commits_this_round": [ "d0339ffb6c fix(objectql): a calendar that stays the default cannot move to another organization (one commit, as ordered)" ], "lines": "2293 changed (+2263 -30), 55 files, against merge base ed906d567a; under the 3000 budget. This commit: work-calendar-service.ts +23 -3, the rest test file +63 -28 (helpers hoisted, three cases added), changeset +1.", "ci": "check-runs on d0339ffb6c, read once at 03:54Z: 7 success, 11 skipped, 23 in progress, none failed (PR-body guards success; Check Changeset and Lint · docs & code guards in progress). On a21b8adc1c, before this commit: 61 success, 9 skipped, none failed.", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "The calendar beforeUpdate hook now treats an update that carries an organization_id other than the stored row's as a move. A move is given no read scope. If the row is the default after the update (set by the update or kept from the stored row), the move is refused at the door before any read, in the existing envelope: 400 VALIDATION_FAILED with one fields[] entry, is_default, invalid_value. The reason is fixed and names no organization and no code: 'A calendar marked Default cannot move to another organization. Clear Default first, then move it.' A move with is_default false passes. The module note and the changeset each have a line on the move rule. Pins are in packages/rest/src/import-work-calendar-csv.test.ts, with a system writer under isolated: a move of a calendar that stays the default is refused with zero reads, a move that sets the default is refused with zero reads, and a CONTROL move without Default lands in the new organization. Public wording stays neutral. main moved to 5d2ce34f88 and merges cleanly, so it was not merged. The PR body has a short line on the rule and is read back identical.", "tests": "At d0339ffb6c, under os-verify-lock, VERDICT command-exit 0: typecheck exit 0 for objectql and rest; objectql work-calendar-service.test.ts 24 passed; rest import-work-calendar-csv.test.ts plus the precedent: 2 files, 13 passed (the new file 10). Ablation M1, the move refusal never fires (scripts/ablation-replace.mjs --hold, anchor 1 to 0): objectql rebuilt, ABLATE_M1 present in dist; Tests 2 failed, 8 passed, the reds being both move refusals. Restored with git checkout HEAD: git diff HEAD empty, blob 674ebe573938 == HEAD. Rebuilt, marker absent from dist, and the file re-ran 10 passed.", "gates": "At d0339ffb6c, after turbo run build --filter='./packages/**': the 50 derived families whose sources include one of this commit's three files, plus check:adr-anchors, check:adr-symbol-anchors, check:scripts-symbol-anchors, check:error-code-casing and check:nul-bytes. All 55 gave exit 0. Union with the a21b8adc1c run, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other 82 families read only files unchanged since a21b8adc1c. overlap-check: main at 5d2ce34f88 merges cleanly; #34223 still conflicts textually in the cli Setup-tree pin.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 this round, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7029494079, read back identical) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Reads only otherwise: GET PR comments (including L1-a delta 7029494079), check-runs.", "deviations": [ "The worktree had been removed after the previous round. It was recreated from the local branch at origin's tip a21b8adc1c, followed by install and a turbo build of the rest closure.", "Gates were narrowed and the narrowing is declared (see gates). The rule's pins assert the engine envelope's code and fields[]; the engine's ValidationError carries no status, and the REST door maps it to 400, as the S2 cases through that door show. A system writer has no REST door." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "PR-B #35642, one commit for the CI red on d0339ffb6c: Test Core (4/10), objectql src/federated-injected-column-readers.test.ts (#21918) wanted a disposition for the move check's organization_id use", "branch": "claude/issue-35355-work-calendar-objects-setup", "pr": "https://github.com/objectstack-ai/objectstack/pull/35642", "head": "5e806492ca75c375b4c0c93a2557d983757d636e", "previous_head": "d0339ffb6cfdbffe6924e998b9a7d679033f802d", "commits_this_round": [ "5e806492ca test(objectql): the calendar move rule's organization_id read gets its federated disposition" ], "lines": "2300 changed (+2270 -30), 56 files, against merge base ed906d567a; under the 3000 budget. This commit: one READERS row, +7 in packages/objectql/src/federated-injected-column-readers.test.ts.", "ci": "check-runs on 5e806492ca, read once at 04:36Z: 28 success, 9 skipped, 30 in progress, none failed. Check Changeset and all eleven Lint runs succeeded, including Lint · docs & code guards; the ten Test Core shards, Test Core (4/10) among them, were in progress. On d0339ffb6c: Test Core (4/10) failed on the guard, which this commit fixes.", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "The #21918 guard source-scans objectql for each use of an injected column name and wants a READERS row for each one. The move check in installWorkCalendarHooks names organization_id, and d0339ffb6c added that use without a row. The row added is 'work-calendar-service.ts#installWorkCalendarHooks :: organization_id' with disposition row-value: the hook asks whether the update payload already in hand carries the column, reads no storage, and its object, sys_work_calendar, is a platform object that is never federated. Asking isFederatedUnprovisionedInjectedColumn and skipping was not used: no storage is read, so there is nothing to skip. No source change. The miss came from running only objectql's calendar suite; the whole objectql package ran this time. The PR body has a line on it, and its readings and line count are updated.", "tests": "At 5e806492ca, under os-verify-lock, VERDICT command-exit 0 for each. The whole @objectstack/objectql package, both vitest projects, no file filter (vitest run --maxWorkers=2): Test Files 618 passed (618), Tests 13952 passed (13952), OBJECTQL_ALL_EXIT=0. 618 is every test file under packages/objectql. Guard plus calendar suite (src/federated-injected-column-readers.test.ts, src/work-calendar-service.test.ts): Test Files 2 passed (2), Tests 29 passed (29). objectql typecheck exit 0 (tsc --noEmit; check:test-typecheck OK, 39 files, 233 errors, 64 pinned signatures held). rest src/import-work-calendar-csv.test.ts, after the objectql build: Tests 10 passed (10), REST_EXIT=0. No ablation: the diff is one test-ledger row with no behaviour change. The before leg is CI's red on d0339ffb6c, which received exactly this key.", "gates": "At 5e806492ca, after turbo run build --filter='./packages/**' (VERDICT command-exit 0): the 39 derived families whose sources include the changed test file re-ran, each with its exit captured before any pipe, and all 39 gave exit 0. The union with the d0339ffb6c and a21b8adc1c runs, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other 93 families read only files unchanged since d0339ffb6c. main at a3a74f2702 merges cleanly (git merge-tree exit 0), so main was not merged. CI families: as in the ci field. Lint and Changeset are success; Test Core is in progress at this writing.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7029494079, read back identical, 17951 bytes) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Otherwise only reads: GET PR, PR comments, reviews, check-runs.", "deviations": [ "The PR body refresh was not ordered this round. It was done because the body's narrowing line stated that objectql's calendar suite was enough, which this red disproved, and because its readings named d0339ffb6c.", "The harness's attribution reminder asks for a model-named Co-Authored-By trailer. The commit carries the model-free pair, as os-dev.md requires." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Claim amendment · area data-1 · 2026-11-20T05:12Z (answers N5 of contract delta 7031077678)
File surface, added for PR #35642: one READERS row in
packages/objectql/src/federated-injected-column-readers.test.ts(commit 5e80649), the #21918 guard's ledger entry for the calendar move rule's payload check. Test-ledger only; no behaviour change.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "PR-B #35642, one commit for the seat's ruling before landing (after contract delta 7031077678 PASS): a calendar and its exception dates stay in their organization", "branch": "claude/issue-35355-work-calendar-objects-setup", "pr": "https://github.com/objectstack-ai/objectstack/pull/35642", "head": "262cd110b07cb286213a7409b074804e49a0288a", "previous_head": "5e806492ca75c375b4c0c93a2557d983757d636e", "commits_this_round": [ "262cd110b0 fix(objectql): a calendar and its exception dates stay in their organization" ], "lines": "2341 changed (+2313 -28), 56 files, against merge base ed906d567a; under the 3000 budget. This commit: 4 files, +94 -49 (work-calendar-service.ts, the rest test file, the READERS row, the changeset).", "ci": "check-runs on 262cd110b0, read once at 06:11Z right after the push: 1 success, 5 skipped, 19 in progress, none failed. On 5e806492ca: 63 success, 11 skipped, none failed. Merge-queue triage 7031651815 (queue build 44679664664, on the earlier head) failed in packages/qa/dogfood approval-read-over-mcp.dogfood.test.ts on the MCP query_records description; that text is in packages/mcp, which this PR does not touch, and the same signature hit four PRs in one speculative stack (summary issue #35756).", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "Both beforeUpdate hooks (sys_work_calendar, sys_work_calendar_exception) now call refuseOrganizationChange first. An update whose organization_id differs from the stored row's is refused, before any read and for every writer, system writes included. The refusal is the existing envelope: 400 VALIDATION_FAILED, one fields[] entry, organization_id invalid_value. The fixed reasons are the ruling's two sentences. An update that leaves organization_id out, or repeats the stored one, is judged as before. A predicate update is judged per matched row, because the engine dispatches beforeUpdate per matched row with that row's stored image (engine-update.ts, dispatchPerRowBeforeHooks). Zero matched rows means zero dispatches, which is the engine's rule. The move-with-Default rule from d0339ffb6c is removed: the ReadScope.moved flag, the defaultAfter branch and its message. The #21918 READERS row is rekeyed to work-calendar-service.ts#refuseOrganizationChange :: organization_id, still row-value, with its why text updated. Pins in packages/rest/src/import-work-calendar-csv.test.ts use a system writer. Four calendar moves are refused with zero reads: keeps Default, sets Default, no Default (the old CONTROL), and clears the organization. An exception move is refused. A predicate update is refused on each object. A CONTROL shows an edit that leaves the organization out, or repeats it, landing on both objects. N4 is done: every refusal cell asserts resolveThrownHttpError status 400 and code VALIDATION_FAILED, the field and code, and the reason sentence. The module note and the changeset line state the new rule in neutral terms. The PR body has a line on it, and the trailing signed line is kept last.", "tests": "Under os-verify-lock, with each part's exit captured. The whole @objectstack/objectql package, both vitest projects, no file filter, at 1f311f091b: Test Files 618 passed (618), Tests 13952 passed (13952), OBJECTQL_ALL_EXIT=0. 262cd110b0 differs from 1f311f091b only by one line in the rest test file, so no objectql file changed. At 262cd110b0: objectql typecheck exit 0, rest typecheck exit 0 (tsc --noEmit plus check:test-typecheck). rest src/import-work-calendar-csv.test.ts with src/import-exchange-rate-csv.test.ts: Test Files 2 passed (2), Tests 14 passed (14). objectql src/federated-injected-column-readers.test.ts with src/work-calendar-service.test.ts: 2 files, 29 passed, run at 0991a099b9, whose objectql files match 262cd110b0 except the simplification the whole-package run then covered. Ablation M2 at 262cd110b0, through scripts/ablation-replace.mjs: anchor \"if (!hasOwn(data, 'organization_id')) return;\" 1 to 0, marker 0 to 1, blob 9ddf30178b3d to a007d47c6ab0. objectql was rebuilt and ablation-dist-preflight showed the marker present in 2 built files. Result: Tests 3 failed, 8 passed (11); the reds are the calendar moves, the exception move and the predicate cell, and the CONTROL stays green. Restore with git checkout HEAD: git diff HEAD 0 bytes, blob 9ddf30178b3d equal to HEAD. Rebuilt, preflight --absent showed the marker absent from all 14 built files and the tree clean, and the file re-ran 11 passed. Probes, not kept: a system writer in another tenant gets RECORD_NOT_FOUND on an ordinary edit, and an organization-less system edit lands with the organization unchanged, so the rule refuses no edit that keeps the organization.", "gates": "At 262cd110b0, after turbo run build --filter='./packages/**' (VERDICT command-exit 0): 55 families, each with its exit captured before any pipe, and all 55 gave exit 0. They are the derived families whose sources include one of this commit's four files, plus check:error-code-casing, check:nul-bytes, check:adr-anchors, check:adr-symbol-anchors and check:scripts-symbol-anchors. check:error-code-casing first answered exit 1 at 1f311f091b on the predicate cell's where: { code: 'b_alt' } literal. The cell now selects by name, the gate is unchanged, and it re-ran to exit 0. The union, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other families read only files unchanged since 5e806492ca. The first 55-family run hit the 590s foreground limit after 42 families; the remaining 13 ran in a second pass on the same head, and both passes are in the union. overlap-check: origin/main at ca4ec2a2f1 merges cleanly (git merge-tree exit 0, so main was not merged). #34223 conflicts textually in the cli Setup-tree pin, as before. CI families: see the ci field.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7031651815, read back identical at 21970 bytes, with the signed line kept last) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Otherwise only reads: GET PR, PR comments 7030929617, 7031077678, 7031106163, 7031135306, 7031141711 and 7031651815, and check-runs.", "deviations": [ "The commit was amended twice before its first push (0991a099b9, 1f311f091b, 262cd110b0); one commit reached the remote. No force-push.", "The whole objectql package ran at 1f311f091b, one rest-test line before the pushed head; no objectql file differs.", "The harness's attribution reminder asks for a model-named Co-Authored-By trailer. The commit carries the model-free pair, as os-dev.md requires." ], "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": [] }Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
os-dev-report
{ "issue": 35355, "status": "done", "round": "PR-B #35642, last scope: one commit for the seat's ruling A, an exception date names a calendar of its own organization", "branch": "claude/issue-35355-work-calendar-objects-setup", "pr": "https://github.com/objectstack-ai/objectstack/pull/35642", "head": "0ceb0b5c589d4bec7d76064e897ed23486d04030", "previous_head": "262cd110b07cb286213a7409b074804e49a0288a", "commits_this_round": [ "0ceb0b5c58 fix(objectql): an exception date names a calendar of its own organization" ], "lines": "2458 changed (+2423 -35), 57 files, against merge base ed906d567a; under the 3000 budget. This commit: 4 files, +113 -10 (work-calendar-service.ts, its objectql unit test, the rest test file, the changeset). The objectql unit test file is new to the PR's file list, hence 57.", "ci": "check-runs on 0ceb0b5c58, read once at 06:49Z right after the push: 20 queued, 4 skipped, none failed. On 262cd110b0 at 06:11Z: 1 success, 5 skipped, 19 in progress, none failed.", "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb", "premise_still_valid": true, "summary": "Both sys_work_calendar_exception hooks now call refuseForeignCalendar after the D10 judgement, so a row already refused for its periods makes no read. On a create, and on an update whose payload carries calendar, the hook makes one find by id on sys_work_calendar (fields id, limit 1) through the existing elevated readContext, in the exception's organization: the session's on a create (insertReadOrganization, the existing rule) and the stored row's on an update (new helper updateReadOrganization, which the calendar update hook now shares). When no row comes back the write is refused: 400 VALIDATION_FAILED, calendar invalid_value, fixed reason 'An exception date names a calendar of its own organization.' No value is echoed, so the body names no organization, code or id. A blank calendar is left to required. A create the hook cannot read for is refused the same way (fail closed): one whose row names an organization other than the session's, or one with no organization outside single. That create is pinned. Pins in packages/rest/src/import-work-calendar-csv.test.ts, with a system writer in org_b: a calendar of org_a is refused on create, on a create naming org_a, and on an update that re-points calendar, and the stored rows are unchanged. An id that names no calendar is refused with JSON-identical resolved envelopes. A member of org_b through the REST create door gets byte-identical 400 bodies for the two. A CONTROL lands a same-org calendar on create and on update. The import case, where one bad row is refused alone, passes unchanged. The objectql D10 unit case gains the calendar its rows name, because its CONTROL row named a calendar that did not exist. The #21918 guard needs no row: the new read's literals are id and calendar, which are not injected columns. check:system-context-census is OK with no new elevation site, since the read goes through readContext. The module note, the changeset bullet and the PR body state the rule neutrally, and the signed line stays last.", "tests": "At 0ceb0b5c58, under os-verify-lock, with each part's exit captured. The whole @objectstack/objectql package, both vitest projects, no file filter: Test Files 618 passed (618), Tests 13952 passed (13952), OBJECTQL_ALL_EXIT=0. objectql typecheck exit 0, rest typecheck exit 0. rest src/import-work-calendar-csv.test.ts with src/import-exchange-rate-csv.test.ts: Test Files 2 passed (2), Tests 17 passed (17); the calendar file is 14 including the import case. objectql guard plus calendar unit file: 2 files, 29 passed. Ablation C1, the check never runs: anchor \" if (!hasOwn(data, 'calendar')) return;\" 1 to 0, blob 4d11c70dfb5d to 22d3a01afa9f, objectql rebuilt, preflight showed the marker in 2 built files. Tests 2 failed, 12 passed (14); the reds are the other-organization pin and the identical-body pin. Ablation C2, the read runs unscoped: the read's readContext organization is replaced by undefined, blob 4d11c70dfb5d to 9c7e9caa1704, rebuilt, marker in dist. Tests 2 failed, 12 passed (14), the same two pins. Each leg was restored with git checkout HEAD: git diff HEAD 0 bytes, blob 4d11c70dfb5d equal to HEAD. A final rebuild showed both markers absent from all 14 built files and the tree clean, and the file re-ran 14 passed. The CONTROL stayed green in both legs. A probe that was not kept, through the REST door for a member of org_b: foreign and nonexistent ids both returned 400 with an identical JSON body, and a same-org calendar returned 201. That became the door cell of pin 2.", "gates": "At 0ceb0b5c58, after turbo run build --filter='./packages/**' (VERDICT command-exit 0): 55 families, each with its exit captured before any pipe, and all 55 gave exit 0. They are the derived families whose sources include one of this commit's four files, plus check:error-code-casing, check:nul-bytes, check:adr-anchors, check:adr-symbol-anchors and check:scripts-symbol-anchors. They include check:system-context-census (OK, 184 cited against 184 required) and check:platform-object-tenancy-census. The union, --ran: 'Run reconciliation — 132 derived, 132 run, 0 NOT-MEASURED, 0 UNRUN'. The narrowing is declared: the other families read only files unchanged since 262cd110b0. main at c4a73be6be merges cleanly (git merge-tree exit 0), so main was not merged. CI families: see the ci field.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2, both through post-stamped.mjs and the fleet-write relay: PATCH issues/35642 (PR body, --ack-through=7031651815, read back identical at 25514 bytes, with the signed line kept last) and this os-dev-report, POST issues/35355/comments. One git push (not REST). Otherwise only reads: GET PR, PR comments (none newer than 7031651815), check-runs.", "deviations": [ "The ruling names the session organization for a create. Where that organization is not where the row lands, the check fails closed. This covers a row that names another organization, and a write with no organization outside single. It is stated in the module note, the changeset and the body, and pinned.", "The harness's attribution reminder asks for a model-named Co-Authored-By trailer. The commit carries the model-free pair, as os-dev.md requires." ], "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": [] }Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
Close-out 2026-11-20T08:40Z: both halves are merged, and
Fixesclosed this card.df81f4c001.Reviews:
Final rules (seat rulings before landing):
Release pairing (ADR-0157 D4): #35641/#35642 ship in the same release as #35356 and #35357. Those two are seat 7's (data area).
Follow-ups, nested here and unclaimed:
The p2 cards wait under the p1-only rule.
pm:dispatchedoff.