Skip to content

Commit 6f96dbb

Browse files
committed
session 2026-08-30 [Claude Code]
1 parent bfca7e4 commit 6f96dbb

2 files changed

Lines changed: 90 additions & 9 deletions

File tree

memory/continuity.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
## Project State
1414

1515
- **project:** mercury-python (PyPI: `mercury-composable`)
16-
- **status:** pre-release 0.1.0 (unreleased) — the Python member of the Mercury Composable
16+
- **status:** v4.12.0 merged to main (the progressive-rendering milestone, engine lock-step
17+
version line; PyPI publish still pending) — the Python member of the Mercury Composable
1718
polyglot initiative: a lightweight Event-over-HTTP function host + thin client, repurposed
1819
August 2026 (legacy language pack in git history only)
1920
- **last_enabled:** 2026-08-22
20-
- **last_session:** 2026-08-26 | agent: Claude Code (2026-08-26-003023)
21+
- **last_session:** 2026-08-30 | agent: Claude Code (2026-08-30-045556)
2122
- **last_review:** (none yet)
2223
- **last_invariant_check:** (none yet)
2324
- **repo:** ~/sandbox/mercury-python (origin: github.com/Accenture/mercury-python)
@@ -27,8 +28,9 @@
2728
> Canonical live home for the current stack — language version, dependencies, tool
2829
> versions. `instructions.md` keeps only a high-level descriptor and points here.
2930
30-
- Python ≥ 3.10; build backend **hatchling**; package `mercury-composable` v0.1.0
31-
(unreleased), wheel from `src/mercury_composable`
31+
- Python ≥ 3.10; build backend **hatchling**; package `mercury-composable` v4.12.0
32+
(merged 2026-08-30, engine lock-step version line; PyPI publish pending), wheel from
33+
`src/mercury_composable`
3234
<!-- id: stack-python-hatchling | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: working | origin: 2026-08-22-171555 -->
3335
- Runtime deps: `aiohttp` >=3.10,<4 (Event API host), `msgpack` >=1,<2 (envelope codec),
3436
`PyYAML` >=6,<7 (config); dev: `pytest` >=8 + `pytest-asyncio` >=0.23 (`asyncio_mode=auto`)
@@ -93,6 +95,18 @@
9395

9496
## Open Threads
9597

