You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1074c04
Browse filesBrowse the repository at this point in the historyBrowse files
fix(service-automation): a name two packages ship keeps defaultActive; ask the loader's default once per armed body
L2 delta on 5fe7b81 (S3, N8-N11):
- S3: the registration check asks whether ANY package's loader set holds
the name (`isShippedFlowName`: the one owner, else each package that may
hold it, asked per package), so a co-held name's bodies register with the
key on every re-sync, upgrade and third holder; dry run and the stored
pass agree. The refusal stands only when no package ships the name.
- N9: the package default reader is asked once per armed body (a WeakMap
keyed by the body registerFlow armed), not on every isFlowEnabled.
- N8: the changeset names setPackagedFlowDefaultSource and
PackagedFlowDefaultSource and states the fail-open behaviour without a
reader; the reader's duck-typed protocol read is pinned through the real
protocol in the first-boot-pull integration harness.
- N11: FlowSchema JSDoc sentence reworded.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPTavMbXsRBw7f7fCb
Copy file name to clipboardExpand all lines: .changeset/34655-flow-default-active.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,4 +21,8 @@ Only a flow a package ships has the packaged-flow switch, so:
21
21
-`POST /api/v1/automation/:name/clone` drops `defaultActive` from the copy, which is written switched off by its own `status` as before;
22
22
- an unmanaged install copies `defaultActive: false` as `status: 'obsolete'` (unless the status already disarms the flow) and drops the key, so the copy arrives switched off.
23
23
24
+
A name two packages ship is a package's flow too: each holder's body registers with the key, on every re-sync and upgrade, and the refusal above is only for a name no package ships.
25
+
26
+
For hosts that compose the engine themselves, `AutomationEngine.setPackagedFlowDefaultSource(source)` and its `PackagedFlowDefaultSource` type are new public API. The automation plugin attaches the reader (it asks the metadata protocol for the package's own body); it is how the engine reads the package's default while a declared `.custom` override is armed in the package's place, and it is asked once per registration, not on every enablement read. An engine composed without a reader reads the default only off an armed package body, so while an override is armed a flow its package ships off runs (fail-open): such an engine cannot see the package's body, and treating an unknown default as on keeps the behaviour every packaged flow had before this release instead of switching off a flow no package was seen to declare off.
27
+
24
28
ADR-0126 §4 carries an amendment note: "absence of a row means the packaged default" now reads the default a packaged flow declares; the ledger's shape is unchanged.
it('[#34655, L2 N8] the base ships `defaultActive: false`: the armed override, which omits the key, stays off — read through the real protocol',async()=>{
* administrator may turn on as `status: 'active', defaultActive: false`.
1198
1198
*
1199
1199
* Only a flow a package ships has that switch. A flow authored in the
1200
-
* environment is switched by its `status`, so registering one that
1201
-
* declares `defaultActive` is refused (and a dry run of one, and the stored
1202
-
* pass lists a stored one); a clone of a packaged flow drops
1203
-
* the key, and an unmanaged install copies `defaultActive: false` as
1204
-
* `status: 'obsolete'`.
1200
+
* environment is switched by its `status`: registering one that declares
1201
+
* `defaultActive` is refused, a dry run of one is refused, and the stored
1202
+
* pass lists a stored one. A clone of a packaged flow drops the key, and an
1203
+
* unmanaged install copies `defaultActive: false` as `status: 'obsolete'`.
1205
1204
*/
1206
1205
defaultActive: z.boolean().optional().describe('Packaged flows only: `false` ships the flow switched off, so it is not armed on an installation until an administrator turns it on with the packaged-flow switch (the activation ledger); the administrator\'s choice, once made, wins over this default across restarts and upgrades. Absent or `true`: switched on. `status` stays the author\'s switch: `obsolete`/`invalid` disarm the flow everywhere. A flow authored in the environment is switched by `status` and may not declare this key.'),
0 commit comments