Repository navigation
Commit 99bd220
feat(spec, service-automation): a packaged flow can ship switched off for an administrator to turn on (defaultActive) (#34793)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBFyg5B2muWbKZjA9phXVWse)_
Fixes #34655
Clause-②: yes (widening) — `FlowSchema` gains the optional
`defaultActive` boolean. Before, any flow declaring it was refused as an
unknown key (`strictObject`); now a packaged flow that declares it
registers. A flow authored in the environment that declares it is still
refused, now by the engine with a sentence naming its `status` as its
switch. Nothing that registered before is refused.
Metadata-protocol: added
Skills-docs: updated here — skills/objectstack-automation/SKILL.md (one
paragraph under "A flow an installed package ships"),
evals/flows-triggers-approvals.json (eval id 24)
## 维护者速读
- 改了什么:flow 新增作者可写的 `defaultActive`(紧挨 `status`,可选,缺省为开)。打包 flow 写
`defaultActive: false` 后,新装时不挂触发器、不运行,`/automation/_status` 报
`enabled:false`;管理员用现有开关(toggle / Studio 的
Enabled)打开即写一行账本,这行优先于包默认,重启、升级、重装都保持。环境自写 flow 写这个键在注册时被拒(它的开关是
status);克隆去掉这个键;unmanaged 安装把 `false` 抄成 `status:'obsolete'`。ADR-0126 §4
加修订注;automation skill 加一段说明和 eval 24。
- 为什么改:hotcrm#2558「接受报价起草合同」要作为默认关闭、管理员可开的打包 flow
发出,今天做不到:没有账本行就是开,`status:'obsolete'` 又会永久关死。
- 风险与回滚:加法,没写这个键的 flow
行为不变(空账本仍然什么都不改)。默认是读时取的,安装时不写行,所以「有行=管理员选过」不变;包升级改默认只影响没人动过开关的安装;本轮(L2
S4)补上 override 被元数据保存激活后、基础包热升级翻转默认时的漏读,每次 `metadata:reloaded`
重新读一次包默认。回滚即 revert 本 PR(已写 `defaultActive` 的包会回到「未知键被拒」)。
- 先看:`packages/services/service-automation/src/engine.ts`(`shipsOff`
接线、`refuseUnpackagedDefaultActive`、`refreshPackagedFlowDefaults`)、`packages/services/service-automation/src/flow-activation-projection.ts`(无行时读包默认)、`packages/services/service-automation/src/plugin.ts`(`resyncFlowsFromProtocol`
每次重同步调用刷新)。
- 两分钟验证:`pnpm --filter @objectstack/service-automation exec vitest run
src/flow-default-active-34655.test.ts`,预期 34 条全过。
- 需要你做的:批准本 PR(碰 packages/spec/src、docs/adr 与 skills/,契约复审记录由席位路由)。
## What changes
A packaged flow can ship switched off, for an administrator to turn on.
- **`packages/spec/src/automation/flow.zod.ts`**:
`FlowSchema.defaultActive`, `z.boolean().optional()`, next to `status`,
with no materialized default, so a flow that does not declare it parses
exactly as before. The JSDoc and `describe` say what it is (the default
of the packaged-flow switch), that a ledger row wins over it, that
`status` stays the author's, and that only a packaged flow may carry it.
-
**`packages/services/service-automation/src/flow-activation-projection.ts`**:
`has(key)` is now the row that decides for the flow (`rowVerdict`, the
old body, answering `undefined` where it used to answer `false` for "no
row decides") or else the new `shipsOff` reader. `offByDefault(key)`
names the "no row, shipped off" case for the refusal log. `hasShared`
became `sharedRowVerdict` the same way.
- **`packages/services/service-automation/src/engine.ts`**: the
projection's `shipsOff` reader is `packagedFlowDefault(key) === false`,
the declaration of the PACKAGE's own body for the version installed now:
the armed body when the loader's body is armed, else the loader's body
for the slot's package (new `setPackagedFlowDefaultSource`; seat ruling
on L2 S2, option (a)), asked once per armed body and cached against it,
so `isFlowEnabled` never reads the loader's set; the cache is replaced
at every `metadata:reloaded` re-sync by `refreshPackagedFlowDefaults()`
(new public method, L2 S4), which re-arms or disarms each held flow
whose armed body is not the loader's own when its answer moved, because
the re-sync does not re-register every body. So an upgrade that changes
the declaration moves only an installation nobody switched, and a
declared `.custom` override does not move the default in either
direction. `refuseUnpackagedDefaultActive` is a member of the one
registration check list (#23317), judged by name: does ANY package's
loader set hold it (`isShippedFlowName`, the loader's own per-package
answer, so a name two packages ship keeps the key): `registerFlow`
throws it (the automation write doors answer `VALIDATION_FAILED` / 400,
`registerAndSaveFlow`), `dryRun` refuses the draft, and the stored pass
(`canonicalizeStoredFlow().todos`) lists a stored row at
`flows[0].defaultActive`. The metadata door (`PUT
/api/v1/meta/flow/:name`) parses without registering, so it stores such
a row; the engine refuses to arm it. `describeDisabledFlow`'s log line
names the shipped default when no row decides; the `isFlowEnabled` and
`hydrateFlowActivations` docblocks say what the default and an active
row now do.
- **`packages/services/service-automation/src/plugin.ts`**,
**`flow-registration-checks.ts`**, **`index.ts`**:
`packagedFlowDefaultReader`, over the protocol's `shippedArtifactsOf` at
question time (the read `packagedFlowReader` already makes for a
package's own question), attached at init beside
`setPackagedFlowSource`; `resyncFlowsFromProtocol` calls
`refreshPackagedFlowDefaults()` after its loop (L2 S4); the check list
gains the member; `PackagedFlowDefaultSource` is exported beside
`PackagedFlowSource`.
- **`packages/services/service-automation/src/flow-definitions.ts`**
(`hydrateFlowActivations` only): a row switching a flow ON is now
applied through `activateFlowTrigger` (idempotent, the same gate) and
its callers re-judged. Without it, a host whose trigger was registered
before the pull would keep a shipped-off flow unarmed after a restart
even though an administrator switched it on. The stock boot order
(trigger plugins at `kernel:ready`) armed it anyway.
- **`packages/runtime/src/flow-clone.ts`**: `FLOW_CLONE_DROPPED_KEYS`
names `defaultActive`. The copy is a writable package's flow, switched
by its `status`, which the clone already writes `obsolete`.
- **`packages/metadata-protocol/src/package-unmanaged-install.ts`**:
`copyUnmanagedFlowSwitch`: an unmanaged install copies `defaultActive:
false` as `status: 'obsolete'` (a status that already disarms is kept)
and drops the key; `true` is dropped. A non-boolean is handed on for the
save door to refuse.
- **`packages/spec/src/contracts/automation-service.ts`** (`toggleFlow`
JSDoc) and **`packages/spec/src/api/automation-api.zod.ts`** (module
JSDoc; regenerated `content/docs/references/api/automation-api.mdx`): N1
of the contract review on #34810 (record 6952048597), carried here at
the seat's request because half A edits `packages/spec`. The toggle
contract prose now names the 409 for switching ON a packaged flow whose
own `status` disables it (landed with #34810, merged into this branch),
and that switching such a flow off is accepted. Prose only: no schema,
`describe`, export or error code moves.
- **`docs/adr/0126-packaged-metadata-customization-model.md`**: an
amendment note under §4 and a Status-line entry. The amended sentence is
not rewritten.
- **`skills/objectstack-automation/SKILL.md`** (the card's "Document it
in the automation skill"): one paragraph under "A flow an installed
package ships": `defaultActive: false` ships the flow unarmed (`_status`
`enabled: false`) until an administrator turns the switch on, that
choice outlives restart / upgrade / reinstall, `status: 'obsolete'`
disarms past the switch, and a flow authored in the deployment is
refused the key. `evals/flows-triggers-approvals.json` gains eval 24.
`scripts/check-skills-token-ratchet.mjs`: the file's ceiling 6903 →
6992, the measured addition (+357 priced bytes, nothing removed), under
the standing ruling 「A:先削重复,余额按实测提高」 (record 6513306068); no restatement
of the switch, its default or `status` as a switch was found to pay
down, as the ceiling's note says.
- `packages/spec/liveness/flow.json` (`defaultActive`: live),
regenerated `authorable-surface`, `content/docs/references/**`,
`liveness/state-counts/flow.md`;
`.changeset/34655-flow-default-active.md` (`minor` spec and
service-automation, `patch` runtime and metadata-protocol).
## Tests
-
`packages/services/service-automation/src/flow-default-active-34655.test.ts`
(34): fresh install neither arms nor runs it (`FLOW_DISABLED`, the
switched-off sentence, `_status` `enabled:false`); the log line names
the shipped default; toggle on writes `{ active: true }`, arms and runs;
survives a restart in the stock boot order and on a host whose trigger
was registered first; survives an uninstall (a boot without the package
leaves the row) and a reinstall; survives an upgrade that changes the
body; a flow switched back off stays off when the next version ships it
on; with no row, an upgrade that changes the declaration moves the
installation both ways; CONTROL `true` and absent ship on; an `obsolete`
flow a row switches on still does not arm; a packaged caller of a
shipped-off subflow is held unarmed until the subflow is switched on;
`defaultActive: false` and `true` on an environment flow are refused
with the exact sentence and nothing is filed (the code and status are
the write door's, as for every `registerFlow` refusal); CONTROL: the
same environment flow without the key runs; the key is judged by name,
so a package arm for a name the loader's set does not hold is refused
and a name it holds keeps the key under any arm; a dry run of an
environment draft with the key throws what registration throws; the
stored pass lists such a row at `flows[0].defaultActive` and none
without it; a package that ships the flow off is not armed by an
override that omits the key, and one that ships it on is not switched
off by an override writing `false` (the administrator's switch works in
both); `packagedFlowDefaultReader` answers the named package's own body
and none for a missing body, a non-boolean, or no protocol. L2 S4 / N13
(six cases): on the engine, `refreshPackagedFlowDefaults()` moves a held
override with no row both ways after the loader's answer flips, a
CONTROL where a ledger row and a loader-armed body are not moved, and a
body `rollbackFlow` puts back reads the set installed now; on the
automation plugin (LiteKernel, a protocol stand-in serving the declared
override in the base's slot, no ledger), an override armed by the
metadata-mutation sync (no reload) is not re-registered by the next
`metadata:reloaded`, and a hot upgrade flipping the base's
`defaultActive` still moves it: on to off stops it (unbound,
`FLOW_DISABLED`), off to on starts it (bound, runs), with a CONTROL
reload that leaves the declaration as it was and moves nothing.
- `packages/spec/src/automation/flow-default-active-34655.test.ts` (3):
accepts both booleans, absent stays absent, a non-boolean is refused at
the key.
- `packages/runtime/src/flow-clone-default-active-34655.test.ts` (2) and
`packages/metadata-protocol/src/package-unmanaged-flow-switch-34655.test.ts`
(5).
- Two existing tests account for the new key:
`packages/spec/src/system/metadata-form-zod-reconciliation.test.ts`
gains a root ledger row for `flow.defaultActive` (the flow form saves
only environment-authored flows, where the engine refuses the key, and
its meaning lives in its absence, like `skill.mcpPrompt`), and
`packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts`
moves `flow`'s served top-level count 23 → 24. No other existing test
changed.
## Acceptance notes
- **Read-time default, not an install-time row** (seat ruling on the
area thread). A row written at install could not be told from an
administrator's choice, so an upgrade that turns the default on would
either override an administrator's off or never reach an installation
nobody touched.
- **Only packaged flows** (area agreed, for the L2 and the seat to
read): the predicate is by name, with no arm exception since the L2
round: does any package's loader set hold the name
(`isShippedFlowName`). It asks the one owner first (the toggle door's
`isPackagedFlow`), then each package that may hold the name, per package
(`packagedFlowSlotOwner`): the packages whose slots hold it now and the
package the body names itself as. The stamp only picks which package to
ask; a stamp naming a package that ships no such flow is still refused
(pinned). A `.custom` override is served at the base's name, which the
loader's set holds (ADR-0146 D9.3), so it is not refused; the default it
carries is not read (seat ruling, S2 option (a)).
- **Reinstall**: the activation store has no delete
(`packages/core/src/utils/metadata-activation-store.ts`, "deliberately
has no `delete`"), and nothing on the uninstall path writes the ledger
(read). The engine half is now pinned: a boot without the package leaves
the row and the reinstall arms the flow.
- **"On" rows that do not count**: a row naming no package that switches
a flow ON is not recorded by the projection, and an ON row of a package
that no longer holds the name is skipped, so neither overrides a
ship-off default (the matching OFF rows still switch the flow off). Both
fail closed; the JSDoc and the ADR note now say so. Not changed here.
- **Release floor**: a package declaring the key needs a platform at or
above this release; an older runtime refuses the flow as an unknown key.
Said in the changeset.
- **Unmanaged import answer** (L2 N7): the answer does not list a flow
whose `defaultActive: false` was copied as `status: 'obsolete'`.
Accepted as is: the copy's `status` says it, and listing it is new
answer surface outside the card.
- **No reader attached** (L2 N8): a host that composes the engine
without `setPackagedFlowDefaultSource` reads the default only off an
armed package body, so while a `.custom` override is armed a flow its
package ships off runs (fail-open). Such an engine cannot see the
package's body, and an unknown default treated as on is how every
packaged flow behaved before this key. The automation plugin always
attaches the reader; the changeset says so.
- **The reader's protocol read** (L2 N8): `packagedFlowDefaultReader`
reaches the protocol's `shippedArtifactsOf` by duck type, as
`packagedFlowReader` already does. It is now pinned through the real
protocol: the first-boot-pull integration harness (ObjectKernel +
ObjectQLPlugin + SqlDriver + AutomationServicePlugin) boots a base
shipping `defaultActive: false` with a stored override that omits the
key; the reader answers `false` for the base and nothing for the pair,
the override is armed and reported `enabled: false`, and a record change
fires nothing.
- **Half B** (the toggle door for a status-disarmed flow) landed as
#34810 and is merged into this branch from `main`, as is #34654; this PR
does not touch `toggleFlow` or
`packages/runtime/src/domains/automation.ts`.
- **L2 S4 fix direction** (delta record 6949383615 offered two): the
cache is dropped at every re-sync and the held non-loader flows go back
through the arming gate, rather than skipping the mutation-mark skip for
a non-loader winner. The review notes N13 rides with the cache drop, and
the drop also covers the second stock path the review names (a
re-registration that throws keeps the old body), which the skip change
would not. Cost per reload: one reader call per held flow whose armed
body is not the loader's own. N14 (an unstamped first or third holder
registered through the engine API) is left as the review allowed:
registry-fed bodies are stamped.
- **Changed lines after this round's merges**: the PR's net diff against
`main` stays inside the claimed surface plus claim amendment 6953980143
(the two spec JSDoc paths for #34810's N1).
- **CI at `1074c040`, seat 3 fix round** (no code change): `Test Core
(2/10)` failed one case,
`packages/spec/scripts/build-schemas-check-mode.anchor.test.ts` "still
fails offline on a deletion the anchor records and this build cannot
account for", with `Hook timed out in 10000ms` in its `beforeEach` (line
69: fixture file writes plus `git add`/`commit`/`rev-parse`/`update-ref`
in the sandbox). Judged a flake: the same hook passed for the file's
other 14 cases in that run; the file's inputs
(`packages/spec/authorable-surface/**`, `authorable-surface.base.json`,
`packages/spec/scripts/**`, root `scripts/**`) are byte-identical to
`5fe7b810`, whose Test Core shards were all green, and `1074c040`
touched only a JSDoc comment in `packages/spec`. The failed jobs of run
44082971653 are re-run once; a second failure is real.
## Verification
Head `34181ed124`: this round (below) on top of `208c272ef1` (a merge of
`origin/main` c4c0794, then the regenerated automation API
reference), the automation-skill commit and the two existing-test
updates (`bef53a4790`, CI all green), then the contract-review rework
(`5fe7b810c4`) and its delta (`1074c040a7`).
<details><summary>L2 delta 6949383615 fix round (S4, N12, N13) and
#34810's N1, on 34181ed</summary>
- Commits: `96a99d06d8` merge of `origin/main` (#34654); `05656d74f1`
the S4 fix and its pins; `536d5a1c12` the spec prose (#34810 N1) and the
changeset sentence; `198cdf7bf6` merge of `origin/main` (#34810 landed);
`34181ed124` the regenerated automation API reference, and
`authorable-surface/api.json` regenerated after the merge (the driver
had deferred it; it differs from `main`'s only by this PR's own
`api/CreateFlowRequest:defaultActive` row).
- **S4**: `AutomationEngine.refreshPackagedFlowDefaults()`; the plugin's
`resyncFlowsFromProtocol` calls it after its loop on every
`metadata:reloaded`. The `packagedFlowDefaults` and
`packagedFlowDefault` docblocks say when the default is read again. The
changeset names the method as public API, since a host composing the
engine itself must call it after the installed packages change.
- **N13**: covered by the same drop (the map a rolled-back body was
cached in is replaced), pinned. **N12**: this body counts 34 for the
card's test file (28 before this round plus six).
- Ablation (`scripts/ablation-replace.mjs`, anchor
`this.engine.refreshPackagedFlowDefaults();` in `plugin.ts` deleted, x1
to x0, blob `02ab3709` to `1e49c39b`): 2 failed / 32 passed. The two
flip pins fail (`expected true to be false` on to off, `expected false
to be true` off to on); the CONTROL reload stays green. Restored: blob
equals HEAD (`02ab3709`), `git diff HEAD` empty. The test imports
`./plugin.js` from source, so no build is involved.
- `service-automation`: `tsc --noEmit` and `check:test-typecheck` exit
0; full suite `Test Files 288 passed (288)`, `Tests 4174 passed (4174)`
at `198cdf7bf6` (4167 at `536d5a1c12`, before #34810 merged).
`flow-default-active-34655.test.ts` 34/34.
- runtime targeted (`flow-clone-default-active-34655`,
`automation-flow-clone`, `automation-toggle-caller`,
`automation-addressed-route`, `automation-toggle-deny-message`,
`automation-toggle-unknown-flow`): 6 files, 111/111. Spec `typecheck`
exit 0; spec `check:generated` 14/14 and `check:docs` exit 0 at
`34181ed124` (the spec `dist` was built after the merge; `gen:docs`
regenerated `automation-api.mdx`).
- `dispatch-gates --commands` at `198cdf7bf6`: 149 families, each run
with its exit code captured before any pipe; `--ran`: 149 accounted for,
146 run, 3 NOT-MEASURED. **NOT MEASURED** (declared narrowing, CI runs
them): `check:skill-examples` and `check:dual-build-cjs-loads` (exit 3,
they need built packages outside the closure: client, client-react and
30 more), `check:type-check-debt` (exit 3, its closure build never got
the shared verify lock behind a long dogfood run). This round changed no
skill file and no package's typecheck wiring. `check:docs` and
`check:generated` first exited 1 (the reference page above), and both
exit 0 after the regeneration. `check-nul-bytes` exit 0. `overlap-check`
at `34181ed124`: clean against `origin/main` 46991d0 and the two open
PRs that share files.
- CI on `34181ed124`: in progress when this was written.
</details>
<details><summary>Contract review delta (record 6947617913 on
5fe7b81)</summary>
- **S3** (a name two packages ship refused the key): the check asks
whether any package's loader set holds the name (`isShippedFlowName`),
not whether it has one owner. Pinned: both holders, a re-sync / hot
upgrade re-registration and a third holder register with the key, `true`
and `false`; a dry run and the stored pass agree; CONTROL: a name no
package ships is still refused, whatever package the body names itself
as.
- **N8**: the changeset names
`AutomationEngine.setPackagedFlowDefaultSource` and
`PackagedFlowDefaultSource` as public additions and states the fail-open
behaviour without a reader, with the reason; the duck-typed protocol
read is pinned through the real protocol (Acceptance notes).
- **N9**: the reader is asked once per armed body
(`packagedFlowDefaults`, a `WeakMap` keyed by the body `registerFlow`
armed); a re-registration (the `metadata:reloaded` re-sync after an
upgrade re-registers the winner) asks again. Pinned: one call across
repeated state reads and runs, one more after a re-registration.
- **N10**: the 维护者速读 count is 28. **N11**: the `FlowSchema` JSDoc
sentence reads as sentences.
- Ablations (each restored, `git diff HEAD` empty): the check asks the
one owner only → 2 failed / 26 passed (the co-held registrations, the
dry run and stored pass); the cache read removed → 1 failed / 27 passed
(the once-per-body pin); the reader reading a key the body does not
carry → the real-protocol pin fails.
- `service-automation` full suite: `Test Files 288 passed (288)`, `Tests
4135 passed (4135)`. `tsc --noEmit` exit 0. Spec `check:generated` 14/14
after a spec build. 20 affected gates (ADR anchors and links, docblock
and scripts symbol anchors, liveness, test-source alias, issue
citations, the changeset gates, docs transcript and corpus claim drift,
engine double contract, optional error sink, undeclared dep imports,
type-check coverage, startup registry, doc authoring, skill examples):
all exit 0.
</details>
<details><summary>Contract review rework (record 6946901031 on
bef53a4)</summary>
- **S1** (the refusal outside the one check list): fixed as the area
ruled. `refuseUnpackagedDefaultActive` is a member of
`registrationChecks`, judged by name; `dryRun` refuses an environment
draft with the key and the stored pass lists a stored row, both pinned.
The changeset names which doors answer 400 and what the metadata door
does.
- **S2** (an override moves the default): seat ruling (a), the default
is the package's own body's. `packagedFlowDefault` +
`packagedFlowDefaultReader`; the JSDoc and the ADR note say so; both
directions pinned.
- **N1** hydrate docblock updated. **N2** the two "on" rows that do not
count are in the JSDoc and the ADR note. **N3** reinstall pinned at the
engine. **N4** gone: the check no longer trusts an arm. **N5** release
floor in the changeset. **N6** the owed-skill note removed. **N7**
accepted as is (Acceptance notes).
- Ablations (each restored, `git diff HEAD` empty): the list member
removed → 5 failed / 19 passed (both environment refusals, the by-name
refusal, the dry run, the stored pass); the default read off the armed
body whatever its arm → 3 failed / 21 passed (both override directions
and the by-name CONTROL).
- `service-automation` full suite: 276 files passed; 12 failed to
collect because the spec `dist` was rebuilt mid-run, and re-run alone:
12 files, 110 tests passed. `tsc --noEmit` exit 0. Spec
`check:generated` 14/14 after a spec build. 23 affected gates (ADR
anchors and links, docblock and scripts symbol anchors, liveness,
error-code provenance, test-source alias, issue citations, the changeset
gates, docs transcript drift, engine double contract, undeclared dep
imports, …): all exit 0.
</details>
<details><summary>Since 208c272 (the skill paragraph, the form ledger
row, the served-property count)</summary>
- CI on 208c272 was red in `Test Core (2/8)` (spec
`metadata-form-zod-reconciliation.test.ts`: `flow.(root): accepted by
the Zod but unauthorable in the form … expected [ 'defaultActive' ] to
deeply equal []`) and `Test Core (6/8)` (metadata-protocol
`protocol.meta-types-degenerate-derivation.test.ts`: `flow` served `24`,
pinned `23`). Both are the new key, accounted for in the next commit:
the reconciliation file 76/76, the derivation file 18/18; the full
metadata-protocol suite had that one failure and `23060 passed` before
the fix.
- `PR-body guards` was red on `check:closing-target-claim` (the card's
claim named half B's branch); the seat posted a claim naming this
branch.
- Gates the new files add, and the skill gates re-run: 39 commands
(`check-skills-token-ratchet` with `--self-test`, `check:skill-docs`,
`check:skill-examples`, `check:skill-refs`,
`check:skill-identifier-liveness`, `check:skill-links`,
`check:skill-compatibility`, `check:skill-frame-sync`,
`check:issue-citations`, the changeset gates, …): all exit 0.
`check:skill-examples` first exited 3 on a stale spec `dist`, then 0
after building spec (`347 prose examples type-check`). Record appended
to the gates file below.
</details>
<details><summary>Premise on origin/main f6f5b50</summary>
`FlowSchema` declares only `status` (`flow.zod.ts`, `status:
z.enum(['draft', 'active', 'obsolete', 'invalid'])`); no default-active
key anywhere in `packages/spec/src`. `isFlowEnabled` composes
`flowStatusDisabled` and `flowLedgerDisabled.has(name)`, and the
projection answered `false` (on) with no row. `toggleFlow` writes
`active: enabled` and the projection keeps the holder's row in either
state. Read in code; the card's fresh-install reading is hotcrm's, on
18.5.0.
</details>
<details><summary>Packages</summary>
- `pnpm --filter @objectstack/service-automation exec vitest run
--maxWorkers=3` (at eb5a27d plus the engine edits): `Test Files 288
passed (288)`, `Tests 4121 passed (4121)`; `typecheck` exit 0.
- `src/flow-default-active-34655.test.ts` 34/34 at the final head;
`src/flow-declared-override-first-boot-pull.integration.test.ts` 28/28
(one new real-protocol pin).
- spec `src/automation/flow-default-active-34655.test.ts` 3/3; runtime
`src/flow-clone-default-active-34655.test.ts` +
`src/domains/automation-flow-clone.test.ts` 24/24; metadata-protocol
`src/package-unmanaged-flow-switch-34655.test.ts` +
`src/package-unmanaged-install.test.ts` 103/103.
- spec `check:generated` exit 0 at the final head (14/14);
`check:test-typecheck` OK (needs
`NODE_OPTIONS=--max-old-space-size=8192` in this container, else tsc
runs out of heap).
</details>
<details><summary>Ablations (scripts/ablation-replace.mjs, each
restored, git diff HEAD empty)</summary>
- `shipsOff` reader answers `false` → 5 failed / 10 passed (fresh
install, the log line, the upgrade both ways, the subflow caller, the
package-arm CONTROL).
- the `refuseUnpackagedDefaultActive` call removed → 2 failed / 13
passed (both environment refusals).
- the hydrate's `activateFlowTrigger` removed → 1 failed / 14 passed
(restart on a host whose trigger registered first).
- `defaultActive` kept on a clone → 1 failed / 1 passed.
- `copyUnmanagedFlowSwitch` not applied → 2 failed / 3 passed.
Log: `/mnt/project-files/objectstack-seat2/34655A-ablation.log`.
</details>
<details><summary>Gates</summary>
`node scripts/pm/dispatch-gates.mjs --commands`: 122 families, each run
with its exit captured before any pipe; `--ran`: `122 derived famil(ies)
accounted for — 122 run, 0 NOT-MEASURED`. First pass:
`check-plugin-teardown-shape --self-test`, `check:skill-examples` and
`check:dual-build-cjs-loads` exit 3 (shallow clone; unbuilt packages),
re-run after `git fetch --unshallow` and a build: exit 0.
`check:error-code-provenance` exit 1 on the first draft's
`VALIDATION_FAILED` stamp in service-automation and
`check:test-source-alias` exit 1 on the new unmanaged test: fixed (the
refusal is a plain registration `Error`; the test preloads lint), both
exit 0. Record:
`/mnt/project-files/objectstack-seat2/34655A-gates-ran.txt`.
</details>
<details><summary>git merge-tree against the in-flight
neighbours</summary>
`git merge-tree --write-tree --name-only` of 208c272 with:
- #34654 head 8598c1d: exit 0, tree e2cc976a1796, no conflicted path.
- half B `claude/issue-34655-toggle-status-disarmed` 0c7fc78: exit 0,
tree 2c70fc9a8273, no conflicted path. On the merged tree (a
`--no-commit` merge, then aborted), `flow-default-active-34655`,
`toggle-door-packaged-only`, `flow-activation-ledger` and
`flow-activation-late-trigger`: 4 files, 94/94 passed.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
Claim note (seat 3, o3-J): #34793's branch is named on its own `Claim:`
line on #34655 (half-A claim after takeover 6948719649), which the
closing-target guard reads.
<!-- signed: repo:objectstack#3 · os-support-ai ·
session_01WGufzfr1xZSFZzCR8HnqXX -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c956ce5 commit 99bd220
29 files changed
Lines changed: 1370 additions & 31 deletions
File tree
- .changeset
- content/docs/references
- api
- automation
- docs/adr
- packages
- metadata-protocol/src
- runtime/src
- services/service-automation/src
- spec
- authorable-surface
- liveness
- state-counts
- src
- api
- automation
- contracts
- system
- scripts
- skills/objectstack-automation
- evals
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| 182 | + | |
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| |||
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
| 312 | + | |
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
| |||
858 | 865 | | |
859 | 866 | | |
860 | 867 | | |
| 868 | + | |
861 | 869 | | |
862 | 870 | | |
863 | 871 | | |
| |||
1170 | 1178 | | |
1171 | 1179 | | |
1172 | 1180 | | |
| 1181 | + | |
1173 | 1182 | | |
1174 | 1183 | | |
1175 | 1184 | | |
| |||
1235 | 1244 | | |
1236 | 1245 | | |
1237 | 1246 | | |
| 1247 | + | |
1238 | 1248 | | |
1239 | 1249 | | |
1240 | 1250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| 264 | + | |
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| |||
0 commit comments