Skip to content

fix(service-automation)!: automation variable keys cannot use reserved object segments, and one run's writes never change a flow's defaults - #38001

Merged
os-zhuang merged 15 commits into
mainfrom
claude/sec1-xrjw-door
Nov 28, 2026
Merged

os-zhuang merged 15 commits into
mainfrom
claude/sec1-xrjw-door

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no published skill teaches a flow variable name, assignment target, screen field name or resume-signal key rule (checked: git grep over skills/** for __proto__, constructor, prototype, and the automation skill's variable, outputVariable, assignment, screen-field and resume text; the only hits are skills/objectui expression-sandbox lists, unrelated)

维护者速读

  • 用户能看到什么变化:流程作者把变量名(或名字里以点分隔的任一段)写成三个保留词之一时,注册和保存会被拒并指出每一处;恢复暂停中的流程时,提交的数据里带这类键会被拒,流程保持暂停;普通流程无感。
  • 为什么做:自动化流程的变量命名与运行之间的隔离加固,安全席位按维护者授权接手的高危项。
  • 出错会怎样:已有流程若恰好用了这些名字会注册失败,改名后重新保存即可;整个改动可以直接撤回。
  • 要你做什么:审阅后由授权审批人批准,再由席位落地。

What changes

Three rules, stated once each in the automation service:

  1. A flow variable key may not use __proto__, constructor or prototype as its name or as any dot-separated part of it — at registration. Registration, and the stored pass that previews it, judges every key a flow names, in every graph it holds: each node's id (it heads every key the node's output is stored under), each declared variable's name, each assignment node's targets in every shape, each node's outputVariable / iteratorVariable / indexVariable / errorVariable / idVariable, and each screen field's name, each judged with surrounding whitespace trimmed. The judged positions are held equal to the spec's binding positions by a pin. The refusal names every such key and where it sits. A name that only contains one of the words (constructor_name) is unaffected.
  2. A caller's resume signal may not carry such a key. Each key of output and of inputs is judged first, before anything reads the submitted values, a signal handed on to a paused subflow child included; the answer is INVALID_SIGNAL (400), nothing is applied, and the run stays paused for a valid submission. The engine's own continuations (a map item handing back, a subflow child finishing) are not judged, so a run paused before this release still completes.
  3. One run's writes never change a flow's defaults, another run's values, or the record the run was handed. Each run binds its own copy of an object or list default and of the trigger record (record and $record), seeded once the run's context has resolved so the copy carries the lookups the start node declares. A dotted write whose head names a value the run holds is read back by the run's expressions (conditions and CEL values) and leaves the value as it was, so a text hole and $record read the value. With no durable store, a resumed run works on its own copy of its variables, as a stored run does. A run value that contains itself is refused by the copy by name; a paused run holding one still resumes.

Commits: the door half (rules 1 and 2), then rule 3, then the docs page and changeset, then one more pin for the chokepoint, then a dogfood pin updated, then the published prose and the ledger entry, then the review round: node ids, idVariable and trimmed names at registration, the engine's own continuations exempt at resume, the run's own record copy (seeded after the context resolves), and the named refusal for a value that contains itself; then a patch round: the run's record copy taken as its context resolves, so declared lookups land on the copy; previous copied too; a value that contains itself answered as a failed run; the third changeset bullet trimmed to its readers; and a second ledger entry; then a should-fix round (26d6b3a): a declared lookup is grafted into a new top-level record, so the caller's record, a class instance included, is never written; new pins cover retry-attempt and dry-run seeding and a class-instance record. Bound, stated: with no graft, a record that is not a plain object is used as handed; the engine writes nothing into it, though a node's in-place change of record then reaches that object, and CEL cannot read a record that is not a plain object unless a graft landed (service-automation 299 files / 4436 tests, trigger-record-change 123).

  • A pin in packages/triggers/trigger-record-change/src/before-update-flow-payload-reach.test.ts stated that a run's record variable is the record on its context; it now states the rule: the run's own copy.
  • Dogfood pin updated in this PR: packages/qa/dogfood/test/flow-condition-scope-keys.dogfood.test.ts (a screen resume's inputs and output bags) stated the earlier accept set and goes red under this change; it now states the ruled one — refused with INVALID_SIGNAL, the run stays paused, and the valid submission then lands.
  • Published prose brought in line with the rule (prose only, no schema shape change): the assignment config's comments in packages/spec/src/automation/builtin-node-config.zod.ts, the INVALID_SIGNAL description in packages/spec/src/contracts/automation-service.ts, and the resume route's status note in packages/runtime/src/domains/automation.ts.
  • ADR-0087 ledger: two semantic entries, flow-variable-key-reserved-segment-refused and flow-dotted-write-read-by-run-expressions-only (packages/spec/src/migrations/entries/semantic/), so os migrate meta and the upgrade guide carry both rules; the changeset is marked registered with both. The changeset is minor on @objectstack/service-automation (the kind narrowed), patch on @objectstack/spec and @objectstack/runtime.

Tests

  • src/variable-key-reserved-segments.test.ts — rules 1 and 2: each sample is refused at registration and listed by the stored pass; each resume sample is refused on a screen (the screen's conditions are never evaluated, the paused variables are byte-identical, and the valid submission then lands) and on a pause with no input contract; the chokepoint refuses them as a whole. Controls: ordinary dotted keys and names containing the words register, run and resume.
  • src/run-values-isolation.test.ts — rule 3: object and list defaults (dotted writes, list index and length, a node that changes the value in place), the trigger record against $record, and a paused run with and without a store.
  • Red before the fix: 38 failed / 5 passed (the controls) on the unfixed tree, every failure an assertion on the rule.
  • Review round: the same two files grow to 88 tests — one case per judged position, held equal to the spec's binding positions; every assignment shape (map, the legacy array's three name keys, the bare config); a key in a nested graph; trimmed names; a map node id; a signal delegated to a subflow child; engine-built signals and an engine-built continuation that completes; a node changing the trigger record in place before any pause; a value that contains itself. All 88 pass.
  • After: both files 50/50 (first round); the whole package suite 299 files / 4392 tests passed at 5cd060c9d6d (existing flow suites with ordinary dotted keys unchanged). The commits after it change no service-automation source.
Reverse verification — each new pin, one change reverted at a time (counts only)

Each leg through scripts/ablation-replace.mjs (anchor x1 -> x0, restored to HEAD, git diff HEAD empty after every leg), on the two new files (50 tests):

Reverted Red Which pins
the registration check 18 every authoring case, registration and stored pass
the resume door's first check 6 every screen case; the no-contract pause stays refused by the chokepoint
the chokepoint's check 6 every chokepoint case; resume stays refused by the first check
the scope's copy on descent 1 the record case
the per-run copy of a default 2 the in-place cases
both copies together 7 every default case and the record case
the held run's copy 1 the paused run with no store

Review round, on the same two files (88 tests), at 2da449d7736:

Reverted Red Which pins
judging node ids 2 the node-id position, the map node id
judging idVariable 4 the idVariable position, the three trimmed-name cases
trimming before judging 5 the three trimmed-name cases, the outputVariable and idVariable positions
nodeId in the judged positions 2 the two enumeration pins
the legacy-array branch 3 the three legacy-array cases
the engine-built exemption 7 the six engine-built cases, the continuation that completes
the resume door's first check 9 the six screen cases, the three delegated inputs cases
the run's record copy 1 the record changed in place before any pause
the cycle guard 2 the named refusal, the paused run holding such a value

The record copy taken before the context resolved reds 2 tests in the existing record-lookup-expand.integration.test.ts (declared lookups missing from the run's copy); seeding after the context resolves turns them green.

Acceptance notes

  • A flow whose text hole or $record read relied on reading a dotted write now reads the held value; the changeset gives the rewrite (assign the computed value to a variable of its own).
  • A security item is with the owner seat.

Verification

First read (by risk):

  1. packages/services/service-automation/src/run-resume.ts — the resume-door block just before the screen contract.
  2. packages/services/service-automation/src/flow-registration-checks.ts — validateVariableKeySegments.
  3. packages/services/service-automation/src/dag-traversal.ts — the descent in celScope, the default and record seeding, and seeding after the context resolves.

Two-minute check: pnpm --filter @objectstack/service-automation exec vitest run src/variable-key-reserved-segments.test.ts src/run-values-isolation.test.ts — expect Tests 94 passed (94) (at 26d6b3a).

Local gates at b1d5a7f (later rounds: service-automation 299 files / 4436 tests and trigger-record-change 123 at 26d6b3a)
  • @objectstack/service-automation typecheck (tsc and the test-layer typecheck): exit 0; the whole package suite: 299 files / 4430 tests passed (at 82e81476d6c; the later commits change no source of that package). @objectstack/trigger-record-change tests: 12 files / 123 tests passed. @objectstack/spec check:generated exit 0 and src/migrations 203/203; @objectstack/runtime typecheck exit 0.
  • The derivation at b1d5a7f4597 is the same 142 families as at 469a6acd57c; check:nul-bytes, check:test-source-alias, check:tier-file-adoption and check:cross-package-test-inputs re-run there: exit 0.
  • check:adr-0087-registration: exit 0, registered flow-variable-key-reserved-segment-refused, flow-dotted-write-read-by-run-expressions-only (at d2273ab). check:cross-package-test-inputs: exit 0, after declaring the spec module the enumeration pin reads (the package's declared globs and its turbo test inputs).
  • The derived gate list (dispatch-gates --commands, 142 families): 139 exit 0; 3 NOT MEASURED, prerequisite not met on this box (exit 3): check:skill-examples (no client SDK build), check:dual-build-cjs-loads (no full build), check:type-check-debt (no full build). CI runs all three. --ran reconciliation: 142 derived, 142 run, 0 unrun.
Dogfood battery at b1d5a7f (re-run at d2273ab: 490 files passed)
  • Closure built at that head, then pnpm --filter @objectstack/dogfood test under the verify lock, no shard: exit 0 · Test Files 490 passed / 3 skipped (493) · Tests 4144 passed / 68 skipped (4212).
  • An earlier run at 469a6acd57c failed to load packages (Cannot find package '@objectstack/platform-objects/…') because that package's built output was rewritten while the run was going; the re-run after rebuilding the closure was green at that head too.

Generated by Claude Code

…d object segments

A flow variable key, and every dot-separated part of one, may not be
`__proto__`, `constructor` or `prototype`. Two doors hold the rule:

- registration (and the stored pass that previews it) refuses a flow that
  declares, assigns or binds such a key, naming each site;
- resume refuses a signal whose `output` or `inputs` carry such a key with
  INVALID_SIGNAL, before anything reads the submitted values, so nothing is
  applied and the pause stays live.

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
…lts or another run's values

- A dotted write whose head names a value the run holds lands in a copy
  the expression scope owns; the run reads it back, and the held value
  (a declared default, the trigger record, the value `record` and
  `$record` share) keeps what it was.
- Each run binds its own copy of an object or list default.
- With no durable store, a paused run is handed out with its own copy of
  its variables, as a stored run is, so a resume writes into nothing the
  parked run shared.

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
…ent keys for every caller

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
… and stays paused

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/runtime, @objectstack/service-automation, @objectstack/spec, touching 51 documentable anchor(s).

15 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/actions-as-tools.mdx (via nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/api/client-sdk.mdx (via AutomationResult (symbol, a top-level interface), dryRun (symbol, a top-level function), /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/api/wire-format.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/automation/approvals.mdx (via nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/automation/flows.mdx (via AutomationResult (symbol, a top-level interface), INVALID_SIGNAL (literal, a string literal in resumeInternal), errorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), idVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), indexVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), iteratorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments), outputVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS))
  • content/docs/data-modeling/currency.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/data-modeling/fields.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/data-modeling/import-mappings.mdx (via dryRun (symbol, a top-level function), /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/kernel/cluster.mdx (via AutomationEngine (symbol, a top-level class), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/kernel/contracts/metadata-service.mdx (via dryRun (symbol, a top-level function))
  • content/docs/kernel/runtime-services/examples.mdx (via outputVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS))
  • content/docs/permissions/authentication.mdx (via dryRun (symbol, a top-level function))
  • content/docs/permissions/system-context.mdx (via handleAutomationRequest (symbol, a top-level function), /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/protocol/knowledge.mdx (via dryRun (symbol, a top-level function))
  • content/docs/protocol/objectql/state-machine.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it), /:object/import/jobs (route, bridged from symbol dryRun — its route source's handler names it))

⛔ 12 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v12.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v14.mdx (via dryRun (symbol, a top-level function))
  • content/docs/releases/v16.mdx (via AutomationEngine (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via AutomationEngine (symbol, a top-level class), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/releases/v17/17-1.mdx (via AutomationResult (symbol, a top-level interface), nodeId (literal, a string literal in VARIABLE_KEY_POSITIONS; a string literal in validateVariableKeySegments))
  • content/docs/releases/v17/17-3.mdx (via AutomationResult (symbol, a top-level interface), dryRun (symbol, a top-level function))
  • content/docs/releases/v17/17-6.mdx (via AutomationEngine (symbol, a top-level class), AutomationResult (symbol, a top-level interface), /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v17/17-7.mdx (via INVALID_SIGNAL (literal, a string literal in resumeInternal))
  • content/docs/releases/v18/18-0.mdx (via errorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), idVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), indexVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), iteratorVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS), outputVariable (literal, a string literal in NODE_BINDING_CONFIG_KEYS; a string literal in VARIABLE_KEY_POSITIONS))
  • content/docs/releases/v18/18-1.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v18/18-2.mdx (via /:object/import (route, bridged from symbol dryRun — its route source's handler names it))
  • content/docs/releases/v18/18-3.mdx (via dryRun (symbol, a top-level function))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 182 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json f19350b410df08db604881848b2c370047a114f2 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 500cd899f05420f421b6f7f620adb4a81f584d01 — the merge of head 3cceede51218db83878b1a5787f890c6485488bb into base f19350b410df08db604881848b2c370047a114f2, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 500cd899f05420f421b6f7f620adb4a81f584d01 && git checkout 500cd899f05420f421b6f7f620adb4a81f584d01
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f19350b410df08db604881848b2c370047a114f2 3cceede51218db83878b1a5787f890c6485488bb && git checkout -B drift-repro f19350b410df08db604881848b2c370047a114f2 && git merge --no-ff 3cceede51218db83878b1a5787f890c6485488bb

node scripts/docs-audit/affected-docs.mjs --json f19350b410df08db604881848b2c370047a114f2

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs f19350b410df08db604881848b2c370047a114f2 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…mes and INVALID_SIGNAL are described; declare the narrowing

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#1 · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c213f8fb80de083b3dfde0d7dcb3b63af1439c31
Local-runs: none
Scope: packages/spec/src/automation/builtin-node-config.zod.ts, packages/spec/src/contracts/automation-service.ts, packages/spec/src/migrations/entries/semantic/19.flow-variable-key-reserved-segment-refused.ts + packages/services/service-automation/src/scope-key-segments.ts, packages/services/service-automation/src/flow-registration-checks.ts, packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/run-resume.ts, packages/services/service-automation/src/dag-traversal.ts, packages/services/service-automation/src/variable-key-reserved-segments.test.ts, packages/services/service-automation/src/run-values-isolation.test.ts, packages/qa/dogfood/test/flow-condition-scope-keys.dogfood.test.ts, packages/runtime/src/domains/automation.ts
Security-touching: yes
Rule-change-verified: none

Inputs: the governing ruling (two halves: the door, and P2), the PR body, its 14-file list, the net diff 02ed8408450..c213f8fb80d, and the head's check-runs. Read-only: every statement below is read from the tree at the head; nothing was built or run. Prose faces (.changeset/automation-variable-keys-reserved-segments.md, content/docs/automation/flows.mdx) read for ② and accuracy only. Mechanism-level detail is held privately with the security seat; this record stays at the rule.

Gate verdicts: every completed check-run on this head is success or skipped, except the first Check Changeset run (failure, 15:04Z), superseded by the later one (success, 16:34Z), which governs.

① Derived judgments

  • Authored flows that change answer. One check, validateVariableKeySegments, sits in the shared registrationChecks list, so registerFlow and the stored pass judge one set by construction. It judges, in every graph collectFlowGraphs returns: each declared variable's name; an assignment node's targets in the three shapes its executor reads; outputVariable / iteratorVariable / indexVariable / errorVariable on a node of any type; each screen fields[].name. A flow naming a key with one of the three words as its name or as a dot-separated part moves from registered to refused, every site named.
  • Nothing refused beyond the three words. The match is exact per part after a split on .: constructor_name, prototype_count and a differently-cased spelling are untouched (the control cases pin the first two, at registration, on a run and on a resume). Two small supersets, both inside "a key the flow names": the four …Variable keys are judged on every node type whether or not that type binds them, and a degenerate legacy-array entry is judged by a slightly wider name pick than the executor's (N3).
  • The judged set is not every key a flow names — see M1.
  • Resume calls that change answer. Every key of output and of variables (the REST body's inputs and its alias, the MCP resume's values) with such a part now answers INVALID_SIGNAL (400). For output that is accepted → refused. For inputs on a screen with declared fields it is a change of code inside the same 400 (INVALID_SCREEN_INPUT → INVALID_SIGNAL), as the updated dogfood pin states. Engine-built continuation signals are judged too (S1).
  • P2 is a behaviour change, not an accept-set change: a declared object or list default is copied per run; a dotted write under a held value lands in a copy the expression scope owns; an in-memory suspension is handed out with its own variables.
  • Spec prose edits change no shape and no generated artifact. The two hunks in builtin-node-config.zod.ts are // comments (no .describe() text); the hunk in automation-service.ts is one JSDoc paragraph on AutomationResult.code. INVALID_SIGNAL is an existing code that gains a documented cause; it is already in the retryable-refusal set, so a delegating parent stays parked on it.
  • The ledger entry is reachable as the gate expects. Semantic entries are discovered by directory (the registry is generated); the file sits beside its 19.* siblings, matches the spec's 19.0.0-next.0 step, and carries no relevantWhen, which is right for a surface that includes a runtime request body. The changeset marker names its id; the ledger-synchrony gates and the latest Check Changeset run are green on this head.

② Semver level

  • @objectstack/service-automation: minor with a ! title and two BREAKING bullets: the level this repo's sibling narrowings carry on the 19 line (35143-data-model-publish-checks.md, 36595-related-list-key-under-arrangement.md). Holds.
  • @objectstack/spec: patch for prose plus one registered ledger entry: the same pairing those siblings use. Holds. @objectstack/runtime: patch covers a comment-only hunk; harmless.
  • Clause-②: no (narrowing) holds: no hunk widens an accept set or adds a capability. Metadata-protocol: narrowed holds: authorable flow metadata that registered is now refused, with no schema shape change.
  • ADR-0087 registered flow-variable-key-reserved-segment-refused: marker, entry id and file agree. The entry's surface, replacement and reason state the rule only. Its acceptanceCriteria ("os migrate meta --stored lists no flow with such a key") can be met while a flow M1 covers is still affected; it becomes exact when M1 is fixed.
  • FROM → TO: the first two bullets carry FROM, TO and the fix. Two accuracy points: N2 (the resume bullet's FROM) and S4 (the third bullet's "Nothing to change").

③ Boundary flags

  • (a) Registration sites. Declared names, assignment targets in all three shapes, the four …Variable keys and screen field names are judged, and the stored pass reads the same check. Not every site is: M1.
  • (b) Resume. The refusal is the first statement after the suspension is loaded and any delegation is resolved, ahead of refuseInvalidScreenInput (the screen contract and its visibleWhen) and ahead of applyResumeSignal. Nothing earlier reads a caller's output or variables (the one earlier reader answers on the engine's own marker first). It returns before the suspension is consumed, so the run stays paused. applyResumeSignal refuses the same keys as a whole, and both of its callers are covered. Every door found reaching it (the REST resume route, the MCP resume, the wait-node timers, a caller's signal delegated down to a subflow child) goes through resume → resumeInternal. Holds for caller signals; for the engine's own signals see S1.
  • (c) P2 copies. Defaults: deep-copied at seeding, arrays and plain objects at every depth. Dotted writes: the scope tracks the containers it made per build and descends into a one-level copy of anything else, so every write lands in an object the scope owns; a list stays a list, any other object becomes a prototype-free copy. Held runs: the only two direct reads of the in-memory cache both go through the copy. One path still shares a held object: S2. Cost: one shallow copy per held object per scope build, and only when a dotted key descends into it; one deep copy per object/list default per run; one deep copy of all variables per in-memory load, on engines with no store or a run the store never took. Linear and acceptable; N1 for one edge.
  • (d) Authoring lint door. os validate and FlowSchema.parse do not apply the rule: the spec comments in this diff say so in words ("this schema accepts"). The ruling names registration, the stored pass and resume, so it is not owed here. Residual R1: an author meets the rule at registration, not at validate; a lint rule is a follow-up for the security seat to file.
  • Dev flag — "node ids are not judged by the authoring door". Answered in part, escalated in part. A node id heads every key a node's output is stored under, and this same file's existing enumeration of names a node binds (flowNodeBoundNames) counts it. Whether the ruling's "variable keys" takes node ids in is a contract call: escalated to the security seat, not decided here. Whichever way it goes, the two doors must give one answer for one key (S1).
  • Dev flag — "a security item is with the owner seat". Noted; nothing to answer on the public face.
  • Author. objectstack-fleet[bot]. No auto-merge is armed on this head (the PR is a draft), so no disarm is owed.
  • SQL push-down (AGENTS.md). n/a: the diff adds no data access, no id materialisation and no in-app join.

④ Design judgment

The ruling, sentence by sentence.

  • "Variable keys cannot use a reserved segment as the whole name or any dot-separated part." The predicate is right: exact match per part, empty parts included. Bracketed and indexed spellings are either refused by a dotted part or are one literal segment that no scope walk reads as a path (both walks split on . only). Case variants and look-alike code points are different property names and are correctly left alone.
  • "Refused at flow registration and in the stored pass." One check, two readers: the same set by construction. The set itself falls short.
    • M1 (must-fix) — on two authoring shapes a flow that names a key with a reserved segment still registers and is not listed by the stored pass. On one of them the flow then binds such a key at run time; on the other it registers and pauses, and no submission can complete it. Held privately with the security seat. The changeset, the docs page and the ledger entry say registration judges every key a flow names; that sentence is not true at this head.
  • "Refused in a resume signal before anything reads the submitted values, the run staying paused." Holds for every caller signal, at the first check and again at the chokepoint.
    • S1 (should-fix) — the chokepoint judges the engine's own continuation signals on the stated ground that their keys are names the authoring door already holds (reservedResumeSignalKeys docblock). That ground does not hold for every key the engine builds: on one flow shape the door registers, the engine's own continuation is refused and the run parks with no valid submission able to move it. Held privately with the security seat. Tied to the node-id escalation in ③.
  • "One run's writes never change a flow's declared defaults, the trigger's record or another run's values." Defaults: held on every path read (seeding copy, dotted writes, a node that changes the value in place, the next run). Another run's values through a pause: held with and without a store.
    • S2 (should-fix) — for the trigger's record the rule is held for a dotted write and for a run resumed from a pause, and not on one further path. Held privately with the security seat. The docs page and the changeset state the wider rule without that limit; either the tree or the prose moves, and which is the ruling's to say.
  • Keys produced at run time rather than authored (a trigger record's own field names, a node's output keys): no door judges them, by design; what holds for them is the scope rule (prototype-free containers, the skipped segment) plus this diff's copy on descent. Named as residual R2, not a finding.
  • Would the pins catch a regression? Resume: yes for caller signals — six samples on a screen (the conditions never evaluated, the paused variables byte-identical, the valid submission landing), on a pause with no input contract, at the chokepoint, and through the HTTP route in the dogfood pin. P2: defaults, the record's dotted write, and a pause with and without a store.
    • S3 (should-fix) — the authoring pin does not hold the door's site list. Its nine cases cover declared names, the assignment map and bare shapes, one outputVariable and one screen field. There is no case for the legacy-array assignment shape, iteratorVariable, indexVariable, errorVariable or a key inside a nested graph, and no enumeration pin against the spec's own list of binding positions; removing any of those branches leaves both new files green. The resume side has no case for a signal delegated to a subflow child or for an engine-built signal.
    • S4 (should-fix, prose) — the changeset's third bullet ends "Nothing to change" and the docs say a dotted write "is read back by that run". The two scope builders differ: an expression reads the write back from the scope's copy; a text hole over the same path reads the held value, because the text scope never merges a flat key into a variable. A flow that read a dotted write through a text hole or through $record changes on upgrade; the bullet should say which reader reads it back and carry a FROM → TO.
    • N1 (nit) — copyHeldValue has no guard for a value that refers to itself; a suspension holding one fails its in-memory load, reported under a store-unavailable code on an engine with no store. SuspendedRun documents its fields as JSON-serialisable, so this is outside the stated contract.
    • N2 (nit) — the resume bullet's "FROM: such a key was accepted" is exact for output; for inputs on a screen with declared fields the call was already a 400 under another code.
    • N3 (nit) — the door picks a legacy-array entry's name as "the first of variable / name / key that is a non-empty string"; the executor and the spec's flowAssignmentTargets pick "the first that is not null". The door is the superset, so nothing slips; it can refuse an entry the executor binds nothing for.

One must-fix (M1), four should-fix (S1–S4), three nits. The resume door and the default-isolation half hold as ruled; the authoring door does not yet refuse every key a flow names, so the narrowing is not delivered whole at this head.

Implemented-by: claude/sec1-xrjw-door
Reviewed-by: session_01ASNY8XNef4ywkQio6S9ju4

VERDICT: FAIL

… registration, exempt the engine's own continuations at resume, and give each run its own trigger record

- Registration judges node ids, object-form screen idVariable, and each
  name with surrounding whitespace trimmed; the judged positions are held
  equal to the spec's binding positions.
- Resume judges a caller's signal only; the engine's own continuations
  still complete.
- Each run binds its own copy of the trigger record.
- A run value that contains itself is refused by the copy by name, and a
  held run carrying one still resumes.

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 27, 2026
…s own record copy carries the declared lookups

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
…s an input of the package's tests

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
… not the context's record

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#1 · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b1d5a7f45975f1f731ce52a42495fabbccf78c26
Local-runs: none
Scope: packages/spec/src/automation/builtin-node-config.zod.ts, packages/spec/src/contracts/automation-service.ts, packages/spec/src/migrations/entries/semantic/19.flow-variable-key-reserved-segment-refused.ts + packages/services/service-automation/src/scope-key-segments.ts, packages/services/service-automation/src/flow-registration-checks.ts, packages/services/service-automation/src/engine.ts, packages/services/service-automation/src/run-resume.ts, packages/services/service-automation/src/dag-traversal.ts, packages/services/service-automation/src/dry-run.ts, packages/services/service-automation/src/variable-key-reserved-segments.test.ts, packages/services/service-automation/src/run-values-isolation.test.ts, packages/qa/dogfood/test/flow-condition-scope-keys.dogfood.test.ts, packages/runtime/src/domains/automation.ts, packages/triggers/trigger-record-change/src/before-update-flow-payload-reach.test.ts, scripts/cross-package-test-inputs.mjs, turbo.json
Security-touching: yes
Rule-change-verified: none

Delta round on the record at c213f8fb80d (FAIL: M1, S1–S4, N1–N3). Inputs: the governing ruling, the seat's rulings of this round (R-a node ids are variable keys; R-b the resume key check judges caller signals only; R-c the run's record / $record are a run-owned copy), the seat-accepted items (the N1 resolution; the out-of-surface edits), the PR body, its 18-file list, the delta c213f8fb80d..b1d5a7f4597, and the new head's check-runs. Read-only: every statement is read from the tree at this head; nothing was built or run. Prose faces read for ② and accuracy only. Mechanism-level detail is held privately with the security seat.

Gate verdicts: 74 check-runs on this head, all completed: 63 success, 11 skipped, none failed.

① Derived judgments

  • Authored flows that change answer, at this head. The door's positions are now a named list, VARIABLE_KEY_POSITIONS: the spec's eight binding positions plus the node id. A flow is refused when a node's id, a declared name, an assignment target in any of the three shapes, outputVariable / errorVariable / iteratorVariable / indexVariable / idVariable on a node of any type, or a screen field name has one of the three words as its name or as a dot-separated part, in every graph the flow holds. Each name is judged trimmed. The stored pass reads the same check.
  • Still nothing refused beyond the three words. Trimming and judging every node type are supersets inside "a key the flow names"; a control pins ordinary names, a node id and a trimmed name among them.
  • Resume calls that change answer. Unchanged for a caller: every key of output and inputs is judged first, INVALID_SIGNAL, the run stays paused. Changed since the last head: a signal the engine built for its own continuation is no longer judged (R-b), so a run parked before the rule completes.
  • P2, at this head. A declared object or list default, the trigger record (record, $record and the flattened fields), and an in-memory suspension's variables are each the run's own copy; a dotted write under a held value lands in a copy the expression scope owns.
  • Spec face. The delta touches one published file, the ledger entry; its text now names the node id, idVariable, the trimmed judgment and the caller-only resume rule. No schema shape and no generated artifact changes.

② Semver level

  • Front matter unchanged and still right: @objectstack/service-automation: minor with a ! title, @objectstack/spec: patch, @objectstack/runtime: patch. The delta's edit under packages/triggers/trigger-record-change is one test assertion and needs no bump.
  • Clause-②: no (narrowing) and Metadata-protocol: narrowed hold. R-b relaxes the previous head, not main: against main every hunk still narrows or isolates.
  • Ledger entry flow-variable-key-reserved-segment-refused: marker, id and file agree, and with M1 closed its acceptance criterion is exact for the key rule.
    • S7 (should-fix) — the changeset's third bullet became BREAKING in this delta, with its own FROM, TO and fix, and no ledger entry carries it: the one registered entry states the key rule and the resume rule only. os migrate meta and the upgrade guide are therefore silent on a change the changeset tells authors to act on. The marker grammar takes more than one id; a second semantic entry stating the rule closes it.
  • FROM → TO: the resume bullet's FROM is now exact for both fields (N2 closed). The third bullet now carries FROM, TO and a fix (S4 closed), with one point under ④ (S6).

③ Boundary flags

  • (a) Registration sites. Every binding position the spec enumerates is judged, plus the node id, and a pin holds the door's list equal to the spec's. Closed.
  • (b) Resume. Order and chokepoint unchanged. R-b admits nothing a caller can forge, as read: the marker is a module-private symbol that no transport body can carry and that the package does not export a way to mint; the engine's three continuation signals take their keys from values the engine itself stored; the one continuation that carries a caller's fields is built only after the chokepoint has judged that caller's signal unmarked. The REST start door assembles its context field by field. Other in-process start doors were not traced; their reach is the same one the $ rule's exemption already had.
  • (c) P2 copies. R-c is implemented as worded, and the declared expand lookups are preserved: the run is now seeded after its context resolves, in execute, the retry path and the dry run, so the copy carries them; the existing end-to-end pin for an expanded relation read after a pause is green on this head. Every reader of the record variables found (the approval node, the screen contract, run history, the notify node) only reads; no code relies on the variable and the context's record being one object, and the one test that measured that identity now states the opposite. Cost: one deep copy of the record per run and per start-condition preview, linear in the record. One point stays open: S5.
  • (d) Lint door. Unchanged: residual R1, not owed by the ruling.
  • Dev flag — node ids. Answered by R-a and implemented: judged at registration and in the stored pass, pinned, and named in the changeset, the docs page and the ledger entry.
  • Dev flag — "a flow whose text hole or $record read relied on reading a dotted write now reads the held value". Accurate, and the changeset now gives the rewrite.
  • Seat-accepted items, read against the tree. The N1 resolution is as described: a held run whose values contain themselves is handed out as held with an error log, and its resume completes (pinned). scripts/cross-package-test-inputs.mjs and turbo.json declare the one spec source file the new enumeration pin reads; nothing else in them moves.
  • Author. objectstack-fleet[bot]. The PR is a draft with no auto-merge armed.
  • SQL push-down (AGENTS.md). n/a: the delta adds no data access, no id materialisation and no in-app join.

④ Design judgment

Prior findings, on the tree under the rulings.

  • M1 — closed. The two authoring shapes are refused at registration and listed by the stored pass; each has a case, and the position list is held equal to the spec's.
  • S1 — closed, twice over: the door judges the name that heads the engine's continuation keys (R-a), and the engine's own signals are not judged (R-b). A parent parked under a key the door now refuses completes (pinned).
  • S2 — closed as ruled (R-c): a node that changes the record in place before any pause leaves the trigger's object as handed (pinned).
  • S3 — closed. One case per judged position with the position named in the refusal, every assignment shape including the legacy array's three name keys, a key inside a nested graph, trimmed names, a signal delegated to a subflow child, and an engine-built signal.
  • S4 — closed. The changeset and the docs page say which reader reads a dotted write back and give the rewrite.
  • N1 — resolved as the seat accepted. N2 — closed. N3 — stands, a nit: the door's legacy-array name pick is still the superset of the executor's.

New in the delta.

  • S5 (should-fix) — R-c holds for the run's own values. One engine step that runs before the copy is taken still writes onto the object the run was handed, and it is reachable from authored metadata, not only from an executor's code. It predates this PR and the delta neither adds nor removes it; held privately with the security seat. The docs page and the changeset now say one run never changes the object the trigger handed over, and with that step the sentence is not yet true. Either the step writes onto the run's copy or the sentence is narrowed; which is the seat's to say.
  • S6 (should-fix, prose) — the third bullet's new FROM line says more about earlier behaviour than an author needs in order to migrate. Under security-findings.md §2 and §6 a changeset carries the rule only. The round-one S4 asked for a FROM → TO, so the reviewer shares this one: the reader-facing half (which reader read the write) is enough. Which clauses stay is the security seat's call.
  • N4 (nit) — the copy now refuses a value that contains itself by a named error. The held-run path catches it; seeding does not, so a run handed such a record is rejected out of execute before a result is formed. Outside what a JSON-shaped record can be.
  • N5 (nit) — the same seeding binds one sibling of the record as handed, uncopied. R-c and the prose name record / $record only; held privately.
  • Residuals, named, not findings. R1: the authoring lint door does not apply the rule. R2: keys a run is handed or produces at run time are judged by no door; the scope rule and the copy on descent hold for them. R3: R-c covers the run's variables; one handle outside them still carries the trigger's own object for code that reaches for it; held privately with the security seat.

No must-fix. Three should-fix (S5, S6, S7), each closable in prose or by one small move, and three nits (N3, N4, N5). The door, the resume rule and the three rulings hold on this head.

Implemented-by: claude/sec1-xrjw-door
Reviewed-by: session_01ASNY8XNef4ywkQio6S9ju4

VERDICT: PASS

…ext resolves, previous is copied too, and a value that contains itself fails the run

- resolveRunContext takes the run's own copy of the handed record before
  anything writes onto it; the start node's declared lookups are grafted
  onto that copy, and the run's variables are seeded from the resolved
  context, so the caller's record object is left as handed.
- previous is bound as the run's own copy, by the same rule as the record.
- A value handed to execute that contains itself is answered as a failed
  run (status 'failed', the copy's named error, one failed history row)
  instead of a rejection out of execute.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcW9L8Noz9BxEwjwiov
…d a second ADR-0087 semantic entry carries it

- The third BREAKING bullet's FROM and TO name the readers only: a text
  hole and $record.
- New semantic ledger entry flow-dotted-write-read-by-run-expressions-only
  states the rule; the changeset's registered marker names both entries.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcW9L8Noz9BxEwjwiov
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract-review-claim: session_017xRBcW9L8Noz9BxEwjwiov · head d2273ab · 2026-11-28T04:07Z

The delta round after the patch round (b1d5a7f..d2273ab), at CONTRACT_REVIEW_TIER, held by security#2, which took this PR over per the Resume-from: brief 7232546724. CI on this head: 61 success, 9 skipped, 0 failing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Delta L2 contract review — PASS · head d2273ab

Scope: the delta b1d5a7f..d2273ab, 2 commits and 7 files. It was reviewed by an isolated reviewer at CONTRACT_REVIEW_TIER, effort high, under claim 7233723903. The reviewer built the closure and ran everything in a throwaway worktree.

Axis Verdict Evidence
1 · the round's orders (S5, S6, S7, N4, N5) PASS Each path was measured: execute, retry, pause and resume, dry run, and the start-condition preview
2 · no regression PASS service-automation 299 files / 4433 tests · trigger-record-change 123 · spec migrations 203 · CI 63 success / 11 skipped / 0 failed
3 · pins meaningful PASS, one gap The 3 new pins go red when the source is reverted to b1d5a7f. Each change was reverted alone and each red maps to its own pin
4 · public text PASS Neutral wording · the ADR-0087 gate is exit 0 and registers both entries

Must-fix: none.

Should-fix (owed, non-blocking):

  1. The retry-attempt and dry-run seeding have no pin of their own. Owed: one case for each.
  2. A record that is not a plain object is not covered by the run's own copy. This is unchanged from b1d5a7f, and no in-repo caller hands one. Owed: either widen the copy, or state the bound.

Nits: seven, carried in the seat's record. Among them: the PR body's test count and gates header are stale.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

维护者速读

  • 用户能看到什么变化:流程变量名不能再用三个保留名字;一次运行里写入的值,不再改到流程的默认值、别的运行或触发它的那条记录。
  • 为什么要你批:这是收窄改动,已有的少数流程可能需要按升级说明改名,合并要你本人审。
  • 复核情况:对抗复核通过,没有必修项;两条应修不挡合并,会单独补测试。
  • 要你做什么:审完合并即可(复核通过记录 7234081837,Head-sha d2273ab3)。

席位核对

ACCEPT · head d2273ab3e702e266a5e37fc36a5851f1903b082a · 2026-11-28T10:05Z · maintainer word, this session, verbatim 「xrjw 交审」

  1. Form: draft, Clause-②: no (narrowing), Metadata-protocol: narrowed. The changeset is present with FROM / TO / fix, and the ADR-0087 marker names both ledger entries.
  2. Premise measured: each order of the patch round is measured on every entry path (delta PASS 7234081837). The three new pins are red on b1d5a7f and green on this head.
  3. Gates (check-runs on this head): 63 success, 11 skipped, 0 failed, including Test Core 10/10 and the Dogfood Regression Gate. The dev's dispatch-gates --ran reconciled 142 of 142.
  4. Accepted deviations: the branch was not re-merged with main, per AGENTS.md (mergeable, no conflict). The PR body was refreshed by the seat.
  5. Out of scope, and where it went: the two should-fix and the recorded residuals go on the private record and a follow-up order. Skills-docs: the flows docs page is updated in this PR.
  6. Landing: Tier H, by the maintainer (the narrowed leg). The seat does not flip it ready or enqueue it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

维护者速读

  • 用户能看到什么变化:流程变量名不能再用三个保留名字;一次运行里写入的值,不再改到流程的默认值、别的运行或触发它的那条记录。
  • 为什么要你批:这是收窄改动,已有的少数流程可能需要按升级说明改名,合并要你本人审。
  • 复核情况:对抗复核通过,没有必修项;两条应修不挡合并,会单独补测试。
  • 要你做什么:审完合并即可(复核通过记录 7234081837,Head-sha d2273ab3)。

席位核对

ACCEPT · head d2273ab3e702e266a5e37fc36a5851f1903b082a · 2026-11-28T10:06Z · maintainer word, this session, verbatim 「xrjw 交审」

  1. Form: draft, Clause-②: no (narrowing), Metadata-protocol: narrowed. The changeset is present with FROM / TO / fix, and the ADR-0087 marker names both ledger entries.
  2. Premise measured: each order of the patch round is measured on every entry path (delta PASS 7234081837). The three new pins are red on b1d5a7f and green on this head.
  3. Gates (check-runs on this head): 63 success, 11 skipped, 0 failed, including Test Core 10/10 and the Dogfood Regression Gate. The dev's dispatch-gates --ran reconciled 142 of 142.
  4. Accepted deviations: the branch was not re-merged with main, per AGENTS.md (mergeable, no conflict). The PR body was refreshed by the seat.
  5. Out of scope, and where it went: the two should-fix and the recorded residuals go on the private record and a follow-up order. Skills-docs: the flows docs page is updated in this PR.
  6. Landing: Tier H, by the maintainer (the narrowed leg). The seat does not flip it ready or enqueue it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d2273ab3e702e266a5e37fc36a5851f1903b082a
Reviewed-by: an isolated reviewer session (effort high), delta b1d5a7f..d2273ab over the delta PASS 7232309888
Local-runs: probe — the reviewer built the closure in a throwaway worktree (removed after) to run the suites and a per-change revert ablation: service-automation 299 files / 4433 tests, trigger-record-change 123, spec migrations 203, check-adr-0087-registration exit 0

No must-fix. Two should-fix are owed, both non-blocking and recorded in 7234081837: a pin each for the retry and dry-run seeding, and a stated or widened bound for a non-plain record.

VERDICT: PASS

…level record, so the caller's record is never written

expandDeclaredLookups no longer assigns into the record it is given: it
sets a new top-level record as runContext.record, built from the record's
own enumerable properties and then the grafted relations. A record that is
not a plain object, which the run's copy hands back as it is, now keeps
what the caller handed, and the run still reads the expanded relation.

Pins: a class-instance record with a start node that declares expand; and,
for the two other paths that seed from the resolved run context, a retried
run (every attempt reads the expanded relation) and a dry run.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcW9L8Noz9BxEwjwiov
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract-review-claim: session_017xRBcW9L8Noz9BxEwjwiov · head 26d6b3a · 2026-11-28T10:21Z

The delta round after the should-fix round (d2273ab..26d6b3a), at CONTRACT_REVIEW_TIER, in-seat, by an isolated reviewer.

…on-plain records

The comments above the record copy in resolveRunContext and seedRunVariables
now say that copyHeldValue copies a plain record, that a record which is not a
plain object is not copied (with no lookup graft it is itself the object the
run binds as `record`), and that a self-containing record throws
HeldValueCycleError. Drops the stale "taken before anything below writes onto
it". Comment-only.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xRBcW9L8Noz9BxEwjwiov
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract-review-claim: session_017xRBcW9L8Noz9BxEwjwiov · head 3cceede · 2026-11-28T10:40Z

The delta round after the comment-only round (26d6b3a..3cceede), at CONTRACT_REVIEW_TIER, in-seat, by an isolated reviewer.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3cceede51218db83878b1a5787f890c6485488bb
Reviewed-by: an isolated reviewer session (effort high). Two delta rounds are covered: d2273ab..26d6b3a (the should-fix round) and 26d6b3a..3cceede (comment only).
Local-runs: probe — the reviewer built the closure in throwaway worktrees (removed after) to run the suites and a per-line revert ablation: service-automation 299 files / 4436 tests, typecheck clean, trigger-record-change 123; each new pin is red when its one line is reverted

Closing the open findings of 7234081837 and 7237696365:

  • S1 (should-fix): closed — the retry-attempt and dry-run seeding each have their own pin, and each pin is red when its line is reverted.
  • S2 (should-fix): closed — a declared lookup is grafted into a new top-level record, pinned with a class-instance record. The remaining bound is stated in the PR body, and a write-logging probe on every entry path measured it true.
  • The comment over-claim raised at 26d6b3a: closed at 3cceede. Both rewritten comments match the code.

No must-fix, no should-fix.

Nits only (outside this delta, optional): a few neighbouring comments use the unqualified shorthand "the run's own copy". The null-prototype branch has no pin.

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

维护者速读

  • 用户能看到什么变化:流程变量名不能再用三个保留名字;一次运行里写入的值,不再改到流程的默认值、别的运行或触发它的那条记录。
  • 为什么要你批:这是收窄改动,少数已有流程可能要按升级说明改名,所以合并要你本人审。
  • 复核情况:对抗复核全部通过,所有应修都已补上,没有遗留问题。
  • 要你做什么:审完合并即可(复核通过记录 7238097812,Head-sha 3cceede5)。

席位核对

ACCEPT · head 3cceede51218db83878b1a5787f890c6485488bb · 2026-11-28T11:14Z · on the maintainer's word in this session, verbatim 「xrjw 交审」

  1. Form: draft, Clause-②: no (narrowing), Metadata-protocol: narrowed. The changeset carries FROM / TO / fix. The ADR-0087 marker names both ledger entries.
  2. Premise measured: every order is closed and measured on every entry path, across records 7234081837, 7237696365 and 7238097812. Each new pin is red when its one line is reverted.
  3. Gates: check-runs on this head are 61 success, 9 skipped, 0 failed.
  4. Accepted deviations: the branch was not re-merged with main, per AGENTS.md, because there is no conflict. The seat refreshed the PR body, which now states the non-plain-record bound.
  5. Out of scope, and where it goes: the residuals named on the private record and the optional nits go to a later order. Skills-docs: the flows docs page is updated in this PR.
  6. Landing: Tier H by the maintainer (the narrowed leg). The seat does not flip it ready or enqueue it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3cceede51218db83878b1a5787f890c6485488bb
Reviewed-by: an isolated reviewer session (effort high). Two delta rounds are covered: d2273ab..26d6b3a (the should-fix round) and 26d6b3a..3cceede (comment only).
Local-runs: probe — the reviewer built the closure in throwaway worktrees (removed after) to run the suites and a per-line revert ablation: service-automation 299 files / 4436 tests, typecheck clean, trigger-record-change 123; each new pin is red when its one line is reverted

Closing the open findings of 7234081837 and 7237696365:
S1 (should-fix): closed
the retry-attempt and dry-run seeding each have their own pin, and each pin is red when its line is reverted.
S2 (should-fix): closed
a declared lookup is grafted into a new top-level record, pinned with a class-instance record. The remaining bound is stated in the PR body, and a write-logging probe on every entry path measured it true.
The comment over-claim raised at 26d6b3a is corrected at 3cceede. Both rewritten comments match the code.

No must-fix, no should-fix.

Nits only (outside this delta, optional): a few neighbouring comments use the unqualified shorthand "the run's own copy". The null-prototype branch has no pin.

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3cceede51218db83878b1a5787f890c6485488bb
Reviewed-by: an isolated reviewer session (effort high). Two delta rounds are covered: d2273ab..26d6b3a (the should-fix round) and 26d6b3a..3cceede (comment only).
Local-runs: probe — the reviewer built the closure in throwaway worktrees (removed after) to run the suites and a per-line revert ablation: service-automation 299 files / 4436 tests, typecheck clean, trigger-record-change 123; each new pin is red when its one line is reverted

What closed them. The retry-attempt and dry-run seeding each have their own pin, and each pin is red when its line is reverted. A declared lookup is grafted into a new top-level record, pinned with a class-instance record. The remaining bound is stated in the PR body, and a write-logging probe on every entry path measured it true. The comment over-claim raised at 26d6b3a is corrected at 3cceede, and both rewritten comments match the code.

The open findings of 7234081837 and 7237696365:

  • S1 (should-fix): closed.
  • S2 (should-fix): closed.

No must-fix, no should-fix.

Nits only (outside this delta, optional): a few neighbouring comments use the unqualified shorthand "the run's own copy". The null-prototype branch has no pin.

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3cceede51218db83878b1a5787f890c6485488bb
Reviewed-by: an isolated reviewer session (effort high). Two delta rounds are covered: d2273ab..26d6b3a (the fix round) and 26d6b3a..3cceede (comment only).
Local-runs: probe — the reviewer built the closure in throwaway worktrees (removed after) to run the suites and a per-line revert ablation: service-automation 299 files / 4436 tests, typecheck clean, trigger-record-change 123; each new pin is red when its one line is reverted

What closed them. The retry-attempt and dry-run seeding each have their own pin, and each pin is red when its line is reverted. A declared lookup is grafted into a new top-level record, pinned with a class-instance record. The remaining bound is stated in the PR body, and a write-logging probe on every entry path measured it true. The comment over-claim raised at 26d6b3a is corrected at 3cceede, and both rewritten comments match the code.

The open findings of 7234081837 and 7237696365:

  • S1 (should-fix): closed.
  • S2 (should-fix): closed.

No must-fix, no should-fix.

Nits only (outside this delta, optional): a few neighbouring comments use the unqualified shorthand "the run's own copy". The null-prototype branch has no pin.

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · sunhaolin · session_017xRBcW9L8Noz9BxEwjwiov

Tier H approval request 2026-11-28T11:18Z. This is a narrowing change, so it lands by the maintainer.

  • Review: Contract review PASS 7238454958 at head 3cceede5; no open findings.
  • Seat: ACCEPT 7238419950, whose ## 维护者速读 is at its top.
  • CI: 61 success, 9 skipped, 0 failed.
  • State: the PR stays draft until it is approved and merged.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 28, 2026 11:19
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 46139352903 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (3/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/expression-conformance.test.ts > ADR-0058 D7 — expression surface conformance ledger > is a sound conformance ledger + ratchet (ADR-0060 checkLedger)
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: UNCLASSIFIED surface — add a ledger row (ADR-0060): data/object.zod.ts:ObjectSchemaBase.uiReadonlyWhen: expected [ Array(1) ] to deeply equal []
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 28 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Merged via the queue into main with commit 5d8d69d Nov 28, 2026
76 checks passed
@os-zhuang
os-zhuang deleted the claude/sec1-xrjw-door branch November 28, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants