Skip to content

Commit d61cf79

Browse files
acn-ericlawclaude
andcommitted
memory: session 2026-11-03 [Claude Code] - the first invariant walk (all hold; awaiting Eric's confirmation); llm.chat configurable by design, not a contradiction
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent bb2fada commit d61cf79

6 files changed

Lines changed: 93 additions & 25 deletions

‎memory/continuity.md‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
Prior: 2026-09-23 | through 2026-09-23-004556.md (cadence — 11 sessions since; archived 1 faded fact
3131
`stack-mercury-serve-node` + swept 5 completed threads past `archive_window` → 2026-Q3; tier changes via `refresh-metadata`;
3232
invariants not due (29 sessions, cadence 40, none yet); stalled none — no unchecked thread) · 2026-09-05 | through 2026-09-05-210103
33-
- **last_invariant_check:** 2026-11-03 | 2026-11-03-005949.md (PROMPTED — the first re-verify, due at 40 session files with none
34-
before: [[reverify-invariants-20261103]] lists the 4 `core` invariants and the Vision for Eric; nothing confirmed yet)
33+
- **last_invariant_check:** 2026-11-03 | 2026-11-03-005949.md (PROMPTED; WALKED 2026-11-03-012056 against the live tree - all four
34+
invariants and the Vision hold, two wordings refreshed; [[reverify-invariants-20261103]] awaits Eric's confirmation)
3535
- **repo:** ~/sandbox/mercury-nodejs (origin: github.com/Accenture/mercury-nodejs)
3636

3737
## Stack & Tools
@@ -56,7 +56,9 @@
5656
graphs, no persistence and no pub/sub broadcast; orchestration lives in the Mercury
5757
engines. It provides functions, the primitive in-process event bus (route mailboxes +
5858
workers — dispatch, not orchestration; ratified 2026-08-23), and minimalist foundation
59-
utilities (README "Scope", amended with the bus).
59+
utilities (README "Scope", amended with the bus). The LLM helper (`extensions/llm-helper/`) is an
60+
application on the package, not part of it, so its configurable transcript store leaves the
61+
package persistence-free (re-verified 2026-11-03).
6062
<!-- id: scope-wrapper-no-orchestration | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: core | origin: 2026-08-22-171916 -->
6163
- **Standard wire format, proven by shared vectors.** The codec implements the standard
6264
event-envelope wire format, verified against the golden conformance vectors shared with
@@ -72,7 +74,11 @@
7274
<!-- id: engine-consistent-conventions | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: core | origin: 2026-08-22-171916 -->
7375
- **Functions are stateless.** Anything a handler must keep belongs to the caller's flow
7476
model or state machine; intentional errors travel as `AppException(status, message)` —
75-
the portable error contract.
77+
the portable error contract. **The LLM helper's `llm.chat` is configurable by design (Eric,
78+
2026-11-03):** a stateless chat, or, with `tools`, one turn of a multi-turn tool-use loop whose
79+
transcript lives in the configured transcript store (`llm.transcript.store`: `memory` for one
80+
process, `redis` shared by replicas; RFC-0011). That store is part of the function's configured
81+
contract, not an exception to this rule.
7682
<!-- id: stateless-functions-contract | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: core | origin: 2026-08-22-171916 -->
7783

7884
## Key Decisions
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
- [ ] **Contradiction: the LLM helper's transcript store against `stateless-functions-contract` (and the wording of
2-
`scope-wrapper-no-orchestration`) - the same tension as mercury-python's thread of this id, which carries the proposed
3-
amendment.** The invariant says a function keeps nothing and anything it must keep belongs to the caller's flow model or
4-
state machine; RFC-0011's rulings 9 and 27 (Eric, 2026-10-28) put an agent loop's transcript in a store the pack owns,
5-
and the loop contract builds it in `extensions/llm-helper/` (branch `feat/llm-chat-loop-contract`). The package
6-
(`dist/src`) stays persistence-free, and the handler keeps no in-process state (any replica serves any turn). One ruling
7-
from Eric settles both packs; not edited until then.
8-
<!-- id: contradiction-transcript-store-stateless | created: 2026-11-03 | last_used: 2026-11-03 | uses: 1 | tier: working | origin: 2026-11-03-004721 -->
1+
- [x] **Contradiction: the LLM helper's transcript store against `stateless-functions-contract`** - RESOLVED 2026-11-03,
2+
NOT a contradiction (Eric): `llm.chat` is configurable by design, a stateless chat by default or, with `tools`, one
3+
turn of a multi-turn tool-use loop whose transcript lives in the configured transcript store (RFC-0011). The
4+
invariant and the scope fence now say so, and the package itself stays persistence-free. Lesson: a configurable
5+
contract is not an exception to the rule it configures; state it in the rule so the next review does not re-raise it.
6+
origin: 2026-11-03-004721; closed 2026-11-03-012056.
7+
<!-- id: contradiction-transcript-store-stateless | created: 2026-11-03 | last_used: 2026-11-03 | uses: 2 | tier: active | origin: 2026-11-03-004721 -->

