Repository navigation
Description
security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov
Feature, ADR first. Maintainer ruling 2026-11-22, option C (record 7073676422 on #32004; analysed by an isolated contract-tier thread).
Rule. An object declares the states in which it and its master_detail lines refuse add, edit, remove and move: for example approved, paid, closed. Approval, payment and closing only set the state. A record leaves the closed state only through a sanctioned action that moves it back. The runtime refuses changes to a closed record and its lines at every door, with one loud refusal.
Why. Today the platform unlocks a record when its approval is decided, as content/docs/automation/approvals.mdx documents. Apps that need a decided document frozen hand-code it:
- the showcase's paid-invoice guard hooks (fix(showcase): a paid invoice's lines can no longer be added, removed or moved, so its total stays what was paid #24731);
- a hosted app's edit guards.
Removing a line cannot be guarded without code. Seat ruling 6281609466 on #24684 required "a named producer beyond this showcase" before a declarative state lock; that condition is now met. Mainstream ERP modelling is state-driven immutability, with child rows included.
The ADR settles:
- the key's shape on the object;
- the unit (the record plus its master-detail lines, the same unit the pending approval lock already uses);
- exemptions (system writes, the record's own delete) and whether a closed document may be deleted;
- one lock read for both producers (the pending approval lock and the declared closed states).
Then build cards. Convert the showcase's paid-invoice hooks to the declaration as the proof.
Not this card: the pending-window line lock. It is already on main (#35755), and #36135 lands with it.
Re-check: git grep -n "the record unlocks" origin/main -- content/docs/automation/approvals.mdx shows today's decided-state behaviour.
Activity
objectstack-fleet commentedon Nov 22, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:spec(ADR first, then build cards) ·pm:queue; rationale: area:data (records refuse change at every door) · Feature · an object declares the states (approved, paid, closed) in which it and its master-detail lines refuse add, edit, remove and move, and a record leaves them only through a sanctioned action. Maintainer ruling option C, 2026-11-22 (7073676422 on #32004); it replaces hand-coded guard hooks such as the showcase paid-invoice hooks (#24731) → p2 (maintainer-ruled feature) · size L.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Claim: PM loop round 1 · 2026-11-26T14:17Z
Session:
session_01L6bhgV6i8jfWwSXjpWJrjAThread session:
session_01L6bhgWPwjheYqchuPwxH8tAccount:
os-salesBranch:
claude/project-thread-lotnpdArea:
s2-dataDomain:
domain:specSeat:
repo:objectstack#2File surface:
docs/adr/0162-<slug>.md(new; 0162 is main's next free number, unclaimed in open PR titles) anddocs/adr/README.md(regenerated bypnpm adr:index). No packages, content/docs or skills.Container & model:
M,mode:thread,model: CONTRACT_REVIEW_TIER — dispatch-gates --tier: "Model tier — MANDATORY" (docs/adr/**, no one-line exit),effort: xhigh (reason: an ADR authored alone — File surface is docs/adr/** only; the build cards that follow run at high)Clause-②: no
Metadata-protocol: none
Relation: the ADR PR says
Part of #36253; the card stays open for the build cards the ADR names (the new declaration key is declared by those cards, not this PR).Responsibility:
objectstack platform spec (no declaration lets an object state when a document and its master-detail lines are closed to change; approvals unlock on decision, and the showcase guards paid-invoice lines with app hooks) | none | app builders modelling invoices, orders and other documents that must freeze once closed; reachable todayThread-read: none
Premise: holds (thread's read on origin/main 6c290d3: ruling 7073676422 on #32004 (② C) stands verbatim;
approvals.mdx:908 and :964 still say "the record unlocks"; the showcase paid-invoice line guards are inexamples/app-showcase/src/data/hooks/index.ts(#24731); seat ruling 6281609466 on #24684 stands; the in-approval line lock is on main (bindDetailRowLockHook, #36135 merged 11-22); no closed-state key exists in spec. Not checkable here: the card's "a hosted app's edit guards", cited as the card states it)Serial constraints cleared:
ADR number 0162 free on main and in open PR titles; the thread re-runs overlap-check before its first pushTier: H (docs/adr/**); L2 owed at CONTRACT_REVIEW_TIER by an agent other than the drafter
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgWPwjheYqchuPwxH8t
os-dev-report
{ "issue": 36253, "status": "done", "branch": "claude/project-thread-lotnpd", "pr": "https://github.com/objectstack-ai/objectstack/pull/37606", "session": "session_01L6bhgWPwjheYqchuPwxH8t", "premise_still_valid": true, "summary": "The card's ADR-first step is delivered as draft PR 37606 at head 9b848ed32b: docs/adr/0162 (status Proposed) plus the regenerated docs/adr/README.md. The record answers the four things the card asks: the key (an object-level closedStates map, read off the stored row), the unit (the record and its direct master_detail lines), the exemptions and delete, and one lock read for both producers. Four points go past the ruling's words and are marked in the text with the other reading beside each: a system context is not bound at all; a caller cannot delete a closed record; the lock is judged on the stored row, so the closing write lands whole; the lock read moves to the data layer and gains a reason. The build half has not started and starts only after acceptance. Tier H: the PR stays a draft; L2 at the contract tier with design judgement is owed by an agent other than the drafter.", "tests": "none: the diff is two Markdown files under docs/adr/", "gates": "Local: dispatch-gates --commands derived 21 commands; all 21 ran, each exit 0, exit codes captured before any pipe (list in the PR body); dispatch-gates --ran: 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN. overlap-check before the first push: exit 0, clean against origin/main, no open PR shares a file. CI on head 9b848ed32b, read once after the PR opened: success: Check Changeset, Check PR Size, Governed Surface Queue Guard, Check Documentation Links, PR-body guards, filter; in_progress: the Lint families, the Type Check families, Plan Test Core shards, Dogfood Regression Gate, Test UI, Auto Label; the rest skipped by path.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "11: read tools only (issue_read 8, pull_request_read 3)", "api_writes": "2 relay strokes: pr_create (POST /repos/objectstack-ai/objectstack/pulls, POST /issues/37606/assignees, POST /issues/37606/labels) and this report (POST /issues/36253/comments)", "deviations": [ "One derived gate (check:doc-formula-expressions) needed @objectstack/formula and @objectstack/lint built first; that turbo build ran without the shared verify lock. No other heavy command ran.", "The record's premise item 'a hosted app's edit guards' was not checked: that code is outside this repository. The record cites it only as the card states it; the claim's Premise line already says so." ], "open_questions": [], "security_findings": "withheld", "out_of_scope_findings": [ "carrier: PR 37606, the record's Execution section · noted, not filed · the approval status mirror is written after the request is finalised and a failure of that write is logged and swallowed; the engine build card measures it where the mirrored value is a declared closed state", "carrier: PR 37606, the record's Execution section · noted, not filed · whether a customization overlay may add or shorten the declaration is left to the spec build card" ] }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Ruled: the maintainer (Sales) answered the ADR-0162 decision card at 18:39Z (stamp 2026-11-26T18:40Z) with "all as recommended", covering the four points the ADR marks (▲1–▲4) and the three open points of the second contract review on PR #37606. The PR thread applies them in one push to #37606, then a delta contract review runs before the Tier H hand-off. Build cards are filed after the ADR is Accepted.
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Ruled · 2026-11-26T19:16Z: after the third contract review of PR #37606 (record 7201298747, S9), the maintainer (Sales) answered a follow-up card on point 7 (a new approval round on a closed record) with 「平台堵住:撤回不恢复关闭值」 — keep the new-round way out, and the platform rule is that a recall never writes the state field back to a value in the closed set. This adds to the 18:39Z ruling (7200732942, 「全部按推荐」). The approvals-plugin change goes to the build cards.
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Ruling text of record · 2026-11-26T20:02Z (adds to 7200732942 and 7201405662; closes review N13 of PR #37606, record 7201298747)
The maintainer's answer recorded in 7200732942 was, in its original language, 「全部按推荐」 ("all as recommended", 2026-11-26 18:39Z). The recommendations it adopted, as put to the maintainer:
readonlyWhenfield locks only; the record lock judges the stored state at write time.lockedand the reason; the ADR states the one bit of the state field this discloses and why.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Ruled · 2026-11-26T23:51Z (adds to 7200732942 and 7201405662; closes the ▲ point left open in PR #37606 after review record 7203817706, S14)
The maintainer (Sales) answered the decision card 「多步审批中途撤回后单据可能停在"已批准"并锁住,平台要拒绝这种配置吗?」 ("after a multi-step approval is recalled midway the record may stay 'approved' and locked — should the platform refuse this setup?") with the option 「平台拒绝这种配置」 ("the platform refuses this setup"). The option read: 「字段声明了关闭值、却缺少"审批中"状态或退回路径时,发布或开审批时直接报错;作者补上选项才能用,单据不会假装已批准。」 ("when the field declares closed values but lacks an in-flight status or a path back, it errors at publish or when the approval opens; the author adds the options before it can be used, and the record never pretends to be approved.") The other option, 「只在文档里教作者避开」 ("only teach authors to avoid it in the docs"), was not chosen.
Effect on ADR-0162: the opening conditions in D5 are the platform's rule, not guidance; every ▲ wording becomes this record. The build cards carry the authoring-lint and request-open refusal.
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
ADR half landed · this card becomes the tracking parent of the build · 2026-11-27T01:54Z
The "ADR first" half of this card has landed. ADR-0162 is on
mainfrom PR #37606 (Part of, merge972114df), after eleven contract-review rounds; the last is 7206423099 (PASS). The maintainer's rulings it carries are 7200732942 (text 7202242844), 7201405662 and 7205949718.The build is the ADR's Execution plan. One card per item, each a sub-issue of this card:
main; B and C on the trunkclosedStateskey and its enforcementBlocked-by: #37768; on the trunk if the liveness gate wants the proof in the key's releaseBlocked-by: #37768Blocked-by: #37770Blocked-by: #37768Blocked-by: #37770,#37773Items 1, 7 and 8 are size L and are split along the slices their bodies name before dispatch. The release rule of ADR-0162: the key is never published without its enforcement and without items 7 and 8.
Still to file when their time comes: the
skills/**follow-up that teaches the key (named by item 1's PR), and the card that turns ADR-0162's status line toAccepted — implementedonce the build has landed.This card is not dispatched. It closes when items 1–5, 7 and 8 have merged, item 6 is ruled, and the status-line card is filed.
State: the skill puts a
trackingparent in no pm state (seat-lifecycle.md), butlabel-write.mjsrefuses an open card with no state, so this parent waits inpm:blockedon its build cards. The gap is filed separately.Blocked-by: #37768, #37766, #37767, #37770, #37771, #37772, #37773, #37774
[-]An object declares the states in which a document and its master-detail lines are closed to change (ADR first)[/-][+]专题:单据锁定(对象声明审批、付款、关账等状态后,单据和主从明细不能再增删改)(ADR 先行)[/+]