Skip to content

fix(lint)!: os build refuses a flow or hook condition that orders an injected column a stored row can hold null in, as the publish gate does - #34129

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-al00uu
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-al00uu

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #33435

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no skill under skills/** teaches a condition over an injected column or the null guard on one; content/docs/automation/flows.mdx and content/docs/automation/hooks.mdx gain the rule in this change.

BREAKING for a stack whose record-triggered flow condition or hook condition orders or does arithmetic on an injected system column the object does not declare (owner_id, created_by, updated_by, owning_business_unit_id, queue, organization_id; created_at / updated_at at a beforeInsert hook) with no != null guard: os build now refuses it, as the runtime publish gate already did. ADR-0087: registered flow-hook-condition-injected-column-null-guard-at-build.

维护者速读

  • 改了什么:os build 在 flow 条件和 hook 条件里,对平台注入列(负责人、创建人、修改人、业务单元、队列、组织)做大小比较或算术而没先判空时,现在会报错,和发布时的服务端检查给出同一条结论;beforeInsert 钩子里的创建/修改时间也一样。
  • 为什么改:实测这些列在系统写入、种子数据、访客写入的行上是空的,条件一碰就出错:flow 跑失败(触发它的写入照样落库),hook 条件直接让写入失败。以前本地构建放行、发布才拒,作者在发布时才第一次看到错误。
  • 风险与回滚:只收紧构建期检查,运行时与发布检查不变;四个示例应用和平台对象零命中。回滚即还原 validate-expressions.ts 的这次改动。
  • 先看:packages/lint/src/validate-expressions.ts(buildInjectedNullableIndex / buildPreStampIndex 和 checkNullGuards 的 nullable 选项),packages/lint/src/validate-expressions.flow-null-guards.test.ts 新增的对齐用例。
  • 两分钟验证:pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-expressions.flow-null-guards.test.ts,应见 29 passed,其中 lint: an unguarded condition on owner_id, created_by, updated_by, owning_business_unit_id or queue is accepted though the column can be NULL on a stored row #33435 的用例逐列断言构建与发布检查结论相同。
  • 需要你做的:无,席位落地。

What changes

  • packages/lint/src/validate-expressions.ts: the flow condition sites (start, edge, decision branch; record. and bare spellings) and the hook condition site now judge the null guard over the declared fields plus the injected system columns the object as read does not carry (buildInjectedNullableIndex). At os build that is every injected column the author did not declare; at a single-item runtime door the objects are served with those columns declared, so the index adds nothing there and its verdicts do not move. Two runtime readers hand the walk authored objects and so narrow with the build, inside the declared narrowing: the MCP validate_expression tool at site flow_condition (judgeAuthoredSiteExpression strips the injected columns and runs the walk as a flow write) now returns the null-guard finding for the six columns, and a publish-drafts batch that carries a draft of the flow's or hook's own object (mergePendingDeclarations replaces the served object with the draft body, which holds no injected column) now refuses what it published before, as the single-item publish already refused it. A hook whose events include beforeInsert also judges created_at / updated_at (buildPreStampIndex), the card's S1 case. Validation rules and requiredWhen keep the declared-field index: both doors judge those over the authored object (measured below), so they already agree.
  • The PLATFORM_STAMPED_COLUMNS docblock records the per-column measurement; the orphaned buildNullableFieldIndex docblock (it said leaving the injected columns out "costs coverage, never a false error") moves above its function and says what the index is now.
  • packages/spec/src/migrations/entries/semantic/18.… reason: a beforeInsert hook reads created_at / updated_at as null only when it runs before the stamp (priority below 10); the rule stays the door's (fix(lint): the flow and hook publish doors stop requiring a null guard on the current row's created_at and updated_at in an ordering comparison #33434), a priority-aware rule at both doors is the seat's follow-up.
  • content/docs/automation/flows.mdx (rule 5) and content/docs/automation/hooks.mdx (the condition gate) state that the injected columns need the guard and the two timestamps do not, except at beforeInsert.
  • ADR-0087 semantic entry flow-hook-condition-injected-column-null-guard-at-build; root changeset 33435-injected-column-null-guard-at-build.md (@objectstack/lint and @objectstack/spec minor).

Measurement (card step 1)

Per column, per ownership tier, per writer (showcase, real REST door + engine, driver-sqlite-wasm, single posture)

Throwaway probe (deleted): the showcase stack plus three objects, one per ownership tier (default/user, business_unit, org), a REST POST /data/OBJECT as the platform admin and as a signed-up member, then ql.insert under { isSystem: true } with and without tenantId, a system update and an admin REST update of each system row; hooks registered at priority 1 recorded what each event saw; three record-after-create flows on the user-tier object.

column REST create (admin, member) system insert after a user REST update of a system row seeded showcase_task
organization_id set set (Default Organization) set set
owner_id (user tier) stamped to the caller NULL NULL claimed by the admin
queue (user tier) NULL NULL NULL NULL
owning_business_unit_id (user, business_unit tiers) NULL NULL NULL NULL
created_by stamped NULL NULL NULL
updated_by stamped NULL (a system update leaves it NULL) stamped NULL
created_at, updated_at set set set set
  • A beforeInsert hook at priority 1 saw a payload with no organization_id, created_at, updated_at, created_by for every writer (REST and system); afterInsert saw them stamped. organization_id is filled by the driver after the hook chain.
  • Reach: system inserts fire record-triggered flows and every hook. record.owner_id > 'a' and record.created_by > 'a' start conditions: each system insert's run failed with condition failed to evaluate as CEL: no such overload: dyn<null> > string; the REST create's run completed; the guarded record.owner_id != null && record.owner_id > 'a' flow never failed.
  • posture-only (isolated) boot: a system-context insert with no organization is refused (SystemWriteOrganizationRequiredError, ADR-0131 D9), so no NULL row there.
  • By design, not re-measured: a guest/public-form write leaves owner_id unset (ADR-0138 D1 item 5), a queue park or release writes owner_id: null (ADR-0142 D3, content/docs/automation/queues-and-assignment-rules.mdx), and driver-memory never stamps a tenant column (packages/drivers/driver-memory/src/memory-tenancy-guard.ts header).

Decision (card step 2): no column is stamped for some ownership tiers only, so no STOP. owner_id, created_by, updated_by, owning_business_unit_id, queue hold NULL on reachable stored rows ⇒ nullable at both. organization_id is set on every stored row on the SQL family but read NULL at beforeInsert and never stamped by driver-memory ⇒ not every reachable row, so it stays nullable at the door and is now nullable at the build (the door already judged it so). created_at / updated_at stay never-null except at a beforeInsert hook (S1).

Gate-level reading before/after (lint functions, same object, every tier): base f81e4b6c — flow/hook sites door=1 build=0 for each of the six columns, beforeInsert hook on created_at/updated_at door=1 build=0, validation rule door=0 build=0; head — build equals door in every cell.

First-party exposure (card step 3)

objectstack build at head in examples/app-todo, app-crm, app-multi-package, app-showcase: exit 0 each, zero null-guard findings. Positive control: examples/app-todo's todo_task_completion start condition with && record.created_by > "a" appended (via scripts/ablation-replace.mjs, restored, git diff HEAD empty) ⇒ exit 1 with applies \>` to `record.created_by`. Platform packages: git grep finds no flow or hook condition ordering an injected column (examples/app-showcase/src/ui/actions/predicate-matrix.action.tsusesowner_id ==in an actionvisible`, not a judged site). No hit to guard.

Tests

  • packages/lint/src/validate-expressions.flow-null-guards.test.ts: the A flow or hook condition ordering record.created_at with no guard is refused at the publish door while os build accepts it #33246 describe is renamed to cover both cards and gains seven cases: os build refuses each of the six columns at every flow slot and at a hook with the door's exact finding; a flow's bare spelling (judged as a declared nullable field's, the door judges no bare name of either kind); per ownership tier the build judges exactly the columns the tier carries; the S1 beforeInsert case and its afterInsert/flow controls; the guarded spelling; an author-declared owner_id keeps its own verdict; a validation rule keeps its verdict at both.
  • packages/lint/src/authored-site-expression.test.ts: the MCP flow_condition entry over a served object returns the gate's null-guard finding for record.owner_id > 'a', and nothing for the guarded spelling.
  • packages/metadata-protocol/src/runtime-authoring-gate.injected-column-null-guard.test.ts (new): evaluateRuntimeAuthoringGate with the object's draft in pending.objects refuses a flow over owner_id and a beforeInsert hook over created_at exactly as the single-item publish does; the guarded spelling publishes. Ablation: with base validate-expressions.ts (lint rebuilt) both batch cases and the MCP case fail; restored, they pass.
  • Forced test edit: packages/lint/src/validate-expressions.test.ts — the validate-expressions / validate-security-posture 也有同形的 spec 不声明键的 ?? 别名读法(#5009 建议 3 的核对结果) #5017 declared-keys meta-test's PLUMBING table gains the five new non-metadata receivers (flowHookNullableIndex, preStampIndex, carriedFieldNames, joinedNullable, joinedFields).

Acceptance notes

  • Out of scope, named for the seat: a hop leaf through an injected lookup (record.owner_id.nmae != null) is judged at neither the build nor the door.
  • Residual build/door difference left on purpose (the order scoped created_at / updated_at to the S1 case): the door also refuses, and the build accepts, arithmetic on record.created_at in a flow, a previous.created_at read, a read-event hook (beforeFind / afterFind) on the two timestamps, and every timestamp read on an external object.
  • Validation rules and requiredWhen over an injected column are judged at neither door (the object door judges the authored object); a stored row with NULL there faults the rule. Same class, not this card's sites.
  • The null-guard message names the object as declaring the column nullable ("'todo_task' declares as nullable (no required: true, no defaultValue)") for an injected column the author never declared; it is the door's existing wording, kept identical for parity.

Verification

All readings at head f1e07bac (the final commit), worktree on origin/main f81e4b6c.

Tests, consumers, dogfood, gates
  • pnpm --filter @objectstack/lint test: Test Files 212 passed (212), Tests 9033 passed (9033); pnpm --filter @objectstack/lint typecheck: exit 0 (lock VERDICT command-exit 0).
  • Consumers of the build verdict (the contract face is os build / os validate; the single-item door's verdicts do not move; the MCP flow_condition entry and publish-drafts batches move as "What changes" says): pnpm --filter @objectstack/cli exec vitest run --project unit 423/423 files, 6010/6010 tests; @objectstack/metadata-protocol 342 passed, 9 skipped files, 22926 passed, 45 skipped tests; @objectstack/mcp 65/65 files, 1185/1185; @objectstack/platform-objects 122/122 files, 2007/2007. All exit 0.
  • Full dogfood battery ((narrowing) arm), pnpm --filter @objectstack/dogfood test under the verify lock: VERDICT command-exit 0, Test Files 467 passed, 3 skipped (470), Tests 3962 passed, 42 skipped (4004).
  • objectstack build in the four examples: exit 0 each; positive control exit 1 (see First-party exposure).
  • node scripts/pm/dispatch-gates.mjs --commands (no paths): 109 commands, each run with stdin closed and the exit captured before any pipe; --ran: 109 derived, 108 run, 1 NOT-MEASURED, 0 UNRUN. NOT MEASURED: pnpm check:dual-build-cjs-loads, reason: exit 3 PREREQUISITE NOT MET (not every package has a dist/), CI runs it. Three first-pass exit 3 refusals re-run green after their prerequisite: check-plugin-teardown-shape.mjs --self-test (shallow clone; git fetch --depth=1 origin 621a4876, 48 cases), check:skill-examples (built @objectstack/client-react...; 346 prose examples), check:type-check-debt (lock wait behind the dogfood run; re-run with a slot, OK).

Generated by Claude Code

…ed row can hold null in at os build, as the door does

Claude-Session: https://claude.ai/code/session_01ADHkmS2qjQvEgMBSBQpeea
Co-authored-by: Claude <noreply@anthropic.com>
…ured stamping; docs, ADR-0087 entry and changeset

Claude-Session: https://claude.ai/code/session_01ADHkmS2qjQvEgMBSBQpeea
Co-authored-by: Claude <noreply@anthropic.com>
…ed-keys meta-test

Claude-Session: https://claude.ai/code/session_01ADHkmS2qjQvEgMBSBQpeea
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/lint, @objectstack/spec, touching 9 documentable anchor(s).

21 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 2539ad9860a3e43323fcf35ac80ffee47c8dec3e.

⛔ 3 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 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; 123 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 — 173 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 2539ad9860a3e43323fcf35ac80ffee47c8dec3e → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9289119221ae3239f0d85e941727e0eefca32b3b — the merge of head 80b1edc6b4fffc19889c78faa4e86d754906c97e into base 2539ad9860a3e43323fcf35ac80ffee47c8dec3e, 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 9289119221ae3239f0d85e941727e0eefca32b3b && git checkout 9289119221ae3239f0d85e941727e0eefca32b3b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2539ad9860a3e43323fcf35ac80ffee47c8dec3e 80b1edc6b4fffc19889c78faa4e86d754906c97e && git checkout -B drift-repro 2539ad9860a3e43323fcf35ac80ffee47c8dec3e && git merge --no-ff 80b1edc6b4fffc19889c78faa4e86d754906c97e

node scripts/docs-audit/affected-docs.mjs --json 2539ad9860a3e43323fcf35ac80ffee47c8dec3e

⚠️ 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 2539ad9860a3e43323fcf35ac80ffee47c8dec3e → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract-review-claim: session_01ADHkmQjrEpxMVxEiDUJHqC · head f1e07ba · 2026-11-15T20:38Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f1e07bac7fcd02daf943ced0017058ef292bb3e3
Local-runs: none
Scope: packages/lint/src/validate-expressions.ts, packages/spec/src/migrations/entries/semantic/18.flow-hook-condition-injected-column-null-guard-at-build.ts, packages/lint/src/validate-expressions.flow-null-guards.test.ts, packages/lint/src/validate-expressions.test.ts + none in the diff. Read, never reviewed: packages/spec/src/data/injected-system-column-provenance.ts, packages/lint/src/authored-site-expression.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/protocol-publish-batch.ts, packages/objectql/src/plugin.ts, packages/objectql/src/hook-wrappers.ts, packages/objectql/src/engine-hooks-and-functions.ts, packages/objectql/src/engine-insert.ts, packages/spec/src/data/hook.zod.ts, packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts, packages/drivers/driver-memory/src/memory-tenancy-guard.ts. The changeset and content/docs/automation/{flows,hooks}.mdx are prose faces, the lane seat's ACCEPT at TIER_DEFAULT; the changeset is read here for ② only.

Inputs: card #33435 body and all six comments (claims 6899727412 and 6899772976, scope additions 6884889456, os-dev-report 6900991227, seat ruling 6901005939), the PR body and seven-file list, the net diff f81e4b6c..f1e07bac, and the head's check-runs.

Check-runs on the head at review time (65 runs): 25 success, 10 skipped, 0 failed, 30 still in progress. In progress: Test Core (1/8) through (8/8), Build Core, Type Check · workspace, Type Check · consumer gates, Type Check UI, Build & E2E UI, Live E2E UI, Test UI (1/16) through (16/16). This verdict does not stand in for any of them. Test Core (7/8) had not concluded, so the known run-date.test.ts timeout (#34081) is neither seen nor ruled out here; if it ends red, the seat reads its log before it treats the red as that timeout. Completed green and relevant: Check Changeset, Spec property liveness, Governed Surface Queue Guard, Lint · CI, release & engine gates, Lint · PM dispatch-gates, Type Check · source gates, Dogfood Regression Gate, Build Docs, PR-body guards.

① Derived judgments

Accept-set changes, read off the tree. All are narrowings; nothing widens.

  1. os build / os validate, record-triggered flow (start condition, edge condition, decision branch expression), record.COLUMN or previous.COLUMN under an ordering or arithmetic operator with no != null guard, COLUMN one of owner_id, created_by, updated_by, owning_business_unit_id, queue, organization_id, where the object as read does not carry COLUMN as a field: accepted before, refused now. Every record trigger (create, update, delete) is covered; the gate keys on triggerKind === 'record_change' alone.
  2. The same flow slots, the BARE spelling (owner_id > 'a') where the flow's root scope is provable and no variable, screen field or engine name shadows it: accepted before, refused now.
  3. os build / os validate, hook condition, any event list, the same six columns: accepted before, refused now.
  4. os build / os validate, hook condition whose events include beforeInsert (alone or mixed with other events), created_at / updated_at under ordering or arithmetic, where the object does not carry them: accepted before, refused now.
  5. NOT named by the PR (S1): judgeAuthoredSiteExpression, site flow_condition (the MCP validate_expression tool). It strips the injected columns and runs the walk with runtimeWriteType: 'flow', so the objects it judges are authored ones and change 1 applies there: it answered clean before and returns the null-guard finding now. That is the answer the publish gate gives, which the tool promises.
  6. NOT named by the PR (S1): the runtime publish gate on a publish-drafts batch that holds a draft of the flow's or hook's own object. mergePendingDeclarations replaces the served object with the draft body, which is stored without the injected columns, so the gate judged that flow or hook over an authored object. Changes 1, 3 and 4 apply there: accepted before, refused now.

Nothing outside the six columns plus the two timestamps is newly refused. The added set is injectedSystemColumnDefs(obj) minus the fields the object carries. That function returns organization_id, the four audit columns, owner_id, owning_business_unit_id and queue, each gated by resolveInjectedSystemColumns, so a tier or an opt-out (systemFields: false, ownership: 'none', tenancy.enabled: false) that does not inject a column adds no verdict on it. created_at / updated_at are split off by PLATFORM_STAMPED_COLUMNS and reach the gate only through beforeStamp. Validation rules, requiredWhen, formulas, sharing rules and the object, view, page and object_extension doors keep nullableIndex (the default of the new nullable option; flows and hooks read an empty list under those write types).

An object that DECLARES one of the columns is treated as the author declared it. injectedColumnsNotCarried leaves out every name in fieldEntries(obj), so the column stays in buildNullableFieldIndex under its own keys: required: true or a defaultValue is non-null (pinned by the author-declared owner_id CONTROL), and a declared column with neither is nullable and refused, as it was at base. A field two packages tie on is carried and gets no verdict, as before.

② Semver level

  • Changeset: @objectstack/lint minor, @objectstack/spec minor, title fix(lint)!. Check Changeset is green. The lint level matches a build-time narrowing under this repo's no-major policy with an ADR-0087 entry; the spec level matches the added migration entry. @objectstack/mcp and @objectstack/metadata-protocol change no code and need no entry.
  • Clause-②: no (narrowing): correct. Every change in ① refuses more; none accepts more.
  • Metadata-protocol: narrowed: correct, and for more than the PR says. Changes 5 and 6 narrow runtime readers, which is what the line declares.
  • ADR-0087 entry: id flow-hook-condition-injected-column-null-guard-at-build matches the changeset marker and is unique in the tree; file prefix 18. matches the spec major (18.5.0); class SemanticMigration with no conversion is right, since whether a null row passes or fails the condition is the author's call. surface names the three flow slots, the hook condition, the six columns and the two timestamps at beforeInsert, which is the diff. The reason overstates one point (S2).
  • First-party exposure: the claim is zero hits. A git grep at the head for an ordering or arithmetic operator after any of the six columns in examples/ and package sources finds only the entry's own replacement text. Consistent with the claim; Dogfood Regression Gate is green.
  • The changeset's last paragraph says Unchanged: the publish gate's verdicts. The tree moves them in the batch case of change 6 (S1).

③ Boundary flags

  • Deviation, gh api reads early in the run: reads only. Answered, no action.
  • Deviation, the validate-expressions / validate-security-posture 也有同形的 spec 不声明键的 ?? 别名读法(#5009 建议 3 的核对结果) #5017 meta-test PLUMBING list gained flowHookNullableIndex, preStampIndex, carried, joined, into: forced, since the receiver scan flags any local whose members are read. All five hold Maps or Sets and read no metadata key; the injected columns are read through injectedSystemColumnDefs over the tabled obj. Answered. The three generic names are a nit (N2).
  • Deviation, PR body final as created: answered, no action.
  • Open question (organization_id exempt at the door, or nullable at both): answered by seat ruling 6901005939, nullable at both. The tree agrees: resolveSystemInsertOrganization and the driver's tenant stamp run after the beforeInsert chain, and driver-memory stamps no tenant column.
  • Out-of-scope, hop leaf through an injected lookup (record.owner_id.nmae): judged at neither door; carried by the ruling, the seat files it.
  • Out-of-scope, validation rule and requiredWhen over an injected column: judged at neither door, pinned by the CONTROL case; carried by the ruling.
  • Out-of-scope, created_at / updated_at residue (flow arithmetic, previous.created_at, beforeFind / afterFind hooks, external objects: the door refuses, the build accepts): carried by the ruling.
  • Out-of-scope, the message says the object "declares as nullable" a column the author never declared: the door's wording, kept for parity. Noted, not filed (N3).
  • Escalated by this review, not in the dev report: the two runtime readers of S1, and the priority question of S2.

④ Design judgment

packages/lint/src/validate-expressions.ts

Agreement with the door, column by column. For the six columns under record. and previous., the build now gives the door's verdict at every flow slot and at every hook: the door serves each as a required: false field with no default, and the build adds exactly those names for the objects that do not carry them. The guard logic is the unchanged findUnguardedNullableOperands, so != null in the same branch and && short-circuit pass, has() does not, and a start-condition guard carries to edges and branches, as for a declared nullable field. For the two timestamps at a hook whose events include beforeInsert, the build equals the door: there the door's hookReadsStampedRow is false, so it keeps every finding, and the build's preStampIndex adds both names with no stamped exemption. afterInsert, beforeUpdate, afterUpdate and the delete events add nothing at the build and the door drops the ordering finding, so they agree on ordering. A mixed list (beforeInsert with beforeUpdate) is judged pre-stamp at both. A flow on update reads the stored row, which can hold null in each of the six, so judging create and update alike is right.

Where the build is still looser than the door: the timestamp residue listed in ③, and a hook or flow on an object the stack does not declare. Where it is stricter: the bare spelling in a flow (N1). Neither is new in kind.

Producers in the live tree against the measured facts. sys_stamp_audit_insert (beforeInsert, priority 10) writes created_at and updated_at on every insert and writes created_by / updated_by only inside if (session?.userId), so a system insert leaves the two user columns empty. The security middleware stamps an empty owner_id to the acting user and has none on a system write. OWNING_BUSINESS_UNIT_FIELD_DEF says nothing stamps that column yet. organization_id is resolved after the hook chain. The hook condition's record is made total over the declared fields, so an unstamped column reads null and the comparison faults. The docblock's per-column account matches.

S1 (should-fix) — The PR body, the changeset (Unchanged: the publish gate's verdicts) and the comment above flowHookNullableIndex say no runtime verdict moves. Two do, both read in the code and not run. (a) judgeAuthoredSiteExpression at site flow_condition hands stripped objects under runtimeWriteType: 'flow', so MCP validate_expression now returns the null-guard finding for the six columns. (b) A publish-drafts batch carrying a draft of the flow's or hook's object judges over the draft body, which carries no injected column, so the gate now refuses there what it accepted at base (the six columns, and the timestamps at beforeInsert). Both move to the card's rule and are inside the declared narrowing, so the level stands. Fix: name both under "What moves" in the changeset and drop the "unchanged" claim for the batch case; pin one case each (a flow_condition probe on record.owner_id > 'a', and a gate call with the object in pending.objects). The same comment names the extension door, which walks no flow and no hook; say the pending-draft door instead.

S2 (should-fix) — The beforeInsert timestamp rule refuses a hook that cannot meet null. Hooks sort ascending by priority, the stamp sits at 10, and HookSchema.priority defaults to 100, so a beforeInsert hook at the default priority, or any priority above 10, runs after the stamp and reads both timestamps set. Only a hook authored below 10 reads null. hook.priority is in hand at the lint. The rule equals the door's (#33434), and build-door agreement is what the card asks, so it is not changed here on one side. Two things are owed. In this PR, the entry's reason says a beforeInsert hook reads organization_id, created_at and updated_at as null "because they are stamped after it"; for the two timestamps that holds only below priority 10, so say "can read … when it runs before the stamp (priority below 10)", as the hookRunsBeforeStamp docblock already does. After merge, the seat files a card to make the rule priority-aware at both doors together. For afterInsert and beforeUpdate the rule is right: the row is stamped or is the prior stored row.

Nits.

  • N1 — a flow's bare owner_id > 'a' is refused at the build and judged by no door, so the dev report's "build equals door in every cell" holds for the record. spelling only. The build treats a declared nullable field the same way, and the new test pins both legs. No change asked.
  • N2 — carried, joined and into are excused file-wide by name in PLUMBING; a later local of the same name holding a metadata record would be excused too. More distinctive names would keep the meta-test's reach.
  • N3 — the null-guard message says the object "declares as nullable" a column the author did not declare. Door parity; a wording card if the seat wants one.

packages/spec/src/migrations/entries/semantic/18.flow-hook-condition-injected-column-null-guard-at-build.ts: holds against the diff apart from the S2 wording. The replacement and acceptance criteria are executable as written.

packages/lint/src/validate-expressions.flow-null-guards.test.ts: the seven cases assert atBuild equal to atDoor per column, per slot, per ownership tier (including a tier that does not carry a column), the mixed event list, the guarded spelling, the author-declared column and the validation-rule control. They do not cover the two readers of S1.

packages/lint/src/validate-expressions.test.ts: the PLUMBING edit is forced and correct (③); N2.

No must-fix.

Implemented-by: claude/project-thread-al00uu
Reviewed-by: fable subagent of session_01ADHkmQjrEpxMVxEiDUJHqC

VERDICT: PASS

…nd scope the beforeInsert timestamp reason to hooks before the stamp (#33435)

The MCP validate_expression tool at a flow condition and a publish-drafts
batch carrying a draft of the flow's or hook's own object both judge the
object as authored, so they now refuse the same unguarded ordering over an
injected column the build does. The changeset and the ADR-0087 entry name
both, and each gets a pin. The entry's reason, the changeset and the hooks
page say a beforeInsert hook reads created_at / updated_at as null only when
it runs before the stamp (priority below 10). The join's locals get names
the #5017 meta-test cannot excuse elsewhere by accident.

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

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract-review-claim: session_01ADHkmQjrEpxMVxEiDUJHqC · head 34790af · 2026-11-15T21:32Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 34790afb6b27a6a8dfe72a17498aca320888e255
Local-runs: none
Scope: packages/lint/src/validate-expressions.ts, packages/spec/src/migrations/entries/semantic/18.flow-hook-condition-injected-column-null-guard-at-build.ts, packages/lint/src/validate-expressions.test.ts, packages/lint/src/authored-site-expression.test.ts, packages/metadata-protocol/src/runtime-authoring-gate.injected-column-null-guard.test.ts, packages/lint/src/validate-expressions.flow-null-guards.test.ts (unchanged since round 1) + none in the diff. Read, never reviewed: packages/lint/src/authored-site-expression.ts, packages/metadata-protocol/src/runtime-authoring-gate.ts, and the round-1 list. The changeset and content/docs/automation/{flows,hooks}.mdx are prose faces, the lane seat's ACCEPT at TIER_DEFAULT; the changeset is read for ② only.

VERDICT: PASS — delta review of f1e07bac..34790afb (one commit, 7 files, +108 −19). It closes round 1's S1 and S2 (record 6901107947). No must-fix, no should-fix.

Not run locally. The brief for this round asked for the two pin files and the ablation to be re-run; the container holds no installed dependencies, and a run needs a checkout, an install and a build, which the review's read-only shape rules out. The pins are judged by reading them and by the head's check-runs. The ablation is the author's reading, not mine.

Check-runs on this head (72 runs): 57 success, 12 skipped, 2 failure, 1 in progress at first read (Check Changeset, since completed success). The two failures are Test Core (7/8) and its roll-up Test Core. The shard's log shows one failed test file in the whole job: @objectstack/scenarios test/runner/run-date.test.ts, three cases, Test timed out in 5000ms; turbo reports Failed: @objectstack/scenarios#test and nothing else. That is the main-wide timeout of #34081, not this PR. Test Core (1/8)–(6/8) and (8/8) are green, so the lint and metadata-protocol suites, the new pins included, passed in CI.

① Derived judgments

The accept set is what round 1 recorded: validate-expressions.ts changes three local names and one comment, no logic. The six changes listed in round 1 ① stand, and nothing else is newly refused. An object that declares one of the columns keeps the author's verdict.

The two readers round 1 found unnamed are now named in the changeset's "What moves": MCP validate_expression at site flow_condition (clean answer to the gate's null-guard finding), and a publish-drafts batch carrying a draft of the flow's or hook's own object (published to refused). "Unchanged" is narrowed to the single-item publish gate and a batch that carries no such draft. Both statements match the tree.

② Semver level

Unchanged and still correct: @objectstack/lint minor, @objectstack/spec minor, Clause-②: no (narrowing), Metadata-protocol: narrowed. Check Changeset is green on this head. The ADR-0087 entry keeps its id, class and surface; its reason now names both runtime readers and scopes the timestamp claim to a hook that runs before the stamp. The new metadata-protocol file is a test and needs no changeset entry.

③ Boundary flags

  • S1 (round 1): closed. See ④.
  • S2 (round 1): closed for this PR. The priority-aware rule at both doors stays a seat follow-up card after merge, as round 1 asked; the PR body says so.
  • N2 (round 1): taken. carried, joined, into are now carriedFieldNames, joinedNullable, joinedFields, and the PLUMBING list names the new spellings.
  • N1 and N3 (round 1): left as accepted deviations. Agreed; neither affects correctness.
  • Seat ruling 6901005939 and the three carried out-of-scope items are unaffected by this delta.

④ Design judgment

packages/lint/src/validate-expressions.ts: renames and a comment only. The comment above flowHookNullableIndex no longer names the extension door; it names judgeAuthoredSiteExpression and the pending-draft door, which is what the code does. hookRunsBeforeStamp and both indexes are byte-identical in behaviour to round 1.

packages/lint/src/authored-site-expression.test.ts: the new case hands the entry a served object, asserts one finding naming record.owner_id, asserts it equals the runtime gate's finding over the same served object, and asserts the guarded spelling is clean. At base the entry strips the columns and returns nothing, so the length assertion fails there. It pins S1 (a).

packages/metadata-protocol/src/runtime-authoring-gate.injected-column-null-guard.test.ts: three cases through evaluateRuntimeAuthoringGate. A flow start condition on owner_id and a beforeInsert hook condition on created_at are each refused over the served object, and refused identically with the authored object in pending.objects; the guarded flow publishes with the draft in the batch. At base the pending-draft leg returns nothing, so the equality fails there. It pins S1 (b), and the timestamp leg of it.

packages/spec/src/migrations/entries/semantic/18.…: the reason now says a beforeInsert hook reads organization_id as null because it is resolved after the hook chain, and can read the two timestamps as null when it runs before the stamp (priority below 10). That matches sys_stamp_audit_insert at priority 10, ascending sort and the default of 100. S2's wording is fixed; the rule is the door's, unchanged, as agreed.

packages/lint/src/validate-expressions.test.ts: the PLUMBING entry follows the rename.

S1 — closed. S2 — closed.

Nit.

  • N4 — the PR body's Verification block still carries one sentence from round 1, "the door's verdicts do not move", beside the consumer test counts. The body's "What changes" section and the changeset say the opposite, correctly. Prose only.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-al00uu
Reviewed-by: fable subagent of session_01ADHkmQjrEpxMVxEiDUJHqC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer-limited fable quota, 2026-11-15T23:29Z) · head 80b1edc

Merge-of-main review: origin/main ea6de74 merged into the reviewed head 34790af (r2 PASS 6901750290) under the K ≥ 15 landing rule. Per the card thread: no conflicts, no regen paths touched, the three-dot PR diff is byte-identical to 34790af (9 files, +413 −25, the same blob hashes), and the 111 derived gates all exit 0 (/mnt/project-files/spec-seat2/33435-gates-ran-r3.txt).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 80b1edc · 2026-11-15T23:30Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 80b1edc6b4fffc19889c78faa4e86d754906c97e
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.flow-hook-condition-injected-column-null-guard-at-build.ts, packages/lint/src/validate-expressions.ts, packages/lint/src/validate-expressions.flow-null-guards.test.ts, packages/lint/src/validate-expressions.test.ts, packages/lint/src/authored-site-expression.test.ts, packages/metadata-protocol/src/runtime-authoring-gate.injected-column-null-guard.test.ts + none further in the diff. Read in the cited code, never reviewed: packages/spec/src/data/injected-system-column-provenance.ts, packages/spec/src/data/injected-system-columns.ts, and, for what main moved, packages/services/service-automation/src/dag-traversal.ts, packages/services/service-automation/src/engine.ts, packages/objectql/src/engine-insert.ts, packages/objectql/src/registry.ts, packages/plugins/plugin-security/src/security-plugin.ts, packages/metadata-protocol/src/protocol-meta-item-reads.ts, skills/objectstack-automation/SKILL.md. The changeset and content/docs/automation/{flows,hooks}.mdx are prose faces, read for ② and for the claims they make; one note on them is N5.

Read at 2026-11-16T00:03Z. Merge delta review of this head against PASS 6901750290 at 34790af; claim: comment 6903210404; lane request 6903202361 on mailbox #33873. Independence: implemented in an os-steve project thread, dispatched by domain:spec#2 (os-steve); reviewed by os-tesla.

Inputs: card #33435 body and its seven comments, the PR body and nine-path file list, the PR thread (records 6901107947 and 6901750290, hand-off 6903197702), git diff and git grep at 80b1edc6, 34790afb, ea6de745 and f81e4b6c, and this head's check-runs. Nothing was built or run.

① Derived judgments

Net-change equivalence, measured and not taken from the lane.

  • 80b1edc6 has two parents, 34790afb (the head of PASS 6901750290) and ea6de745 (main). The merge base of the old head and main at that time is f81e4b6c; the merge base of this head and main is ea6de745.
  • git diff f81e4b6c 34790afb and git diff ea6de745 80b1edc6 are byte-identical as whole patches (one sha256 for both). Per path, all nine paths carry the same patch hash on both sides and the same blob id at 34790afb and at 80b1edc6. Nine paths, 413 added, 25 removed, on both sides; the PR API reads the same numbers.
  • git diff f81e4b6c ea6de745 (28 commits, 141 paths) touches none of the nine paths. So the merge resolved nothing on the PR's surface and no merge-only edit hides in the head.

The accept set is therefore what records 6901107947 and 6901750290 derived, and I re-derived it from the tree at this head. All narrowings, nothing widens:

  1. os build and os validate, a record-triggered flow's start condition, edge condition and decision branch expression: an ordering or arithmetic operator over record.COLUMN or previous.COLUMN with no != null guard, COLUMN one of owner_id, created_by, updated_by, owning_business_unit_id, queue, organization_id, where the object as read does not carry the column: accepted before, refused now.
  2. The same slots in the bare spelling, where the flow's bound set is provable and no variable, screen field or engine name holds the name: accepted before, refused now.
  3. A hook condition on any event list, the same six columns: accepted before, refused now.
  4. A hook condition whose events include beforeInsert, created_at and updated_at as well: accepted before, refused now.
  5. Two runtime readers that hand the walk authored objects narrow with the build: the MCP validate_expression tool at site flow_condition, and a publish-drafts batch carrying a draft of the flow's or hook's own object. Both are named in the changeset and the entry.

Unchanged, read in the code: the default of the new nullable option is the declared-field index, so validation rules, requiredWhen, sharing rules and every other null-guard site keep their verdicts; a column the object itself declares is left out of the added set (injectedColumnsNotCarried) and keeps the verdict its own keys give; an object whose plan injects no such column (systemFields: false, the ownership tiers, tenancy.enabled: false) gets no verdict on it, because the added set is exactly injectedSystemColumnDefs of that object.

What main brought in, judged against the PR's claims:

  • packages/lint/**, packages/spec/**, packages/mcp/**, packages/cli/**, packages/platform-objects/**, examples/** and content/docs/automation/**: no change between the two merge bases. buildNullableFieldIndex, its neighbours, the injected-column plan, judgeAuthoredSiteExpression, the semantic entries directory and both docs pages are as they were when the PR was reviewed.
  • Migration registry: no entry was added or renamed on main; the id flow-hook-condition-injected-column-null-guard-at-build occurs twice in the tree, in the entry and in the changeset marker. The one breaking changeset main added (33264-bare-doc-read-refusal.md) declares no migration entry.
  • Flow runtime: main now re-evaluates a start condition on every retry attempt (startConditionHolds, shared by execute and executeWithoutRetry). The PR's sentence "the flow run fails at the condition while the write that fired it lands" holds on this tree for every error strategy; before that change a retried run could pass the faulting condition on a later attempt. The change supports the PR's reason and contradicts nothing in it.
  • packages/objectql/src/engine-insert.ts, engine-update.ts, engine-validate.ts: a currency-code argument only. The stamp order the PR relies on (the audit stamp at priority 10 on beforeInsert, the organization resolved after the hook chain) is untouched.
  • packages/objectql/src/registry.ts and packages/metadata-protocol/src/protocol-meta-item-reads.ts: the bare doc read only. mergePendingDeclarations and the publish gate are untouched.
  • packages/plugins/plugin-security/src/security-plugin.ts: a docblock about a read filter. The owner stamp is untouched.
  • skills/objectstack-automation/SKILL.md and its evals: the retried-callout rule and wording trims. No skill at this head teaches an ordering over an injected column or a null guard on one, so Skills-docs: none still holds.
  • First-party exposure on the merged tree: a git grep for an ordering or arithmetic operator after any of the six columns in examples/, skills/, package sources and content/docs finds only the PR's own guarded example in hooks.mdx. Zero hits stands.

② Semver level

  • Changeset 33435-injected-column-null-guard-at-build.md: @objectstack/lint minor, @objectstack/spec minor, fix(lint)!, Clause-②: no (narrowing), Metadata-protocol: narrowed. Correct at this head for the same reasons as at 34790afb: every change in ① refuses more, none accepts more, and two of them narrow runtime readers, which is what the metadata-protocol line declares. main moved neither package's surface under the PR.
  • ADR-0087: the entry is a SemanticMigration with no conversion, which is right because whether a null row passes or fails is the author's decision. Its surface names the three flow slots, the hook condition, the six columns and the two timestamps at beforeInsert; that is the diff.
  • CI on this head, 45 check-runs at read time: 15 success, 9 skipped, 0 failed, 21 in progress. Green: Check Changeset, Governed Surface Queue Guard, Spec property liveness, Dogfood Regression Gate, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Type Check · source gates, Check Documentation Links, PR-body guards, Check PR Size, and the shard planners. Still running: Test Core (1/8) to (8/8), Build Core, Build Docs, Build UI Deps, Live E2E UI, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Lint · ESLint, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · repo & tooling gates, and the two scoped lint jobs.
  • CI completed before posting: 68 check-runs, 58 success, 10 skipped, 0 failed, none in progress.
  • ⚠️ This is a PASS given while checks run. It does not stand in for any of them. The lint and metadata-protocol suites that hold the PR's pins run in Test Core, which has not concluded on this head; the seat waits for the required checks to end green before it lands, and reads the log of any red shard before it calls it unrelated.

③ Boundary flags

  • Prior findings, by id, checked in the tree at this head. S1 (record 6901107947): closed; the changeset's "What moves" and the entry's reason name both runtime readers, each has a pin, and the comment above flowHookNullableIndex names the pending-draft door. S2: closed for this PR; the entry's reason, the changeset and hooks.mdx scope the timestamp claim to a hook that runs before the stamp (priority below 10). The priority-aware rule at both doors stays the seat's follow-up card. N2: taken (carriedFieldNames, joinedNullable, joinedFields). N1 and N3: accepted deviations, unchanged. N4 (record 6901750290): closed; the PR body's Verification block now says the single-item door does not move and the two readers do.
  • Seat ruling 6901005939 (organization_id nullable at both doors) and the three carried out-of-scope items (hop leaf through an injected lookup; validation rules and requiredWhen over an injected column; the created_at residue) are untouched by the merge. The seat still owes those cards after landing.
  • Dev open questions: none open; the one in report 6900991227 is answered by the ruling above.
  • SQL push-down check (Prime Directive 5): the diff adds no query, no id materialisation and no in-app join. It builds in-memory name sets over the stack's object definitions at lint time. No finding.
  • The record template on main moved between the two bases (scripts/pm/record-recognisers.mjs); this record follows the shape main prints at ea6de745, which adds the push-down line above and requires no further line for this diff.
  • Rule layer only: the diff touches no auth, permission or security rule surface; there is nothing to route to the private notes.

④ Design judgment

Independent reading, since both earlier records were rendered inside the implementing lane.

packages/lint/src/validate-expressions.ts: the narrowing makes an existing refusal real earlier. The publish gate already refused these conditions over the served object; the build accepted them only because it reads objects as authored. The added index is derived from the same plan the registry injects from (injectedSystemColumnDefs), minus the names the object carries, so the build cannot name a column the plan would not inject and cannot override a column the author declared. The guard walker is unchanged, so the accepted spelling is the one the gate accepts. The two timestamps reach the gate only through beforeStamp, read off events containing beforeInsert, which matches the gate's own exemption list (a hook keeps the stamped-column exemption only when every event reads a stamped row). I found no path where the build now refuses a condition the gate accepts over the same object, other than the bare flow spelling already recorded as N1, which the build also applies to a declared nullable field.

packages/spec/src/migrations/entries/semantic/18.…: surface, replacement, reason and acceptanceCriteria agree with the code and with the measurement on the card. On this merged tree the reason's run-fails sentence is also true under a retry strategy (see ①).

packages/lint/src/validate-expressions.flow-null-guards.test.ts, authored-site-expression.test.ts, runtime-authoring-gate.injected-column-null-guard.test.ts: each LIT case asserts the build's findings equal the gate's over the served object, per column, per slot and per ownership tier, with controls for the guarded spelling, an author-declared column and a validation rule; the two runtime readers each have a case that compares against the single-item gate. The assertions would fail at the base tree by reading. Their outcome on this head is CI's to report (②).

packages/lint/src/validate-expressions.test.ts: the PLUMBING addition is forced by the receiver scan and names Map and Set locals only.

Nits. Neither changes a verdict of the code or the contract.

  • N5 (nit) — prose face, for the seat. content/docs/automation/flows.mdx rule 5 now says created_at and updated_at "need none" under a paragraph that covers ordering and arithmetic. The publish gate drops only the ordering finding on those two columns; arithmetic on record.created_at, and a previous.created_at read, are still refused there without the guard, as the PR's own acceptance notes say. An author following the sentence for arithmetic meets a clear refusal at publish, so this is wording, and it belongs with the created_at residue card the seat already owes: either narrow the sentence to comparisons or close the residue.
  • N6 (nit) — the build has no deployment input, so it judges organization_id on an object a deployment declares platform-global, where the plan injects no such column at run time. The build already resolved the column as a field of such an object before this PR; the guard it now asks for is harmless there. Not read at the gate; no change asked.

No must-fix, no should-fix.

Implemented-by: claude/project-thread-al00uu
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

ACCEPT · PR #34129 (#33435) · head 80b1edc6b4fffc19889c78faa4e86d754906c97e · 2026-11-16T00:04Z

席位核对

  • 形态: 9 files (+413 / −25):

    • validate-expressions.ts: the flow / hook condition null guard over the six injected columns, plus created_at / updated_at for beforeInsert hooks;
    • semantic entry 18.flow-hook-condition-injected-column-null-guard-at-build.ts;
    • four test files: lint ×3, plus the new metadata-protocol pin file;
    • the changeset;
    • content/docs/automation/{flows,hooks}.mdx.

    The head is a merge of origin/main ea6de745 into the reviewed 34790afb, made under the K ≥ 15 landing rule. check-governed-merges.mjs --pr 34129: NOT governed, ≤ 3000 lines.

  • 前提实测: the card thread merged with os-regen-merge.sh. There were no conflicts and no regen paths. The 111 derived gates all exit 0 (/mnt/project-files/spec-seat2/33435-gates-ran-r3.txt). The seat read the prose faces at TIER_DEFAULT: the changeset names both moving runtime readers and the priority-below-10 scope.

  • 契约复审: CONTRACT_REVIEW_TIER:

    • r1 6901107947: PASS, with S1 and S2.
    • r2 6901750290 @34790afb: PASS, closing both.
    • Merge-delta r3 6903617482 @ this head: PASS, by review#2 (handoff 6903197702; the maintainer limited fable quota). The whole patch is byte-identical to 34790afb. No must-fix and no should-fix.
  • 门禁 check-runs: this head, 68 runs: 58 success, 10 skipped, 0 failed, 0 in progress.

  • 接受的偏差:

    • N1 and N3 (r1) and N6 (r3) are left as accepted deviations.
    • The seat's organization_id ruling 6901005939 stands.
  • 范围外去向: the seat files these after merge, as ruling 6901005939 carries them:

    • the priority-aware beforeInsert timestamp rule at both doors, folding in r1 S2's residue and r3 N5 (flows.mdx rule 5's "need none" sentence for arithmetic and previous.created_at);
    • the hop leaf through an injected lookup;
    • validation rules and requiredWhen over injected columns.
  • 落地条款: ready + auto-merge now, under the maintainer's standing orders 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z) and 「你应该使用 pm-dispatch 技能审核和落地pr」 (2026-11-07T16:59Z). K = 8 first-parent commits on main past PRBASE 2539ad98 (this head's Test Core Affected-set diff base), < 15.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 00:04
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit a061708 Nov 16, 2026
69 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-al00uu branch November 16, 2026 00:38
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 size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants