instar 1.3.1194 → 1.3.1196

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.
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
5
- "packageVersion": "1.3.1194",
5
+ "packageVersion": "1.3.1196",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "682c4fe7ea234c958ab4c7c34ca753fc73b5758a613693ca0b86f2d608bf6a32",
2
+ "sha256": "245d913df7c5e45424a2491bef4d7ea849d2cce4e224a0ab1943fa31195ec96d",
3
3
  "registrySha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
4
- "packageVersion": "1.3.1194"
4
+ "packageVersion": "1.3.1196"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
3
3
  "articleCount": 90,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1194"
5
+ "packageVersion": "1.3.1196"
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OpenClawBridge.d.ts","sourceRoot":"","sources":["../../src/threadline/OpenClawBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAK9D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAA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BAAqB;IAMnC,OAAO,CAAC,gBAAgB;IAwBxB,OAAO,CAAC,oBAAoB;IA4C5B,OAAO,CAAC,mBAAmB;IAkD3B,OAAO,CAAC,kBAAkB;IAwD1B;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAK5B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;;;OAIG;IACH,OAAO,CAAC,aAAa;CA2BtB"}
@@ -15,12 +15,39 @@
15
15
  * No external SDK dependency — OpenClaw interfaces are defined locally and
16
16
  * all dependencies are injected via config.
17
17
  */
18
+ import { randomBytes } from 'node:crypto';
18
19
  // ── Constants ──────────────────────────────────────────────────────────
19
20
  /** Default trust level for agents arriving via OpenClaw */
20
21
  const DEFAULT_TRUST_LEVEL = 'untrusted';
21
22
  /** Default token estimate per message when actual count is unavailable */
22
23
  const DEFAULT_TOKEN_ESTIMATE = 500;
23
24
  // ── Implementation ─────────────────────────────────────────────────────
25
+ /**
26
+ * Mint a threadId for a (room, agent) pair.
27
+ *
28
+ * THE CLOCK IS NOT AN IDENTIFIER. The first version was
29
+ * `openclaw-${roomId}-${Date.now().toString(36)}` — no agent component and no
30
+ * entropy, so its ONLY distinguishing input was the millisecond. Two different
31
+ * agents resolving a thread in the SAME room within the same millisecond
32
+ * received the SAME threadId, and `ContextThreadMap`'s reverse index then
33
+ * collapsed both agents onto one thread. That is not a cosmetic collision:
34
+ * isolation between two agents' conversations in a shared room is exactly what
35
+ * the threadId is for, so the failure mode is one agent addressing another's
36
+ * thread.
37
+ *
38
+ * It surfaced as an intermittent e2e failure (Scenario 8, 2026-08-23) because
39
+ * it needs two calls inside one millisecond — a race that gets MORE likely as
40
+ * the code gets faster, which is the wrong direction for a correctness property
41
+ * to move in. Fixed with real entropy rather than by spacing the calls out: a
42
+ * uniqueness property that depends on how fast the caller runs is not a
43
+ * property.
44
+ *
45
+ * The timestamp is kept for readability and rough ordering. Uniqueness comes
46
+ * from the random suffix, never from the timestamp.
47
+ */
48
+ function newThreadId(roomId) {
49
+ return `openclaw-${roomId}-${Date.now().toString(36)}-${randomBytes(8).toString('hex')}`;
50
+ }
24
51
  export class OpenClawBridge {
25
52
  config;
26
53
  roomToThread;
@@ -319,7 +346,7 @@ export class OpenClawBridge {
319
346
  return { threadId: existingThreadId, isNewThread: false };
320
347
  }
321
348
  // Create new mapping — generate a threadId from the roomId
322
- const threadId = `openclaw-${roomId}-${Date.now().toString(36)}`;
349
+ const threadId = newThreadId(roomId);
323
350
  this.config.contextThreadMap.set(roomId, threadId, agentIdentity);
324
351
  this.metrics.threadsActive++;
325
352
  return { threadId, isNewThread: true };
@@ -330,7 +357,7 @@ export class OpenClawBridge {
330
357
  if (existingThreadId) {
331
358
  return { threadId: existingThreadId, isNewThread: false };
332
359
  }
333
- const threadId = `openclaw-${roomId}-${Date.now().toString(36)}`;
360
+ const threadId = newThreadId(roomId);
334
361
  this.roomToThread.set(key, threadId);
335
362
  this.metrics.threadsActive++;
336
363
  return { threadId, isNewThread: true };
@@ -1 +1 @@
1
- {"version":3,"file":"OpenClawBridge.js","sourceRoot":"","sources":["../../src/threadline/OpenClawBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAmFH,0EAA0E;AAE1E,2DAA2D;AAC3D,MAAM,mBAAmB,GAAoB,WAAW,CAAC;AAEzD,0EAA0E;AAC1E,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAEnC,0EAA0E;AAE1E,MAAM,OAAO,cAAc;IACR,MAAM,CAAuB;IAC7B,YAAY,CAAsB;IAC3C,OAAO,CAAwB;IAEvC,YAAY,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG;YACb,iBAAiB,EAAE,CAAC;YACpB,aAAa,EAAE,CAAC;YAChB,MAAM,EAAE,CAAC;SACV,CAAC;IACJ,CAAC;IAED,qEAAqE;IAErE;;;OAG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,CAAC;YACjC,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YACzF,IAAI,gBAAgB,EAAE,CAAC;gBACrB,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;YAC5D,CAAC;YAED,2DAA2D;YAC3D,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;YACrC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;YAC7B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QACzC,CAAC;QAED,iCAAiC;QACjC,MAAM,GAAG,GAAG,GAAG,MAAM,KAAK,aAAa,EAAE,CAAC;QAC1C,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACpD,IAAI,gBAAgB,EAAE,CAAC;YACrB,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QAC5D,CAAC;QAED,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;QACrC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC7B,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IACzC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.1194",
3
+ "version": "1.3.1196",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-08-24T00:25:20.165Z",
5
- "instarVersion": "1.3.1194",
4
+ "generatedAt": "2026-08-24T02:13:09.489Z",
5
+ "instarVersion": "1.3.1196",
6
6
  "entryCount": 202,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
5
- "packageVersion": "1.3.1194",
5
+ "packageVersion": "1.3.1196",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "682c4fe7ea234c958ab4c7c34ca753fc73b5758a613693ca0b86f2d608bf6a32",
2
+ "sha256": "245d913df7c5e45424a2491bef4d7ea849d2cce4e224a0ab1943fa31195ec96d",
3
3
  "registrySha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
4
- "packageVersion": "1.3.1194"
4
+ "packageVersion": "1.3.1196"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "8e6606a6722433c5ffc15b3870402283c5406083a14cdbd0e18e735731e2aae2",
3
3
  "articleCount": 90,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1194"
5
+ "packageVersion": "1.3.1196"
6
6
  }
@@ -0,0 +1,30 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ `src/threadline/OpenClawBridge.ts` mints thread ids with real entropy instead of a bare millisecond timestamp. The id was `openclaw-${roomId}-${Date.now().toString(36)}` — no agent component and no randomness — so two DIFFERENT agents resolving a thread in the SAME room within one millisecond received an identical threadId, and `ContextThreadMap`'s reverse index then collapsed both agents onto one thread. Isolation between two agents' conversations in a shared room is precisely what the threadId exists to provide.
9
+
10
+ The timestamp is kept for readability and rough ordering; uniqueness now comes from `randomBytes(8)`, never from the clock.
11
+
12
+ ## What to Tell Your User
13
+
14
+ If two of your agents talk in the same shared room, each keeps its own conversation thread — reliably now, rather than almost always. Previously the thread name was built from the room name and the clock alone, so two agents arriving in the same millisecond could be handed the same thread and their conversations would merge. Threads created before this change keep their existing names and are unaffected.
15
+
16
+ ## Summary of New Capabilities
17
+
18
+ No new capability. An existing guarantee — one thread per agent per room — now actually holds instead of holding whenever the two agents happened to be more than a millisecond apart.
19
+
20
+ ## Evidence
21
+
22
+ Caught as an intermittent failure of `tests/e2e/threadline/ThreadlineFullStack.test.ts` Scenario 8 on 2026-08-23: `expected 'openclaw-room-a-mt6h30po' not to be 'openclaw-room-a-mt6h30po'`. Both agents, one id.
23
+
24
+ The defect was already known and worked around rather than fixed. `tests/unit/threadline/OpenClawBridge.test.ts` carried a test named "different agents get different threads for same room" that passed only because of a `setTimeout(2)` inserted mid-test with the comment *"Small wait to ensure different Date.now() for threadId generation"*. The sleep bought the millisecond the id could not supply, so the assertion passed for a reason unrelated to the property it claims to check. The sleep is removed; that test now fails without the fix.
25
+
26
+ Two new frozen-clock regressions pin both sides of the boundary: two agents in one room at the same millisecond must get DIFFERENT threads, and the same agent re-entering must keep ONE thread (entropy must not leak into the reuse path and shatter continuity). Verified by reverting the fix: 2 of 89 fail, and only those 2. With the fix, 89/89.
27
+
28
+ ## Known Limits
29
+
30
+ `ContextThreadMap` keys mappings by contextId alone, with agent identity as a binding CHECK rather than part of the key. In a room shared by several agents the last writer's mapping is the one stored, so an earlier agent's lookup returns null and it mints a fresh thread. That is a separate design question about the map's key, not an id-uniqueness defect, and it is not addressed here.
@@ -0,0 +1,32 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ `tests/e2e/benchmark-divergence-alive.test.ts` no longer asserts `mirror.stale === false`. It asserts the wiring facts it owns — the mirror resolves on the production init path, carries a `capturedAt`, and reports a `stale` verdict CONSISTENT with the `staleDays` it computed — and leaves the threshold itself to a unit test with an injected clock.
9
+
10
+ `tests/unit/BenchmarkDivergenceAnalyzer.test.ts` gains that test: with a PRESENT mirror, `capturedAt + 30d` ⇒ `stale: false`, `capturedAt + 31d` ⇒ `stale: true`.
11
+
12
+ No runtime behaviour changes — tests only.
13
+
14
+ ## What to Tell Your User
15
+
16
+ None — internal change (no user-facing surface).
17
+
18
+ ## Summary of New Capabilities
19
+
20
+ None — internal change (no user-facing surface).
21
+
22
+ ## Evidence
23
+
24
+ The shipped baseline `src/data/benchmarkPredictions.json` carries `capturedAt: 2026-07-24T01:20:00.000Z`; `mirrorStalenessMaxDays` defaults to 30. The assertion therefore passed for thirty days and turned RED at 2026-08-24T01:20Z on every branch simultaneously — main included — with no commit involved. Confirmed by running the e2e against `origin/main` at `9f83c19ca`: 1 failed, 4 passed, `expected { present: true, …(3) } to match object { present: true, stale: false }`. It blocked every merge, since `safe-merge` refuses on any red check.
25
+
26
+ Both sides of the boundary are pinned deliberately: a change that made nothing ever stale would satisfy a one-sided test while deleting the signal. Negative control — with `staleDays > mirrorStalenessMaxDays` removed from `mirrorStatus()`, the new test fails (1 of 26); restored, 26/26. E2E 5/5.
27
+
28
+ ## Known Limits
29
+
30
+ The shipped baseline IS now stale by the default threshold, so a fresh install correctly reports `stale: true`. That is the feature working and it is deliberately NOT papered over here — refreshing `capturedAt` to make a test green would fabricate a capture that never happened. Whether to ship a newer capture on a cadence is a release decision, named rather than taken.
31
+
32
+ This fixes the one assertion found. No sweep was run for other tests whose verdict depends on wall-clock aging of a committed artifact, and none is claimed.
@@ -0,0 +1,35 @@
1
+ # A test that turned red at a specific minute, on every branch, with nobody touching anything — Plain-English Overview
2
+
3
+ ## The problem in one breath
4
+
5
+ One end-to-end test checked that a reference file shipped inside instar was "not stale". That file was captured on 24 July, and the rule is that it goes stale after thirty days. So at **01:20 UTC today** — thirty-one days later — the test started failing everywhere at once. No commit caused it. The clock did.
6
+
7
+ ## Why that is worse than an ordinary failure
8
+
9
+ Nothing in the code changed, so nothing in the code looks guilty. Every branch went red simultaneously, including the main one, which makes it read like an infrastructure outage rather than a test making a claim it had no business making.
10
+
11
+ And it blocked everything: nothing could merge, because merges wait on a green build.
12
+
13
+ ## What the test was actually entitled to check
14
+
15
+ That the feature is **wired up** — that the reference file is found when the server really boots, that it carries a capture date, and that the "is it stale?" answer it reports agrees with the age it worked out.
16
+
17
+ What it was **not** entitled to check is whether that file happens to be under thirty days old on the day the test runs. That is a fact about how often we ship a fresh capture, not about whether the code works.
18
+
19
+ ## What changes
20
+
21
+ The end-to-end test now checks the wiring and the internal consistency of the answer. The staleness rule itself moved to a test where the clock is a dial we set: at exactly thirty days it must report *not stale*, and at thirty-one it must report *stale*.
22
+
23
+ Both sides are pinned deliberately. A "fix" that made nothing ever stale would have satisfied a one-sided test while quietly deleting the warning the feature exists to give.
24
+
25
+ ## The safeguard
26
+
27
+ Checked against deliberately broken code: with the staleness rule removed, the new test fails. So it is a test, not a decoration.
28
+
29
+ ## One thing worth knowing separately
30
+
31
+ The shipped reference capture really is more than thirty days old now. That means a fresh install will correctly report it as stale — which is the feature working, not breaking. Whether to ship a newer capture is a release-cadence decision, and it is deliberately not made here: silently refreshing the date would have hidden the same information this change exists to preserve.
32
+
33
+ ## What you actually need to decide
34
+
35
+ Nothing about the test. Separately, and not urgently: whether the shipped reference capture should be refreshed on a cadence so installs do not inherit a stale one.
@@ -0,0 +1,35 @@
1
+ # Two agents in one room could end up sharing a conversation — Plain-English Overview
2
+
3
+ ## The problem in one breath
4
+
5
+ When two agents talk in the same shared room, each is supposed to get its own private conversation thread. The name of that thread was built out of the room name and the current time in milliseconds — and nothing else. Two agents entering the same room in the same millisecond got the *same* name, and their two conversations collapsed into one.
6
+
7
+ ## Why it hid for so long
8
+
9
+ It needs two things to happen inside one thousandth of a second, so it almost never fired. It failed once, at random, in an end-to-end test on 2026-08-23 — and would have gone on failing at random.
10
+
11
+ The uncomfortable part: it gets **more** likely as the code gets faster. A correctness property that erodes as you optimise is not a property.
12
+
13
+ ## The part worth reading twice
14
+
15
+ There was already a test for exactly this — "different agents get different threads for same room". It passed. It passed because someone had put a two-millisecond sleep in the middle of it, with a comment explaining that the sleep was there to make the timestamps differ.
16
+
17
+ So the defect was not undiscovered. It was **observed, described in a comment, and worked around** — and the test that would have caught it was converted into a test that could not. The sleep is gone; the test now depends on the fix.
18
+
19
+ ## What changes
20
+
21
+ The thread name gets real randomness in it. The timestamp stays, because it is useful to read, but nothing depends on it being unique any more.
22
+
23
+ ## The safeguards
24
+
25
+ **Two tests, both sides of the line.** With the clock frozen so that every timestamp is identical: two different agents in one room must get different threads, and the *same* agent coming back must get the *same* thread. The second matters — a fix that made every message unique would have bought uniqueness by destroying continuity.
26
+
27
+ **Both were checked against the un-fixed code** and both fail there, so they are tests rather than decorations.
28
+
29
+ ## What ships when
30
+
31
+ Immediately. It only affects threads created from now on; existing ones keep their names.
32
+
33
+ ## What you actually need to decide
34
+
35
+ Nothing.
@@ -0,0 +1,78 @@
1
+ # Side-Effects Review — an aliveness test stops asserting a fact about the calendar
2
+
3
+ **Slug:** `mirror-staleness-is-not-an-aliveness-fact`
4
+ **Date:** 2026-08-24
5
+ **Risk floor:** 1 (tests only; no runtime file touched)
6
+
7
+ ## Summary of the change
8
+
9
+ An e2e aliveness test asserted `mirror.stale === false` against a baseline shipped inside the package. The baseline's `capturedAt` is 2026-07-24T01:20Z and the staleness threshold defaults to 30 days, so the assertion turned red at 2026-08-24T01:20Z on every branch at once, main included, with no commit involved. The e2e now asserts the wiring (present, `capturedAt` set, `stale` consistent with `staleDays`); the threshold moves to a unit test with an injected clock, pinned on both sides.
10
+
11
+ ## Decision-point inventory
12
+
13
+ None. No runtime decision changes; `mirrorStatus()` is untouched.
14
+
15
+ ## 1. Over-block
16
+
17
+ None. The e2e can no longer fail for a reason unrelated to the code under test — which is the point, and is a REDUCTION in false red, not in coverage: the staleness rule is now checked more strictly than before (two points, controlled clock) rather than incidentally.
18
+
19
+ ## 2. Under-block
20
+
21
+ Named honestly: the e2e no longer notices if the SHIPPED baseline ages out. That was never something it could report usefully — it could only say "red today, green yesterday, same code" — but the information is real and now has no automated home. It is recorded under Known Limits in the release fragment rather than silently dropped.
22
+
23
+ ## 3. Level-of-abstraction fit
24
+
25
+ This is the whole finding. An aliveness test answers "is the feature wired on the production boot path?". Whether a shipped artifact is under thirty days old is a fact about release cadence and belongs where the clock is an input. Putting it in the e2e put a calendar dependency in a layer that cannot control the calendar.
26
+
27
+ ## 4. Signal vs authority compliance
28
+
29
+ Not applicable — tests only, no runtime authority.
30
+
31
+ ## 4b. Judgment-point check
32
+
33
+ None.
34
+
35
+ ## 5. Interactions
36
+
37
+ - **`safe-merge`** refuses on any red check, so this single assertion blocked EVERY merge from 01:20Z. Two open PRs (#1967, and anything opened later) were stuck behind it. That is why the fix is worth doing now rather than filing.
38
+ - **`mirrorStatus()`** is unchanged, so the `precondition-failed / stale-mirror` verdict path and the unit tests around it keep their existing behaviour.
39
+
40
+ ## 6. External surfaces
41
+
42
+ None.
43
+
44
+ ## 6b. Operator-surface quality
45
+
46
+ Improves it indirectly: the operator stops seeing a repo-wide red that no commit explains.
47
+
48
+ ## 7. Multi-machine posture
49
+
50
+ `unified` — tests only, no per-machine state.
51
+
52
+ ## 8. Rollback cost
53
+
54
+ Revert two test files. Reverting restores a build that goes red on a timer, so it should not be reverted quietly.
55
+
56
+ ## Conclusion
57
+
58
+ Ship.
59
+
60
+ ## Phase-5 second pass
61
+
62
+ **Not required, and not run** — no block/allow decision, no session lifecycle, no gate/sentinel/guard/watchdog, no runtime file touched. Stated explicitly so the section below is not mistaken for an independent reviewer's concurrence.
63
+
64
+ ## The finding that outlives the fix
65
+
66
+ This is the second time today the same shape has appeared, in two unrelated subsystems: a correctness claim resting on wall-clock timing. This morning it was a thread id whose uniqueness came only from the millisecond (fixed in #1971). Tonight it is a test whose verdict came only from the date. Both fail without a commit, both look like flake, and both get *more* likely with time or speed rather than less.
67
+
68
+ The tempting cheap fix here was to bump `capturedAt` in the shipped baseline. That would have made the suite green in one line and fabricated a capture that never happened — turning a true signal ("the shipped baseline is old") into a false one. Worth naming because it was the obvious move and it was wrong.
69
+
70
+ ## Evidence pointers
71
+
72
+ - `origin/main` at `9f83c19ca`, e2e run locally: 1 failed / 4 passed, `expected { present: true, …(3) } to match object { present: true, stale: false }`. Main was red on the clock, not on a change.
73
+ - `src/data/benchmarkPredictions.json` → `capturedAt: 2026-07-24T01:20:00.000Z`; age 31 days; `mirrorStalenessMaxDays` default 30 (`BenchmarkDivergenceAnalyzer.ts:110`).
74
+ - Negative control: with the threshold comparison removed from `mirrorStatus()`, the new unit test fails (1/26). Restored: 26/26. E2E 5/5.
75
+
76
+ ## Class-Closure Declaration (display-only mirror)
77
+
78
+ The class is "a test whose verdict depends on wall-clock aging of a committed artifact." Closed for this one assertion. NOT closed generally — no sweep was run for other date-sensitive assertions, and the sibling class named above (correctness resting on wall-clock timing, in runtime code as well as tests) is not swept for either. Named, not claimed.
@@ -0,0 +1,81 @@
1
+ # Side-Effects Review — thread ids stop depending on the clock for uniqueness
2
+
3
+ **Slug:** `openclaw-thread-id-collision`
4
+ **Date:** 2026-08-23
5
+ **Risk floor:** 2 (correctness fix in a cross-agent isolation path; no external surface)
6
+
7
+ ## Summary of the change
8
+
9
+ `OpenClawBridge` minted thread ids as `openclaw-${roomId}-${Date.now().toString(36)}`. Two different agents resolving a thread in the same room within one millisecond got the same id. A `randomBytes(8)` suffix is added; the timestamp remains for readability only.
10
+
11
+ ## Decision-point inventory
12
+
13
+ One: where uniqueness comes from. Previously the clock. Now entropy. No branch, threshold or policy is introduced.
14
+
15
+ ## 1. Over-block
16
+
17
+ None possible. The change cannot cause a refusal — it only widens the id space.
18
+
19
+ ## 2. Under-block
20
+
21
+ The relevant question is whether uniqueness can still fail. `randomBytes(8)` is 64 bits; a collision requires the same room, the same millisecond AND a 1-in-2^64 draw. This is no longer a timing property.
22
+
23
+ ## 3. Level-of-abstraction fit
24
+
25
+ Correct level. The id is minted in exactly two places, both in `resolveThread`, and both now call one helper — so the property has a single home rather than two copies that can drift.
26
+
27
+ ## 4. Signal vs authority compliance
28
+
29
+ Signal only. The id names a thread; it grants nothing and is not consulted for a decision.
30
+
31
+ ## 4b. Judgment-point check
32
+
33
+ None. No judgment is made from this value.
34
+
35
+ ## 5. Interactions
36
+
37
+ - **`ContextThreadMap`** keeps a reverse index `threadId → contextId`. Colliding ids were what let two agents collapse onto one thread, so this is the consumer the fix protects. Its keying (contextId alone, agent identity as a binding check) is a separate question, named under Known Limits and NOT changed here.
38
+ - **Existing threads** keep their ids; the map is not rewritten. Old ids remain valid and resolvable.
39
+ - **Length** grows by 17 characters. No downstream store bounds the id.
40
+
41
+ ## 6. External surfaces
42
+
43
+ None. No route, no message, no notification.
44
+
45
+ ## 6b. Operator-surface quality
46
+
47
+ Invisible to the operator, except that the intermittent CI failure stops.
48
+
49
+ ## 7. Multi-machine posture
50
+
51
+ `unified`. Ids are minted per-process and were never coordinated across machines; adding entropy makes a cross-machine collision strictly less likely rather than more.
52
+
53
+ ## 8. Rollback cost
54
+
55
+ One line. Reverting restores a race that gets more likely as the code gets faster, which is why it should not be reverted quietly.
56
+
57
+ ## Conclusion
58
+
59
+ Ship.
60
+
61
+ ## Phase-5 second pass
62
+
63
+ **Not required, and not run** — none of the Phase-5 triggers apply: no block/allow decision, no session lifecycle, no compaction, no coherence gate, trust level, sentinel, guard, gate or watchdog. Saying so explicitly because the section below is a review finding of my own and must not be mistaken for an independent reviewer's concurrence.
64
+
65
+ ## The finding that outlives the fix
66
+
67
+ The defect was not undiscovered. A unit test named "different agents get different threads for same room" existed and PASSED, because a `setTimeout(2)` had been inserted mid-test with the comment *"Small wait to ensure different Date.now() for threadId generation"*. Someone met the collision, understood it precisely enough to describe its cause in one line, and spent that understanding on making the test go green.
68
+
69
+ The test then actively concealed the defect: anyone auditing "is agent isolation tested?" found a green test with the right name. Only the e2e — which had no sleep and no such comment — could still fail, and it did, intermittently, which reads as flake rather than defect.
70
+
71
+ **The class:** a sleep inserted to make a test pass is a defect report written in the wrong file. This is not searched for anywhere in this repo, and I am not claiming otherwise.
72
+
73
+ ## Evidence pointers
74
+
75
+ - e2e failure, run 32674712573: `expected 'openclaw-room-a-mt6h30po' not to be 'openclaw-room-a-mt6h30po'` at `tests/e2e/threadline/ThreadlineFullStack.test.ts:1032`.
76
+ - `tests/unit/threadline/OpenClawBridge.test.ts` 89/89 with the fix.
77
+ - Negative control run: with the entropy removed, exactly 2 of 89 fail — the de-slept original and the new frozen-clock regression. The tests bite.
78
+
79
+ ## Class-Closure Declaration (display-only mirror)
80
+
81
+ The class is "an identifier whose uniqueness rests on wall-clock resolution." Closed for `OpenClawBridge`. NOT closed generally: other id-minting sites in this repo have not been enumerated, and the sibling class named in the second-pass review — a test made green with a sleep — is not swept for at all. Named, not claimed.
@@ -19,7 +19,7 @@ The lint holds no blocking authority anywhere: it ships report-first (exit 0 unl
19
19
 
20
20
  ## 1. Over-block
21
21
 
22
- The narrowing makes 19 existing `physical-credential-locality` markers report findings, and 11 of those were the sole defence of their surface, so those surfaces now also report A1-undefended. **This is the intended effect of the amendment, not an over-block**: the operator's stated reason for Amendment 3 is that the key as written let a storage habit assert a physical constraint, and a narrowing that fails none of the cases it narrowed has narrowed nothing. It cannot over-BLOCK in the literal sense because the lint blocks nothing — total findings move 73122, all report-only. The sweep to fix those 16 markers is separate work and is named as such rather than folded in here.
22
+ The narrowing makes 16 existing `physical-credential-locality` markers report findings, and 9 of those were the sole defence of their surface, so those surfaces now also report A1-undefended. **This is the intended effect of the amendment, not an over-block**: the operator's stated reason for Amendment 3 is that the key as written let a storage habit assert a physical constraint, and a narrowing that fails none of the cases it narrowed has narrowed nothing. It cannot over-BLOCK in the literal sense because the lint blocks nothing — total findings move 94135, all report-only. The sweep to fix those 16 markers is separate work and is named as such rather than folded in here.
23
23
 
24
24
  ## 2. Under-block
25
25