instar 1.3.1994 → 1.3.1995
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/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +16 -32
- package/dist/commands/server.js.map +1 -1
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +8 -15
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/memorySessionPolicy.d.ts.map +1 -1
- package/dist/core/memorySessionPolicy.js +3 -1
- package/dist/core/memorySessionPolicy.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/shared/telegramInboundFiles.d.ts +17 -0
- package/dist/messaging/shared/telegramInboundFiles.d.ts.map +1 -1
- package/dist/messaging/shared/telegramInboundFiles.js +35 -0
- package/dist/messaging/shared/telegramInboundFiles.js.map +1 -1
- package/dist/native/InstarWedgeCanary.app/Contents/MacOS/InstarWedgeCanary +0 -0
- package/dist/native/instar-desktop-host +0 -0
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +3 -3
- 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.1995.md +23 -0
- package/upgrades/side-effects/inbound-files-private.md +35 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memorySessionPolicy.d.ts","sourceRoot":"","sources":["../../src/core/memorySessionPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,SAAS,CAAC;AAMzB,eAAO,MAAM,oBAAoB,YAAI,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAU,CAAC;AAE9H,iFAAiF;AACjF,wBAAgB,yBAAyB,CAAC,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MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAOnE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,GAAE,MAAmB,EAAE,UAAU,GAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,KAAK,OAAqB,GAAG,MAAM,CA6C7M"}
|
|
@@ -24,7 +24,9 @@ export function memorySessionInboundRoots(state) {
|
|
|
24
24
|
return [
|
|
25
25
|
path.join(state, 'telegram-inbound'), path.join(state, 'telegram-images'), path.join(state, 'telegram-documents'),
|
|
26
26
|
path.join(state, 'telegram-files'), path.join(state, 'slack-files'), path.join(state, 'imessage', 'attachments'),
|
|
27
|
-
|
|
27
|
+
// SEC-138: Slack context and long-message files moved from /tmp/instar-slack into telegram-inbound;
|
|
28
|
+
// a shared /tmp folder is no longer a trusted source of inbound files.
|
|
29
|
+
path.join(state, 'state', 'dashboard-uploads'),
|
|
28
30
|
];
|
|
29
31
|
}
|
|
30
32
|
/** Top-level entries of the agent home a session must still be able to read. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memorySessionPolicy.js","sourceRoot":"","sources":["../../src/core/memorySessionPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,uBAAuB,GAAG,EAAE,GAAG,MAAM,CAAC;AAE5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAA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EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;gBACtF,CAAC;qBAAM,CAAC;oBACN,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;gBAChE,CAAC;gBACD,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;gBACzB,OAAO,MAAM,CAAC;YAChB,CAAC;YAAC,MAAM,CAAC;gBACP,2FAA2F;gBAC3F,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;QACL,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"generatedFrom": "source-tree",
|
|
4
4
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
5
|
-
"packageVersion": "1.3.
|
|
5
|
+
"packageVersion": "1.3.1995",
|
|
6
6
|
"guards": [
|
|
7
7
|
{
|
|
8
8
|
"ref": "docs/audits/phase-b/f10-triage.md",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sha256": "
|
|
2
|
+
"sha256": "14d6972109fc5e9206e9e54fbd61d463eabf41bd7433de5e4e2cc0fafb284c46",
|
|
3
3
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
4
|
-
"packageVersion": "1.3.
|
|
4
|
+
"packageVersion": "1.3.1995"
|
|
5
5
|
}
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
export declare function getTelegramInboundDir(projectDir: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Create the inbound folder owner-only, and tighten it when it already exists, is ours, and has
|
|
4
|
+
* group or other bits (older builds made it with the default mode). With the folder at 0700, no
|
|
5
|
+
* other account can list or open anything inside, whatever mode an individual file has.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensurePrivateDir(dir: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* SEC-138: save an inbound message body for a session to read, inside the agent's own project
|
|
10
|
+
* folder rather than a fixed shared folder under /tmp. A shared /tmp folder is readable by every
|
|
11
|
+
* local account and can be pre-created by one of them, which could then read the body or swap the
|
|
12
|
+
* file before the session opens it. The project-local inbound folder is the one Telegram already
|
|
13
|
+
* uses: sandboxed sessions can read it, git sync skips it, and the memory-privacy staging knows it.
|
|
14
|
+
*
|
|
15
|
+
* The folder is created owner-only, the file is created owner-only and exclusively (`wx`), and the
|
|
16
|
+
* name carries a random part, so two messages in the same millisecond never collide.
|
|
17
|
+
*/
|
|
18
|
+
export declare function writePrivateInboundFile(projectDir: string, prefix: string, content: string): string;
|
|
2
19
|
//# sourceMappingURL=telegramInboundFiles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telegramInboundFiles.d.ts","sourceRoot":"","sources":["../../../src/messaging/shared/telegramInboundFiles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"telegramInboundFiles.d.ts","sourceRoot":"","sources":["../../../src/messaging/shared/telegramInboundFiles.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAMnG"}
|
|
@@ -1,5 +1,40 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
1
2
|
import path from 'node:path';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
2
4
|
export function getTelegramInboundDir(projectDir) {
|
|
3
5
|
return path.join(projectDir, '.instar', 'telegram-inbound');
|
|
4
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Create the inbound folder owner-only, and tighten it when it already exists, is ours, and has
|
|
9
|
+
* group or other bits (older builds made it with the default mode). With the folder at 0700, no
|
|
10
|
+
* other account can list or open anything inside, whatever mode an individual file has.
|
|
11
|
+
*/
|
|
12
|
+
export function ensurePrivateDir(dir) {
|
|
13
|
+
fs.mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
14
|
+
try {
|
|
15
|
+
const st = fs.lstatSync(dir);
|
|
16
|
+
if (st.isDirectory() && typeof process.getuid === 'function' && st.uid === process.getuid() && (st.mode & 0o077) !== 0) {
|
|
17
|
+
fs.chmodSync(dir, 0o700);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch { /* @silent-fallback-ok — files written by writePrivateInboundFile are still 0600 */ }
|
|
21
|
+
return dir;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* SEC-138: save an inbound message body for a session to read, inside the agent's own project
|
|
25
|
+
* folder rather than a fixed shared folder under /tmp. A shared /tmp folder is readable by every
|
|
26
|
+
* local account and can be pre-created by one of them, which could then read the body or swap the
|
|
27
|
+
* file before the session opens it. The project-local inbound folder is the one Telegram already
|
|
28
|
+
* uses: sandboxed sessions can read it, git sync skips it, and the memory-privacy staging knows it.
|
|
29
|
+
*
|
|
30
|
+
* The folder is created owner-only, the file is created owner-only and exclusively (`wx`), and the
|
|
31
|
+
* name carries a random part, so two messages in the same millisecond never collide.
|
|
32
|
+
*/
|
|
33
|
+
export function writePrivateInboundFile(projectDir, prefix, content) {
|
|
34
|
+
const dir = ensurePrivateDir(getTelegramInboundDir(projectDir));
|
|
35
|
+
const safePrefix = prefix.replace(/[^a-zA-Z0-9-]/g, '').slice(0, 60) || 'msg';
|
|
36
|
+
const filepath = path.join(dir, `${safePrefix}-${Date.now()}-${randomUUID().slice(0, 8)}.txt`);
|
|
37
|
+
fs.writeFileSync(filepath, content, { mode: 0o600, flag: 'wx' });
|
|
38
|
+
return filepath;
|
|
39
|
+
}
|
|
5
40
|
//# sourceMappingURL=telegramInboundFiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telegramInboundFiles.js","sourceRoot":"","sources":["../../../src/messaging/shared/telegramInboundFiles.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"telegramInboundFiles.js","sourceRoot":"","sources":["../../../src/messaging/shared/telegramInboundFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;AAC9D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,UAAU,IAAI,EAAE,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YACvH,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC,CAAC,mFAAmF,CAAC,CAAC;IAC/F,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB,EAAE,MAAc,EAAE,OAAe;IACzF,MAAM,GAAG,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC;IAC9E,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/F,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACjE,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-11-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-11-24T06:27:00.897Z",
|
|
5
|
+
"instarVersion": "1.3.1995",
|
|
6
6
|
"entryCount": 210,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -1604,7 +1604,7 @@
|
|
|
1604
1604
|
"type": "subsystem",
|
|
1605
1605
|
"domain": "sessions",
|
|
1606
1606
|
"sourcePath": "src/core/SessionManager.ts",
|
|
1607
|
-
"contentHash": "
|
|
1607
|
+
"contentHash": "dae1b1859960077d414d8e5ce6abf85239c479421087b8fa6b90ba74cbc6b88f",
|
|
1608
1608
|
"since": "2025-01-01"
|
|
1609
1609
|
},
|
|
1610
1610
|
"subsystem:auto-updater": {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"generatedFrom": "source-tree",
|
|
4
4
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
5
|
-
"packageVersion": "1.3.
|
|
5
|
+
"packageVersion": "1.3.1995",
|
|
6
6
|
"guards": [
|
|
7
7
|
{
|
|
8
8
|
"ref": "docs/audits/phase-b/f10-triage.md",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"sha256": "
|
|
2
|
+
"sha256": "14d6972109fc5e9206e9e54fbd61d463eabf41bd7433de5e4e2cc0fafb284c46",
|
|
3
3
|
"registrySha256": "11e2a45ab1345e2ded6499404ee9962e4e48bcfed4677a4d31dac4492565d2fa",
|
|
4
|
-
"packageVersion": "1.3.
|
|
4
|
+
"packageVersion": "1.3.1995"
|
|
5
5
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
SEC-138. A WhatsApp or iMessage message over the inline limit, and a large iMessage session bootstrap, were saved in fixed shared folders under `/tmp` (`instar-whatsapp` with default permissions, `instar-imessage` with a mode that a pre-created folder ignores). Another local account could read them, or pre-create the folder and swap a file before the session read it. They are now saved with `writePrivateInboundFile` (`src/messaging/shared/telegramInboundFiles.ts`) in the project's `.instar/telegram-inbound` folder, the same folder long Telegram messages use: folder 0700, file 0600, created exclusively, with a random part in the name. Slack's thread-context, long-message and recovery files, which were in `/tmp/instar-slack` with default modes, move the same way, and `/tmp/instar-slack` is no longer a trusted inbound root for memory-scoped sessions. An existing inbound folder of the agent's with a loose mode is tightened to 0700, including by the Telegram writers. The 7-day sweep of that folder now also runs daily, not only at startup.
|
|
9
|
+
|
|
10
|
+
## What to Tell Your User
|
|
11
|
+
|
|
12
|
+
- **Private long messages**: "Long WhatsApp, iMessage and Slack messages are now saved only in my own private folder, so other accounts on this computer cannot read or swap them."
|
|
13
|
+
|
|
14
|
+
## Summary of New Capabilities
|
|
15
|
+
|
|
16
|
+
| Capability | How to Use |
|
|
17
|
+
|-----------|-----------|
|
|
18
|
+
| Long WhatsApp, iMessage and Slack message files saved owner-only in the agent's own folder | Automatic |
|
|
19
|
+
|
|
20
|
+
## Evidence
|
|
21
|
+
|
|
22
|
+
- `tests/unit/headless-spawn-reroute.test.ts`, "SEC-138 repro" (from the security-review job; fails on main because the reference names `/tmp/instar-whatsapp/` and `/tmp/instar-imessage/`): both references now point to owner-only files whose content is the tagged message.
|
|
23
|
+
- `tests/unit/private-inbound-file.test.ts` (new): folder and file modes, unique names, prefix cannot leave the folder, a loose existing folder is tightened.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Side effects: long WhatsApp, iMessage and Slack message files saved in the agent's own folder (SEC-138)
|
|
2
|
+
|
|
3
|
+
In plain words: the files that hold long WhatsApp and iMessage messages, and Slack's thread-context, long-message and recovery files, move from a shared temp folder to the agent's own owner-only folder, where long Telegram messages already go.
|
|
4
|
+
|
|
5
|
+
Tier 1. Size: 3 source files edited (`SessionManager.ts`, `server.ts`, `memorySessionPolicy.ts`), 1 helper file extended, 1 doc table updated, 1 new and 8 edited test files (three module mocks now keep the real module's other exports).
|
|
6
|
+
|
|
7
|
+
## What changes for running agents
|
|
8
|
+
- `SessionManager.injectWhatsAppMessage` and `injectIMessageMessage` save bodies over 500 characters with `writePrivateInboundFile` into `<project>/.instar/telegram-inbound/` (`wa-<number>-...` / `im-<slug>-...`). The line typed into the session names that path instead of `/tmp/instar-whatsapp/...` or `/tmp/instar-imessage/...`.
|
|
9
|
+
- The iMessage session bootstrap in `src/commands/server.ts`, when it is over 500 characters, is saved the same way (`im-bootstrap-<slug>-...`). Its old 1-hour cleanup loop over `/tmp/instar-imessage` is removed; the 7-day `cleanupTelegramTempFiles` sweep of the inbound folder covers these files (retention goes from 1 hour to up to 8 days for this one file kind, owner-only).
|
|
10
|
+
- Slack (`src/commands/server.ts`): the thread-context file (`slack-ctx-<channel>-...`), the long-message file (`slack-msg-<channel>-...`) and the context-exhaustion recovery file (`slack-recovery-<channel>-...`) are saved the same way instead of in `/tmp/instar-slack` (default modes, plain overwrite).
|
|
11
|
+
- `memorySessionInboundRoots` no longer lists `/tmp/instar-slack` and `/private/tmp/instar-slack`: a shared /tmp folder is no longer a trusted source when staging files into a memory-scoped session. Slack files are found under `telegram-inbound`, which the list already has.
|
|
12
|
+
- Folder created 0700 when missing; an existing folder owned by the agent's account with group or other bits is tightened to 0700 by `ensurePrivateDir`. Telegram's two writers (the session bootstrap in `server.ts` and long messages in `injectTelegramMessage`) now call it too, so a Telegram-only agent's folder is also owner-only; their files keep their existing names and modes, protected by the folder. Files 0600, created with `wx`, name with 8 random hex characters.
|
|
13
|
+
- `cleanupTelegramTempFiles` (7-day limit) now also runs once a day on a timer (`unref`), not only at startup, so a long-running server does not keep these files past the limit.
|
|
14
|
+
- Sessions already read this folder for Telegram, sandboxed sessions are allowed to read it, and git sync skips it (`FileClassifier`), so no new access is needed. Old files left in `/tmp/instar-*` are not touched; `slack-reply.sh`'s own diagnostics folder is separate and unchanged.
|
|
15
|
+
- Memory-privacy staging is unchanged: it only scopes Telegram and Slack places, and WhatsApp/iMessage sessions do not take that path today, as before.
|
|
16
|
+
|
|
17
|
+
## Signal vs authority
|
|
18
|
+
Storage location and permissions only. It refuses nothing and grants nothing.
|
|
19
|
+
|
|
20
|
+
## Rollback
|
|
21
|
+
Revert the commit. No state migration.
|
|
22
|
+
|
|
23
|
+
## Tests
|
|
24
|
+
- `headless-spawn-reroute` "SEC-138 repro": 56 pass.
|
|
25
|
+
- `private-inbound-file` (new): 4 pass (location and modes, unique names, prefix stays in the folder, a loose existing folder is tightened).
|
|
26
|
+
- `memory-session-policy` and `slack-context-exhaustion-recovery` updated for the Slack move.
|
|
27
|
+
- `imessage-session-injection` updated to the helper; `whatsapp-message-routing-e2e` source assertion updated to the helper.
|
|
28
|
+
- Also pass: `bootstrap-file-threshold`, `session-telegram-inject`, `memory-session-inbound-claims`, `user-channel-wa-imessage`, `file-classifier`, `respawn-collision-notice`, `spawn-session-silent-start`, `cold-start-fallback-wiring`, `telegram-message-injection`, `server-temp-cleanup`.
|
|
29
|
+
|
|
30
|
+
## Second-pass review
|
|
31
|
+
|
|
32
|
+
**Reviewer:** independent Claude reviewer subagent, two rounds. Round 1 was blocking: Slack still wrote thread context, long messages and recovery context to a shared /tmp folder with default modes. Fixed here together with three round-1 notes (an existing loose folder is now tightened, the tidy-up also runs daily, a weak test was replaced). Round 2 verdict: concur, no blocking items. Its main note, that a Telegram-only agent kept a loose folder, is also applied (`ensurePrivateDir` on both Telegram writers).
|
|
33
|
+
|
|
34
|
+
Left as is: files written to /tmp before the upgrade are not moved or deleted.
|
|
35
|
+
|