Repository navigation
feat(approvals): the check when an approval opens, and the between-two-steps stamp (ADR-0162 item 7, slice B) - #38499
Conversation
…o-steps stamp (slice B) ADR-0162 Execution item 7 "The check", as revised on 2026-11-27. At an approval's first request the plugin reads the approval whole (the root run's flow and every subflow/map body, to any depth) and: - stamps the between-two-steps set on the request (new engine-written column between_steps_json); later requests of the approval copy it; - refuses the opening, VALIDATION_FAILED with one sentence per gap in the run's locale, where a step mirrors onto a field its object closes on at a request status and a D5 condition fails, where a flow cannot be read, or where the host runs no job service. Not judged: no object declares closedStates; no root run; a later request; a request that cannot be placed. The writing-node condition is withdrawn and pinned as not refused. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nzgcVrZ8Neqqd1AFi
…bjectstack-ai/objectstack into claude/project-thread-fkdrk9
…e changeset is patch The abandoned-request status-mirror tests (merged from the trunk) now note the plugin's sweeps on their hand-built service, as a host with a job service does, and open the no-pending arm before the object declares closedStates, the case the opening check does not judge. The changeset is graded patch: the metadata protocol is unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nzgcVrZ8Neqqd1AFi
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nzgcVrZ8Neqqd1AFi Contract-review-claim: session_01FEkQ5nzgcVrZ8Neqqd1AFi · head c84dfff · 2026-11-29T06:06Z Face: |
📓 Docs Drift CheckThis PR changes 1 package(s): 36 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 11 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin de9a8f9fa50d91c12d4c5aa22c91872855063d84 && git checkout de9a8f9fa50d91c12d4c5aa22c91872855063d84
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 07f0923c5c1bb65463329d5023fd6b53c1de8222 a07507914d63bb699560c705431ec20ee6d69315 && git checkout -B drift-repro 07f0923c5c1bb65463329d5023fd6b53c1de8222 && git merge --no-ff a07507914d63bb699560c705431ec20ee6d69315
node scripts/docs-audit/affected-docs.mjs --json 07f0923c5c1bb65463329d5023fd6b53c1de8222
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nzgcVrZ8Neqqd1AFi Contract reviewServed-tier: ① Derived judgmentsFace: the declaration face.
② Semver level
③ Boundary flags
④ Design judgmentNot owed: this is the declaration face. No defect that breaks the contract was found in the files named on No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nzgcVrZ8Neqqd1AFi The brief handed to the isolated reviewer sub-agent whose record is posted beside this comment (posted for the seat to read before it adopts the record). Contract review brief — PR #38499 @
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nzgcVrZ8Neqqd1AFi Green head declared at 2026-11-29T06:31Z: |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB 席位核对 — REWORK · L1-b · area o5-data · Head-sha
|
Name the optional `locale` member of openNodeRequest's input among the widened surface, and say that an approval one of whose flows cannot be read is refused wherever some object declares closedStates. Prose only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nzgcVrZ8Neqqd1AFi
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nzgcVrZ8Neqqd1AFi Regen-provenance: 7251725255 · L1-b R1 (7251955730) answered at 2026-11-29T06:37Z, prose only, in |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5kjJ6Qm1z2mRox4ZbB 席位核对 — ACCEPT · L1-b · area o5-data · Head-sha
|
4cc09b1
into
claude/o5-data-approvals-trunk
Requested by Leehom · project thread
Part of #37766
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
ADR-0162 Execution item 7 "The check", as revised on 2026-11-27, in
@objectstack/plugin-approvalsonly. This is slice B; slice A (root run and record run) is onmainvia #37820, slice C (the mirror on an abandoned request, #38485) is on the trunkclaude/o5-data-approvals-trunkand merged into this branch, slice D (the guide) is separate. Replaces #38496, which targeted the old trunk branch.approval-opening-check.ts(new). A pure read of the approval whole over anOpeningCheckSource: the root run's flow and every flow asubflowormapnames (by package slot where a name is shared), to any depth. It propagates the objects each flow's steps can act on (asubflowbody acts on its caller's record; amapbody on its items' object where an item may be a record, on the caller's where an item may not be), then builds one graph of the whole approval (containers and calls as entry/exit pairs;loopandmapbodies repeat or run zero times;parallelbranches interleave; atryregion fails intocatchand to the exit) and answers: whether a step touches an object that declaresclosedStates, the between-two-steps set, and the gaps.ApprovalService.judgeOpening, called inopenNodeRequestbefore the row is written. Placement by root run: no root run, not judged; a later request of the approval is not judged and copies the first request's set; a request on the record since the root run started that records no root run makes the request unplaceable, not judged. Nothing is read in an application where no object declares the key (registry.getAllObjects). Refusal:VALIDATION_FAILED:with a lead sentence and one sentence per gap, in the run's locale (AutomationContext.locale, threaded from the node).sys_approval_request.between_steps_json(new, engine-written, read-only, searchable likenode_config_json): a JSON list of{ flow, node }, null where the approval touches no closing object or the request could not be placed. Label and help in all 11 locales.ApprovalService.noteSweepClockScheduled(), called by the plugin once its sweeps are scheduled on the host'sjobservice; until then an approval touching a closing object is refused at its first request.approval-opening-refusal.ts(new) and twelveapprovalOpening*sentences in all 11 catalog packs.status-mirror-closing-field-refusal.integration.test.ts(piece 2 of Approval status mirror: a write that does not land, a run that ends between two steps, and a decision whose run cannot resume must not leave a document closed on an unfinished approval (ADR-0162 item 8) #37767) andstatus-mirror-abandoned-closed-value.integration.test.ts(slice C) now note the sweeps on their hand-built service, since their objects declareclosedStates. Slice C's no-pending arm, which pins an approval the check did not judge, now opens its approval before the object declares the key, which is the case the check does not judge.Why
ADR-0162 D5: an approval on an object that closes on its approval field must be able to show itself in progress there, or the record closes on an unfinished approval. The maintainer chose that the platform refuses such a configuration (7205949718 on #36253). #37767 pieces 3–5 read the stamp (design note 7210179412, question 3, T2).
Readings
maporloopwhose body holds a step is in the set where it is entered before a step and left after one (between one item's or pass's step and the next, the run is parked at or back on it); asubflowis not, since its body runs once. The read is context-insensitive and errs one way: a node that could stand between two steps on some path counts.update_recordbetween two steps of arunAs: 'user'flow is not refused.startandendcannot pause, so theendof amaporsubflowbody refuses nothing (pinned: amapwith written-out items whose body ends inend).aliasOfis followed to the canonical descriptor, as the engine's pause gate does. The revise window (approval_revise) is excepted;subflowandmapare read by their bodies; region containers carry descriptors withoutsupportsPauseand their regions' nodes are judged themselves.maprule is of the parent's object. Amapwith an approval step in its body is refused where the parent's object is one a concerned step acts on, unless its items are written out and none is a record (an object with a stringid). Pinned as not refused: an item object that closes on the body step's field under a parent whose object does not; a parent run with no record (the batch sign-off shape).warn), never refused: refusing a later request on a guess would end its approval between two steps.Verification
approval-opening-check.test.ts: 45 arms over fixtures, each D5 condition, own-value closing (also with astate_machinekeeping one final), no declaration, no closing field (stamped, not refused), other/no field ahead of and after, a step two levels down, two child runs side by side underparallel,try_catch, a loop body, the map arms (expression items ahead/between/after, withitemObject, written-out items none/one record, parent not concerned, batch with no record), the stamp for a linear flow, a branch passing over a step, a subflow, a map body with its only step, wait and screen in both flow kinds, a type with no descriptor, aliases, the revise window,visibleWhenon each status option, an unreadable flow, the host.approval-opening-check-37766.integration.test.ts: 7 tests on the real kernel, ObjectQL (SQLite) and automation engine: opens and stamps, later request copies the stamp, refused with the sentence and no row, the locale (zh-CN), a later request of an approval opened before the declaration not judged, a later request whose earlier request records no root run not judged (reverse-verified: removing the rule turns it red), the no-job host.pnpm --filter @objectstack/plugin-approvals exec vitest runat the head (after merging the trunk with slice C): 2106 tests, 136 files, all green. Before the merge, 1 of 2054 failed on the first run (the search-set ledger, fixed by adding the column tosearchableFields).patch(Metadata-protocol: none), perCheck Changeseton feat(approvals): the check when an approval opens, and the between-two-steps stamp (ADR-0162 item 7, slice B) #38496.pnpm --filter @objectstack/plugin-approvals run typecheck(test layer held in its debt ledger);node scripts/check-i18n-bundles.mjs: in sync.dispatch-gates.mjs --commands: 117 repo-levelcheck:*andnode scripts/*gates run at the first head (before the trunk merge), 115 green. 2 NOT MEASURED (prerequisite exit 3, not a finding):check-plugin-teardown-shape --self-testneeds an unshallow clone;check:dual-build-cjs-loadsneedsdist/of packages this diff does not touch. The spec / metadata gates the list also names belong to files already on the trunk, not to this diff.overlap-check.mjs --base=origin/claude/o5-data-approvals-trunk: clean against the trunk (07f0923) and feat(objectql): a record in a closed state, and its lines, are closed to change (closedStates, ADR-0162) — trunk #38497.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5nzgcVrZ8Neqqd1AFi