instar 1.3.1239 → 1.3.1241
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 +15 -4
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/messaging/telegram-origin/OriginAwareness.d.ts +4 -0
- package/dist/messaging/telegram-origin/OriginAwareness.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginAwareness.js +11 -2
- package/dist/messaging/telegram-origin/OriginAwareness.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginBotEgress.d.ts +2 -0
- package/dist/messaging/telegram-origin/OriginBotEgress.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginBotEgress.js +23 -7
- package/dist/messaging/telegram-origin/OriginBotEgress.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginCodexModelCanary.js +1 -1
- package/dist/messaging/telegram-origin/OriginCodexModelCanary.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginConfigReader.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginConfigReader.js +9 -28
- package/dist/messaging/telegram-origin/OriginConfigReader.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginDetectorCanary.d.ts +1 -0
- package/dist/messaging/telegram-origin/OriginDetectorCanary.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginDetectorCanary.js +155 -16
- package/dist/messaging/telegram-origin/OriginDetectorCanary.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginDetectorCanary.worker.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginDetectorCanary.worker.js +69 -41
- package/dist/messaging/telegram-origin/OriginDetectorCanary.worker.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginNoticePolicyObserver.d.ts +1 -1
- package/dist/messaging/telegram-origin/OriginNoticePolicyObserver.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginNoticePolicyObserver.js +9 -29
- package/dist/messaging/telegram-origin/OriginNoticePolicyObserver.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginRetry.d.ts +2 -0
- package/dist/messaging/telegram-origin/OriginRetry.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginRetry.js +5 -0
- package/dist/messaging/telegram-origin/OriginRetry.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginSourcePoller.d.ts +20 -0
- package/dist/messaging/telegram-origin/OriginSourcePoller.d.ts.map +1 -0
- package/dist/messaging/telegram-origin/OriginSourcePoller.js +74 -0
- package/dist/messaging/telegram-origin/OriginSourcePoller.js.map +1 -0
- package/dist/messaging/telegram-origin/OriginStore.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginStore.js +7 -1
- package/dist/messaging/telegram-origin/OriginStore.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginStoreBackend.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginStoreBackend.js +10 -1
- package/dist/messaging/telegram-origin/OriginStoreBackend.js.map +1 -1
- package/dist/messaging/telegram-origin/StoreTypes.d.ts +3 -0
- package/dist/messaging/telegram-origin/StoreTypes.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/TelegramOriginRuntime.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/TelegramOriginService.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/TelegramOriginService.js +14 -9
- package/dist/messaging/telegram-origin/TelegramOriginService.js.map +1 -1
- package/dist/testing/selfActionRegistry.d.ts.map +1 -1
- package/dist/testing/selfActionRegistry.js +23 -1
- package/dist/testing/selfActionRegistry.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/upgrades/1.3.1240.md +26 -0
- package/upgrades/1.3.1241.md +20 -0
- package/upgrades/side-effects/telegram-canary-cleanup-phase.md +444 -0
- package/upgrades/side-effects/telegram-local-refusal-budget.md +180 -0
- package/upgrades/telegram-canary-cleanup-phase.eli16.md +19 -0
- package/upgrades/telegram-local-refusal-budget.eli16.md +11 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
# Owned Telegram canary cleanup phases — side-effects review
|
|
2
|
+
|
|
3
|
+
Governing approved/converged spec: docs/specs/telegram-message-origin.md. Fresh
|
|
4
|
+
helper-created worktree fix/telegram-canary-cleanup-phase from canonical
|
|
5
|
+
https://github.com/JKHeadley/instar.git at 15cd5876d6d285a39fc105aeb57e5fde705ad540,
|
|
6
|
+
v1.3.1238. Existing approved private overview is linked in that spec.
|
|
7
|
+
|
|
8
|
+
## Evidence and intended outcome
|
|
9
|
+
|
|
10
|
+
Independent tracing found all six checks completed in about 318 ms, followed by
|
|
11
|
+
synchronous native watcher shutdown. One success spent 1298 ms closing observer
|
|
12
|
+
watchers and 3150 ms closing reader watchers; a failed cycle stalled at observer
|
|
13
|
+
close until both six-second attempts timed out. A separate production Boot trace
|
|
14
|
+
measured 5763 ms and 1470 ms in those closes, then 3 ms in runtime close. Logs:
|
|
15
|
+
/tmp/echo-review-canary-direct.log and /tmp/echo-review-network-lifecycle-close.log.
|
|
16
|
+
|
|
17
|
+
The current six-second timer includes cleanup and is not a hard total duration
|
|
18
|
+
bound because actual termination remains awaited after timeout. The approved
|
|
19
|
+
spec does not prescribe six seconds. The existing controller declaration requires
|
|
20
|
+
sequential bounded attempts, verified cleanup ownership, a cleanup-failure latch,
|
|
21
|
+
and startup/recurrence floors. Preserve six seconds for contract checks and use
|
|
22
|
+
a separate explicitly chosen 30-second cleanup deadline justified by these timings.
|
|
23
|
+
|
|
24
|
+
## Principle check and side effects
|
|
25
|
+
|
|
26
|
+
This changes diagnostic health, not credentials, delivery permission, retry custody,
|
|
27
|
+
or source authority. Health stays non-passing until all cleanup is verified.
|
|
28
|
+
Over-block: malformed protocol rejects the attempt and permits at most one retry.
|
|
29
|
+
Failed or unverified cleanup latches unavailable health even if checks succeeded;
|
|
30
|
+
actual source readers retain their own authority. Under-block: early success messages, duplicates, late results and missing
|
|
31
|
+
cleanup must never establish passing health. Ownership remains held while cleanup
|
|
32
|
+
is unresolved. At most two workers run sequentially and recurrence remains
|
|
33
|
+
completion-relative; restart waits 60 seconds.
|
|
34
|
+
|
|
35
|
+
The additional cleanup time can delay diagnostic completion and close(), but never
|
|
36
|
+
permits overlapping workers or healthy status before teardown. Deadlines are
|
|
37
|
+
bounded observations, not promises that an unabortable OS close returns by then.
|
|
38
|
+
Signals expose only fixed phases/reasons, never fixture content or paths.
|
|
39
|
+
|
|
40
|
+
Machine-local by design: each canary owns a private fixture and process resources;
|
|
41
|
+
no network transport or remote authority is created. Rollback restores the older
|
|
42
|
+
probe accounting and needs no stored-data migration. Existing-install awareness
|
|
43
|
+
will receive a guarded update alongside generated instructions.
|
|
44
|
+
|
|
45
|
+
Class unbounded-self-action: preserve existing registered owned-canary controller,
|
|
46
|
+
single-flight ownership, cleanup-failure latch, two-attempt limit, and schedule floors.
|
|
47
|
+
Update its declaration to state the separate contract and cleanup bounds.
|
|
48
|
+
|
|
49
|
+
## Validation
|
|
50
|
+
|
|
51
|
+
The protocol-compatibility regression failed against the previous parent using
|
|
52
|
+
the new checks-first fixture: that parent could accept the new early check result
|
|
53
|
+
without understanding its separate cleanup message. The old production worker
|
|
54
|
+
reported after its own finally block; its actual defect was classifying timely
|
|
55
|
+
checks as failed while native watcher teardown consumed the shared deadline.
|
|
56
|
+
The corrected protocol passes 25 boundary cases, including delayed timer callbacks,
|
|
57
|
+
late termination and removal, duplicate messages, cancellation after a real worker
|
|
58
|
+
starts, and no automatic scheduling after a cleanup failure. Twelve existing real
|
|
59
|
+
worker/native-lane cases, six scheduling cases, and six installed-migration cases
|
|
60
|
+
also pass (49 focused cases). Build and lint pass. An initial test-source quote
|
|
61
|
+
error was corrected before the real-worker suite ran successfully. The actual
|
|
62
|
+
operator HTTP health test passes (69.7 seconds), including startup wait, fresh
|
|
63
|
+
owned proof, authority-reader invalidation and no origin-row side effects.
|
|
64
|
+
All three production Boot cases pass (133.5 seconds): default native resolver
|
|
65
|
+
wiring, real owned checks with source failure/restoration, and resource shutdown
|
|
66
|
+
after failed profile enrollment. Full-suite and CI release validation remain
|
|
67
|
+
outstanding. This repair now precedes the local-refusal release because its
|
|
68
|
+
known canary defect blocks that candidate's full validation.
|
|
69
|
+
|
|
70
|
+
Independent reviewer review_local_refusal: concur with the runtime protocol and
|
|
71
|
+
23 initial cases. Separate monotonic deadlines, normal exit before proof, joined
|
|
72
|
+
termination/removal, single-flight ownership and cleanup-failure latch hold. The
|
|
73
|
+
two recommended additional boundary cases are now included and pass. Final
|
|
74
|
+
review also concurs with the guarded awareness migration, controller declaration,
|
|
75
|
+
and 145-second successful-path wait (60 + 2 * (6 + 30) = 132 seconds plus margin).
|
|
76
|
+
The reviewer requested the protocol/latch wording corrections now applied above.
|
|
77
|
+
|
|
78
|
+
Tracked adjacent watchdog false interrupt: topic-69507. The conversation watchdog
|
|
79
|
+
sent SIGINT to a legitimate long-running Vitest process in the separate primary
|
|
80
|
+
release validation. This canary repair does not alter that watchdog; the current
|
|
81
|
+
release validation uses a bounded supervised test job with durable logs and exits.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## Release dependency and shared fixture corrections
|
|
85
|
+
|
|
86
|
+
The separate local-refusal candidate's frozen full run ended normally with
|
|
87
|
+
51,936 passing tests and one failure: the real detector HTTP health fixture
|
|
88
|
+
observed ownedContracts.state=fail while config and noticePolicy were healthy.
|
|
89
|
+
All 14,014 input hashes were unchanged. This matches the independently measured
|
|
90
|
+
old canary cleanup failure class; that run did not expose per-attempt phase
|
|
91
|
+
timing, so it is not new proof of the exact timing of each failed attempt.
|
|
92
|
+
|
|
93
|
+
The canary commit was rebased unchanged onto v1.3.1239. An independent range-diff
|
|
94
|
+
review confirmed equivalence and no dependency on local-refusal accounting.
|
|
95
|
+
Fourteen files receive previously reviewed fixture corrections: awaited real
|
|
96
|
+
Boot cleanup has a 30-second budget with existing restorations in finally, and
|
|
97
|
+
the phone fixture explicitly asserts initial/post-save display convergence
|
|
98
|
+
within 20 seconds with safe health metadata on failure. Its body budget is
|
|
99
|
+
60 seconds. The two detector fixtures already had bounded cleanup; their
|
|
100
|
+
canary-specific 145-second observation is preserved. The HTTP body remains
|
|
101
|
+
180 seconds; the Boot body is 240 seconds to cover sequential recovery waits
|
|
102
|
+
and its explicit awaited in-body close.
|
|
103
|
+
Only the cleanup hunk is transferred to the late-capacity lifecycle fixture;
|
|
104
|
+
no local-refusal accounting test or runtime change is imported.
|
|
105
|
+
|
|
106
|
+
Reverse closure order, propagation of cleanup errors, delivery assertions,
|
|
107
|
+
operator scope checks, and production authorization/read deadlines remain
|
|
108
|
+
unchanged. Longer fixture waits still fail at their bounds. Independent reviewer
|
|
109
|
+
review_local_refusal concurred with the actual transfer and rebase. Build passes
|
|
110
|
+
on v1.3.1239. Initial combined focused validation passed all 55 tests in eight
|
|
111
|
+
files (normal exit 0, 2026-09-15T08:55:49Z).
|
|
112
|
+
|
|
113
|
+
A class-wide test audit found healthy-readiness waits shorter than two real
|
|
114
|
+
refresh opportunities: two completion-relative five-second intervals plus two
|
|
115
|
+
two-second reads can consume 14 seconds before scheduling margin. Seven files
|
|
116
|
+
now allow 20 seconds for healthy config/display/authorization/policy readiness.
|
|
117
|
+
The shared helper retains monotonic time and real timers for fake-interval lease
|
|
118
|
+
tests. Unavailable/revocation checks, delivery deadlines, and independent
|
|
119
|
+
enrollment-only probes are unchanged. The opt-out branch allows 20 seconds for
|
|
120
|
+
a new parsed snapshot while its unreadable branch keeps seven seconds. Only the
|
|
121
|
+
canary Boot body needs expansion: 145 + 20 + 8 + 20 seconds of sequential waits,
|
|
122
|
+
with allowance for setup and explicit in-body close, fits 240 seconds.
|
|
123
|
+
|
|
124
|
+
Independent reviewer review_local_refusal concurred with the actual seven-file
|
|
125
|
+
diff and owning-body budget audit. Final readiness-focused validation passed
|
|
126
|
+
all 36 tests in seven files (normal exit 0, 2026-09-15T09:06:33Z), including the
|
|
127
|
+
real canary lifecycle, policy, enrollment, dashboard rejection, production Boot,
|
|
128
|
+
and fake-interval lease consumer. Full lint passes. Full local suite and CI
|
|
129
|
+
remain required before merge; no deployment is claimed.
|
|
130
|
+
|
|
131
|
+
## Full-run watchdog fixture correction
|
|
132
|
+
|
|
133
|
+
Frozen candidate d10015e35060ff41ec56c2d24cad48e8a258fd85 completed the aggregate
|
|
134
|
+
suite normally on 2026-09-15T10:09:41Z: 51,969 tests passed and one failed.
|
|
135
|
+
All 14,018 tracked input hashes were unchanged. The canary production Boot
|
|
136
|
+
lifecycle and real HTTP detector health both passed (154.9 and 91.4 seconds).
|
|
137
|
+
Dedicated integration and E2E phases were not reached because the aggregate
|
|
138
|
+
failed. GitHub CI passed, including integration, build and 3,234 E2E tests;
|
|
139
|
+
build and E2E checkout logs verify merge f4f24dbd9721fe4d9487bc4693cdab7189e21d9a,
|
|
140
|
+
whose parents are current v1.3.1239 main and d10015e35. Those results do not
|
|
141
|
+
establish a passing full local run.
|
|
142
|
+
|
|
143
|
+
The single local failure was the watchdog real-esbuild fixture observing no
|
|
144
|
+
protected service after a fixed 100ms post-spawn sleep. This installation's
|
|
145
|
+
esbuild entrypoint is a Node shim that subsequently starts the native service;
|
|
146
|
+
its spawn event does not establish native-process readiness. Installed version
|
|
147
|
+
0.21.5 matches the fixture and discovery has no elapsed-time filter. This proves
|
|
148
|
+
the fixture lacks readiness synchronization, not the exact timing of its failed
|
|
149
|
+
attempt. The installer may instead replace the entrypoint with a native binary
|
|
150
|
+
on another platform. The audit found no other real esbuild spawn-plus-100ms
|
|
151
|
+
fixture in the test population.
|
|
152
|
+
|
|
153
|
+
The correction polls actual production process discovery for up to five seconds,
|
|
154
|
+
accepting only the spawned PID or its verified descendants. It detects early
|
|
155
|
+
exit, preserves the watchdog judge/signal assertions, and verifies both exit
|
|
156
|
+
and signal liveness. The test body allows 15 seconds for readiness plus a final
|
|
157
|
+
in-flight bounded process snapshot. Cleanup ends the owned stdin, awaits closure,
|
|
158
|
+
and uses strict process-table reads to verify captured owned resources are gone.
|
|
159
|
+
A bounded fallback rechecks each owned identity before stopping descendants
|
|
160
|
+
before their wrapper; uncertainty or incomplete cleanup fails the test. No
|
|
161
|
+
production watchdog, classifier, deadline, permission, or signaling policy is
|
|
162
|
+
changed. This also removes the former unawaited wrapper-only SIGKILL cleanup.
|
|
163
|
+
|
|
164
|
+
Reviewer review_local_refusal drafted the correction outside the frozen tree;
|
|
165
|
+
the primary independently reviewed ownership and cleanup, strengthened the root
|
|
166
|
+
liveness fence and final assertions, and the reviewer concurred with those
|
|
167
|
+
adjustments. After the frozen run ended and hashes were verified, focused
|
|
168
|
+
validation passed all 11 tests across the real-process integration fixture and
|
|
169
|
+
classification boundaries (normal exit 0, 2026-09-15T10:10:22Z). The corrected
|
|
170
|
+
candidate still requires full local validation and fresh CI before release.
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## Remaining cleanup failure and bounded diagnostics
|
|
174
|
+
|
|
175
|
+
Frozen candidate 5d8a3bea87905b163a4348b64734bc56a37f4b63 completed the aggregate
|
|
176
|
+
with 51,970 passing tests, then dedicated integration with 4,207 passing tests
|
|
177
|
+
and one real detector HTTP failure (2026-09-15T11:27:28Z). All 14,018 tracked
|
|
178
|
+
input hashes were unchanged; dedicated E2E was not reached. CI passed against
|
|
179
|
+
the corresponding merge tree, which does not override the local failure. The
|
|
180
|
+
canary latched cleanup unavailable after one attempt while both actual authority
|
|
181
|
+
readers were healthy. The previous fixed `cleanup` label cannot identify the
|
|
182
|
+
first failing step. This remaining failure blocks release.
|
|
183
|
+
|
|
184
|
+
Three bounded direct probes and one actual production-Boot HTTP lifecycle passed
|
|
185
|
+
without reproducing it. Direct watcher closures took roughly 4.0, 12.5 and 6.6
|
|
186
|
+
seconds; the Boot probe took 1.49 seconds, with immediate parent termination and
|
|
187
|
+
9ms fixture removal. These observations locate latency in those successful
|
|
188
|
+
probes only; they do not prove the cause of the full-run failure.
|
|
189
|
+
|
|
190
|
+
The existing degradation reason now distinguishes fixed cleanup faults and stages:
|
|
191
|
+
acknowledgement, natural worker exit, parent termination and fixture removal. The
|
|
192
|
+
first fault is retained when later deadline or cleanup failures follow. No paths,
|
|
193
|
+
exception text, worker payloads, credentials or timestamps enter those labels.
|
|
194
|
+
Health schema/reasons, authority, protocol, resource ownership, retries, and
|
|
195
|
+
6s/30s deadlines remain unchanged. Thirty focused boundary tests pass, including
|
|
196
|
+
negative and late acknowledgements, abnormal exit versus error, failed termination,
|
|
197
|
+
late final cleanup, first-fault preservation, and reporter redaction. A completed
|
|
198
|
+
cycle report remains suppressed after close. Independent reviewer
|
|
199
|
+
review_local_refusal concurs with the runtime and test diff. The next dedicated
|
|
200
|
+
integration run is diagnostic; this addition does not claim to repair the still
|
|
201
|
+
unreproduced failure.
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
## Pool fixture listener ownership correction
|
|
205
|
+
|
|
206
|
+
The diagnostic candidate 0c327ce4f passed dedicated integration: 4,208 tests in
|
|
207
|
+
520 files, including real detector HTTP health (83.6 seconds). All 14,019 tracked
|
|
208
|
+
input hashes were unchanged. This did not reproduce the earlier cleanup fault.
|
|
209
|
+
The required full local run was then started on the same frozen candidate.
|
|
210
|
+
|
|
211
|
+
Fresh CI 34965209260 failed Node 22 shard 1 during pool-view-link-alive beforeAll:
|
|
212
|
+
the real holder AgentServer could not bind fixed port 47262 (EADDRINUSE). Its
|
|
213
|
+
9,450 tests passed, but one suite failed. Job 104367926455 checkout logs verify
|
|
214
|
+
merge 886d8ea6ec0be058a632f8da520771fdd6c49f6e, with parents main v1.3.1239 and
|
|
215
|
+
0c327ce4f. The source fixes holder/front ports at 47262/47261 without owning them
|
|
216
|
+
before listen. The competing process cannot be identified from that CI error.
|
|
217
|
+
The in-progress local full run was cancelled through its owned supervisor on
|
|
218
|
+
2026-09-15T12:06:12Z, after 499 seconds, because this known fixture correction
|
|
219
|
+
requires a new candidate. All 14,019 hashes were verified unchanged and its
|
|
220
|
+
owned process group had no remaining members. That cancelled run is not a pass.
|
|
221
|
+
|
|
222
|
+
The four related real-AgentServer pool fixtures (view link, reconciler, poll
|
|
223
|
+
cache, and placement transfer) now bind port zero. A shared test helper reads
|
|
224
|
+
the actual bound TCP listener after awaited start and rejects an absent or
|
|
225
|
+
non-TCP address. That listener remains reserved through the fixture lifetime;
|
|
226
|
+
there is no probe-and-release race, random port guess, or retry masking a bind
|
|
227
|
+
failure. The holder URL is established before signed mesh proxy wiring, and
|
|
228
|
+
all front/wired/dark URLs are established before their requests. SessionManagers
|
|
229
|
+
do not launch sessions in these fixtures. Existing authentication, signed proxy,
|
|
230
|
+
privacy/no-store, offline 503, ownership/transfer, and wired-versus-dark assertions
|
|
231
|
+
and awaited cleanup remain unchanged. No production server behavior changes.
|
|
232
|
+
|
|
233
|
+
This fixes the test resource-ownership layer and creates no diagnostic or
|
|
234
|
+
authorization signal. It neither over-blocks legitimate production work nor
|
|
235
|
+
weakens production checks. Rollback changes only test fixtures. The shared port
|
|
236
|
+
47261 also appeared in the reconciler fixture; the narrow pool fixture population
|
|
237
|
+
now contains no fixed 47xxx listener assignments. Existing pool streaming
|
|
238
|
+
fixtures already use OS-assigned listeners and remain unchanged.
|
|
239
|
+
|
|
240
|
+
Reviewer review_local_refusal prepared the five proposals outside the frozen
|
|
241
|
+
tree; the primary independently reviewed them, removed extra blank lines, then
|
|
242
|
+
applied them only after cancellation and input/ownership verification. Focused
|
|
243
|
+
dedicated E2E validation passed all 14 tests across the four actual server
|
|
244
|
+
fixtures (6.68 seconds, normal exit zero). Full local validation and fresh CI
|
|
245
|
+
on the corrected candidate remain required.
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
## Completing the enumerated real-listener population
|
|
249
|
+
|
|
250
|
+
The first four-fixture correction committed as 54f3e5f0f with full lint passing.
|
|
251
|
+
Its push completed normally (2026-09-15T12:14:07Z); the smoke listing timed out
|
|
252
|
+
and was skipped, not passed. A broader source audit then examined 13 remaining
|
|
253
|
+
files containing a real AgentServer construction, awaited start, and a numeric
|
|
254
|
+
port assignment. Eight were genuine unreserved listeners: three fixed (U4.1 pin
|
|
255
|
+
persistence, stale-owner handback, secret sync) and five randomized (reply marker,
|
|
256
|
+
ingress, planned handoff, multi-machine HTTP, tunnel/private view). Five were
|
|
257
|
+
configuration or migration literals whose actual listeners already use port zero.
|
|
258
|
+
Those five remain unchanged. This is the enumerated source-search population,
|
|
259
|
+
not a claim that every possible test listener pattern has been formally analyzed.
|
|
260
|
+
|
|
261
|
+
The 54f3e5f0f full run was cancelled through its owned supervisor after 347
|
|
262
|
+
seconds (2026-09-15T12:17:29Z) to complete that population before final validation.
|
|
263
|
+
All 14,020 hashes were unchanged and its owned process group was empty before
|
|
264
|
+
any tracked edit. This cancelled run is not a pass.
|
|
265
|
+
|
|
266
|
+
The eight additional fixtures now use port zero and the same actual-bound-address
|
|
267
|
+
helper. Identity-only peer fixtures retain their roles with a zero placeholder;
|
|
268
|
+
all real signed requests use the listening server's actual URL. Planned handoff
|
|
269
|
+
retains peer resolver closures, which read the assigned URLs only after both
|
|
270
|
+
servers have started. The tunnel fixture retains the same real TunnelManager
|
|
271
|
+
injected into AgentServer. Its test-owned TunnelConfig receives the bound port
|
|
272
|
+
after server start and before explicit tunnel start; TunnelManager retains that
|
|
273
|
+
config object and supplies its current port to provider.start, whose nonzero
|
|
274
|
+
argument overrides the constructor placeholder. No private provider mutation,
|
|
275
|
+
free-port probing, transport mocking, or retry behavior is introduced.
|
|
276
|
+
|
|
277
|
+
All existing request bodies, signing, custody and lease assertions, startup order,
|
|
278
|
+
authentication, and cleanup remain unchanged. The side effects remain test-only
|
|
279
|
+
resource allocation: no production signaling or authority behavior changes.
|
|
280
|
+
The primary reviewed the six reviewer-prepared proposals; the independent
|
|
281
|
+
reviewer reviewed the primary's handoff/tunnel proposals against the actual
|
|
282
|
+
transport, manager, provider, and AgentServer implementations and concurred.
|
|
283
|
+
Focused dedicated E2E validation passed all 53 tests in 12 files (normal exit
|
|
284
|
+
zero after 28.26 seconds). The real tunnel failed its external reachability check,
|
|
285
|
+
so its existing conditional remote branches were not exercised; local tunnel
|
|
286
|
+
and viewer assertions passed. No remote-reachability success is claimed. The
|
|
287
|
+
post-change source audit leaves only the five confirmed configuration-only
|
|
288
|
+
numeric matches. Full local validation and fresh CI still remain required.
|
|
289
|
+
|
|
290
|
+
## Actual watcher-boundary repair after the interrupted full run
|
|
291
|
+
|
|
292
|
+
Candidate 11d38c7b6 completed its frozen local `test:all` run with 51,972
|
|
293
|
+
passing tests and two failures: the real canary unit and HTTP integration paths
|
|
294
|
+
both latched `cleanup:deadline-timer:awaiting-ack`. CI was green, but that does
|
|
295
|
+
not override the local failure. Direct instrumentation reproduced the cause
|
|
296
|
+
outside Vitest: all six checks finished in roughly 320 ms, then synchronous
|
|
297
|
+
`FSWatcher.close()` calls inside the disposable worker took 15–43 seconds on
|
|
298
|
+
this macOS host. The timeout was therefore reporting a real cleanup-path stall,
|
|
299
|
+
not a failed contract check and not merely an undersized test wait.
|
|
300
|
+
|
|
301
|
+
The repair makes the worker thread itself the watcher cleanup boundary. The
|
|
302
|
+
worker removes its exact private fixture through `SafeFsExecutor`, reports the
|
|
303
|
+
worker-side monotonic check and cleanup completion instants, and acknowledges
|
|
304
|
+
only when fixture removal succeeded. The parent validates the ordered proof,
|
|
305
|
+
rejects missing, malformed, negative, or over-budget proof, then force-terminates
|
|
306
|
+
that one disposable worker. Passing health still waits for the actual worker
|
|
307
|
+
exit event and a second idempotent parent-side fixture removal. Legacy injected
|
|
308
|
+
test workers without the new proof fields retain the previous normal-exit and
|
|
309
|
+
deadline behavior.
|
|
310
|
+
|
|
311
|
+
### Decision-point and principle review
|
|
312
|
+
|
|
313
|
+
- **Modified decision point:** deterministic admission of `ownedContracts=pass`.
|
|
314
|
+
This is a hard protocol/resource invariant, not a judgment about message
|
|
315
|
+
meaning. No delivery, credential, retry, or content authority changes.
|
|
316
|
+
- **Over-block:** a legitimate proof with inconsistent timestamps, a missing
|
|
317
|
+
`fixtureRemoved: true`, or cleanup duration at/above the configured bound is
|
|
318
|
+
rejected. The bundled worker emits the complete schema; legacy test workers
|
|
319
|
+
remain compatible through the old receive-time path.
|
|
320
|
+
- **Under-block:** a substituted worker could claim false proof, but production
|
|
321
|
+
supplies the bundled owned worker URL. Even then, the parent independently
|
|
322
|
+
requires its actual exit and repeats exact-directory removal before pass.
|
|
323
|
+
- **Level of abstraction:** watcher ownership belongs at the disposable worker
|
|
324
|
+
boundary. Serially closing individual native watcher handles inside that
|
|
325
|
+
worker duplicated the OS/thread teardown authority and caused the stall.
|
|
326
|
+
- **Signal vs authority:** compliant with `docs/signal-vs-authority.md`. This is
|
|
327
|
+
structural validation of a diagnostic result, within the hard-invariant
|
|
328
|
+
exception; it adds no brittle message-flow blocker or conversational judgment.
|
|
329
|
+
- **Judgment Within Floors:** no competing-signals heuristic is added. Ordered
|
|
330
|
+
proof, bounded elapsed time, exact fixture removal, and worker exit are fully
|
|
331
|
+
enumerable invariants.
|
|
332
|
+
- **Interactions and races:** the parent clears the acknowledgement deadline
|
|
333
|
+
only after a valid worker-side proof, owns forced termination, retains the
|
|
334
|
+
single-flight slot until exit/removal settle, and preserves the first fixed
|
|
335
|
+
cleanup fault. A queued timely proof receives one poll turn before an
|
|
336
|
+
`awaiting-ack` timer classification, preventing parent event-loop stalls from
|
|
337
|
+
manufacturing a late acknowledgement. Failed cleanup still latches the
|
|
338
|
+
instance and prevents recurrence.
|
|
339
|
+
- **External surface:** only detector-health timing/reason can change. No
|
|
340
|
+
Telegram request, message body, persistent delivery record, operator action,
|
|
341
|
+
URL, or user-facing notice is added. No operator surface is touched.
|
|
342
|
+
- **Multi-machine posture:** machine-local by design because each machine probes
|
|
343
|
+
its own file/watcher runtime. It emits no notice, holds no durable state, and
|
|
344
|
+
generates no URL, so one-voice, replication, transfer, and remote-link
|
|
345
|
+
concerns do not apply.
|
|
346
|
+
- **Rollback:** pure code/test rollback in the next patch; no data migration or
|
|
347
|
+
agent-state repair.
|
|
348
|
+
|
|
349
|
+
This controller retains its registered two-attempt ceiling, startup and
|
|
350
|
+
completion-relative schedule floors, cleanup-failure latch, and single-flight
|
|
351
|
+
ownership. Class-closure remains `unbounded-self-action` with guard coverage at
|
|
352
|
+
`tests/unit/self-action-convergence.test.ts`: the control-loop edge cannot start
|
|
353
|
+
another attempt while `pending`, cleanup failure prevents rescheduling, and
|
|
354
|
+
`close()` joins the owned worker. No agent-authored prompt/hook/config/skill
|
|
355
|
+
defect is involved.
|
|
356
|
+
|
|
357
|
+
Validation on the repaired candidate: 32 adversarial cleanup protocol cases,
|
|
358
|
+
12 real-worker/native-lane unit cases, the real authenticated HTTP integration,
|
|
359
|
+
and all three production-Boot E2E lifecycles pass. The exact HTTP case passed in
|
|
360
|
+
124.4 seconds and the E2E file passed all three cases in 193.0 seconds under the
|
|
361
|
+
same machine load that reproduced the prior fault. Full lint and build pass.
|
|
362
|
+
Fresh full local `test:all` and CI are still required before merge/deployment.
|
|
363
|
+
|
|
364
|
+
## Exact-head aggregate-load follow-up
|
|
365
|
+
|
|
366
|
+
The first exact-head aggregate run and fresh CI exposed three additional load
|
|
367
|
+
boundaries before merge. The local run timed out while a production-bootstrap
|
|
368
|
+
test waited for an HTTP keep-alive socket during teardown. Node 22 CI also
|
|
369
|
+
started an origin storage worker after its ordinary request deadline and raced a
|
|
370
|
+
real tmux receiver before its child shell had entered raw TTY mode; the latter
|
|
371
|
+
produced the characteristic Linux canonical-line length of 4,095 bytes.
|
|
372
|
+
|
|
373
|
+
The follow-up keeps these concerns separate. Origin storage worker startup now
|
|
374
|
+
has its own bounded 30-second budget instead of borrowing the much shorter
|
|
375
|
+
already-running request budget. The production HTTP test explicitly closes its
|
|
376
|
+
pooled connections. The real-tmux control now waits for a receiver-ready file
|
|
377
|
+
written only after `stty raw`, so its byte-exact assertion measures tmux
|
|
378
|
+
chunking rather than shell-startup scheduling. The outage-policy lifecycle's
|
|
379
|
+
outer test bound now covers its already-declared 20-second readiness and
|
|
380
|
+
7-second unreadable-state waits plus teardown.
|
|
381
|
+
|
|
382
|
+
These changes do not loosen Telegram send authority, retry authority, durable
|
|
383
|
+
custody, or the detector's cleanup proof. They remove unrelated scheduler and
|
|
384
|
+
transport races from the evidence path while preserving finite failure bounds.
|
|
385
|
+
Focused reruns pass the 32 cleanup protocol cases, all three real production
|
|
386
|
+
bootstrap cases, and all three real-tmux ceiling cases under the same heavily
|
|
387
|
+
loaded host.
|
|
388
|
+
|
|
389
|
+
## Production source-watcher closure under aggregate load
|
|
390
|
+
|
|
391
|
+
The next exact-head aggregate run exposed the same native watcher class outside
|
|
392
|
+
the disposable detector worker. A dashboard-origin lifecycle completed its
|
|
393
|
+
delivery assertions, then spent more than 30 seconds in fixture teardown while
|
|
394
|
+
`OriginConfigReader` and `OriginNoticePolicyObserver` synchronously closed
|
|
395
|
+
parent-process `FSWatcher` handles. The focused file passed alone but took 33
|
|
396
|
+
seconds; under aggregate load the affected recorded-missing-message case took
|
|
397
|
+
37 seconds and its teardown hook timed out. This was a real production cleanup
|
|
398
|
+
boundary, not an assertion wait.
|
|
399
|
+
|
|
400
|
+
The two authority readers now observe their exact owned source files with one
|
|
401
|
+
unrefed, overlap-suppressed stat poller. It fingerprints device, inode, size,
|
|
402
|
+
mtime and ctime every 250 ms. Creation, replacement, mutation, deletion or an
|
|
403
|
+
unreadable transition invalidates the existing projection; the established
|
|
404
|
+
five-second source refresh and 30-second expiry remain unchanged. `close()` now
|
|
405
|
+
cancels a timer synchronously instead of closing native filesystem watchers.
|
|
406
|
+
An in-flight stat may finish, but the closed fence prevents it from invalidating
|
|
407
|
+
or refreshing anything afterward.
|
|
408
|
+
|
|
409
|
+
This changes no credential, destination, delivery, retry or lease authority.
|
|
410
|
+
It narrows the observation mechanism while preserving the spec's at-most-five-
|
|
411
|
+
second refresh requirement and fail-closed invalidation. Focused validation
|
|
412
|
+
passed source creation/change/close, encrypted configuration, same-account
|
|
413
|
+
credential rotation, corrupt source, opt-out and hub-rebind boundaries. The
|
|
414
|
+
dashboard production lifecycle then passed all seven cases in 10 seconds under
|
|
415
|
+
the same concurrent aggregate load, down from 33 seconds in the prior focused
|
|
416
|
+
run and the 74-second failing aggregate file.
|
|
417
|
+
|
|
418
|
+
The fixed-rate observer is registered as the
|
|
419
|
+
`telegram-origin-source-poller` eternal-sentinel controller. The convergence
|
|
420
|
+
ratchet proves its 250 ms rate floor and constant exact-file target under
|
|
421
|
+
sustained pressure; overlap suppression, synchronous interval cancellation and
|
|
422
|
+
the closed fence bound each live instance and prevent a late callback after
|
|
423
|
+
shutdown.
|
|
424
|
+
|
|
425
|
+
## Independent Phase 5 review — production source poller
|
|
426
|
+
|
|
427
|
+
The second pass inspected the poller, both authority-source callers, their unit
|
|
428
|
+
coverage, the production Boot lifecycle, the dashboard teardown regression, and
|
|
429
|
+
the governing signal-versus-authority rule. The poller only emits machine-local
|
|
430
|
+
change signals; it grants no delivery, credential, retry, or destination
|
|
431
|
+
authority. Both callers serialize source work, reject revisions changed during
|
|
432
|
+
a read, retain their five-second refresh and 30-second expiry fences, and prevent
|
|
433
|
+
an in-flight stat from acting after synchronous timer cancellation. Exact-file
|
|
434
|
+
metadata detects ordinary creation, replacement, mutation, deletion, and access
|
|
435
|
+
transitions without creating cross-machine state or a second decision authority.
|
|
436
|
+
|
|
437
|
+
The focused tests exercise mutation, deletion, late creation, post-close silence,
|
|
438
|
+
encrypted credential rotation, corrupt sources, policy opt-out, hub rebinding,
|
|
439
|
+
and the real production teardown that motivated the change. Direct poller tests
|
|
440
|
+
do not isolate close during an intentionally stalled stat; the closed checks and
|
|
441
|
+
post-close behavior make that a non-blocking coverage gap rather than a
|
|
442
|
+
correctness defect.
|
|
443
|
+
|
|
444
|
+
Concur with the review
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Side-Effects Review — Local capacity refusals preserve transport budget
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `telegram-local-refusal-budget`
|
|
4
|
+
**Date:** 2026-09-14
|
|
5
|
+
**Author:** Echo
|
|
6
|
+
**Second-pass reviewer:** review_local_refusal (independent Codex agent)
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
A prepared Telegram operation currently spends one of nine transport attempts when its credential-capacity reservation fails locally, before any network invocation. The egress closure now supplies private, single-use evidence bound to the exact sealed request. Only that evidence permits the outcome transaction to return the claim's transport attempt. The dispatched intent and failed-attempt audit remain durable. This repairs local refusal accounting; it does not establish delivery for a request that reached the network.
|
|
11
|
+
|
|
12
|
+
## 1. Over-block
|
|
13
|
+
|
|
14
|
+
No new message-content decision or permission check. A custom transport throwing a capacity-shaped exception without the private proof remains uncertain. That is intentional: exception names alone cannot establish non-invocation.
|
|
15
|
+
|
|
16
|
+
## 2. Under-block
|
|
17
|
+
|
|
18
|
+
The proof is minted only around capacity reserve/consume, before the network callback. Concurrent or repeated invocation cannot mint proof after another invocation starts sending. Wrong-request use does not consume the real proof. The transaction rejects stale leases, repeated outcomes, accepted receipts with a refund, and refund requests before dispatch intent. A failed persistence write leaves the original dispatched claim charged and subject to uncertain-outcome recovery.
|
|
19
|
+
|
|
20
|
+
## 3. Level-of-abstraction fit
|
|
21
|
+
|
|
22
|
+
The wire closure owns whether it invoked transport; the canonical outbox owns durable attempt accounting. The existing recovery scheduler still owns review cadence. A response-shaped error or an LLM explanation supplies neither proof nor permission.
|
|
23
|
+
|
|
24
|
+
## 4. Signal vs authority compliance
|
|
25
|
+
|
|
26
|
+
Per docs/signal-vs-authority.md, this is constrained transport accounting, not semantic blocking. The exact in-process non-invocation fact feeds the existing claim-fenced transaction. Current content, destination, lease, emergency-stop, and origin authorities remain in the send path.
|
|
27
|
+
|
|
28
|
+
## 5. Interactions
|
|
29
|
+
|
|
30
|
+
The attempt refund and outcome transition are one transaction. Capacity debits are never refunded or renewed. Local refusals retain the first transport backoff interval; automatic recovery also retains its durable 15-minute review interval. The original six-hour deadline bounds persistence and retries. No old failed/unknown operation or original budget is manually reset. Mixed-version workers conservatively retaining charges must not be claimed as upgraded until activated.
|
|
31
|
+
|
|
32
|
+
## 6. External surfaces
|
|
33
|
+
|
|
34
|
+
Audit attempts remain visible while the child transport counter excludes proven local refusals. The new metric is attempt:local-refusal-not-charged. HTTP holds continue to tell callers not to resend. Agent awareness explains that custody is not delivery and migrates the exact old shipped sentence without touching custom text.
|
|
35
|
+
|
|
36
|
+
## 6b. Operator-surface check
|
|
37
|
+
|
|
38
|
+
No new operator surface. Existing audit and hold responses are retained.
|
|
39
|
+
|
|
40
|
+
## 7. Multi-machine posture (Cross-Machine Coherence)
|
|
41
|
+
|
|
42
|
+
Machine-local BY DESIGN: capacity ownership and executable outbox custody already belong to the credential owner; origin evidence retains the source machine. The private proof never crosses the network or grants remote execution authority. The resulting durable audit is exposed through existing origin audit/pool readers. No new notice or URL is produced and no topic-transfer storage path is introduced.
|
|
43
|
+
|
|
44
|
+
## 8. Rollback cost
|
|
45
|
+
|
|
46
|
+
A normal patch release can revert runtime accounting. No schema change is needed. Retained audit rows and restored counters remain readable by the older worker; it resumes charging subsequent local failures. Rollback must not reconstruct or replay previously uncertain operations.
|
|
47
|
+
|
|
48
|
+
## Conclusion
|
|
49
|
+
|
|
50
|
+
The candidate closes local capacity refusal charging without weakening uncertain-delivery replay rules. Broader network evidence, unresolved-delivery escalation, snapshot freshness, never-dispatched expiry investigation, and terminal recovery-row cleanup remain distinct repairs in the existing tracked delivery assignment. This artifact does not certify the whole assignment or a fleet deployment.
|
|
51
|
+
|
|
52
|
+
## Second-pass review
|
|
53
|
+
|
|
54
|
+
review_local_refusal independently concurred with the runtime change, including request-bound proof, atomic refund, stale-fence behavior, immutable deadlines, and unchanged credential debits. It recommended wrong-request/single-use proof, expired-lease, persistence-loss, and deadline tests; those have been added and are in validation. Final independent review concurred with the added boundary tests and corrected paragraph-scoped migration; no code blocker found.
|
|
55
|
+
|
|
56
|
+
## Evidence pointers
|
|
57
|
+
|
|
58
|
+
First stable focused run: /tmp/echo-local-refusal-focused-2.log — 55 passing tests across unit, outbox, HTTP and production restart. Expanded run: /tmp/echo-local-refusal-focused-3.log — 248 passed, one incorrect public-wrapper error expectation corrected. /tmp/echo-local-refusal-final-focused.log — local/deadline/migration cases passed, one HTTP cleanup timeout. /tmp/echo-local-refusal-cleanup-recheck.log repeated cleanup timeouts; /tmp/echo-local-refusal-cleanup-trace.log passed all four HTTP cases and narrowed delay to Boot before runtime close without proving a cause. Temporary diagnostics removed. Build passed. Full suite/CI/release pending.
|
|
59
|
+
|
|
60
|
+
The frozen aggregate completed normally with 51,919 passing tests and one failure,
|
|
61
|
+
solely the expired-deadline preflight gate. All frozen inputs remained unchanged.
|
|
62
|
+
The candidate was then rebased without conflicts onto v1.3.1238 at
|
|
63
|
+
15cd5876d6d285a39fc105aeb57e5fde705ad540, which contains the upstream deadline
|
|
64
|
+
updates. No local deadline exception was applied. Build, countdown lint and all
|
|
65
|
+
60 rebased unit/store/HTTP/restart/preflight checks passed. Independent review
|
|
66
|
+
concurred again after checking the upstream relogin changes for interactions.
|
|
67
|
+
Complete release validation on this base remains pending.
|
|
68
|
+
|
|
69
|
+
## Class-Closure Declaration (display-only mirror)
|
|
70
|
+
|
|
71
|
+
Recovery continues through the existing paced recovery implementation; no new controller is introduced. The control edge is local refusal → original queued child → paced recovery. Its steady-state bounds are the existing 15-minute durable review reservation and original six-hour deadline; repeated invocation and process restarts cannot reset either. The executable twelve-refusal/one-attempt, original-deadline and restart tests exercise the accounting boundary in tests/unit/telegram-origin-store.test.ts and tests/e2e/telegram-origin-late-capacity-lifecycle.test.ts. The unbounded-self-action declaration cites those concrete bounds rather than claiming a new controller registration.
|
|
72
|
+
|
|
73
|
+
## Release-run cleanup correction
|
|
74
|
+
|
|
75
|
+
The frozen d9c2d0cc2 aggregate ended normally with51,936passing tests and one
|
|
76
|
+
failure: the existing receipt-restart case exceeded its10-second afterEach
|
|
77
|
+
cleanup limit after the delivery assertions passed. All5670frozen inputs were
|
|
78
|
+
unchanged. The new local-refusal restart case passed. Dedicated integration
|
|
79
|
+
and E2E stages did not run because the aggregate exit was nonzero.
|
|
80
|
+
|
|
81
|
+
Independent tracing of this same lateCapacityHttpHarness/production Boot close
|
|
82
|
+
path measured5763ms in notice-policy watcher close,1470ms in config-reader
|
|
83
|
+
watcher close,0ms joining canaries, and3ms in runtime close. The reviewed
|
|
84
|
+
correction gives this lifecycle fixture an explicit30-second cleanup bound,
|
|
85
|
+
continues awaiting actual closure, and restores mocks in finally. No runtime
|
|
86
|
+
deadline, delivery assertion, or retry policy changes. The production canary
|
|
87
|
+
shutdown defect remains separately tracked in topic69507.
|
|
88
|
+
<!-- tracked: topic-69507 -->
|
|
89
|
+
|
|
90
|
+
After the run ended, the correction passed both lifecycle cases in
|
|
91
|
+
/tmp/echo-local-refusal-cleanup-focused.log. Reviewer review_local_refusal
|
|
92
|
+
concurred with applying the measured bound to this shared shutdown path.
|
|
93
|
+
Fresh full validation and CI remain required.
|
|
94
|
+
|
|
95
|
+
## Complete shared Boot cleanup correction
|
|
96
|
+
|
|
97
|
+
The subsequent frozen a80a5c915 full run passed 51,937 aggregate tests and
|
|
98
|
+
4,201 dedicated integration tests. Dedicated E2E completed with 3,242 passing
|
|
99
|
+
cases and one failure: the dashboard unchanged-no-op case completed its delivery
|
|
100
|
+
assertions but exceeded the default 10-second afterEach cleanup deadline. All
|
|
101
|
+
5,670 frozen inputs were unchanged. The runner exited normally with code 1;
|
|
102
|
+
this result is not a green full suite.
|
|
103
|
+
|
|
104
|
+
A read-only inventory found 15 remaining fixtures owning the same real Boot
|
|
105
|
+
watcher shutdown, directly or through the detector/late-capacity helpers. Their
|
|
106
|
+
cleanup hooks now have the same explicit 30-second bound as the corrected
|
|
107
|
+
late-capacity lifecycle fixture. Reverse sequential awaited closure, close-error
|
|
108
|
+
propagation, test-body deadlines and behavioral assertions are unchanged. Existing
|
|
109
|
+
mock/global/timer restoration moves into finally in its original order; no new
|
|
110
|
+
restorations are added. Finally executes when the awaited closure settles or
|
|
111
|
+
rejects, not automatically when Vitest's external timeout fires. A genuine
|
|
112
|
+
cleanup hang still fails, with up to 20 seconds more time before reporting.
|
|
113
|
+
|
|
114
|
+
Independent reviewer review_local_refusal inspected the actual 15-file diff and
|
|
115
|
+
concurred without a blocker. No runtime, global test configuration, production
|
|
116
|
+
canary deadline, delivery policy or release gate changes are included.
|
|
117
|
+
|
|
118
|
+
All 49 focused tests across these 15 files passed in
|
|
119
|
+
/tmp/echo-local-refusal-boot-cleanup-focused.log (normal exit 0).
|
|
120
|
+
Lint passed in /tmp/echo-local-refusal-boot-cleanup-lint.log.
|
|
121
|
+
Fresh full validation and final-candidate CI remain required.
|
|
122
|
+
|
|
123
|
+
## Phone fixture observer convergence
|
|
124
|
+
|
|
125
|
+
The frozen ca90f46d7 full run passed 51,937 aggregate tests and 4,201 dedicated
|
|
126
|
+
integration tests. Dedicated E2E finished with 3,242 passing cases and one
|
|
127
|
+
failure. The final stack points to message preparation after the phone display
|
|
128
|
+
save at tests/e2e/telegram-origin-phone.test.ts:87: the preceding ten-second
|
|
129
|
+
observer loop silently exhausted its deadline and continued despite unavailable
|
|
130
|
+
display authority. All 14,014 frozen inputs were unchanged. This is a failed
|
|
131
|
+
full run, even though all required CI checks passed.
|
|
132
|
+
|
|
133
|
+
Both initial and post-save loops now explicitly assert the real runtime display
|
|
134
|
+
value within 20 seconds. This permits two independent refresh opportunities
|
|
135
|
+
(5-second scheduling delay, up to a 2-second failed or invalidated source read,
|
|
136
|
+
another 5-second delay, and another bounded read) plus scheduling margin. This
|
|
137
|
+
is a fixture allowance, not a new production service guarantee. Unabortable work
|
|
138
|
+
can retain the existing read slot longer; a persistent failure still fails this
|
|
139
|
+
test with phase-labelled state, reason, revision, busy flag and timestamps. No
|
|
140
|
+
config values, tokens or arbitrary exception messages enter those diagnostics.
|
|
141
|
+
The body budget is 60 seconds to accommodate the two observation waits and
|
|
142
|
+
HTTP/DOM work; the separate 30-second cleanup bound is unchanged.
|
|
143
|
+
|
|
144
|
+
Message preparation remains outside polling, immediately after successful
|
|
145
|
+
observation. Disk persistence, actual new-message display settings, unchanged
|
|
146
|
+
original envelopes, operator audit scope and model-write refusal assertions are
|
|
147
|
+
preserved. Production source reads still have their two-second deadline,
|
|
148
|
+
snapshots still require current authority and 30-second freshness, and no
|
|
149
|
+
runtime or delivery policy changes are included. The observed test failure
|
|
150
|
+
alone does not establish a production observer defect.
|
|
151
|
+
|
|
152
|
+
Independent reviewer review_local_refusal concurred with the actual single-file
|
|
153
|
+
diff. The dedicated phone E2E passed in
|
|
154
|
+
/tmp/echo-local-refusal-phone-observer-focused.log. Fresh full validation and
|
|
155
|
+
final-candidate CI remain required before release.
|
|
156
|
+
|
|
157
|
+
## Native canary aggregate-load correction
|
|
158
|
+
|
|
159
|
+
The rebased `707febb49` candidate passed all 51,995 aggregate tests and all
|
|
160
|
+
4,208 dedicated integration tests. Dedicated E2E then passed 3,242 tests and
|
|
161
|
+
failed only the actual credential-free Codex native-format canary at its exact
|
|
162
|
+
30-second production deadline. The same canary immediately passed directly in
|
|
163
|
+
about 18 seconds and in its isolated E2E file in 29.48 seconds, proving the
|
|
164
|
+
native format, both turns, six isolation controls, and cleanup were functional
|
|
165
|
+
but leaving inadequate aggregate-load margin. Hosted CI passed all 26 checks.
|
|
166
|
+
|
|
167
|
+
The canary's three independent network sabotage probes previously waited
|
|
168
|
+
serially, permitting their fixed 1.5-second safety bounds to consume up to 4.5
|
|
169
|
+
seconds before the native CLI started. They now execute concurrently with
|
|
170
|
+
`Promise.all`, retaining the same fixed destinations, per-probe timeout,
|
|
171
|
+
ordered six-control result, kernel sandbox, and fail-closed aggregate check.
|
|
172
|
+
The production canary's 30-second deadline, two native turns, credential
|
|
173
|
+
isolation, cleanup verification, and all delivery authority remain unchanged.
|
|
174
|
+
This reduces avoidable fixture latency; it does not turn a timeout or failed
|
|
175
|
+
control into a pass.
|
|
176
|
+
|
|
177
|
+
Independent reviewer poller_second_pass concurred with the correction. It
|
|
178
|
+
verified unchanged destinations and expectations, independent 1.5-second
|
|
179
|
+
bounds, ordered `Promise.all` results, fail-closed six-control acceptance,
|
|
180
|
+
bounded cleanup, and no authority widening. No blocker was found.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Let the diagnostic finish cleaning up before judging it
|
|
2
|
+
|
|
3
|
+
Instar periodically checks its own Telegram configuration readers using a private, disposable fixture. It checks six things, including encrypted configuration, the exact alert destination, an opt-out, a changed destination, changed credentials, and malformed configuration. These checks diagnose the readers. They do not contact Telegram or give any message permission to send.
|
|
4
|
+
|
|
5
|
+
The old deadline included both the checks and the time needed to close native filesystem watchers. Tracing showed the checks finishing in about a third of a second, while macOS could spend 15 to 43 seconds closing those watchers one by one. That cleanup could make healthy reader checks appear broken. Retrying repeated the same expensive cleanup.
|
|
6
|
+
|
|
7
|
+
This repair keeps six seconds for the checks and gives their cleanup its own bounded 30-second window. The disposable worker removes its private directory and reports when its work actually finished. Instar then terminates that whole worker thread, which lets the operating system close all of its watchers as one owned boundary instead of serially waiting on each watcher. Instar still waits for the real worker exit and repeats private-directory removal before reporting a pass. While that work is happening, health says cleanup is running. An early success flag cannot establish a passing result.
|
|
8
|
+
|
|
9
|
+
If cleanup proof is missing, malformed, unsuccessful, or over its deadline, the result stays unavailable and that instance stops trying. Instar retains ownership until the worker really exits and final removal settles. This prevents a second worker from overlapping resources that are still closing. A delayed parent event loop does not turn an already completed worker cleanup into a false timeout.
|
|
10
|
+
|
|
11
|
+
The existing startup wait, two-attempt ceiling, and completion-relative schedule remain. Every machine checks its own disposable state. Existing agents receive the same explanation as newly installed agents, without replacing their added notes. No stored delivery data needs migration. Rolling back restores the previous diagnostic timing; it does not replay any message.
|
|
12
|
+
|
|
13
|
+
The acceptance evidence includes malformed and duplicated worker messages, both sides of each deadline, real worker teardown, HTTP health, production boot, and installed-instruction migration. Release readiness still requires the full local suite and normal CI gates.
|
|
14
|
+
|
|
15
|
+
The release gates also found two nearby timing races under heavy load. Starting a storage worker now has a separate bounded allowance from asking an already-running worker to do one operation. Test receivers also announce when raw terminal mode is truly active before accepting a large tmux payload. These do not change who may send a message; they keep slow startup from being mistaken for broken storage or truncated input.
|
|
16
|
+
|
|
17
|
+
One final aggregate test showed that the normal configuration and alert-policy readers still had native filesystem watchers in the main process. Those readers could finish their work and then spend over 30 seconds closing watchers on macOS. They now check the exact source files on a short background cadence and stop by cancelling that timer. Configuration, encrypted-secret, credential, and alert-destination changes still revoke stale authority promptly, while normal shutdown no longer waits on the operating system's watcher close path.
|
|
18
|
+
|
|
19
|
+
That background check is also registered in Instar's self-action convergence guard. The guard proves its cadence stays fixed at one pass per 250 milliseconds under sustained pressure and cannot accelerate into a tight loop.
|