instar 1.3.79 → 1.3.81
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/dist/core/AutoUpdater.d.ts +16 -0
- package/dist/core/AutoUpdater.d.ts.map +1 -1
- package/dist/core/AutoUpdater.js +78 -6
- package/dist/core/AutoUpdater.js.map +1 -1
- package/dist/core/UpdateGate.d.ts +11 -0
- package/dist/core/UpdateGate.d.ts.map +1 -1
- package/dist/core/UpdateGate.js +17 -0
- package/dist/core/UpdateGate.js.map +1 -1
- package/dist/monitoring/MentorStageA.d.ts +23 -5
- package/dist/monitoring/MentorStageA.d.ts.map +1 -1
- package/dist/monitoring/MentorStageA.js +43 -8
- package/dist/monitoring/MentorStageA.js.map +1 -1
- package/dist/monitoring/TokenLedger.d.ts +6 -0
- package/dist/monitoring/TokenLedger.d.ts.map +1 -1
- package/dist/monitoring/TokenLedger.js +1 -1
- package/dist/monitoring/TokenLedger.js.map +1 -1
- package/dist/server/AgentServer.d.ts +9 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +41 -1
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +12 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +48 -48
- package/upgrades/1.3.80.md +35 -0
- package/upgrades/1.3.81.md +23 -0
- package/upgrades/side-effects/auto-updater-restart-activation-visibility.md +93 -0
- package/upgrades/side-effects/mentor-stagea-full-exchange-surface.md +90 -0
- package/upgrades/side-effects/tokenledger-503-alive-regression.md +82 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Side-Effects Review — Mentor Stage-A full exchange surface
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `mentor-stagea-full-exchange-surface`
|
|
4
|
+
**Date:** `2026-05-29`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `Justin review requested in PR`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This change completes the mentor Stage-A conversation surface by logging mentor-sent prompt content after successful delivery and interleaving those turns with mentee replies. `src/monitoring/MentorStageA.ts` adds `MentorSentLine`, `parseMentorSent`, and timestamp interleaving in the pure `buildConversationSurface` function. `src/server/AgentServer.ts` appends successful mentor sends to `mentor-sent.jsonl`, reads that log for `getSurface`, and continues reading mentee replies from `mentor-replies.jsonl`. `tests/unit/MentorStageA.test.ts` covers the new parser and the interleave boundary.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `MentorStageA.buildConversationSurface` — modify — determines what user-visible conversation Stage A sees.
|
|
15
|
+
- `AgentServer.deliverToMentee` — modify — writes mentor-sent prompt content only after delivery succeeds.
|
|
16
|
+
- `AgentServer.getSurface` wiring — modify — feeds parsed mentor-sent turns plus parsed mentee-reply turns into the pure surface builder.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Over-block
|
|
21
|
+
|
|
22
|
+
No block/allow surface — over-block not applicable. The parsers drop malformed or empty log rows, but that only removes unusable history from Stage-A context; it does not reject user input, messages, or actions.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Under-block
|
|
27
|
+
|
|
28
|
+
The main remaining miss is a send that succeeds but crashes before the append finishes. In that case the next surface may still lack the mentor-side prompt. The append is intentionally best-effort and non-fatal so delivery is not turned into a filesystem-dependent operation. Rows without timestamps or text are skipped rather than guessed.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 3. Level-of-abstraction fit
|
|
33
|
+
|
|
34
|
+
The pure parser and interleave logic belong in `MentorStageA.ts`, which already owns the Stage-A boundary and has focused unit tests. File I/O belongs in `AgentServer`, which already reads the reply log and owns delivery. The change uses the existing a2a transport and outstanding prompt tracker rather than adding a second delivery path.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 4. Signal vs authority compliance
|
|
39
|
+
|
|
40
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
41
|
+
|
|
42
|
+
- [ ] No — this change produces a signal consumed by an existing smart gate.
|
|
43
|
+
- [x] No — this change has no block/allow surface.
|
|
44
|
+
- [ ] Yes — but the logic is a smart gate with full conversational context (LLM-backed with recent history or equivalent).
|
|
45
|
+
- [ ] Yes, with brittle logic — STOP. Reshape the design. Brittle detectors must not own block authority.
|
|
46
|
+
|
|
47
|
+
This change expands the data surface visible to Stage A with mentor-owned, user-visible conversation text. It does not add a new blocker, filter, or authority.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 5. Interactions
|
|
52
|
+
|
|
53
|
+
- **Shadowing:** The sent-log parser does not replace the reply parser. Both feed the same pure surface builder.
|
|
54
|
+
- **Double-fire:** The sent log is independent from the metadata-only a2a sent ledger. It is intentionally content-bearing because the existing ledger cannot provide prompt text.
|
|
55
|
+
- **Races:** Delivery can succeed while appending the sent row fails. The next surface loses that mentor-side turn, but no transport or reply tracking is broken.
|
|
56
|
+
- **Feedback loops:** Logging occurs only after `deliverA2aMessage` returns true. Failed sends do not create fake conversation history.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 6. External surfaces
|
|
61
|
+
|
|
62
|
+
The new external surface is a local state JSONL file containing mentor prompt content. It stays under the agent state directory and is not published or sent elsewhere by this change. Stage-A prompt content changes because it can now include both sides of the mentor exchange. The a2a wire format, Telegram behavior, scheduling policy, and reply capture remain unchanged.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 7. Rollback cost
|
|
67
|
+
|
|
68
|
+
Rollback is a hot-fix release that reverts the MentorStageA, AgentServer, and test changes. The JSONL file can remain on disk; older versions ignore it. No database migration or agent state repair is required.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Conclusion
|
|
73
|
+
|
|
74
|
+
The change closes the half-history limitation without weakening the two-hats boundary. Stage A still receives only user-visible conversation and the mentor's own agenda, but now that visible conversation includes both mentor prompts and mentee replies. Clear to ship for PR review.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Second-pass review (if required)
|
|
79
|
+
|
|
80
|
+
**Reviewer:** Justin review requested in PR
|
|
81
|
+
**Independent read of the artifact: pending external review**
|
|
82
|
+
|
|
83
|
+
This changes a mentor information-flow surface, so the PR is intentionally opened for Justin review before merge.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Evidence pointers
|
|
88
|
+
|
|
89
|
+
- `npm test -- --run tests/unit/MentorStageA.test.ts`
|
|
90
|
+
- `npm run lint`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Side-Effects Review — TokenLedger 503 Alive Regression Guard
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `tokenledger-503-alive-regression`
|
|
4
|
+
**Date:** `2026-05-29`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This change adds an integration regression test for the TokenLedger 503 recovery paths and a narrow TokenLedger constructor seam used only by tests. The test seeds an old pre-attribution SQLite database, opens it through the real ledger, wires the real token route, and verifies `/tokens/summary` returns HTTP 200 with data. It also simulates a prior successful native sqlite heal by another subsystem and proves TokenLedger retries open cheaply and the route remains alive.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
No runtime decision point is added or modified. The existing route decision of returning 503 when no ledger is configured is unchanged. The added constructor seam only changes how tests inject a database opener.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 1. Over-block
|
|
19
|
+
|
|
20
|
+
No block/allow surface — over-block not applicable.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Under-block
|
|
25
|
+
|
|
26
|
+
No block/allow surface — under-block not applicable. The test does not cover every TokenLedger route; it targets the summary route because that is the smallest alive signal for the two known 503 causes.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 3. Level-of-abstraction fit
|
|
31
|
+
|
|
32
|
+
The test sits at the integration layer because the failure was endpoint unavailability, not only an internal helper result. The constructor seam is lower-level and narrowly scoped to the SQLite open boundary, which is the only place the native heal timing can be simulated without mutating installed dependencies.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 4. Signal vs authority compliance
|
|
37
|
+
|
|
38
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
39
|
+
|
|
40
|
+
- [x] No — this change has no block/allow surface.
|
|
41
|
+
|
|
42
|
+
The change does not add a detector or an authority. It adds coverage for existing recovery behavior and one dependency injection seam.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 5. Interactions
|
|
47
|
+
|
|
48
|
+
- **Shadowing:** No existing route behavior is shadowed. The route still checks for a configured ledger before reading summaries.
|
|
49
|
+
- **Double-fire:** The native-heal test asserts the opposite of double-fire: the simulated prior rebuild is consumed once, and TokenLedger does not start a second rebuild.
|
|
50
|
+
- **Races:** Temporary databases are per-test files. The NativeModuleHealer singleton is reset after each test.
|
|
51
|
+
- **Feedback loops:** None identified. The test does not feed production telemetry or persisted agent state.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 6. External surfaces
|
|
56
|
+
|
|
57
|
+
No user-facing API shape changes. The only production type-surface change is the optional `databaseFactory` field on `TokenLedgerOptions`, which existing callers do not pass. Persistent state behavior is unchanged except that the test verifies the existing schema migration writes the missing column.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 7. Rollback cost
|
|
62
|
+
|
|
63
|
+
Rollback is a normal revert. No production migration is added by this change. If the seam proved undesirable, removing it would only require deleting the integration test or replacing the injection strategy.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Conclusion
|
|
68
|
+
|
|
69
|
+
The change is clear to ship. It strengthens coverage at the level where the regression was visible while keeping production behavior unchanged.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Second-pass review (if required)
|
|
74
|
+
|
|
75
|
+
**Reviewer:** `not required`
|
|
76
|
+
**Independent read of the artifact:** `not required`
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Evidence pointers
|
|
81
|
+
|
|
82
|
+
- `tests/integration/tokens-503-regression.test.ts`
|