instar 0.28.75 → 0.28.76

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.
Files changed (316) hide show
  1. package/dist/cli.js +4 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/discovery.d.ts.map +1 -1
  4. package/dist/commands/discovery.js +1 -0
  5. package/dist/commands/discovery.js.map +1 -1
  6. package/dist/commands/init.d.ts.map +1 -1
  7. package/dist/commands/init.js +2 -0
  8. package/dist/commands/init.js.map +1 -1
  9. package/dist/commands/job.d.ts.map +1 -1
  10. package/dist/commands/job.js +1 -0
  11. package/dist/commands/job.js.map +1 -1
  12. package/dist/commands/ledgerCleanup.d.ts.map +1 -1
  13. package/dist/commands/ledgerCleanup.js +1 -0
  14. package/dist/commands/ledgerCleanup.js.map +1 -1
  15. package/dist/commands/listener.d.ts.map +1 -1
  16. package/dist/commands/listener.js +6 -0
  17. package/dist/commands/listener.js.map +1 -1
  18. package/dist/commands/nuke.d.ts.map +1 -1
  19. package/dist/commands/nuke.js +6 -0
  20. package/dist/commands/nuke.js.map +1 -1
  21. package/dist/commands/server.d.ts.map +1 -1
  22. package/dist/commands/server.js +2 -0
  23. package/dist/commands/server.js.map +1 -1
  24. package/dist/commands/setup.d.ts.map +1 -1
  25. package/dist/commands/setup.js +6 -0
  26. package/dist/commands/setup.js.map +1 -1
  27. package/dist/commands/slack-cli.d.ts.map +1 -1
  28. package/dist/commands/slack-cli.js +4 -0
  29. package/dist/commands/slack-cli.js.map +1 -1
  30. package/dist/commands/whatsapp.d.ts.map +1 -1
  31. package/dist/commands/whatsapp.js +1 -0
  32. package/dist/commands/whatsapp.js.map +1 -1
  33. package/dist/commands/worktree.d.ts.map +1 -1
  34. package/dist/commands/worktree.js +1 -0
  35. package/dist/commands/worktree.js.map +1 -1
  36. package/dist/core/AgentConnector.d.ts.map +1 -1
  37. package/dist/core/AgentConnector.js +3 -0
  38. package/dist/core/AgentConnector.js.map +1 -1
  39. package/dist/core/AgentRegistry.d.ts.map +1 -1
  40. package/dist/core/AgentRegistry.js +2 -0
  41. package/dist/core/AgentRegistry.js.map +1 -1
  42. package/dist/core/AutoDispatcher.d.ts.map +1 -1
  43. package/dist/core/AutoDispatcher.js +1 -0
  44. package/dist/core/AutoDispatcher.js.map +1 -1
  45. package/dist/core/AutoUpdater.d.ts.map +1 -1
  46. package/dist/core/AutoUpdater.js +1 -0
  47. package/dist/core/AutoUpdater.js.map +1 -1
  48. package/dist/core/AutonomousEvolution.d.ts.map +1 -1
  49. package/dist/core/AutonomousEvolution.js +1 -0
  50. package/dist/core/AutonomousEvolution.js.map +1 -1
  51. package/dist/core/BackupManager.d.ts.map +1 -1
  52. package/dist/core/BackupManager.js +1 -0
  53. package/dist/core/BackupManager.js.map +1 -1
  54. package/dist/core/BranchManager.d.ts.map +1 -1
  55. package/dist/core/BranchManager.js +1 -0
  56. package/dist/core/BranchManager.js.map +1 -1
  57. package/dist/core/CaffeinateManager.d.ts.map +1 -1
  58. package/dist/core/CaffeinateManager.js +1 -0
  59. package/dist/core/CaffeinateManager.js.map +1 -1
  60. package/dist/core/DeferredDispatchTracker.d.ts.map +1 -1
  61. package/dist/core/DeferredDispatchTracker.js +1 -0
  62. package/dist/core/DeferredDispatchTracker.js.map +1 -1
  63. package/dist/core/DispatchManager.d.ts.map +1 -1
  64. package/dist/core/DispatchManager.js +2 -0
  65. package/dist/core/DispatchManager.js.map +1 -1
  66. package/dist/core/EvolutionManager.d.ts.map +1 -1
  67. package/dist/core/EvolutionManager.js +1 -0
  68. package/dist/core/EvolutionManager.js.map +1 -1
  69. package/dist/core/ExecutionJournal.d.ts.map +1 -1
  70. package/dist/core/ExecutionJournal.js +1 -0
  71. package/dist/core/ExecutionJournal.js.map +1 -1
  72. package/dist/core/FeedbackManager.d.ts.map +1 -1
  73. package/dist/core/FeedbackManager.js +1 -0
  74. package/dist/core/FeedbackManager.js.map +1 -1
  75. package/dist/core/FileClassifier.d.ts.map +1 -1
  76. package/dist/core/FileClassifier.js +4 -0
  77. package/dist/core/FileClassifier.js.map +1 -1
  78. package/dist/core/ForegroundRestartWatcher.d.ts.map +1 -1
  79. package/dist/core/ForegroundRestartWatcher.js +2 -0
  80. package/dist/core/ForegroundRestartWatcher.js.map +1 -1
  81. package/dist/core/GitStateManager.d.ts.map +1 -1
  82. package/dist/core/GitStateManager.js +1 -0
  83. package/dist/core/GitStateManager.js.map +1 -1
  84. package/dist/core/GitSync.d.ts.map +1 -1
  85. package/dist/core/GitSync.js +3 -0
  86. package/dist/core/GitSync.js.map +1 -1
  87. package/dist/core/GlobalInstallCleanup.d.ts.map +1 -1
  88. package/dist/core/GlobalInstallCleanup.js +2 -0
  89. package/dist/core/GlobalInstallCleanup.js.map +1 -1
  90. package/dist/core/GlobalSecretStore.d.ts.map +1 -1
  91. package/dist/core/GlobalSecretStore.js +2 -0
  92. package/dist/core/GlobalSecretStore.js.map +1 -1
  93. package/dist/core/HandoffManager.d.ts.map +1 -1
  94. package/dist/core/HandoffManager.js +2 -0
  95. package/dist/core/HandoffManager.js.map +1 -1
  96. package/dist/core/LedgerSessionRegistry.d.ts.map +1 -1
  97. package/dist/core/LedgerSessionRegistry.js +1 -0
  98. package/dist/core/LedgerSessionRegistry.js.map +1 -1
  99. package/dist/core/MachineIdentity.d.ts.map +1 -1
  100. package/dist/core/MachineIdentity.js +1 -0
  101. package/dist/core/MachineIdentity.js.map +1 -1
  102. package/dist/core/ParallelDevWiring.d.ts.map +1 -1
  103. package/dist/core/ParallelDevWiring.js +1 -0
  104. package/dist/core/ParallelDevWiring.js.map +1 -1
  105. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  106. package/dist/core/PostUpdateMigrator.js +2 -0
  107. package/dist/core/PostUpdateMigrator.js.map +1 -1
  108. package/dist/core/ProjectMapper.d.ts.map +1 -1
  109. package/dist/core/ProjectMapper.js +2 -0
  110. package/dist/core/ProjectMapper.js.map +1 -1
  111. package/dist/core/RelationshipManager.d.ts.map +1 -1
  112. package/dist/core/RelationshipManager.js +2 -0
  113. package/dist/core/RelationshipManager.js.map +1 -1
  114. package/dist/core/SafeFsExecutor.d.ts +41 -0
  115. package/dist/core/SafeFsExecutor.d.ts.map +1 -0
  116. package/dist/core/SafeFsExecutor.js +146 -0
  117. package/dist/core/SafeFsExecutor.js.map +1 -0
  118. package/dist/core/SafeGitExecutor.d.ts +139 -0
  119. package/dist/core/SafeGitExecutor.d.ts.map +1 -0
  120. package/dist/core/SafeGitExecutor.js +631 -0
  121. package/dist/core/SafeGitExecutor.js.map +1 -0
  122. package/dist/core/ScopeVerifier.d.ts.map +1 -1
  123. package/dist/core/ScopeVerifier.js +1 -0
  124. package/dist/core/ScopeVerifier.js.map +1 -1
  125. package/dist/core/SecretStore.d.ts.map +1 -1
  126. package/dist/core/SecretStore.js +1 -0
  127. package/dist/core/SecretStore.js.map +1 -1
  128. package/dist/core/SharedStateLedger.d.ts.map +1 -1
  129. package/dist/core/SharedStateLedger.js +1 -0
  130. package/dist/core/SharedStateLedger.js.map +1 -1
  131. package/dist/core/SoulManager.d.ts.map +1 -1
  132. package/dist/core/SoulManager.js +2 -0
  133. package/dist/core/SoulManager.js.map +1 -1
  134. package/dist/core/StateManager.d.ts.map +1 -1
  135. package/dist/core/StateManager.js +3 -0
  136. package/dist/core/StateManager.js.map +1 -1
  137. package/dist/core/SyncOrchestrator.d.ts.map +1 -1
  138. package/dist/core/SyncOrchestrator.js +3 -0
  139. package/dist/core/SyncOrchestrator.js.map +1 -1
  140. package/dist/core/UpdateChecker.d.ts.map +1 -1
  141. package/dist/core/UpdateChecker.js +2 -0
  142. package/dist/core/UpdateChecker.js.map +1 -1
  143. package/dist/core/UpgradeGuideProcessor.d.ts.map +1 -1
  144. package/dist/core/UpgradeGuideProcessor.js +2 -0
  145. package/dist/core/UpgradeGuideProcessor.js.map +1 -1
  146. package/dist/core/WorktreeManager.d.ts.map +1 -1
  147. package/dist/core/WorktreeManager.js +7 -0
  148. package/dist/core/WorktreeManager.js.map +1 -1
  149. package/dist/knowledge/KnowledgeManager.d.ts.map +1 -1
  150. package/dist/knowledge/KnowledgeManager.js +1 -0
  151. package/dist/knowledge/KnowledgeManager.js.map +1 -1
  152. package/dist/lifeline/ServerSupervisor.d.ts.map +1 -1
  153. package/dist/lifeline/ServerSupervisor.js +14 -0
  154. package/dist/lifeline/ServerSupervisor.js.map +1 -1
  155. package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
  156. package/dist/lifeline/TelegramLifeline.js +1 -0
  157. package/dist/lifeline/TelegramLifeline.js.map +1 -1
  158. package/dist/lifeline/droppedMessages.d.ts.map +1 -1
  159. package/dist/lifeline/droppedMessages.js +1 -0
  160. package/dist/lifeline/droppedMessages.js.map +1 -1
  161. package/dist/memory/EpisodicMemory.d.ts.map +1 -1
  162. package/dist/memory/EpisodicMemory.js +1 -0
  163. package/dist/memory/EpisodicMemory.js.map +1 -1
  164. package/dist/memory/TopicMemory.d.ts.map +1 -1
  165. package/dist/memory/TopicMemory.js +4 -0
  166. package/dist/memory/TopicMemory.js.map +1 -1
  167. package/dist/messaging/AgentTokenManager.d.ts.map +1 -1
  168. package/dist/messaging/AgentTokenManager.js +1 -0
  169. package/dist/messaging/AgentTokenManager.js.map +1 -1
  170. package/dist/messaging/DropPickup.js +1 -0
  171. package/dist/messaging/DropPickup.js.map +1 -1
  172. package/dist/messaging/GitSyncTransport.d.ts.map +1 -1
  173. package/dist/messaging/GitSyncTransport.js +3 -0
  174. package/dist/messaging/GitSyncTransport.js.map +1 -1
  175. package/dist/messaging/MessageStore.d.ts.map +1 -1
  176. package/dist/messaging/MessageStore.js +2 -0
  177. package/dist/messaging/MessageStore.js.map +1 -1
  178. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  179. package/dist/messaging/TelegramAdapter.js +4 -0
  180. package/dist/messaging/TelegramAdapter.js.map +1 -1
  181. package/dist/messaging/backends/BaileysBackend.d.ts.map +1 -1
  182. package/dist/messaging/backends/BaileysBackend.js +2 -0
  183. package/dist/messaging/backends/BaileysBackend.js.map +1 -1
  184. package/dist/messaging/shared/EncryptedAuthStore.d.ts.map +1 -1
  185. package/dist/messaging/shared/EncryptedAuthStore.js +2 -0
  186. package/dist/messaging/shared/EncryptedAuthStore.js.map +1 -1
  187. package/dist/messaging/shared/MessageLogger.d.ts.map +1 -1
  188. package/dist/messaging/shared/MessageLogger.js +1 -0
  189. package/dist/messaging/shared/MessageLogger.js.map +1 -1
  190. package/dist/messaging/shared/PrivacyConsent.d.ts.map +1 -1
  191. package/dist/messaging/shared/PrivacyConsent.js +1 -0
  192. package/dist/messaging/shared/PrivacyConsent.js.map +1 -1
  193. package/dist/messaging/shared/SessionChannelRegistry.d.ts.map +1 -1
  194. package/dist/messaging/shared/SessionChannelRegistry.js +1 -0
  195. package/dist/messaging/shared/SessionChannelRegistry.js.map +1 -1
  196. package/dist/moltbridge/ProfileCompiler.d.ts.map +1 -1
  197. package/dist/moltbridge/ProfileCompiler.js +3 -0
  198. package/dist/moltbridge/ProfileCompiler.js.map +1 -1
  199. package/dist/monitoring/CommitmentTracker.d.ts.map +1 -1
  200. package/dist/monitoring/CommitmentTracker.js +1 -0
  201. package/dist/monitoring/CommitmentTracker.js.map +1 -1
  202. package/dist/monitoring/CredentialProvider.d.ts.map +1 -1
  203. package/dist/monitoring/CredentialProvider.js +1 -0
  204. package/dist/monitoring/CredentialProvider.js.map +1 -1
  205. package/dist/monitoring/HealthChecker.d.ts.map +1 -1
  206. package/dist/monitoring/HealthChecker.js +1 -0
  207. package/dist/monitoring/HealthChecker.js.map +1 -1
  208. package/dist/monitoring/HookEventReceiver.d.ts.map +1 -1
  209. package/dist/monitoring/HookEventReceiver.js +1 -0
  210. package/dist/monitoring/HookEventReceiver.js.map +1 -1
  211. package/dist/monitoring/InstructionsVerifier.d.ts.map +1 -1
  212. package/dist/monitoring/InstructionsVerifier.js +1 -0
  213. package/dist/monitoring/InstructionsVerifier.js.map +1 -1
  214. package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
  215. package/dist/monitoring/PresenceProxy.js +4 -0
  216. package/dist/monitoring/PresenceProxy.js.map +1 -1
  217. package/dist/monitoring/QuotaTracker.d.ts.map +1 -1
  218. package/dist/monitoring/QuotaTracker.js +1 -0
  219. package/dist/monitoring/QuotaTracker.js.map +1 -1
  220. package/dist/monitoring/SessionMigrator.d.ts.map +1 -1
  221. package/dist/monitoring/SessionMigrator.js +1 -0
  222. package/dist/monitoring/SessionMigrator.js.map +1 -1
  223. package/dist/monitoring/SessionRecovery.d.ts.map +1 -1
  224. package/dist/monitoring/SessionRecovery.js +1 -0
  225. package/dist/monitoring/SessionRecovery.js.map +1 -1
  226. package/dist/monitoring/TelemetryAuth.d.ts.map +1 -1
  227. package/dist/monitoring/TelemetryAuth.js +2 -0
  228. package/dist/monitoring/TelemetryAuth.js.map +1 -1
  229. package/dist/monitoring/TriageOrchestrator.d.ts.map +1 -1
  230. package/dist/monitoring/TriageOrchestrator.js +2 -0
  231. package/dist/monitoring/TriageOrchestrator.js.map +1 -1
  232. package/dist/monitoring/WorktreeReaper.d.ts.map +1 -1
  233. package/dist/monitoring/WorktreeReaper.js +3 -0
  234. package/dist/monitoring/WorktreeReaper.js.map +1 -1
  235. package/dist/monitoring/probes/PlatformProbe.d.ts.map +1 -1
  236. package/dist/monitoring/probes/PlatformProbe.js +2 -0
  237. package/dist/monitoring/probes/PlatformProbe.js.map +1 -1
  238. package/dist/paste/PasteManager.d.ts.map +1 -1
  239. package/dist/paste/PasteManager.js +4 -0
  240. package/dist/paste/PasteManager.js.map +1 -1
  241. package/dist/publishing/PrivateViewer.d.ts.map +1 -1
  242. package/dist/publishing/PrivateViewer.js +1 -0
  243. package/dist/publishing/PrivateViewer.js.map +1 -1
  244. package/dist/scheduler/JobScheduler.d.ts.map +1 -1
  245. package/dist/scheduler/JobScheduler.js +1 -0
  246. package/dist/scheduler/JobScheduler.js.map +1 -1
  247. package/dist/server/routes.d.ts.map +1 -1
  248. package/dist/server/routes.js +21 -9
  249. package/dist/server/routes.js.map +1 -1
  250. package/dist/threadline/AgentDiscovery.d.ts.map +1 -1
  251. package/dist/threadline/AgentDiscovery.js +1 -0
  252. package/dist/threadline/AgentDiscovery.js.map +1 -1
  253. package/dist/threadline/AgentTrustManager.d.ts.map +1 -1
  254. package/dist/threadline/AgentTrustManager.js +1 -0
  255. package/dist/threadline/AgentTrustManager.js.map +1 -1
  256. package/dist/threadline/CircuitBreaker.d.ts.map +1 -1
  257. package/dist/threadline/CircuitBreaker.js +1 -0
  258. package/dist/threadline/CircuitBreaker.js.map +1 -1
  259. package/dist/threadline/ComputeMeter.d.ts.map +1 -1
  260. package/dist/threadline/ComputeMeter.js +1 -0
  261. package/dist/threadline/ComputeMeter.js.map +1 -1
  262. package/dist/threadline/ContextThreadMap.d.ts.map +1 -1
  263. package/dist/threadline/ContextThreadMap.js +1 -0
  264. package/dist/threadline/ContextThreadMap.js.map +1 -1
  265. package/dist/threadline/InvitationManager.d.ts.map +1 -1
  266. package/dist/threadline/InvitationManager.js +1 -0
  267. package/dist/threadline/InvitationManager.js.map +1 -1
  268. package/dist/threadline/MCPAuth.d.ts.map +1 -1
  269. package/dist/threadline/MCPAuth.js +1 -0
  270. package/dist/threadline/MCPAuth.js.map +1 -1
  271. package/dist/threadline/PipeSessionSpawner.d.ts.map +1 -1
  272. package/dist/threadline/PipeSessionSpawner.js +2 -0
  273. package/dist/threadline/PipeSessionSpawner.js.map +1 -1
  274. package/dist/threadline/RateLimiter.d.ts.map +1 -1
  275. package/dist/threadline/RateLimiter.js +1 -0
  276. package/dist/threadline/RateLimiter.js.map +1 -1
  277. package/dist/threadline/SessionLifecycle.d.ts.map +1 -1
  278. package/dist/threadline/SessionLifecycle.js +1 -0
  279. package/dist/threadline/SessionLifecycle.js.map +1 -1
  280. package/dist/threadline/ThreadlineBootstrap.d.ts.map +1 -1
  281. package/dist/threadline/ThreadlineBootstrap.js +1 -0
  282. package/dist/threadline/ThreadlineBootstrap.js.map +1 -1
  283. package/dist/threadline/WakeSocketServer.d.ts.map +1 -1
  284. package/dist/threadline/WakeSocketServer.js +2 -0
  285. package/dist/threadline/WakeSocketServer.js.map +1 -1
  286. package/dist/threadline/listener-daemon.d.ts.map +1 -1
  287. package/dist/threadline/listener-daemon.js +2 -0
  288. package/dist/threadline/listener-daemon.js.map +1 -1
  289. package/dist/users/UserManager.d.ts.map +1 -1
  290. package/dist/users/UserManager.js +1 -0
  291. package/dist/users/UserManager.js.map +1 -1
  292. package/dist/users/UserOnboarding.d.ts.map +1 -1
  293. package/dist/users/UserOnboarding.js +1 -0
  294. package/dist/users/UserOnboarding.js.map +1 -1
  295. package/dist/utils/jsonl-rotation.d.ts.map +1 -1
  296. package/dist/utils/jsonl-rotation.js +1 -0
  297. package/dist/utils/jsonl-rotation.js.map +1 -1
  298. package/package.json +4 -2
  299. package/scripts/add-migration-marker.js +121 -0
  300. package/scripts/analyze-release.js +6 -0
  301. package/scripts/check-contract-evidence.js +2 -0
  302. package/scripts/destructive-command-shim.js +1 -0
  303. package/scripts/fix-better-sqlite3.cjs +2 -0
  304. package/scripts/generate-builtin-manifest.cjs +1 -0
  305. package/scripts/instar-dev-precommit.js +2 -0
  306. package/scripts/lint-no-direct-destructive.js +597 -0
  307. package/scripts/migrate-incident-2026-04-17.mjs +1 -0
  308. package/scripts/pre-push-gate.js +24 -0
  309. package/scripts/test-bootstrap-relay.mjs +1 -0
  310. package/scripts/worktree-commit-msg-hook.js +4 -0
  311. package/scripts/worktree-precommit-gate.js +1 -0
  312. package/src/data/builtin-manifest.json +98 -98
  313. package/src/templates/scripts/git-sync-gate.sh +4 -0
  314. package/upgrades/0.28.76.md +67 -0
  315. package/upgrades/side-effects/comprehensive-destructive-tool-containment-foundation.md +74 -0
  316. package/upgrades/side-effects/telegram-lifeline-version-missing-info.md +76 -0
