instar 1.3.418 → 1.3.420

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.
@@ -0,0 +1,69 @@
1
+ # Side-Effects Review — EXO 3.0 harness gap fixes
2
+
3
+ **Version / slug:** `exo3-harness-gap-fixes`
4
+ **Date:** `2026-06-07`
5
+ **Author:** `Echo (Instar dev agent)`
6
+ **Second-pass reviewer:** `not required (Tier-1)`
7
+
8
+ ## Summary of the change
9
+
10
+ Three surgical bug fixes surfaced by the new `exo3-harness` from-every-angle verification:
11
+ (1) `src/core/AgentPassport.ts` `permits()` — default `forbiddenActions`/`allowedCapabilities` to `[]`
12
+ so a partial peer passport yields a verdict instead of an HTTP 500; (2) `src/core/OrgIntentManager.ts`
13
+ `parse()` — accept the documented chained `A > B > C` Tradeoff Hierarchy form in addition to bullets;
14
+ (3) `src/server/routes.ts` `/metrics/learning-velocity` — read the REAL event sources
15
+ (`state/evolution/learning-registry.json` with `source.discoveredAt`, `state/evolution/action-queue.json`
16
+ `.actions[].createdAt`, and the SQLite `correctionLedger`) instead of three paths the agent never writes.
17
+ Regression tests extended in the matching unit + integration suites.
18
+
19
+ ## Decision-point inventory
20
+
21
+ - `AgentPassport.permits()` — modify (add input-tolerance; verdict logic unchanged)
22
+ - `OrgIntentManager.parse()` tradeoff parsing — modify (add chained-line acceptance; bullets unchanged)
23
+ - `/metrics/learning-velocity` event gathering — modify (correct source paths; scorer untouched)
24
+
25
+ ## 1. Over-block
26
+
27
+ **What legitimate inputs does this change reject that it shouldn't?**
28
+ None. Passport `permits()` becomes MORE permissive of input shapes (defaults missing arrays) but the
29
+ allow/deny verdict for any complete passport is byte-identical. The tradeoff parser only ADDS a format;
30
+ a bulleted hierarchy parses exactly as before. No block/allow surface added.
31
+
32
+ ## 2. Under-block
33
+
34
+ **What does this change now allow that it shouldn't?**
35
+ Nothing new is allowed. A partial passport that omits `forbiddenActions` is treated as "no forbidden
36
+ actions" — which is the correct, safe reading of an absent list (the verifier still applies trust-floor
37
+ and capability-scope). A forbidden action present in a partial passport is still denied (covered by a
38
+ regression test).
39
+
40
+ ## 3. Data / state
41
+
42
+ **What persistent state does this read or write?**
43
+ Read-only. The learning-velocity route only READS `state/evolution/*.json` and the correction ledger;
44
+ it never writes. No new files, no schema changes, no migrations.
45
+
46
+ ## 4. Performance
47
+
48
+ The learning-velocity route now reads `action-queue.json` (can be ~hundreds of KB) once per request.
49
+ This endpoint is a low-frequency, on-demand observability call (not a hot path); a single synchronous
50
+ JSON parse per call is acceptable and bounded. No new work on any per-message or per-tick path.
51
+
52
+ ## 5. Failure modes
53
+
54
+ Every new source read is wrapped in try/catch and skips on error (unreadable/malformed file → that
55
+ source contributes zero, never a 500). The correction ledger read is guarded by `if (ctx.correctionLedger)`
56
+ so agents with correction-learning off (ledger absent) are unaffected. The passport guard removes a
57
+ crash failure mode entirely.
58
+
59
+ ## 6. Security / auth
60
+
61
+ No auth surface change. The passport fix HARDENS a trust boundary (a peer-supplied passport can no
62
+ longer crash the verifier — a malformed/hostile card now produces a clean verdict). No new endpoints,
63
+ no new capabilities, no credential handling.
64
+
65
+ ## 7. Migration / compatibility
66
+
67
+ No migration needed. The learning-velocity path correction means existing agents' metric starts
68
+ reflecting real events on the next deploy (it read zero before). No config, no on-disk format, no
69
+ agent-installed file changes. Pure runtime behavior correction.