Repository navigation
fix(lint)!: the publish gate refuses a subflow or map step that calls a flow the deployment does not hold - #38594
objectstack-fleet[bot] wants to merge 10 commits into
Conversation
…s at the publish gate Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
… changeset Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
… protocol facade Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
…ing flow resolves at the publish gate The unmanaged install writes its items one at a time, so the publish gate's subflow-target judgement met a caller before its callee and rolled the whole install back. The door now states its plan's flow names on each flow write, as a publish batch does. The gate reads the stored flow names in one read projected to name, and none for a flow that calls no other flow. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSjBfkaFUVwRa3pdUK
…he changeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSjBfkaFUVwRa3pdUK
… and warn filters Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSjBfkaFUVwRa3pdUK
📓 Docs Drift CheckThis PR changes 3 package(s): 21 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 10 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 182 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 17286cc025d7e487708a424338ce4bfc2aa449dc && git checkout 17286cc025d7e487708a424338ce4bfc2aa449dc
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 75108ea6df94b13b57ec010aeb77012ec211ebb3 93f3643eafd6aa5d25ec772a661ad83e6e18fdb9 && git checkout -B drift-repro 75108ea6df94b13b57ec010aeb77012ec211ebb3 && git merge --no-ff 93f3643eafd6aa5d25ec772a661ad83e6e18fdb9
node scripts/docs-audit/affected-docs.mjs --json 75108ea6df94b13b57ec010aeb77012ec211ebb3
|
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS Contract-review-claim: session_01QsR2jSyQBDMyRnrrWKy7WS · head a7c00fd · 2026-11-29T13:38Z Seat 1's review thread R1 starts an isolated contract-review sub-agent at |
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS Contract reviewServed-tier: One full round, ① to ④, on PR #38594: the net diff against merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe delta on record 7238045522: M1: closed.
S1: closed.
S2: closed.
S3: closed.
N1 of that record is fixed: the New at this round: S4 (should-fix) — the gate's universe leaves out a disabled package's registry flows, and the contract says it holds them.
The The implementing files, each against the contract:
Tried and held:
Nits, none with an effect on correctness or the contract:
Open at this head: S4. Nothing here is graded a must-fix, so the verdict is PASS, and the next head owes a delta round on S4. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS The brief the isolated reviewer was handed for contract-review record 7257069704, as it stood (2026-11-29T14:08Z). The reviewer ran at BriefContract review brief — PR #38594 @
|
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS 席位核对 — REWORK · L1 by seat repo:objectstack#1, review thread R1 · Head-sha
|
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS 2026-11-29T14:10Z · Correction to L1 7257085221, its sentence on landing only. It said "Not governed …, so after the delta it lands through the queue." That is wrong. No path of this pull is on a governed surface, but it lands as Tier H on two other grounds, either of which is enough: the pull declares a narrowing ( |
…argets at the publish gate The gate's names read the served registry listing, which drops a disabled package's items, so after a restart a call to such a flow was refused with a sentence saying no installed package holds it. The names now read the registry with its disabled packages, as the docblock and the changeset said. Docblocks, the explanation, the upgrade entry and the changeset's exports list now name a package install's flows and saveMetaItem's copyPlanFlowNames. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jSjBfkaFUVwRa3pdUK
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS Contract-review-claim: session_01QsR2jSyQBDMyRnrrWKy7WS · head 93f3643 · 2026-11-29T14:21Z Delta round on record 7257069704 (PASS at |
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS Contract reviewServed-tier: Delta review, 2026-11-29T14:47Z. This is the delta round that record 7257069704 left owed (PASS at ① Derived judgmentsEverything in ① of record 7257069704 stands, with one line changed:
What the delta does to the other lines:
② Semver level
③ Boundary flags
④ Design judgmentS4: closed.
The The hunks outside S4 are what the commit says they are:
Tried and held:
Nits of record 7257069704:
New at this round, nits only, none with an effect on correctness or the contract:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS 维护者速读
席位意见:建议批准。请留意第三条里应用包副本安装被拒的情况:在 #38595 修好之前,这类副本装不上。这一条是读代码得出的结论,没有测试钉住;席位认为拒绝比装上之后运行失败好。 席位核对 — ACCEPT · L1 · seat repo:objectstack#1, review thread R1 · Head-sha
|
|
repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS Tier H approval request · 2026-11-29T15:33Z This pull request declares a narrowing ( |
Requested by Jianguo · project thread
Fixes #35143
Supersedes #38241 (closed, 7256687325)
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #38259 — skills/objectstack-automation/SKILL.md (the
subflowrow saysos validatewarnsflow-subflow-unknown; it does not say the publish refuses a call to a flow nothing in the deployment holds), skills/objectstack-automation/evals/flows-triggers-approvals.json (the eval that namesflow-subflow-unknown)维护者速读
What changes
The card's last two open lines, re-verified on
main(1208460) first.F1, option label in decision-node and edge conditions: already covered on
main, no change here.flow-condition-option-labelreads every edge condition and everydecisionnode'sconditions[].expression(and query filter operands) since #37491 (optionLabelsBeyondStartinvalidate-flow-trigger-readiness.ts, aterror, same id, runtime gate and CLI). Its positive and negative pins are inflow-publish-checks-second-batch.test.ts, describe "past the start condition". The card gets a line saying so.F6, a
subflow/mapstep calling a flow that does not exist: now refused at the publish gate. It was a CLI-only warning because the gate's per-write snapshot holds just the written flow. The gate now judges the call against the names of every flow the deployment holds, which the host states on a flow publish:includeDisabledPackages, so a disabled package's are included);pending.flows), so a package that ships a flow with its caller publishes;copyPlanFlowNames, new in this head), so a package whose flow calls a sibling it declares later installs;listFlows), so a flow registered straight into the engine with no metadata row resolves.A call that names none of them, and is not the written flow itself, is an
error(flow-subflow-unknown):executeanswersFlow 'X' not foundon every run.Severity per door:
os validate/lint/compile/build):warning, unchanged. The stack is one app, and another installed package may ship the called flow.error. The set is the whole deployment, so "held nowhere" is decided, the lint: an overlay write (no package) of a list view bound to an object that exists nowhere answers 200 with no issue —validateListViewFieldRefsskips it and no other rule judges aviewwrite's binding #24668 reading of a whole collection.listFlows(each logged once atwarn) and an empty set. A missingsys_metadatatable is no stored flow: the other sources still decide. An empty set with no closure is no universe (lint: an overlay write (no package) of a list view bound to an object that exists nowhere answers 200 with no issue —validateListViewFieldRefsskips it and no other rule judges aviewwrite's binding #24668).outside-closure) is not judged here. This rule never refuses a call the engine would accept.Wiring:
@objectstack/lint:validateFlowSubflowTargets(stack, { deploymentFlowNames }), theAuthoringRuleContext.deploymentFlowNamesinput, andrunRuntimeAuthoringRules({ deploymentFlowNames }). The rule's registry entry moves totier: 'gating',surfaces: CLI_AND_RUNTIME,runtimeTypes: ['flow']. Its runtime pass judges nothing without stated names. The rule's explanation text is updated.@objectstack/metadata-protocol:evaluateRuntimeAuthoringGate({ deploymentFlowNames })adds the batch's flow drafts.judgeRuntimeAuthoringRulesreads the names only on a flow write whose body calls another flow (flowCallsAnotherFlowinruntime-authoring-gate.ts;deploymentFlowNamesOf,automationFlowNames,registeredFlowsWithDisabledinprotocol-authoring-gate.ts), through the host's existingservicesRegistry; the registry is listed with its disabled packages, since the served listing drops their items. The stored names are onesys_metadataread,type$inboth spellings, projected tofields: ['name'].saveMetaItemtakes a server-onlycopyPlanFlowNames(protocol-door-requests.ts), whichimportUnmanagedPackagestates on each flow write and the save door hands the gate aspending.flows.protocol.tsmoves no line: one docblock (thependingfield) is reworded in place.@objectstack/spec: the ADR-0087 entrypublish-refuses-flows-that-save-and-do-not-runnow counts eight errors at the publish gate, seven of them also on the CLI: itssurfacenames thesubflow/maprefusal, the warnings sentence says which door each warning is silent at, the acceptance line is no longer seven, and the reason says what holds for a package install.No rule is added, so no "author-time rules (N)" count moves.
Rework on contract review 7238045522 (FAIL at
bc21970eab)This PR continues #38241 (seat 6's branch
claude/issue-35143-flows-leftovers, whose dev ran out of budget). It starts at that head, mergesmain, and closes every open item of the review:importUnmanagedPackagestates its plan's flow names on each flow write (copyPlanFlowNames), which reach the gate aspending.flows, the batch's channel. Pinned inpackage-unmanaged-install.test.ts, describe "a flow calling a sibling flow of the same package": a package declaringcrm_parent(callscrm_child) beforecrm_child, on a protocol whose automation service holds another flow, installs both; the control (a call to a flow nothing holds) is still refused 422 and leaves no row and no base.duplicatePackageis unchanged: it copies stored rows, which the gate's stored read already holds (the review's own reading).fields: ['name']; none at all for a flow that calls no other flow, or only itself. Pinned on the shared harness.surface,reasonandacceptanceCriteriarewritten as above.saveMetaItemon the shared harness: a store read that throws (accepted, onewarn), alistFlowsthat throws (accepted, onewarn), and a missingsys_metadatatable (nowarn; a call to an engine or registry flow is accepted and a call to nothing is still refused).sealedFlowNodeTypeVocabularydocblock is back above its function. N2–N5 are left as the review graded them (no effect on correctness); see the acceptance notes.Patch round on contract review 7257069704 (PASS, S4 open at
a7c00fdd85)includeDisabledPackages: true(registeredFlowsWithDisabled), so a call to a disabled package's flow is let through, as a draft is: the flow is held, and runs once its package is enabled. The docblock, the changeset and this body now say what the code does. Pinned throughsaveMetaItem; removing the option fails the pin.reasongives the right cause (the install states its flow names) and says the rename covers prefixed names only; thependingdocblocks, the lint docblocks and theos explaintext name a package install's flows and a disabled package's; the changeset's Exports bullet namessaveMetaItem'scopyPlanFlowNamesand no longer namesevaluateRuntimeAuthoringGate. N9 and N10 stand as accepted.Why
#35143 "Done when": each line is a rule with its pins, or a line on the card saying which rule covers it. F1 is the second case and F6 is now the first. The hosted copy of the subflow check can be deleted.
Tests
Lint: new pins in flow-publish-checks-second-batch.test.ts (describe flow-subflow-unknown)
warning.error, pathflows[0].nodes[1].config.flowName, message opening,rulesRunnames the rule.mapcall inside a loop body:erroratflows[0].nodes[1].config.body.nodes[0].config.flowName.Metadata-protocol: the describe in protocol.runtime-authoring-gate.test.ts (the shared harness), end to end through saveMetaItem
INVALID_METADATA, issueflow-subflow-unknownat the path, nothing stored.includeDisabledPackages) resolves; a call to nothing in the same case is still a 422.{ where: { type: { $in: ['flow', 'flows'] } }, fields: ['name'] }; a flow calling only itself, and a flow with no call, read nothing.warnnaming the cause; alistFlowsthat throws, the same; a missingsys_metadatatable, nowarn, engine and registry flows still resolve and a call to nothing is still a 422.evaluateRuntimeAuthoringGate: a flow inpending.flowsresolves; without it the call is refused.Metadata-protocol: new describe in package-unmanaged-install.test.ts (M1)
crm_parent(asubflowstep callingcrm_child) beforecrm_child, with an automation service holdingother_flow: installs, both flows stored active.crm_parentcallingcrm_nowhere: refused 422 withflow-subflow-unknown, no active row left, the basecom.example.crm-copyremoved.targetNamespace: 'crm2'is refused 422 (flow 'crm2_parent' could not be written … flows[0].nodes[1].config.flowName [flow-subflow-unknown]) and rolled back, because the rename does not rewriteconfig.flowName; see the acceptance notes.Ablations (each fix removed on disk from the committed head, then restored with git checkout HEAD)
importUnmanagedPackagestates nocopyPlanFlowNames: "installs a package that declares the calling flow before the flow it calls" fails (1 failed / 1 passed).flowCallsAnotherFlowguard dropped): "reads the stored names once …" fails (1 failed / 7 passed).includeDisabledPackages: "lets a call through to a disabled package's flow …" fails (1 failed).Suites (head 93f3643, main merged at 3014176; under os-verify-lock)
@objectstack/linttest: 246 files / 9962 tests passed. typecheck exit 0.@objectstack/metadata-protocoltest: 372 passed / 9 skipped files, 23660 passed / 45 skipped tests. typecheck exit 0.protocol.runtime-authoring-gate.test.ts+package-unmanaged-install.test.ts: 383/383.@objectstack/specsrc/migrations: 5 files / 209 tests.pnpm --filter @objectstack/dogfood testunder the lock after a clean closure build (exit 0): VERDICT command-exit 0, Test Files 495 passed / 3 skipped (498), Tests 4187 passed / 68 skipped (4255), no failure.Acceptance notes
outside-closurecall still fails at run time. Judging that would need the resolver's verdict at the door.targetNamespace) renames its flows but not theconfig.flowNamethat calls them, so a package whose flow calls a sibling is now refused and rolled back unless the deployment holds the old name. Onmainit installed with a step that fails on every run. Making the rename follow flow names is outside this card; reported to the seat as a finding.listFlowsis read with no seal; N3 the empty-set exit depends on the door; N4 the "did you mean" suggestion draws on the unfiltered stored read; N5rulesRunnames the rule on a write where it judged nothing.Verification
packages/metadata-protocol/src/protocol-package-commits.tsimportUnmanagedPackage(copyPlanFlowNames) withprotocol-save.ts(where it becomespending.flows);packages/metadata-protocol/src/protocol-authoring-gate.tsdeploymentFlowNamesOf(the union, the projected read, the no-verdict exits),packages/lint/src/authoring-rules.tsthevalidateFlowSubflowTargetsentry (runtime pass with no names = nothing),packages/lint/src/validate-flow-trigger-readiness.tsvalidateFlowSubflowTargets.pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.runtime-authoring-gate.test.ts src/package-unmanaged-install.test.ts -t '35143|sibling flow'. Expect 11 passed, among them a 422 namingflow-subflow-unknownand a package install of a caller before its callee.Gates (head 93f3643)
dispatch-gates --ranat 93f3643, run after the closure build: 103 derived, 102 run (all exit 0), 1 NOT MEASURED, 0 unrun (✓ dispatch-gates --ran: 103 derived famil(ies) accounted for).check:dual-build-cjs-loadsexit 3: needs a full workspace build. Left to CI.overlap-check(--exclude-pr=38241) at a7c00fd: clean against origin/main 3014176 and the two open PRs sharing a file (feat(spec)!: actions that act on many records are placed atselection; a list view'sbulkActionsis retired #38550, feat(objectql): a record in a closed state, and its lines, are closed to change (closedStates, ADR-0162) — trunk #38497). The 93f3643 commit touches only files of this PR.protocol.tsmoves no line, socheck:facade-delegation-only's ceiling is untouched (exit 0 in the sweep).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses (CI-owned run).main, one pull request.packages/spectouched: only a migration entry's text, no generated artifact moves.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jSjBfkaFUVwRa3pdUK