@systemfsoftware/effect-daemon-spec 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,99 @@
|
|
|
1
1
|
# @systemfsoftware/effect-daemon-spec
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Pass capabilities as arguments instead of requiring them through a projection tag, in these two packages
|
|
8
|
+
|
|
9
|
+
Wlaschin's second approach — dependency parameterization — is preferred over the
|
|
10
|
+
Reader, and it removes the requirement from the signature entirely rather than
|
|
11
|
+
relocating it. Each operation in `effect-daemon-spec` and `stryker-js-cli` that
|
|
12
|
+
previously reached into the context for a projection now receives what it uses,
|
|
13
|
+
and the composition root is the single place that acquires the port.
|
|
14
|
+
|
|
15
|
+
The remaining `*ExecutorDeps` projections live in `omp/**/src/internal/`, fenced
|
|
16
|
+
behind each package's own `exports` map, so they are unreachable from any consumer;
|
|
17
|
+
the exported-wiring gate scans `src/` outside `src/internal/`, so internal composition
|
|
18
|
+
stays internal and is not a migration target here.
|
|
19
|
+
|
|
20
|
+
- `effect-daemon-spec` — `withLeaderLock` takes `lock: LeaderLock['Type']`, and the
|
|
21
|
+
supervisor body takes `reporter: DaemonReporter['Type']`. Every `yield* LeaderLock`
|
|
22
|
+
and `yield* DaemonReporter` now lands in `mod.ts`; the exported `worker` and
|
|
23
|
+
`supervisor` shapes are unchanged, and `withLeaderLock` loses `LeaderLock` from `R`.
|
|
24
|
+
- `stryker-js-cli` — `StrykerCliExecutorDeps` and its service interface are gone.
|
|
25
|
+
`runStrykerCli` and the handler take `detectMode` and `createRunEventStream`, typed
|
|
26
|
+
as indexed accesses off the two port services, and both lose the requirement from
|
|
27
|
+
`R`. `main.ts` acquires both ports and passes the members down.
|
|
28
|
+
|
|
29
|
+
For these two packages, a caller that provided the projection layer now provides
|
|
30
|
+
nothing, because the operation no longer requires anything.
|
|
31
|
+
|
|
32
|
+
- Carry the lock decision as a `LockBinding` so a required lock can never silently vanish.
|
|
33
|
+
|
|
34
|
+
The three lock-taking operations — the internal `worker`, `supervisor`, and the
|
|
35
|
+
`withLockByMode` operation behind them — now take a single discriminated
|
|
36
|
+
argument, `LockBinding`, in place of a `(LockConfig, LeaderLock['Type'] | null)`
|
|
37
|
+
pair. `unlocked` is the one case for a body that takes no lock; `locked` carries
|
|
38
|
+
the keyed spec and the adapter that honours it.
|
|
39
|
+
|
|
40
|
+
A spec declaring `mode: 'required'` paired with a null or missing adapter
|
|
41
|
+
previously fell through to the body unwrapped — a silent downgrade from "must
|
|
42
|
+
hold the leader lock" to "no lock at all". That combination is no longer
|
|
43
|
+
representable: `unlocked` only exists for a `{ mode: 'none' }` spec, and `locked`
|
|
44
|
+
demands both a keyed spec (via `KeyedLockConfig`) and an adapter (via
|
|
45
|
+
`LeaderLock['Type']`). The composition root — `worker` and `supervisor` in
|
|
46
|
+
`mod.ts` — is now the one place that builds the binding, and its public shapes
|
|
47
|
+
are unchanged.
|
|
48
|
+
|
|
49
|
+
### Minor Changes
|
|
50
|
+
|
|
51
|
+
- cut over to effect v4 (4.0.0-rc.108): public surface derives from effect types; peers flip effect ^3→^4
|
|
52
|
+
|
|
53
|
+
- Produce every workflow through `Workflow.make`.
|
|
54
|
+
|
|
55
|
+
`decideRestart`, `interpretHookResult`, and `admitSurvivorsRun` are now built by the constructor rather
|
|
56
|
+
than annotated with `Workflow<Command, Decision, Error>`. Each decision is behaviourally identical —
|
|
57
|
+
`make` is the identity at runtime — but the channels are now inferred from the decider instead of
|
|
58
|
+
asserted by hand, so a total decision resolves to `UninhabitedError` and becomes uncallable rather than
|
|
59
|
+
compiling as a workflow that cannot fail.
|
|
60
|
+
|
|
61
|
+
`effect-daemon-spec` takes a minor bump because the change is consumer-visible beyond its own source:
|
|
62
|
+
`@systemfsoftware/effect-cell-types` moves from `devDependencies` to `dependencies`, so installing this
|
|
63
|
+
package now installs it. That reclassification is required, not incidental — `make` is a runtime call,
|
|
64
|
+
and `scripts/guards/check-runtime-deps.mjs` fails a runtime import declared only as a dev dependency.
|
|
65
|
+
`omp-claude-compat` gains the same dependency; `stryker-js-cli` already declared it.
|
|
66
|
+
|
|
67
|
+
`RestartDecisionWorkflow` survives as a type-only export: one in-repo consumer, its own property test,
|
|
68
|
+
references it through `ReturnType<…>`.
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- Array types are spelled one way. `Array<T>` and `ReadonlyArray<T>` in emitted
|
|
73
|
+
declarations become `T[]` and `readonly T[]`, which the type checker cannot tell
|
|
74
|
+
apart: no exported type changes, only how it is written.
|
|
75
|
+
|
|
76
|
+
- New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
|
|
77
|
+
|
|
78
|
+
- Express each executor's sandwich as a `Cell` description.
|
|
79
|
+
|
|
80
|
+
Every call site that previously sequenced the phases by hand now builds one description and hands it to the interpreter, so the order these executors run in is carried by the phase types instead of by the order the statements happen to appear in. Behaviour is preserved and no public surface moves: the change is confined to `src/internal/*.executor.ts`, and each package's golden API report is unchanged.
|
|
81
|
+
|
|
82
|
+
One site needed a real fix rather than a translation. `supervisor-body.executor.ts` wrote before it could classify — it recorded a restart, then read the resulting rate — which is a read that depends on an earlier decision. Its read now gathers the restart record and the resulting rate as one product, which keeps that site a single layer, with the intensity tracker passed as the read's command rather than captured from the surrounding scope.
|
|
83
|
+
|
|
84
|
+
- The base mutation preset selects at the make boundary.
|
|
85
|
+
|
|
86
|
+
The preset carries both ignorers (`effect-schema-declarations`, `workflow-make-boundary`) and
|
|
87
|
+
`disableBail: true`, so killer recording is structural for every inheriting config. The sandwich
|
|
88
|
+
packages (daemon-spec, stryker-js-cli, omp-claude-compat) widen `mutate` to all non-test source
|
|
89
|
+
at explicit 100/100/100 thresholds — the ignorer is the selector, so membership is forced by the
|
|
90
|
+
brand rather than chosen by a path list. Library packages' mutate arrays are byte-identical.
|
|
91
|
+
|
|
92
|
+
- `restart-decision.workflow.ts` has its pure decision in a new internal `restart-decision.kernel.ts` with a colocated property test. Both files are internal, so the package's public surface is unchanged and the restart behaviour is identical.
|
|
93
|
+
|
|
94
|
+
- Updated dependencies:
|
|
95
|
+
- @systemfsoftware/effect-cell-types@3.0.0
|
|
96
|
+
|
|
3
97
|
## 1.0.0
|
|
4
98
|
|
|
5
99
|
### Major Changes
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@systemfsoftware/effect-daemon-spec",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"author": "Ryan Lee <drdgvhbh@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
|
|
9
|
-
"directory": "packages/effect
|
|
9
|
+
"directory": "packages/core/effect/daemon-spec"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/effect
|
|
11
|
+
"homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/core/effect/daemon-spec#readme",
|
|
12
12
|
"bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
|
|
13
13
|
"description": "Supervision-tree daemons for Effect-TS — leader election, distributed locks, restart-intensity backoff, dynamic children, and health latches as a pure typed core.",
|
|
14
14
|
"keywords": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@systemfsoftware/effect-cell-types": "^
|
|
40
|
+
"@systemfsoftware/effect-cell-types": "^3.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@effect/vitest": "4.0.0-rc.108",
|
|
@@ -50,15 +50,16 @@
|
|
|
50
50
|
"oxlint": "^1.77.0",
|
|
51
51
|
"rimraf": "^6.1.3",
|
|
52
52
|
"tsdown": "^0.22.14",
|
|
53
|
+
"typescript": "^7",
|
|
53
54
|
"vitest": "^4.1.10",
|
|
54
|
-
"@systemfsoftware/effect-gherkin-spec": "^
|
|
55
|
-
"@systemfsoftware/effect-schema-law": "^0.
|
|
56
|
-
"@systemfsoftware/effect-schema-vite": "^1.5.
|
|
55
|
+
"@systemfsoftware/effect-gherkin-spec": "^2.0.0",
|
|
56
|
+
"@systemfsoftware/effect-schema-law": "^0.8.0",
|
|
57
|
+
"@systemfsoftware/effect-schema-vite": "^1.5.3",
|
|
57
58
|
"@systemfsoftware/oxlint-config": "^0.1.0",
|
|
58
|
-
"@systemfsoftware/oxlint-plugin-cell-vocabulary": "^1.
|
|
59
|
-
"@systemfsoftware/
|
|
60
|
-
"@systemfsoftware/
|
|
61
|
-
"@systemfsoftware/
|
|
59
|
+
"@systemfsoftware/oxlint-plugin-cell-vocabulary": "^1.2.0",
|
|
60
|
+
"@systemfsoftware/stryker-plugins": "^0.13.0",
|
|
61
|
+
"@systemfsoftware/vitest-config": "^0.1.0",
|
|
62
|
+
"@systemfsoftware/tsconfig": "^1.3.3"
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
65
|
"effect": "4.0.0-rc.108"
|