98+
- [x] (feature — **MERGED 2026-08-30 as
99+
[PR #21](https://github.com/Accenture/mercury-python/pull/21) true merge `bfca7e4`
100+
carrying `d50986a`; tree verified; v4.12.0 milestone, all four repos lock-step)
101+
**The progressive-rendering round: event streaming (engines' envelope-mode SSE
102+
contract, reply_to bus mechanism, stream/stream_to consumers), business
103+
correlation-id continuity, full span lineage with the engines' distributed-trace
104+
dataset on stdout, app-log-context with the packaged default template, sender
105+
attribution.** Lessons: detach long-lived workers from the creating task's
106+
contextvars; install the log-context config before its own warning logs; RPC legs
107+
emit no dataset (engine parity). origin: 2026-08-30-045556.
108+
<!-- id: ot-streaming-telemetry-round-20260830 | created: 2026-08-30 | last_used: 2026-08-30 | uses: 1 | tier: working | origin: 2026-08-30-045556 -->
109+
96110
- [x] (P4 docs — **SHIPPED and LIVE 2026-08-24**, same day as plan ratification)
97111
**Documentation site "Composable for Python"** — engine Material theme, 13 files
98112
incl. the one-page AI agent guide + llms.txt; live at accenture.github.io/mercury-python.
@@ -153,11 +167,11 @@
153167
> the archive once older than `archive_window` sessions. Don't archive them by hand.
154168
155169
- [ ] **(blueprint) Publish behind the interop gate.** The wrapper is complete and green
156-
(tests incl. the shared golden vectors; cross-wrapper interop proven; the
157-
composable-example flow executed a Python function unchanged) but **unreleased**the
158-
Vision's "releasable on its own cadence" is unmet until 0.1.0 ships to PyPI with
159-
protocol-compat versioning and the interop gate green per release (design P5/D6).
160-
Publishing itself is Eric-gated (ownership, cadence, supply-chain posture).
170+
and now versioned **v4.12.0 on main** (the milestone merge, 2026-08-30 — the version
171+
aligns with the engine lock-step line, superseding the 0.1.0 plan), with the interop
172+
gate green (the progressive-rendering interop report). The Vision's "releasable on its
173+
own cadence" is unmet until it ships to PyPI; publishing itself stays Eric-gated
174+
(ownership, cadence, supply-chain posture; design P5/D6).
161175
→ serves: vision-mercury-python
162176
<!-- id: bp-publish-interop-gate | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: working | origin: 2026-08-22-173136 -->
163177

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Session (2026-08-30T04:55:56.000Z)
2+
3+
**Agent:** Claude Code
4+
5+
## Summary
6+
7+
**The progressive-rendering round, shipped as the v4.12.0 milestone.** Merged as
8+
[PR #21](https://github.com/Accenture/mercury-python/pull/21) true merge `bfca7e4`
9+
carrying gated `d50986a` (amended once for an IDE type-narrowing finding); tree
10+
verified == gated; branches deleted both ends. The version jumps 0.1.0 -> **4.12.0**,
11+
aligning with the engine lock-step line (Eric's call: all four repos ship this
12+
milestone at the same version).
13+
14+
What shipped (each mirrored the engines' contract exactly; node twin in lock-step):
15+
16+
1. **Event streaming** (engines' Phase-2/3 twin): `EventStreamWriter` producer
17+
(interceptor functions), the streaming `/api/event` host speaking the hybrid
18+
envelope-mode SSE dialect (pinned 406/503/408 messages, single-shot
19+
byte-identical), `PostOffice.stream()` async-iterator consumer with dialect
20+
conformance guards, `stream_to()` relay composition - on the primitive bus's
21+
new reply_to mechanism (envelope-routed local delivery + per-request reply
22+
sinks; Eric's ruling: consistency, not orchestration).
23+
2. **Business correlation-id continuity** (Eric's check surfaced the outbound gap):
24+
the client fill-stamps the `my_cid` tag from context; local deliveries inject
25+
the read-only `my_correlation_id` view (WorkerHandler parity);
26+
`trace_context()` carries it.
27+
3. **Span lineage** (Eric: "the lineage documents the graphs" - AI SDLC): every
28+
traced execution mints a 16-hex span parented on the caller's (inbound
29+
envelope span); outbound events/segments carry the current span (touch
30+
parity, traceparent lights up); the engines' `rpc` tag suppresses datasets
31+
for RPC legs; non-RPC executions emit the engines' distributed-trace dataset
32+
on the `distributed.tracing` stdout stream (message = {"trace": {...},
33+
"annotations": {...}} - key-for-key the Java Telemetry record). Sender
34+
attribution: the host fills `event.api.service` for anonymous wire callers
35+
(Eric's review find); the context carries the executing route for onward
36+
calls.
37+
4. **Application log context** (Eric's follow-on gap): the engines'
38+
app-log-context feature - packaged `default-log-context.yaml` (a real
39+
resource file, not a code constant - Eric's check), `resources/
40+
app-log-context.yaml` override, `app.log.context` flag, `update_context()`
41+
developer API with reserved-key guard; a `context` block on json/compact log
42+
lines inside traced requests; app log and telemetry join on spanId.
43+
5. The interop report copy (`docs/test-reports/progressive-rendering-interop.md`)
44+
incl. the captured end-to-end telemetry + app-log-context appendix; the
45+
streaming guide; the demo `hello.tokens` echoes trace_id + my_correlation_id
46+
in eof metadata and logs a context-bearing line.
47+
48+
**Durable lessons:**
49+
50+
- Long-lived bus workers inherit the creating task's contextvars - a stale trace
51+
leaked onto telemetry records until workers detach at start (`_set_trace(None)`).
52+
- The log-context loader is invoked from inside the log formatter: install the
53+
resolved config BEFORE emitting its warning, or the loader lock deadlocks.
54+
- The engines emit trace datasets only for non-RPC executions (WorkerHandler's
55+
rpc-tag gate) - parity means suppressing, not enriching.
56+
- IDE type checkers do not narrow a walrus inside a comprehension filter; a
57+
generator + `is not None` two-step narrows cleanly.
58+
59+
Gates at merge: pytest 83/83, ruff clean, basedpyright 0 errors, mkdocs strict;
60+
live drives against both engines and the node twin recorded in the interop report.
61+
62+
## Memory References
63+
64+
- referenced: bp-publish-interop-gate (substance updated: v4.12.0 merged; PyPI
65+
publish still Eric-gated), stack-python-hatchling (version substance 0.1.0 ->
66+
4.12.0), ot-vision-bootstrap
67+
- created: ot-streaming-telemetry-round-20260830 (tier: working)

0 commit comments

Comments
 (0)