Skip to content

Commit 487244d

Browse files
committed
session 2026-08-23 [Claude Code]
1 parent f343b4d commit 487244d

2 files changed

Lines changed: 76 additions & 1 deletion

File tree

memory/continuity.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
polyglot initiative: a lightweight Event-over-HTTP function host + thin client, repurposed
1818
August 2026 (legacy language pack in git history only)
1919
- **last_enabled:** 2026-08-22
20-
- **last_session:** 2026-08-22 | agent: Claude Code (2026-08-22-175327)
20+
- **last_session:** 2026-08-23 | agent: Claude Code (2026-08-23-005709)
2121
- **last_review:** (none yet)
2222
- **last_invariant_check:** (none yet)
2323
- **repo:** ~/sandbox/mercury-python (origin: github.com/Accenture/mercury-python)
@@ -75,13 +75,43 @@
7575

7676
## Conventions
7777

78+
- **Quality gates (adopted 2026-08-23, Eric's IDE review round): ruff + basedpyright +
79+
pytest, config lives in pyproject.toml.** ruff: line-length 100, py310, isort extend.
80+
basedpyright: standard mode + reportMissingParameterType=error, TESTS INCLUDED (Eric's
81+
ruling — test signatures are annotated; handlers take `(dict[str, str], Body)`).
82+
`agent-skills/` excluded from both (tool-managed by agent-memory — style fixes belong
83+
upstream). Run: `uvx ruff check .` / `uvx basedpyright` / `.venv/bin/pytest -q`.
84+
Unused contract params take the underscore prefix; deliberate suppressions carry
85+
rationale comments (PyBroadException / noqa only where the rule actually fires).
86+
<!-- id: conv-python-quality-gates | created: 2026-08-23 | last_used: 2026-08-23 | uses: 1 | tier: working | origin: 2026-08-23-005709 -->
7887
- Engine-mirrored configuration/logging/trace conventions (see the invariant above and
7988
`instructions.md`); GitHub flow with tests + a CHANGELOG entry per change
8089
(CONTRIBUTING.md).
8190
<!-- id: conv-github-flow-changelog | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: working | origin: 2026-08-22-171555 -->
8291

8392
## Open Threads
8493

94+
- [ ] (feature — design RATIFIED by Eric 2026-08-23 in the quality-round conversation;
95+
implementation next on `feature/primitive-event-bus`, LOCK-STEP with mercury-nodejs)
96+
**Primitive in-process event bus — the single dispatch pipeline.** Ratified shape:
97+
per-route FIFO mailbox (asyncio.Queue; node = queue + worker loops) with
98+
**instances = N worker tasks** (replaces the semaphore — the parameter becomes faithful);
99+
two operations only: `deliver` (RPC with ttl → 408 envelope; dead-work skip when the
100+
caller's future already expired) and `publish` (drop-n-forget, returns the 202-shape
101+
ack). The HTTP host becomes thin ingress (hygiene + 403-private, then bus); PostOffice
102+
WITHOUT an endpoint = local ingress reaching private AND public routes (engine
103+
semantics — `private` becomes faithful: in-app only); with endpoint = wire client,
104+
unchanged. **No spill tier / no queue cap (Eric's ruling): back-pressure belongs to the
105+
tier that owns recovery — the engine's flows/graphs; a leaf host fails fast by deadline
106+
rather than hoarding work.** Caveats recorded: in-memory = in-flight events die with the
107+
process (durability was never this layer's contract); send() has no ttl valve (engine
108+
parity; per-route cap only on field demand). Bus class stays INTERNAL (developers touch
109+
preload/PostOffice only). Scope fence amended: + "primitive in-process event bus, no
110+
orchestration/flows/persistence/broadcast". Pins: local RPC public+private, FIFO order,
111+
instances=2 concurrency, local 408, unregistered-route error, trace-chained
112+
hosted→local-private. README boundary statement: leaf-side composition here; workflow
113+
processing = Event Script / Knowledge Graph.
114+
<!-- id: thread-primitive-event-bus | created: 2026-08-23 | last_used: 2026-08-23 | uses: 1 | tier: working | origin: 2026-08-23-005709 -->
85115
> Mark completed items `- [x]` and leave them in place — the review sweeps them to
86116
> the archive once older than `archive_window` sessions. Don't archive them by hand.
87117
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Session (2026-08-23T00:57:09.000Z)
2+
3+
**Agent:** Claude Code
4+
5+
## Summary
6+
7+
**Eric's screenshot-driven code-quality review round (15 commits on
8+
`chore/code-quality-review`) + the primitive-event-bus design ratified in the same
9+
conversation.**
10+
11+
1. **Quality gates adopted** — the round's first two findings became durable tooling, not
12+
one-line fixes: **ruff** (pyproject config: line-length 100, py310, isort; ruff 0.16's
13+
broad modern defaults; 103 auto-fixes incl. `Optional[X]``X | None`) and
14+
**basedpyright** (standard mode + `reportMissingParameterType` as error, unit tests
15+
included by Eric's ruling — every test signature annotated). `agent-skills/` is excluded
16+
from both (tool-managed by agent-memory; upstream owns its style) and its accidental
17+
auto-fixes were reverted. `.idea/` gitignored; README gained the Development section
18+
(uv venv recipe + the three gates + PyCharm wiring: uv interpreter on `.venv`,
19+
Package-requirements-file → pyproject.toml).
20+
2. **The wire contract is now typed end to end**: exported recursive `Body` type (the
21+
MsgPack payload universe) + `Handler = Callable[[dict[str, str], Body], Any]`; every
22+
bare generic parameterized; demo/README teach the typed signature with the
23+
underscore-unused convention.
24+
3. **Real findings among the smells**: the custom log formatters DROPPED tracebacks
25+
(exc_info ignored — fixed in text+json form, pinned by new tests, suite 30→32); the
26+
protected-member warnings exposed a missing public API → **`trace_context()`** context
27+
manager (the node `runWithTrace` twin) now exported; `pytest.raises` blocks narrowed to
28+
single throwing calls; pathlib replaced os.path smearing; PyCharm-proof local-narrowing
29+
patterns in the singleton accessors, session accessor, and `from_map` (with `: Any` on
30+
msgpack-decoded locals — PyCharm won't narrow `Any | None`).
31+
4. **Declined with rationale** (the honest half of a review): async stays on the aiohttp
32+
health handler (framework contract), the broad catch in the log-only sink is suppressed
33+
with `PyBroadException` + rationale, `traceparent`/`packb` are real names not typos,
34+
and the "not in project requirements" warnings were IDE configuration (fixed by Eric).
35+
5. **Design ratified in-conversation (next feature, lock-step with mercury-nodejs):
36+
the primitive in-process event bus** — see the new open thread.
37+
38+
Gates at close: ruff clean, basedpyright 0 errors, pytest 32/32, Sonar scan clean (Eric).
39+
40+
## Memory References
41+
42+
- referenced: (Java-repo id) polyglot-event-over-http-design (scope fence D4 — amended by
43+
the ratified bus design), eric-release-rhythm
44+
- created: conv-python-quality-gates (tier: working), thread-primitive-event-bus
45+
(tier: working)

0 commit comments

Comments
 (0)