Skip to content

Commit c37d6b5

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 b26c7ff commit c37d6b5

5 files changed

Lines changed: 88 additions & 24 deletions

File tree

‎memory/continuity.md‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
Prior: 2026-09-23 | through 2026-09-23-004552.md (cadence — archived 1 faded fact `decision-polyglot-reboot` + swept 3
3434
completed threads → 2026-Q3; invariants not due (29 sessions, cadence 40, none yet); stalled none) · 2026-09-05 | through
3535
2026-09-05-211409
36-
- **last_invariant_check:** 2026-11-03 | 2026-11-03-010131.md (PROMPTED, not yet confirmed — the first re-verify, due at 40
37-
session files; [[reverify-invariants-20261103]] awaits Eric)
36+
- **last_invariant_check:** 2026-11-03 | 2026-11-03-010131.md (PROMPTED; WALKED 2026-11-03-012056 against the live tree - all four
37+
invariants and the Vision hold, two wordings refreshed; [[reverify-invariants-20261103]] awaits Eric's confirmation)
3838
- **repo:** ~/sandbox/mercury-python (origin: github.com/Accenture/mercury-python)
3939

4040
## Stack & Tools
@@ -63,7 +63,9 @@
6363
graphs, no persistence and no pub/sub broadcast; orchestration lives in the Mercury
6464
engines. It provides functions, the primitive in-process event bus (route mailboxes +
6565
workers — dispatch, not orchestration; ratified 2026-08-23), and minimalist foundation
66-
utilities (README "Scope", amended with the bus).
66+
utilities (README "Scope", amended with the bus). The LLM helper (`extensions/llm-helper/`) is an
67+
application on the package, not part of it, so its configurable transcript store leaves the
68+
package persistence-free (re-verified 2026-11-03).
6769
<!-- id: scope-wrapper-no-orchestration | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: core | origin: 2026-08-22-171555 -->
6870
- **Standard wire format, proven by shared vectors.** The codec implements the standard
6971
event-envelope wire format, verified against the golden conformance vectors shared with
@@ -78,7 +80,11 @@
7880
<!-- id: engine-consistent-conventions | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: core | origin: 2026-08-22-171555 -->
7981
- **Functions are stateless.** Anything a handler must keep belongs to the caller's flow
8082
model or state machine; intentional errors travel as `AppException(status, message)` —
81-
the portable error contract.
83+
the portable error contract. **The LLM helper's `llm.chat` is configurable by design (Eric,
84+
2026-11-03):** a stateless chat, or, with `tools`, one turn of a multi-turn tool-use loop whose
85+
transcript lives in the configured transcript store (`llm.transcript.store`: `memory` for one
86+
process, `redis` shared by replicas; RFC-0011). That store is part of the function's configured
87+
contract, not an exception to this rule.
8288
<!-- id: stateless-functions-contract | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: core | origin: 2026-08-22-171555 -->
8389

