instar 1.3.893 → 1.3.895
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/messaging/slack/SlackAdapter.js +15 -14
- package/dist/messaging/slack/SlackAdapter.js.map +1 -1
- package/dist/messaging/slack/types.d.ts +7 -4
- package/dist/messaging/slack/types.d.ts.map +1 -1
- package/dist/messaging/slack/types.js.map +1 -1
- package/dist/monitoring/SessionMonitor.d.ts.map +1 -1
- package/dist/monitoring/SessionMonitor.js +15 -4
- package/dist/monitoring/SessionMonitor.js.map +1 -1
- package/dist/monitoring/SessionRecovery.d.ts +9 -0
- package/dist/monitoring/SessionRecovery.d.ts.map +1 -1
- package/dist/monitoring/SessionRecovery.js +42 -5
- package/dist/monitoring/SessionRecovery.js.map +1 -1
- package/dist/permissions/AmbientContributionGate.d.ts +14 -17
- package/dist/permissions/AmbientContributionGate.d.ts.map +1 -1
- package/dist/permissions/AmbientContributionGate.js +50 -56
- package/dist/permissions/AmbientContributionGate.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.894.md +25 -0
- package/upgrades/1.3.895.md +23 -0
- package/upgrades/side-effects/context-wedge-seen-latch.md +88 -0
- package/upgrades/side-effects/slack-considered-acknowledgment-v1.md +80 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Side-Effects Review — Context-wedge seen latch
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `context-wedge-seen-latch`
|
|
4
|
+
**Date:** `2026-07-21`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `independent Codex agent /root/living_doc_canonicalization`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`SessionMonitor` records the existing detector's positive context-exhaustion result through a true-only per-topic latch owned and persisted by `SessionRecovery`. `SessionRecovery` may reuse that remembered observation after the banner scrolls away, while retaining its existing ownership, active-work, cooldown, attempt, compact, and respawn authority. Tests cover monitor presentation, persistence, reload, attempt-row preservation, success clear, and manual clear.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `detectContextExhaustion` result — pass-through — unchanged detector is the only setter signal.
|
|
15
|
+
- `SessionMonitor` context presentation — modify — current detector match or remembered true signal enters the same existing call, still behind the existing monitor cooldown.
|
|
16
|
+
- `SessionRecovery` context branch — modify — consumes the remembered signal but retains every existing recovery guard and action decision.
|
|
17
|
+
- latch clear — add invariant — only existing `recovered:true` or explicit manual clear.
|
|
18
|
+
|
|
19
|
+
## 1. Over-block
|
|
20
|
+
|
|
21
|
+
No new block/allow surface. A deliberately recycled numeric topic id could inherit a stale true value unless the operator uses the explicit manual clear first; the final scope ruling rejects inferred mapping validation, and current topic ids are stable external conversation identities.
|
|
22
|
+
|
|
23
|
+
## 2. Under-block
|
|
24
|
+
|
|
25
|
+
The change remembers only context wedges already recognized by the existing patterns. It does not recognize new banner text, silent provider/network waits, or other terminal shapes. A persistence write failure degrades to in-memory behavior for that process, matching the existing recovery-state failure posture.
|
|
26
|
+
|
|
27
|
+
## 3. Level-of-abstraction fit
|
|
28
|
+
|
|
29
|
+
The latch is signal memory at the observer/action seam. It does not create a parallel detector or recovery controller. Persistence belongs to `SessionRecovery`, the existing single owner of recovery-state writes; the monitor receives only mechanical mark/read methods.
|
|
30
|
+
|
|
31
|
+
## 4. Signal vs authority compliance
|
|
32
|
+
|
|
33
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
34
|
+
|
|
35
|
+
- [x] No — this change produces a signal consumed by an existing smart gate.
|
|
36
|
+
- [ ] No — this change has no block/allow surface.
|
|
37
|
+
- [ ] Yes — but the logic is a smart gate with full conversational context (LLM-backed with recent history or equivalent).
|
|
38
|
+
- [ ] ⚠️ Yes, with brittle logic — STOP.
|
|
39
|
+
|
|
40
|
+
The unchanged regex detector sets only a boolean. The existing deterministic SessionRecovery policy remains the only action authority and applies ownership, work, cooldown, attempt, compact-verification, and respawn rules.
|
|
41
|
+
|
|
42
|
+
## 4b. Judgment-point check
|
|
43
|
+
|
|
44
|
+
No new static heuristic at a competing-signals decision point. True-or-absent persistence is an invariant materialization of a detector result. Competing work/recovery signals remain with the existing SessionRecovery authority.
|
|
45
|
+
|
|
46
|
+
## 5. Interactions
|
|
47
|
+
|
|
48
|
+
- **Shadowing:** a current detector match remains preferred; the latch matters only when the current capture is negative.
|
|
49
|
+
- **Double-fire:** one monitor branch calls the one recovery instance at most once per existing monitor cooldown.
|
|
50
|
+
- **Races:** `SessionMonitor.poll()` is already serialized; latch mutations and whole-state writes occur synchronously through the one SessionRecovery instance.
|
|
51
|
+
- **Feedback loops:** failed/deferred recovery retains the boolean but creates no timer. Existing cooldown and attempt exhaustion bound later action.
|
|
52
|
+
|
|
53
|
+
## 6. External surfaces
|
|
54
|
+
|
|
55
|
+
The only durable surface is a `wedgedSeen` true-only object in `.instar/recovery-state.json`. No raw pane text, pattern, timestamp, confidence, or session metadata is stored. Users may observe recovery continuing after the original banner scrolls away. No new notification or external-service call is added. The manual-clear method is an internal recovery seam, not a new operator UI or API.
|
|
56
|
+
|
|
57
|
+
## 6b. Operator-surface quality
|
|
58
|
+
|
|
59
|
+
No operator surface — not applicable.
|
|
60
|
+
|
|
61
|
+
## 7. Multi-machine posture
|
|
62
|
+
|
|
63
|
+
Machine-local by design (`hardware-bound-resource`): the signal describes a tmux pane and SessionRecovery instance local to the machine owning that session. It emits no new user-facing notice, generates no URL, and creates no pool-wide authority. Topic transfer needs the existing recovery/ownership lifecycle or explicit manual clear; this increment intentionally adds no mapping policy.
|
|
64
|
+
|
|
65
|
+
## 8. Rollback cost
|
|
66
|
+
|
|
67
|
+
Revert the code and ship a patch. Old versions ignore the additive `wedgedSeen` field in the recovery-state JSON. No migration is required; the field can remain harmlessly or be manually removed.
|
|
68
|
+
|
|
69
|
+
## Conclusion
|
|
70
|
+
|
|
71
|
+
The change is intentionally narrower than the withdrawn expiring typed-latch design. The side-effect review confirms that it adds only durable detector memory, while all action authority and brakes remain in SessionRecovery. The required independent second pass concurred.
|
|
72
|
+
|
|
73
|
+
## Second-pass review (if required)
|
|
74
|
+
|
|
75
|
+
**Reviewer:** independent Codex agent `/root/living_doc_canonicalization`
|
|
76
|
+
**Independent read of the artifact:** concur
|
|
77
|
+
|
|
78
|
+
Concur with the review. The unchanged detector is the sole setter; persistence is true-or-absent with no metadata; SessionRecovery retains ownership, work, cooldown, attempt, compact, and respawn authority; monitor reuse stays behind the existing cooldown; and clear occurs only on `recovered:true` or the explicit manual seam. No new timer, pattern, mapping, retry owner, engine, or external side effect was introduced.
|
|
79
|
+
|
|
80
|
+
## Evidence pointers
|
|
81
|
+
|
|
82
|
+
- `tests/unit/context-exhaustion-recovery.test.ts`
|
|
83
|
+
- `tests/unit/SessionMonitor.test.ts`
|
|
84
|
+
- `docs/specs/reports/context-wedge-detection-completeness-convergence.md`
|
|
85
|
+
|
|
86
|
+
## Class-Closure Declaration (display-only mirror)
|
|
87
|
+
|
|
88
|
+
This modifies an existing self-triggered recovery path but adds no new control-loop edge or side effect. `defectClass: unbounded-self-action`; `closure: guard`; `guardEvidence: { enforcementType: ratchet, citation: tests/unit/context-exhaustion-recovery.test.ts, howCaught: the persistence/reload test forces the detector-positive banner to disappear, then proves the same bounded SessionRecovery path still receives the true-only signal while the existing cooldown and maximum-attempt brake remain authoritative }`. The unchanged steady-state brakes are SessionMonitor's poll/cooldown and SessionRecovery's per-session cooldown plus max-attempt cap; `tests/unit/self-action-convergence.test.ts` remains the standing controller ratchet.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Side-Effects Review — Slack considered acknowledgment v1
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `slack-considered-acknowledgment-v1`
|
|
4
|
+
**Date:** `2026-07-21`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `instar-codey throughput-floor workstream reviewer`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
`AmbientContributionGate` expands its one conservative semantic result from binary speak/silent to the closed action `speak | react | silent`. `SlackAdapter` mechanically executes `react` through its existing `addReaction` primitive with fixed `eyes`, buffers the inbound message, and returns without a conversational turn. Tests and Slack config documentation cover the new contract.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `AmbientContributionGate.decideAction` — modified judgment authority — one existing context-rich provider call chooses one closed action.
|
|
15
|
+
- `SlackAdapter._handleMessage` ambient branch — modified invariant executor — exhaustive mechanical execution without content reinterpretation.
|
|
16
|
+
|
|
17
|
+
## 1. Over-block
|
|
18
|
+
|
|
19
|
+
Strict parsing can turn otherwise understandable but nonconforming provider output into silence. This is intentional: unsolicited activity must never arise from guessed or malformed output.
|
|
20
|
+
|
|
21
|
+
## 2. Under-block
|
|
22
|
+
|
|
23
|
+
A confident but socially mistaken `react` can still add `eyes`. Exposure is bounded to explicitly opted channels and the existing shared cap; no deterministic parser can guarantee recipients' interpretation.
|
|
24
|
+
|
|
25
|
+
## 3. Level-of-abstraction fit
|
|
26
|
+
|
|
27
|
+
Correct layer. The existing context-rich LLM gate retains semantic authority. The adapter reuses the existing low-level reaction primitive and performs no semantic classification.
|
|
28
|
+
|
|
29
|
+
## 4. Signal vs authority compliance
|
|
30
|
+
|
|
31
|
+
- [x] Yes — the modified authority is the existing smart gate with conversational context.
|
|
32
|
+
|
|
33
|
+
No brittle detector gains authority. Strict schema and confidence checks are deterministic safety floors around the one judgment result.
|
|
34
|
+
|
|
35
|
+
## 4b. Judgment-point check
|
|
36
|
+
|
|
37
|
+
No static heuristic is added at a competing-signals point. The spec declares the bounded action space, conservative silent floor, existing LLM arbiter, and fallback ladder.
|
|
38
|
+
|
|
39
|
+
## 5. Interactions
|
|
40
|
+
|
|
41
|
+
- **Shadowing:** authorization, directedness, channel opt-in, inbound deduplication, and rate exhaustion still precede the model call.
|
|
42
|
+
- **Double-fire:** one returned action enters one branch; react returns before downstream message dispatch.
|
|
43
|
+
- **Races:** no new state. Speak and react consume the same existing machine-local timestamp budget immediately before execution.
|
|
44
|
+
- **Feedback loops:** none; no outcome feedback or retry is added.
|
|
45
|
+
|
|
46
|
+
## 6. External surfaces
|
|
47
|
+
|
|
48
|
+
Slack may receive one `reactions.add` call for the original message. The reaction is fixed to `eyes`; failures remain contained by the existing fire-and-forget primitive. No new API, dashboard, operator action, durable state, or timing controller is added.
|
|
49
|
+
|
|
50
|
+
## 6b. Operator-surface quality
|
|
51
|
+
|
|
52
|
+
No operator surface — not applicable.
|
|
53
|
+
|
|
54
|
+
## 7. Multi-machine posture
|
|
55
|
+
|
|
56
|
+
**Unified behavior through existing ownership.** The existing Slack owner handles the inbound event and makes the sole decision. No new state is replicated or stranded. There are no notices, durable records, or generated URLs. The unchanged legacy rate window remains local to the active owner.
|
|
57
|
+
|
|
58
|
+
## 8. Rollback cost
|
|
59
|
+
|
|
60
|
+
Pure code rollback: revert the enum/parser and adapter branch and ship a patch. There is no migration or state repair. Users would temporarily return to binary speak-or-silent behavior.
|
|
61
|
+
|
|
62
|
+
## Conclusion
|
|
63
|
+
|
|
64
|
+
The change is tightly bounded and fail-to-silent. The principal risks—social ambiguity, malformed model output, duplicate action, and reaction spam—are constrained by opt-in, fixed meaning, strict parsing, single branching, and the existing shared cap. The independent review's one documentation concern was corrected; the change is clear to ship.
|
|
65
|
+
|
|
66
|
+
## Second-pass review
|
|
67
|
+
|
|
68
|
+
**Reviewer:** instar-codey throughput-floor workstream reviewer
|
|
69
|
+
**Independent read of the artifact:** concur
|
|
70
|
+
|
|
71
|
+
The reviewer verified no authority, state, retry, or analytics creep. It raised one material documentation mismatch: the adapter's legacy comment still claimed the gate could only make the agent quieter. The comment was corrected to describe the closed three-action execution, fixed reaction attempt, and fail-to-silent posture; the reviewer re-read the hunk and concurred with no remaining concern.
|
|
72
|
+
|
|
73
|
+
## Evidence pointers
|
|
74
|
+
|
|
75
|
+
- `tests/unit/slack-ambient-contribution-gate.test.ts`
|
|
76
|
+
- `tests/unit/slack-ambient-gate-wiring.test.ts`
|
|
77
|
+
|
|
78
|
+
## Class-Closure Declaration (display-only mirror)
|
|
79
|
+
|
|
80
|
+
No agent-authored-artifact defect and no self-triggered controller — not applicable.
|