dsh-plugin-infj-pet 1.0.3 → 1.0.4
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 +34 -0
- package/README.md +6 -2
- package/lib/index.js +13 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
3
3
|
All notable changes to this plugin are documented here. This project follows
|
|
4
4
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
+
## 1.0.4
|
|
7
|
+
|
|
8
|
+
**Fix: the plugin never activated**
|
|
9
|
+
|
|
10
|
+
`1.0.3` shipped a Host half that could not start. In Cordis an `inject` entry
|
|
11
|
+
names a service the plugin waits for, and the entry stays pending until that name
|
|
12
|
+
is provided — an object form does not mean "optional". The Host half declared
|
|
13
|
+
`{ optional: ['agents'] }`, which asks for a service literally called `optional`.
|
|
14
|
+
Nothing provides it, so the entry stayed pending forever and the whole plugin,
|
|
15
|
+
browser half included, never loaded. DSH reported it as:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
1 entry did not activate infj-pet (dsh-plugin-infj-pet):
|
|
19
|
+
pending (waiting for service: optional)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The `inject` declaration is gone. The optional agents registry is read with
|
|
23
|
+
`ctx.get('agents')` instead, which returns `undefined` when it is absent and
|
|
24
|
+
costs only the coarse `isSubagent` hint on a recorded boundary.
|
|
25
|
+
|
|
26
|
+
Guards added so this cannot come back:
|
|
27
|
+
|
|
28
|
+
- a test asserts `inject` is `undefined`, with the reason in the failure path
|
|
29
|
+
- a test asserts the Host half still activates and records a boundary when no
|
|
30
|
+
agents registry is present
|
|
31
|
+
- the fake Cordis context no longer needs `agents`, because the plugin must not
|
|
32
|
+
ask for it
|
|
33
|
+
|
|
34
|
+
**A note on why this was missed.** Forty-six of the forty-seven tests exercised
|
|
35
|
+
the browser half, which was never the part failing. The Host half was tested
|
|
36
|
+
against a fake context — and a fake context does not enforce the `inject` gate,
|
|
37
|
+
because that gate is framework behaviour. A complete stub hid a framework-level
|
|
38
|
+
failure; the new assertions target exactly that blind spot.
|
|
39
|
+
|
|
6
40
|
## 1.0.3
|
|
7
41
|
|
|
8
42
|
**The sage no longer paces about**
|
package/README.md
CHANGED
|
@@ -167,8 +167,12 @@ contract:
|
|
|
167
167
|
- injected shares: `slots`, `sessions`, `connection`, `locale`
|
|
168
168
|
- only `react` and `react-dom/client` are required from the platform module table
|
|
169
169
|
|
|
170
|
-
The Host half declares no
|
|
171
|
-
|
|
170
|
+
The Host half declares **no `inject`**, on purpose. A Cordis `inject` entry names a
|
|
171
|
+
service the plugin waits for, and the entry stays pending until that service is
|
|
172
|
+
provided — so an `inject` that never resolves stops the whole plugin, browser half
|
|
173
|
+
included, from ever activating. The optional agents registry is read with
|
|
174
|
+
`ctx.get('agents')` instead, which returns `undefined` when it is missing and
|
|
175
|
+
costs only the coarse `isSubagent` hint.
|
|
172
176
|
|
|
173
177
|
DSH is evolving quickly. If a future release changes the slot or store contract,
|
|
174
178
|
the sage is written to fail quietly: it falls back to a non-reactive pose rather
|
package/lib/index.js
CHANGED
|
@@ -15,8 +15,19 @@
|
|
|
15
15
|
/** Cordis plugin name; also the service key. */
|
|
16
16
|
export const name = 'infjPet';
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Deliberately no `inject`.
|
|
20
|
+
*
|
|
21
|
+
* A Cordis `inject` entry names a service the plugin waits for, and the plugin
|
|
22
|
+
* stays pending until that name is provided. An object form does not mean
|
|
23
|
+
* "optional": `{ optional: ['agents'] }` asks for a service literally called
|
|
24
|
+
* `optional`, which never arrives, so the whole entry never activates.
|
|
25
|
+
*
|
|
26
|
+
* The agents registry is read with `ctx.get('agents')` in `apply` instead. That
|
|
27
|
+
* returns `undefined` when the service is absent, which is exactly the
|
|
28
|
+
* degradation wanted here: boundaries are still recorded, only the coarse
|
|
29
|
+
* `isSubagent` hint is left off.
|
|
30
|
+
*/
|
|
20
31
|
|
|
21
32
|
/** Bounded ring of remembered boundaries. */
|
|
22
33
|
export const HISTORY_LIMIT = 256;
|
package/package.json
CHANGED