8490
## Key Decisions
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
- [ ] **Contradiction: the LLM helper's transcript store against `stateless-functions-contract` (and the wording of
2-
`scope-wrapper-no-orchestration`).** The invariant says a function keeps nothing and anything it must keep belongs to the
3-
caller's flow model or state machine. RFC-0011's rulings 9 and 27 (Eric, 2026-10-28) put an agent loop's transcript in
4-
a store the pack owns, so the engine's state machine stays small and no provider block crosses an engine codec; the
5-
loop contract (2026-11-02, [[llm-chat-loop-contract]]) builds it in `extensions/llm-helper/`. The package
6-
(`src/mercury_composable`) stays persistence-free, so `scope-wrapper-no-orchestration` still holds for the package, and the
7-
handler keeps no in-process state (any replica serves any turn). Proposed amendment of `stateless-functions-contract`,
8-
for Eric's approval: "Functions are stateless in process. What a function must keep belongs to the caller's flow model
9-
or state machine, except where a design names an external, access-controlled store (the LLM helper's transcript store,
10-
RFC-0011); intentional errors travel as `AppException(status, message)`." Not edited until Eric rules.
11-
<!-- id: contradiction-transcript-store-stateless | created: 2026-11-02 | last_used: 2026-11-02 | uses: 1 | tier: working | origin: 2026-11-02-235604 -->
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-02-235604; closed 2026-11-03-012056.
7+
<!-- id: contradiction-transcript-store-stateless | created: 2026-11-02 | last_used: 2026-11-03 | uses: 2 | tier: active | origin: 2026-11-02-235604 -->
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
- [ ] **Re-verify invariants (due):** confirm scope-wrapper-no-orchestration, wire-standard-golden-vectors,
22
engine-consistent-conventions, stateless-functions-contract and the Vision (vision-mercury-python) still hold, or supersede any
3-
that don't (DECAY.md §9). The first re-verify: `last_invariant_check` was unset and 40 session files exist (cadence 40). One
4-
is in question in its own thread: stateless-functions-contract and the scope fence's wording, the Vision's "no persistence"
5-
non-goal with it, in [[contradiction-transcript-store-stateless]]. The Vision's versioning clause and its version line were
6-
settled 2026-11-03 by Eric's ruling ([[contradiction-vision-versioning-java-number]], closed). Raised by the 2026-11-03
7-
memory review; Eric confirms or supersedes the rest.
8-
<!-- id: reverify-invariants-20261103 | created: 2026-11-03 | last_used: 2026-11-03 | uses: 2 | tier: working | origin: 2026-11-03-010131 -->
3+
that don't (DECAY.md §9). The first re-verify: `last_invariant_check` was unset and 40 session files exist (cadence 40).
4+
**Walked against the live tree 2026-11-03** (suite: 351 passed, 64 live-Redis cases skipped):
5+
- `scope-wrapper-no-orchestration` HOLDS: the wheel is `src/mercury_composable` alone, with no store client, subprocess,
6+
file write, flow, graph or broadcast in it; the LLM helper is in `extensions/` (sdist teaching surface, not the wheel).
7+
Wording refreshed: the helper is an application on the package.
8+
- `wire-standard-golden-vectors` HOLDS: `tests/vectors/vectors.json` is byte-identical with Java platform-core's 7 vectors.
9+
- `engine-consistent-conventions` HOLDS: config, `${ENV:default}` and `-D` tests in the config suite, `x-ttl` and
10+
`x-async` in the server suite, `resources/` next to the application file (2026-10-14, both packs).
11+
- `stateless-functions-contract` HOLDS, wording refreshed per Eric's ruling: `llm.chat` is configurable by design,
12+
a stateless chat or a tool-use loop turn with its transcript in the configured store
13+
([[contradiction-transcript-store-stateless]], closed).
14+
- The Vision HOLDS after the two 2026-11-03 amendments (versioning, and the package-only persistence clause). A forward
15+
note: "Never subprocess or embedded-interpreter execution" means functions are never run that way (Option A); RFC-0011
16+
step 4 binds MCP servers over stdio, a child process of the pack, so its wording is settled before step 4.
17+
- Rust finding, outside this repo: its `envelope-vectors/vectors.json` has 6 vectors and lacks `standard-trace-context`
18+
(added in Java #213, 2026-07-21).
19+
Walked 2026-11-03-012056; awaits Eric's confirmation.
20+
<!-- id: reverify-invariants-20261103 | created: 2026-11-03 | last_used: 2026-11-03 | uses: 3 | tier: working | origin: 2026-11-03-010131 -->
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 wheel is `src/mercury_composable` alone; no store client, subprocess, file write, flow, graph or broadcast in it | holds; wording refreshed |
27+
| `wire-standard-golden-vectors` | `tests/vectors/vectors.json` byte-identical with Java platform-core's 7 vectors; the envelope suite green | 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-python` (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: 351 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-python, reverify-invariants-20261103
48+
- Referenced: wire-standard-golden-vectors, engine-consistent-conventions (each walked against the tree)
49+
- Closed: contradiction-transcript-store-stateless

‎memory/vision.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ teams, who gain polyglot reach with zero engine coupling.
6868

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

71-
- **Never a composable foundation or full SDK** — no flows, no graphs, no persistence, no
72-
pub/sub broadcast, no orchestration. Those live in the engines (the ratified scope
73-
fence). This is **not** a ban on an in-process dispatch bus.
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. Those live in the engines (the
74+
ratified scope fence). This is **not** a ban on an in-process dispatch bus.
7475
- **The primitive in-process event bus is in scope** (ratified 2026-08-23, implemented):
7576
the single dispatch pipeline — one FIFO mailbox per route, `instances` worker tasks,
7677
`deliver` (RPC) and `publish` (drop-n-forget) only. HTTP and local `PostOffice` are thin

0 commit comments

Comments
 (0)