@@ -29,6 +29,7 @@ fi
29
29
  LOCAL_CHANGES=$(git status --porcelain 2>/dev/null | head -1)
30
30
 
31
31
  # Fetch remote (silent, with timeout)
32
+ // safe-git-allow: incremental-migration
32
33
  git fetch origin --quiet 2>/dev/null &
33
34
  FETCH_PID=$!
34
35
  sleep 5 && kill "$FETCH_PID" 2>/dev/null &
@@ -55,8 +56,11 @@ fi
55
56
  # If both sides have changes, check for potential conflicts
56
57
  if [ -n "$LOCAL_CHANGES" ] && [ "${BEHIND:-0}" -gt 0 ]; then
57
58
  # Stash local changes temporarily and try a dry-run merge
59
+ // safe-git-allow: incremental-migration
58
60
  git stash --quiet 2>/dev/null
61
+ // safe-git-allow: incremental-migration
59
62
  MERGE_OUTPUT=$(git merge-tree "$(git merge-base HEAD "$TRACKING_BRANCH")" HEAD "$TRACKING_BRANCH" 2>/dev/null)
63
+ // safe-git-allow: incremental-migration
60
64
  git stash pop --quiet 2>/dev/null
61
65
 
62
66
  if echo "$MERGE_OUTPUT" | grep -q "<<<<<<"; then