‎memory/open-threads/thread-pack-catch-up-release.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
and against a build of the tag when the shipped files are not tracked. Origin: 2026-10-02-001255.md; the record in
55
2026-10-07-012440.md.
66
→ serves: vision-mercury-nodejs
7-
<!-- id: pack-catch-up-release | created: 2026-10-01 | last_used: 2026-10-07 | uses: 2 | tier: active | origin: 2026-10-02-001255 -->
7+
<!-- id: pack-catch-up-release | created: 2026-10-01 | last_used: 2026-10-07 | uses: 2 | tier: archive-candidate | origin: 2026-10-02-001255 -->
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
- [ ] **Re-verify invariants (due):** confirm `scope-wrapper-no-orchestration`, `wire-standard-golden-vectors-bigint`,
22
`engine-consistent-conventions`, `stateless-functions-contract` and the Vision (`vision-mercury-nodejs`) still hold, or supersede
3-
any that don't (DECAY.md §9). The first re-verify: `last_invariant_check` was unset and 40 session files exist
4-
(`verify_invariants_every` 40). Context for the walk: `stateless-functions-contract` and the "no persistence" wording of
5-
`scope-wrapper-no-orchestration` (and the Vision's non-goals) are under [[contradiction-transcript-store-stateless]]; the
6-
Vision's versioning target and its version line were settled 2026-11-03 by Eric's ruling ([[vision-versioning-vs-java-number]],
7-
closed). Raised by the 2026-11-03 review; the rest is not yet confirmed.
8-
<!-- id: reverify-invariants-20261103 | created: 2026-11-03 | last_used: 2026-11-03 | uses: 2 | tier: working | origin: 2026-11-03-005949 -->
3+
any that don't (DECAY.md §9). The first re-verify: `last_invariant_check` was unset and 40 session files exist.
4+
**Walked against the live tree 2026-11-03** (suite: 410 tests, 346 passed, 64 live-Redis cases skipped):
5+
- `scope-wrapper-no-orchestration` HOLDS: the npm package is `dist/src` alone, with no store client, child process, file
6+
write, flow, graph or broadcast in `src/`; the LLM helper is in `extensions/`, outside the package. Wording refreshed:
7+
the helper is an application on the package.
8+
- `wire-standard-golden-vectors-bigint` HOLDS: `test/vectors/vectors.json` is byte-identical with Java platform-core's 7
9+
vectors, and int64 beyond 2^53 stays exact as BigInt (envelope suite).
10+
- `engine-consistent-conventions` HOLDS: config, `${ENV:default}` and `-D` tests in the config suite, `x-ttl` and
11+
`x-async` in the server suite, `resources/` next to the application file (2026-10-14, both packs).
12+
- `stateless-functions-contract` HOLDS, wording refreshed per Eric's ruling: `llm.chat` is configurable by design,
13+
a stateless chat or a tool-use loop turn with its transcript in the configured store
14+
([[contradiction-transcript-store-stateless]], closed).
15+
- The Vision HOLDS after the two 2026-11-03 amendments (versioning, and the package-only persistence clause). A forward
16+
note: "Never subprocess or embedded-interpreter execution" means functions are never run that way (Option A); RFC-0011
17+
step 4 binds MCP servers over stdio, a child process of the pack, so its wording is settled before step 4.
18+
- Rust finding, outside this repo: its `envelope-vectors/vectors.json` has 6 vectors and lacks `standard-trace-context`
19+
(added in Java #213, 2026-07-21).
20+
Walked 2026-11-03-012056; awaits Eric's confirmation.
21+
<!-- id: reverify-invariants-20261103 | created: 2026-11-03 | last_used: 2026-11-03 | uses: 3 | tier: working | origin: 2026-11-03-005949 -->
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Session (2026-11-03T01:20:56.000Z)
2+
3+
**Agent:** Claude Code
4+
5+
## Summary
6+
7+
Eric's two instructions (2026-11-03):
8+
9+
1. Run the first invariant validation.
10+
2. `llm.chat` is configurable: a stateless chat, or multi-turn tool use with the transcript store. That is by design, not a
11+
contradiction.
12+
13+
### Ruling 2: the stateless contract
14+
15+
- [[contradiction-transcript-store-stateless]] is closed as not a contradiction.
16+
- `stateless-functions-contract` now states the configurable design: a stateless chat, or, with `tools`, a loop turn whose
17+
transcript lives in `llm.transcript.store` (`memory` for one process, `redis` shared by replicas). It names that store as
18+
part of the function's configured contract.
19+
- `scope-wrapper-no-orchestration` and the Vision's scope non-goal now say that the LLM helper in `extensions/llm-helper/`
20+
is an application on the package, not part of it. Its store therefore leaves the package persistence-free.
21+
22+
### The invariant walk (live tree, this session)
23+
24+
| Item | Evidence | Verdict |
25+
| --- | --- | --- |
26+
| `scope-wrapper-no-orchestration` | the npm package is `dist/src` alone; no store client, child process, file write, flow, graph or broadcast in `src/` | holds; wording refreshed |
27+
| `wire-standard-golden-vectors-bigint` | `test/vectors/vectors.json` byte-identical with Java platform-core's 7 vectors; int64 beyond 2^53 exact as BigInt | holds |
28+
| `engine-consistent-conventions` | config, `${ENV:default}` and `-D` tests; `x-ttl` and `x-async` tests; `resources/` next to the application file (2026-10-14) | holds |
29+
| `stateless-functions-contract` | the helper's handler keeps the transcript only in its configured store; the package has no handler state | holds; wording refreshed per ruling 2 |
30+
| `vision-mercury-nodejs` (the Vision) | elevator, current state (v4.12.21, amended earlier today), scope, conventions, non-goals | holds after the two 2026-11-03 amendments |
31+
32+
Suite: 410 tests, 346 passed, 64 skipped (the live-Redis variants of the loop vectors).
33+
34+
Two notes for Eric:
35+
- **The Vision's "Never subprocess or embedded-interpreter execution" non-goal.** It means a function is never run that
36+
way (Option A). RFC-0011 build plan step 4 binds MCP servers over stdio, which makes a server a child process of the pack.
37+
Settle the wording before step 4.
38+
- **The golden vectors in the Rust repository (mercury).** Its
39+
`crates/platform-core/tests/resources/envelope-vectors/vectors.json` has 6 vectors. It lacks `standard-trace-context`,
40+
which Java #213 added on 2026-07-21. Java and both packs carry 7 vectors, byte-identical.
41+
42+
[[reverify-invariants-20261103]] carries the walk and waits for Eric's confirmation. `last_invariant_check` records the walk.
43+
The check is not complete until Eric confirms.
44+
45+
## Memory References
46+
47+
- Edited: scope-wrapper-no-orchestration, stateless-functions-contract, vision-mercury-nodejs, reverify-invariants-20261103
48+
- Referenced: wire-standard-golden-vectors-bigint, engine-consistent-conventions (each walked against the tree)
49+
- Closed: contradiction-transcript-store-stateless

‎memory/vision.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ architecture; and the engine teams, who gain polyglot reach with zero engine cou
6868

6969
## Non-goals (what it must never become)
7070

71-
- **Never a composable foundation or full SDK** — no flows, no graphs, no persistence,
72-
no pub/sub broadcast, no orchestration (the ratified scope fence). A **primitive
73-
in-process event bus** (route mailboxes + workers — dispatch, not orchestration) is
74-
in scope and shipped; it must never grow spill, queue caps, or engine-style
75-
orchestration. In particular, **never a re-port of the full framework** — light by
76-
design is the point of the reboot.
71+
- **Never a composable foundation or full SDK** — no flows, no graphs, no persistence (in
72+
the package: the LLM helper's configurable transcript store is that application's,
73+
2026-11-03), no pub/sub broadcast, no orchestration (the ratified scope fence). A
74+
**primitive in-process event bus** (route mailboxes + workers — dispatch, not
75+
orchestration) is in scope and shipped; it must never grow spill, queue caps, or
76+
engine-style orchestration. In particular, **never a re-port of the full framework** —
77+
light by design is the point of the reboot.
7778
- **Never subprocess or embedded-interpreter execution** (Option A shelved; helper-style
7879
embedding explicitly not planned).
7980
- **Never released on the engine's cadence for its own sake**: a Java release with nothing that

0 commit comments

Comments
 (0)