instar 1.3.883 → 1.3.884
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/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +12 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +20 -20
- package/src/templates/scripts/telegram-reply.sh +15 -0
- package/upgrades/1.3.884.md +24 -0
- package/upgrades/side-effects/telegram-reply-bounded-outcome.md +76 -0
- package/upgrades/telegram-reply-bounded-outcome.eli16.md +9 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-07-19T22:02:34.529Z",
|
|
5
|
+
"instarVersion": "1.3.884",
|
|
6
6
|
"entryCount": 202,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"domain": "identity",
|
|
12
12
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
13
13
|
"installedPath": ".instar/hooks/instar/session-start.sh",
|
|
14
|
-
"contentHash": "
|
|
14
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
15
15
|
"since": "2025-01-01"
|
|
16
16
|
},
|
|
17
17
|
"hook:dangerous-command-guard": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"domain": "safety",
|
|
21
21
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
22
22
|
"installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
|
|
23
|
-
"contentHash": "
|
|
23
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
24
24
|
"since": "2025-01-01"
|
|
25
25
|
},
|
|
26
26
|
"hook:grounding-before-messaging": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"domain": "safety",
|
|
30
30
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
31
31
|
"installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
|
|
32
|
-
"contentHash": "
|
|
32
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
33
33
|
"since": "2025-01-01"
|
|
34
34
|
},
|
|
35
35
|
"hook:compaction-recovery": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"domain": "identity",
|
|
39
39
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
40
40
|
"installedPath": ".instar/hooks/instar/compaction-recovery.sh",
|
|
41
|
-
"contentHash": "
|
|
41
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
42
42
|
"since": "2025-01-01"
|
|
43
43
|
},
|
|
44
44
|
"hook:external-operation-gate": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"domain": "safety",
|
|
48
48
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
49
49
|
"installedPath": ".instar/hooks/instar/external-operation-gate.js",
|
|
50
|
-
"contentHash": "
|
|
50
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
51
51
|
"since": "2025-01-01"
|
|
52
52
|
},
|
|
53
53
|
"hook:deferral-detector": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"domain": "safety",
|
|
57
57
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
58
58
|
"installedPath": ".instar/hooks/instar/deferral-detector.js",
|
|
59
|
-
"contentHash": "
|
|
59
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
60
60
|
"since": "2025-01-01"
|
|
61
61
|
},
|
|
62
62
|
"hook:self-stop-guard": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"domain": "coherence",
|
|
66
66
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
67
67
|
"installedPath": ".instar/hooks/instar/self-stop-guard.js",
|
|
68
|
-
"contentHash": "
|
|
68
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
69
69
|
"since": "2025-01-01"
|
|
70
70
|
},
|
|
71
71
|
"hook:post-action-reflection": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"domain": "evolution",
|
|
75
75
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
76
76
|
"installedPath": ".instar/hooks/instar/post-action-reflection.js",
|
|
77
|
-
"contentHash": "
|
|
77
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
78
78
|
"since": "2025-01-01"
|
|
79
79
|
},
|
|
80
80
|
"hook:external-communication-guard": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"domain": "safety",
|
|
84
84
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
85
85
|
"installedPath": ".instar/hooks/instar/external-communication-guard.js",
|
|
86
|
-
"contentHash": "
|
|
86
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
87
87
|
"since": "2025-01-01"
|
|
88
88
|
},
|
|
89
89
|
"hook:scope-coherence-collector": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"domain": "coherence",
|
|
93
93
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
94
94
|
"installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
|
|
95
|
-
"contentHash": "
|
|
95
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
96
96
|
"since": "2025-01-01"
|
|
97
97
|
},
|
|
98
98
|
"hook:scope-coherence-checkpoint": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"domain": "coherence",
|
|
102
102
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
103
103
|
"installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
|
|
104
|
-
"contentHash": "
|
|
104
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
105
105
|
"since": "2025-01-01"
|
|
106
106
|
},
|
|
107
107
|
"hook:free-text-guard": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"domain": "safety",
|
|
111
111
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
112
112
|
"installedPath": ".instar/hooks/instar/free-text-guard.sh",
|
|
113
|
-
"contentHash": "
|
|
113
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
114
114
|
"since": "2025-01-01"
|
|
115
115
|
},
|
|
116
116
|
"hook:claim-intercept": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"domain": "coherence",
|
|
120
120
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
121
121
|
"installedPath": ".instar/hooks/instar/claim-intercept.js",
|
|
122
|
-
"contentHash": "
|
|
122
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
123
123
|
"since": "2025-01-01"
|
|
124
124
|
},
|
|
125
125
|
"hook:claim-intercept-response": {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"domain": "coherence",
|
|
129
129
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
130
130
|
"installedPath": ".instar/hooks/instar/claim-intercept-response.js",
|
|
131
|
-
"contentHash": "
|
|
131
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
132
132
|
"since": "2025-01-01"
|
|
133
133
|
},
|
|
134
134
|
"hook:stop-gate-router": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"domain": "safety",
|
|
138
138
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
139
139
|
"installedPath": ".instar/hooks/instar/stop-gate-router.js",
|
|
140
|
-
"contentHash": "
|
|
140
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
141
141
|
"since": "2025-01-01"
|
|
142
142
|
},
|
|
143
143
|
"hook:auto-approve-permissions": {
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"domain": "safety",
|
|
147
147
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
148
148
|
"installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
|
|
149
|
-
"contentHash": "
|
|
149
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
150
150
|
"since": "2025-01-01"
|
|
151
151
|
},
|
|
152
152
|
"job:health-check": {
|
|
@@ -1242,7 +1242,7 @@
|
|
|
1242
1242
|
"type": "template",
|
|
1243
1243
|
"domain": "operations",
|
|
1244
1244
|
"sourcePath": "src/templates/scripts/telegram-reply.sh",
|
|
1245
|
-
"contentHash": "
|
|
1245
|
+
"contentHash": "1182b2c7e3779a9c37355e7317962ea48122a5f4a42425d7f3f9973e8127aa19",
|
|
1246
1246
|
"since": "2025-01-01"
|
|
1247
1247
|
},
|
|
1248
1248
|
"template:whatsapp-reply.sh": {
|
|
@@ -1562,7 +1562,7 @@
|
|
|
1562
1562
|
"type": "subsystem",
|
|
1563
1563
|
"domain": "updates",
|
|
1564
1564
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1565
|
-
"contentHash": "
|
|
1565
|
+
"contentHash": "68624dacc4e2bb0f43676a5bd8509a53c1cf37aa09f80f678c66c37f8a2168e2",
|
|
1566
1566
|
"since": "2025-01-01"
|
|
1567
1567
|
},
|
|
1568
1568
|
"subsystem:scheduler": {
|
|
@@ -373,6 +373,8 @@ ATTEMPTED_AT=$(date -u +%Y-%m-%dT%H:%M:%S.000Z)
|
|
|
373
373
|
# from config — the server uses it to reject wrong-port requests before
|
|
374
374
|
# evaluating the token.
|
|
375
375
|
CURL_ARGS=(-s -w "\n%{http_code}" -X POST "http://localhost:${PORT}/telegram/reply/${TOPIC_ID}"
|
|
376
|
+
--connect-timeout 3
|
|
377
|
+
--max-time 125
|
|
376
378
|
-H 'Content-Type: application/json'
|
|
377
379
|
-d "$JSON_BODY")
|
|
378
380
|
if [ -n "$AUTH_TOKEN" ]; then
|
|
@@ -386,6 +388,19 @@ if [ -n "$DELIVERY_ID" ]; then
|
|
|
386
388
|
fi
|
|
387
389
|
|
|
388
390
|
RESPONSE=$(curl "${CURL_ARGS[@]}")
|
|
391
|
+
CURL_STATUS=$?
|
|
392
|
+
|
|
393
|
+
# A transport failure after request start is inherently ambiguous: the server
|
|
394
|
+
# may still finish its tone review or Telegram send after our bounded client
|
|
395
|
+
# window closes. Always render a terminal outcome so a yielded/reattached tool
|
|
396
|
+
# call cannot complete silently, and never auto-enqueue/retry an unknown send.
|
|
397
|
+
if [ "$CURL_STATUS" -ne 0 ]; then
|
|
398
|
+
echo "AMBIGUOUS: Telegram relay transport ended without an HTTP outcome (curl ${CURL_STATUS})." >&2
|
|
399
|
+
echo " The message MAY still be delivered. Do NOT retry blindly; verify the conversation first." >&2
|
|
400
|
+
[ -n "$DELIVERY_ID" ] && echo " Delivery id: ${DELIVERY_ID}" >&2
|
|
401
|
+
echo "AMBIGUOUS: no HTTP outcome — verify delivery before retrying"
|
|
402
|
+
exit 0
|
|
403
|
+
fi
|
|
389
404
|
|
|
390
405
|
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
|
391
406
|
BODY=$(echo "$RESPONSE" | sed '$d')
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
- Telegram reply requests now have finite connection and total deadlines.
|
|
9
|
+
- Transport failures always return an explicit ambiguous outcome with a delivery id and safe retry guidance.
|
|
10
|
+
- Stock installed relay scripts upgrade in place; locally customized scripts remain protected.
|
|
11
|
+
|
|
12
|
+
## What to Tell Your User
|
|
13
|
+
|
|
14
|
+
If a Telegram reply loses its connection before Instar can return a result, the agent now sees a clear uncertain-delivery warning instead of an empty tool outcome. It will verify before retrying rather than risk sending the message twice.
|
|
15
|
+
|
|
16
|
+
## Summary of New Capabilities
|
|
17
|
+
|
|
18
|
+
- Bounded, observable Telegram reply outcomes even when the transport fails before an HTTP response.
|
|
19
|
+
|
|
20
|
+
## Evidence
|
|
21
|
+
|
|
22
|
+
- Feedback: `fb-9c139a25-11e`
|
|
23
|
+
- Behavioral test: `tests/unit/telegram-reply-bounded-outcome.test.ts`
|
|
24
|
+
- Existing recovery/status regression suite remains green.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Side-Effects Review — Telegram reply bounded outcome
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `telegram-reply-bounded-outcome`
|
|
4
|
+
**Date:** `2026-07-19`
|
|
5
|
+
**Author:** `Instar Agent (instar-codey)`
|
|
6
|
+
**Second-pass reviewer:** `/root/cross_engine_completion` (independent reviewer subagent)
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
The shipped Telegram reply template bounds its final HTTP request and explicitly renders transport ambiguity. This closes `fb-9c139a25-11e` at the outcome-observability class level.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- Final relay curl — modified transport boundary — limits connection to 3 seconds and total time to 125 seconds.
|
|
15
|
+
- Curl transport-status branch — new — reports an ambiguous outcome and prevents automatic recovery classification when no HTTP status exists.
|
|
16
|
+
|
|
17
|
+
## 1. Over-block
|
|
18
|
+
|
|
19
|
+
No valid HTTP response is rejected. The overall client window is five seconds longer than the server's 120-second outbound route budget, so the server retains authority to return a structured success, timeout, or tone rejection. A transport failure exits as ambiguity rather than falsely blocking the message.
|
|
20
|
+
|
|
21
|
+
## 2. Under-block
|
|
22
|
+
|
|
23
|
+
The helper cannot prove whether the server accepted a request before a network failure. It therefore makes no delivered/not-delivered claim. The delivery id is surfaced for durable investigation, and the caller is explicitly told to verify before retrying.
|
|
24
|
+
|
|
25
|
+
## 3. Level-of-abstraction fit
|
|
26
|
+
|
|
27
|
+
The boundary belongs in the caller that owns curl lifecycle and transcript output. The server already owns semantic tone review and delivery; moving transport-process interpretation into that server would not help a caller that never receives an HTTP response.
|
|
28
|
+
|
|
29
|
+
## 4. Signal vs authority compliance
|
|
30
|
+
|
|
31
|
+
Per `docs/signal-vs-authority.md`, curl exit status is exact transport evidence, not a semantic heuristic. It has authority only to classify the HTTP outcome as unavailable. It does not claim delivery failure or authorize a retry.
|
|
32
|
+
|
|
33
|
+
## 4b. Judgment-point check
|
|
34
|
+
|
|
35
|
+
No competing-signals judgment. A nonzero curl exit with no completed HTTP response deterministically means the caller lacks an HTTP outcome; delivery remains explicitly ambiguous.
|
|
36
|
+
|
|
37
|
+
## 5. Interactions
|
|
38
|
+
|
|
39
|
+
HTTP 200, 408, 422, and recoverable status handling is unchanged. The new transport branch runs before HTTP parsing, so a synthetic `000` from a completed curl remains in the existing recovery matrix while an actual curl failure never gets blindly enqueued. The original shell did not enable errexit; the change preserves that state.
|
|
40
|
+
|
|
41
|
+
## 6. External surfaces
|
|
42
|
+
|
|
43
|
+
Agents now receive a non-empty, actionable ambiguity message after a bounded transport failure. Normal user-visible Telegram messages and tone rejection text are unchanged.
|
|
44
|
+
|
|
45
|
+
## 6b. Operator-surface quality
|
|
46
|
+
|
|
47
|
+
The output names uncertainty, prohibits blind retry, and includes the delivery id without exposing credentials or raw response internals.
|
|
48
|
+
|
|
49
|
+
## 7. Multi-machine posture
|
|
50
|
+
|
|
51
|
+
Machine-local by design: the helper calls the owning agent server resolved from the owning agent home. The reported delivery id is the same id sent to that server, so investigation remains tied to the correct machine-local ledger. No URL or replicated state is introduced.
|
|
52
|
+
|
|
53
|
+
## 8. Rollback cost
|
|
54
|
+
|
|
55
|
+
Pure template and test change. Revert and ship a patch; existing installed scripts will be refreshed by the normal template migrator. No data repair or schema migration is needed.
|
|
56
|
+
|
|
57
|
+
## Conclusion
|
|
58
|
+
|
|
59
|
+
The missing standard was outcome-bearing-call completeness: external calls must be bounded and must render success, rejection, or ambiguity. The process gap was HTTP-status coverage without transport-exit coverage. The behavioral curl-timeout test closes the class. Independent review is required because this changes an outbound messaging decision path.
|
|
60
|
+
|
|
61
|
+
## Second-pass review
|
|
62
|
+
|
|
63
|
+
**Reviewer:** `/root/cross_engine_completion`
|
|
64
|
+
**Independent read:** concur after correction. The reviewer initially found that the immediately prior shipped template SHA was absent from the safe migration allowlist, so existing agents would receive only a `.new` candidate, and that the emergency inline fallback retained an unbounded curl. Both were required corrections. The migration now recognizes the exact prior SHA and behaviorally proves in-place stock upgrade while preserving customized scripts; the fallback now has equivalent finite transport bounds and explicit non-HTTP ambiguity handling. The reviewer independently re-inspected both closures and reported no remaining over/under-block, timeout, dedup/recovery, shell, or signal-vs-authority concern.
|
|
65
|
+
|
|
66
|
+
## Evidence pointers
|
|
67
|
+
|
|
68
|
+
- `tests/unit/telegram-reply-bounded-outcome.test.ts`
|
|
69
|
+
- `tests/unit/PostUpdateMigrator-telegramReply.test.ts`
|
|
70
|
+
- `tests/unit/telegram-reply-recoverable-classification.test.ts`
|
|
71
|
+
- `tests/unit/telegram-reply-port-resolution.test.ts`
|
|
72
|
+
- Feedback `fb-9c139a25-11e`
|
|
73
|
+
|
|
74
|
+
## Class-Closure Declaration (display-only mirror)
|
|
75
|
+
|
|
76
|
+
`defectClass: claim-vs-evidence`, `closure: guard`, `guardEvidence: { enforcementType: gate, citation: src/templates/scripts/telegram-reply.sh#CURL_STATUS, howCaught: the helper makes no delivery claim without a completed HTTP result; every final request has finite bounds and every nonzero transport exit renders explicit ambiguity on stdout and stderr without authorizing retry }`.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Telegram reply bounded outcome
|
|
2
|
+
|
|
3
|
+
The Telegram reply helper makes an HTTP request to the local Instar server, which may spend time reviewing the message before it sends. The final request previously had no client deadline and did not inspect the transport exit status. If the caller's tool yielded while the review was running and curl later ended without a normal HTTP response, the helper could finish without printing any useful result. The agent then could not tell whether the message was blocked, delivered, or still uncertain.
|
|
4
|
+
|
|
5
|
+
The repair treats a terminal outcome as part of delivery correctness. The final request now has a three-second connection limit and a 125-second overall limit, slightly longer than the server's 120-second outbound budget. Normal HTTP results are unchanged, including the detailed 422 tone-review explanation. If transport ends without an HTTP result, the helper prints an explicit AMBIGUOUS result to both standard output and standard error, includes the pre-minted delivery id for investigation, and tells the caller not to retry blindly. The emergency inline fallback follows the same rule.
|
|
6
|
+
|
|
7
|
+
This does not claim that an interrupted request failed. The server may have received it and may still complete the send, so automatically queueing or retrying would risk a duplicate. The behavioral regression replaces curl with a controlled timeout and proves the helper is bounded, produces non-empty output on both channels, exits without triggering a blind retry, and preserves the delivery identifier.
|
|
8
|
+
|
|
9
|
+
The CLASS review found the missing standard: every outcome-bearing external call needs a bounded transport and an explicit terminal rendering for success, rejection, and ambiguity. The process gap was that existing tests covered HTTP status classification but not a transport process that exits before producing an HTTP status—or whether the repaired template actually reaches already-installed agents. This adds both failure-mode and in-place-migration ratchets and closes feedback `fb-9c139a25-11e`.
|