@@ -0,0 +1,67 @@
1
+ # Upgrade Guide — v0.28.76
2
+
3
+ <!-- bump: patch -->
4
+
5
+ ## What Changed
6
+
7
+ `POST /internal/telegram-forward` no longer reports the backward-compat
8
+ `TelegramLifeline.versionMissing` event into the feedback pipeline as a
9
+ `[DEGRADATION]` signal. The condition (an upgraded but un-restarted lifeline
10
+ forwarding a Telegram message without the Stage-B `lifelineVersion` field) is
11
+ expected, accepted, and documented behaviour — emitting it as a critical
12
+ degradation was producing noisy regressions in cluster
13
+ `cmo7wswhj0000mgmdbw4j7dyd` every time any pre-Stage-B lifeline forwarded a
14
+ message.
15
+
16
+ The forward itself still succeeds via the documented backward-compat path;
17
+ the response, the inbound-message log, and the version-handshake logic for
18
+ lifelines that *do* send `lifelineVersion` are all unchanged. On the first
19
+ occurrence per server process, a one-shot `console.info` is emitted so the
20
+ operator-side observability signal is preserved without per-request log
21
+ spam.
22
+
23
+ The systemic work to give `DegradationReporter` a typed severity / category
24
+ field (so callers can mark events as ERROR vs COMPAT_SIGNAL at the reporter
25
+ layer rather than the call site) remains tracked under PROP-543 and is
26
+ deliberately out of scope for this release.
27
+
28
+ ## What to Tell Your User
29
+
30
+ - **Quieter feedback signal**: I won't keep logging a critical-looking
31
+ message every time my lifeline forwards a Telegram note before I've had a
32
+ chance to restart it. The forward still works the same way; only the
33
+ noisy critical report goes away.
34
+
35
+ ## Summary of New Capabilities
36
+
37
+ | Capability | How to Use |
38
+ |-----------|-----------|
39
+ | Quieter pre-Stage-B lifeline forwards | Automatic on upgrade |
40
+
41
+ ## Evidence
42
+
43
+ Reproduction (before fix):
44
+
45
+ 1. Run a lifeline at v0.28.67 or later, then upgrade the server-side package
46
+ without restarting the lifeline daemon.
47
+ 2. Send a Telegram message that the lifeline forwards via
48
+ `POST /internal/telegram-forward`.
49
+ 3. The handler accepts the forward and emits a
50
+ `[DEGRADATION] TelegramLifeline.versionMissing: …` feedback event,
51
+ classified as critical by the Portal cluster intake.
52
+
53
+ After fix:
54
+
55
+ 1. Same setup; same forward; same successful response.
56
+ 2. On the first forward per server process, a single
57
+ `[telegram-forward] Accepted pre-Stage-B lifeline forward …`
58
+ `console.info` is emitted; subsequent forwards on the same process emit
59
+ nothing.
60
+ 3. No `TelegramLifeline.versionMissing` feedback events are submitted, so
61
+ cluster `cmo7wswhj0000mgmdbw4j7dyd` does not auto-reopen on every
62
+ forward.
63
+
64
+ `grep -rn versionMissing src/ tests/ test/ __tests__/` shows the symbol
65
+ appears only in `routes.ts` (the one-shot guard and the comment explaining
66
+ it). No test changed because the call site has no existing test coverage of
67
+ the reporter side-effect.
@@ -0,0 +1,74 @@
1
+ # Side-Effects Review — Comprehensive Destructive-Tool Containment (PR 1/2 — Foundation)
2
+
3
+ **Version / slug:** `comprehensive-destructive-tool-containment-foundation`
4
+ **Date:** `2026-04-26`
5
+ **Author:** Echo
6
+ **Spec:** `docs/specs/COMPREHENSIVE-DESTRUCTIVE-TOOL-CONTAINMENT-SPEC.md`
7
+ **Convergence report:** `docs/specs/reports/comprehensive-destructive-tool-containment-convergence.md`
8
+ **Commitments:** `commitments/comprehensive-destructive-tool-containment.yaml`
9
+ **Approval:** `approved: true` by Justin via Telegram topic 8122 on 2026-04-26 after reading the bundled review doc.
10
+
11
+ ## Summary of the change
12
+
13
+ This is the foundation half of the comprehensive containment work. It introduces two new destructive-operation funnels (`SafeGitExecutor`, `SafeFsExecutor`), a lint rule that refuses new direct destructive callsites, a CI step that catches accidental tree mutations, an audit log, and the three structural deferral-honesty layers that prevent recurrence of the "out-of-scope trap" pattern that allowed Incident B.
14
+
15
+ The migration of pre-existing direct callsites (1025 of them — 6× larger than the spec's initial estimate) is a separate PR scheduled for delivery within 7 days under principal-approved deferral with monitoring trigger (`commitment://incremental-migration`, due 2026-05-03). During the transitional period a `// safe-git-allow: incremental-migration` comment marker preserves bisectability — the lint rule blocks NEW direct callsites unconditionally; pre-existing callsites pass via marker.
16
+
17
+ ## Decision-point inventory
18
+
19
+ Changes to decision points:
20
+
21
+ - **Added**: `src/core/SafeGitExecutor.ts` — single-funnel destructive git executor. Calls `assertNotInstarSourceTree` (from PR #96) against canonicalized cwd + `-C <dir>` + `--git-dir=` + `--work-tree=` targets. Strips git-redirection env vars from caller-supplied env. Injects `GIT_CONFIG_GLOBAL=/dev/null`, `GIT_CONFIG_SYSTEM=/dev/null`, `GIT_CONFIG_NOSYSTEM=1` to disable user-gitconfig alias bypasses.
22
+ - **Added**: `src/core/SafeFsExecutor.ts` — parallel funnel for in-process destructive `fs` calls (`rm`, `unlink`, `rmdir` and their sync variants). Same canonicalization + assertion pipeline.
23
+ - **Added**: `scripts/lint-no-direct-destructive.js` — AST rule blocking direct `execFileSync('git', …)`, `spawn('git', …)`, `simpleGit(…)`, `execSync('git …')` AND direct `fs.rm*`, `fs.unlink*`, `fs.rmdir*` outside the closed module allowlist. Catches namespace imports, aliased imports, dynamic require, namespace-imported forms.
24
+ - **Added**: `.github/workflows/ci.yml` working-tree integrity step at end of `unit`, `integration`, `e2e` jobs — fails build if `git status --porcelain` shows mutations.
25
+ - **Added**: `.instar/audit/destructive-ops.jsonl` audit log — every safe-executor call appends a structured JSON line (timestamp, executor, operation, verb, target, outcome, reason, caller). Fail-soft on log-write failure.
26
+ - **Added**: Layer A — `/instar-dev` skill deferral-honesty check. LLM classifier with regex fail-closed fallback. Refuses `recurrence-risking` items entirely unless `principal-deferral-approval` lists their commitment IDs. Refuses `tactical-deferral` items without paired tracked commitments. Time horizons: 36 hours / 6 days (10× tightened from initial 14d / 60d on principal directive).
27
+ - **Added**: Layer B — pre-commit hook deferral-section structural check (extends `scripts/instar-dev-precommit.js`). Refuses commits with "Out-of-scope follow-ups" section header but no paired commitments file.
28
+ - **Added**: Layer C — `/spec-converge` "recurrence-containment" reviewer angle. Two questions per deferred item: "if this never ships, does the original problem recur?" and "is there any way this could be done in current scope, even at the cost of a larger PR?"
29
+ - **Added**: 53 new unit tests covering SafeGitExecutor + SafeFsExecutor + lint-rule bypass closures, plus regression tests reproducing Incident A and Incident B at the new funnel level.
30
+ - **Modified**: 570 pre-existing destructive callsites carry the `// safe-git-allow: incremental-migration` marker as a transitional pass-through. Lint rule honors the marker until the migration commitment lands.
31
+ - **Allowlist (transitional)**: `src/messaging/imessage/IMessageAdapter.ts` and `src/messaging/imessage/NativeBackend.ts` are added to the lint ALLOWLIST as transitional entries (not per-line markers) so that the foundation PR does not modify adapter source files. This keeps the pre-push adapter contract test gate from triggering on what would otherwise be no-op marker comments. PR #2 (commitment://incremental-migration, due 2026-05-03) migrates these `fs.unlinkSync` calls through `SafeFsExecutor` and removes the entries.
32
+
33
+ ## Roll-up verdict across the seven review dimensions
34
+
35
+ 1. **Over-block**: minimal. The marker mechanism is intentionally transitional — pre-existing callsites pass via marker; new ones are refused unconditionally. False-block cost on a new caller is "use the safe executor"; the cost trade is correct.
36
+ 2. **Under-block**: known transitional surface — pre-existing direct callsites can still hit the source tree if a fixture passes a misconfigured cwd. Compensating mechanisms during the transitional period: PR #96's three-class constructor guard catches manager-class instantiation; the new CI tree-mutation detector catches anything that mutated the working tree post-test; the migration commitment has a 7-day hard deadline with automatic Telegram notification on the due date.
37
+ 3. **Level-of-abstraction fit**: appropriate. Funnels at the right layer (single chokepoint per domain). Lint at the right layer (compile-time AST rule). CI detector at the right layer (post-test integration). Layers A/B/C at the developer-process layer.
38
+ 4. **Signal-vs-authority compliance**: compliant. `assertNotInstarSourceTree` is the authority (carve-out applies — irreversible action class). Lint rule is brittle pattern-matcher with refusal authority on a structural rule. Layer A LLM is smart authority; Layer B grep is brittle signal-producer; Layer C reviewer prompt is smart-LLM authority. All within carve-out.
39
+ 5. **Interactions**: tested. 53 new tests pass. Three pre-existing test failures (`agent-registry.test.ts:271,287`, `ListenerSessionManager.test.ts:359`) verified to fail on baseline commit `1f06e99` before any changes — not introduced by this work. One flaky E2E (`tunnel-private-view.test.ts`) passes in isolation, fails in full-suite ordering — pre-existing flakiness. Other test suites unaffected.
40
+ 6. **External surfaces**: lint rule extends pre-commit and pre-push gates (developer-process surface, not user-runtime). CI workflow gains a post-test step (CI surface, not user-runtime). No user-runtime API changes. Audit log is local, gitignored, and informational only.
41
+ 7. **Rollback cost**: low. Per-commit revert restores prior state. No persistent state mutations beyond the new audit log file (which is informational and gitignored). The marker comments are pure no-ops — removing them is mechanical.
42
+
43
+ ## Second-pass review
44
+
45
+ External cross-model review across GPT 5.4, Gemini 3.1 Pro, Grok 4.1 Fast. All three returned 8–9/10 CONDITIONAL. Eleven material findings between them, all addressed in spec before approval:
46
+
47
+ 1. Env-var redirection bypass closure (GPT)
48
+ 2. User-gitconfig alias bypass closure via `readSync` source-tree check + `GIT_CONFIG_GLOBAL=/dev/null` injection (Gemini)
49
+ 3. Namespace-import lint coverage (Gemini)
50
+ 4. `write-tree` reclassified read-only (GPT)
51
+ 5. Path canonicalization on `cwd`/`-C`/`--git-dir`/`--work-tree` (GPT)
52
+ 6. `format-patch` shape check (Grok)
53
+ 7. LLM-unavailable fail-closed regex fallback (Grok)
54
+ 8. Classifier hallucination override path (Gemini)
55
+ 9. Audit logging (GPT, Grok)
56
+ 10. Self-compliance contradiction → pulled `safe-fs` and `ci-mutation-detector` in-scope (Gemini)
57
+ 11. Comprehensive-first stance + 10× time-horizon tightening (principal directive)
58
+
59
+ Synthesis at `~/.instar/agents/echo/.claude/skills/crossreview/output/20260426-131003/synthesis.md`. Convergence report Round 4 documents per-finding disposition.
60
+
61
+ ## Evidence pointers
62
+
63
+ - 53 new unit tests in `tests/unit/SafeGitExecutor.test.ts`, `tests/unit/SafeFsExecutor.test.ts`, `tests/unit/lint-no-direct-destructive.test.ts`. All passing.
64
+ - Incident A regression test at `tests/integration/incident-a-fs-regression.test.ts` — verifies in-process `fs.rmSync(realInstarPath, …)` is blocked.
65
+ - Incident B regression test at `tests/integration/incident-b-regression.test.ts` — verifies test-fixture-shape `execFileSync('git', ['add', '-A'], { cwd: <instar source root> })` is blocked.
66
+ - Cross-review raw outputs at `~/.instar/agents/echo/.claude/skills/crossreview/output/20260426-131003/{gpt,gemini,grok,synthesis}.md`.
67
+ - Spec frontmatter records `approved: true`, `approved-by: justin`, `approved-at`, and `principal-deferral-approval` for `commitment://incremental-migration`.
68
+ - Commitments file lists three remaining deferrals (positive-authorization-redesign, kernel-container-guards, autostash-rebase-safety) plus the new incremental-migration with 7-day deadline. All non-`unscheduled` items have automatic Telegram-notification job triggers.
69
+
70
+ ## Migration deferral — explicit principal-deferral-approval
71
+
72
+ Justin approved the incremental-migration deferral via Telegram topic 8122 on 2026-04-26 after acknowledging the scope-reality mismatch (spec estimated ~167 callsites; actual 1025). The deferral is recorded in the spec frontmatter under `principal-deferral-approval` with full rationale. The 7-day cap is a principal-approved override of the standard 36-hour `recurrence-risking` cap, justified by the engineering reality that 1025 mechanical migrations + their full-suite test verification cannot ship in a single PR without unacceptable risk of subtle test breakage and an extended no-progress window.
73
+
74
+ This is the first real exercise of the new commitment-tracker infrastructure. The migration PR (PR 2/2) follows this one in the same session.
@@ -0,0 +1,76 @@
1
+ # Side-Effects Review — TelegramLifeline.versionMissing → info-only log
2
+
3
+ **Slug:** `telegram-lifeline-version-missing-info`
4
+ **Date:** `2026-04-27`
5
+ **Author:** Dawn (instar-bug-fix autonomous job)
6
+ **Cluster:** `cmo7wswhj0000mgmdbw4j7dyd` (severity: critical → resolved by reclassification)
7
+
8
+ ## Summary of the change
9
+
10
+ In `src/server/routes.ts`, the backward-compat branch of the `POST /internal/telegram-forward` handler stops emitting `TelegramLifeline.versionMissing` as a `[DEGRADATION]` feedback event. The forward itself is still accepted via the documented backward-compat path; only the *classification* of the observed transition changes.
11
+
12
+ Concretely:
13
+
14
+ - The call to `DegradationReporter.getInstance().report({ feature: 'TelegramLifeline.versionMissing', … })` is removed from `routes.ts:6367-6376`.
15
+ - A one-shot `console.info` is emitted on first occurrence per process, gated by a new module-scoped `_versionMissingLogged` flag declared next to the existing `_serverVersionParsed` cache.
16
+ - No other lines of code change. No new files. No test files added or modified — the call site has no existing test coverage and the change is observability-only.
17
+
18
+ Files touched:
19
+ - `src/server/routes.ts` — two small edits described above.
20
+ - `docs/specs/telegram-lifeline-version-missing-info.md` — new spec (LOW-risk autonomous-approved).
21
+ - `upgrades/side-effects/telegram-lifeline-version-missing-info.md` — this file.
22
+ - `upgrades/NEXT.md` — release notes appended.
23
+
24
+ ## 1. Over-block
25
+
26
+ **What legitimate inputs does this change reject that it shouldn't?**
27
+
28
+ None. The handler still accepts the forward; nothing is rejected. Pre-Stage-B lifelines continue to work exactly as they did, including the response body and logged inbound message. The only thing that changes is whether the acceptance is also reported as a `[DEGRADATION]` event into the feedback pipeline.
29
+
30
+ ## 2. Under-block
31
+
32
+ **What failure modes does this still miss?**
33
+
34
+ A genuine class of "lifeline running with wrong assumptions about server" issues that *also* manifest as a missing version field would no longer raise a degradation event. In practice, `lifelineVersion === undefined` only happens in the pre-Stage-B compatibility scenario — newer lifelines always send the field. Any *new* incompatibility class would also need to hit a different branch of this handler to surface, which is the correct layer.
35
+
36
+ The console.info preserves the signal in server logs (the operator-side observability surface). What we lose is the per-incident feedback-pipeline submission — which was the entire point of this change, since those submissions were being mis-classified as critical.
37
+
38
+ ## 3. Level-of-abstraction fit
39
+
40
+ **Is this at the right layer?**
41
+
42
+ Yes. The right long-term fix — adding a typed severity / category field to `DegradationReporter` so callers can distinguish ERROR from COMPAT_SIGNAL — is a broader API change tracked under PROP-543. This spec deliberately stays at the call site. The call site already has the contextual knowledge that *this particular* condition is observability-only (per the existing comment "emit informational signal once per cooldown" and the original commit's "Missing field accepted for backward compat."). Encoding "this is observability, not a degradation" at the call site is correct until the typed-severity refactor lands.
43
+
44
+ The chosen mechanism (module-scoped boolean + console.info) matches existing patterns in `routes.ts` (e.g. `console.log('[telegram-forward] …')` at lines 6452, 6515, 6604).
45
+
46
+ ## 4. Signal vs authority compliance
47
+
48
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
49
+
50
+ **Does this change hold blocking authority with brittle logic?**
51
+
52
+ No. This change has no block/allow surface. It is purely a presentation/classification change about how an *already-accepted* request is reported back into the feedback pipeline. The handler still makes the same admission decision (accept the forward) it did before.
53
+
54
+ ## 5. Interactions
55
+
56
+ - **Shadowing:** No — there is no alternative reporting path that this could shadow. The DegradationReporter call was the only emission site for `TelegramLifeline.versionMissing`. Removing it removes the signal from the feedback pipeline and only from there.
57
+ - **Cooldown coupling:** The previous code relied implicitly on `DegradationReporter`'s per-feature alert cooldown to avoid Telegram spam. Replacing the call with a one-shot `console.info` on the same condition removes that coupling: even without cooldown, the new path emits at most once per process. Per-process log noise is bounded; restart frequency dominates.
58
+ - **Build manifest:** `routes.ts` is a route-group source, so `scripts/generate-builtin-manifest.cjs` re-emits its inventory. No symbol added or removed (the new boolean is local), so the manifest delta is zero entries.
59
+
60
+ ## 6. Test coverage
61
+
62
+ **What tests changed and why.**
63
+
64
+ No test file is added or modified.
65
+
66
+ - The pre-fix call site had no direct test referencing `TelegramLifeline.versionMissing` (`grep` confirms). The only test surface for `/internal/telegram-forward` exercises the version-handshake decision tree, not the feedback emission side-effect.
67
+ - A "no degradation feedback emitted" assertion on this branch would require reaching into `DegradationReporter` internals, which is brittle and out of step with the existing test harness.
68
+ - The signal-preserving `console.info` is a logging-only side-effect; in line with existing `console.log` patterns in `routes.ts`, it is intentionally untested.
69
+
70
+ If a future test ever wants to assert "backward-compat path is informational only," the natural seam is the `DegradationReporter` mock in `tests/integration/server-route-degradation.test.ts` (if/when written) — verifying the reporter is *not* called for this branch.
71
+
72
+ ## 7. Reviewer notes
73
+
74
+ The cluster research notes cite this exact fix and acknowledge the broader systemic work as PROP-543. This change is the minimal, lowest-risk realisation of the cited fix and explicitly does not anticipate the systemic refactor.
75
+
76
+ A second-pass review is not required: no signal/authority change, no contract surface, no API change, single-file edit at a documented call site with no existing tests.