|
17 | 17 | polyglot initiative: a lightweight Event-over-HTTP function host + thin client, repurposed |
18 | 18 | August 2026 (legacy language pack in git history only) |
19 | 19 | - **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) |
21 | 21 | - **last_review:** (none yet) |
22 | 22 | - **last_invariant_check:** (none yet) |
23 | 23 | - **repo:** ~/sandbox/mercury-python (origin: github.com/Accenture/mercury-python) |
|
75 | 75 |
|
76 | 76 | ## Conventions |
77 | 77 |
|
| 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 --> |
78 | 87 | - Engine-mirrored configuration/logging/trace conventions (see the invariant above and |
79 | 88 | `instructions.md`); GitHub flow with tests + a CHANGELOG entry per change |
80 | 89 | (CONTRIBUTING.md). |
81 | 90 | <!-- id: conv-github-flow-changelog | created: 2026-08-22 | last_used: 2026-08-22 | uses: 1 | tier: working | origin: 2026-08-22-171555 --> |
82 | 91 |
|
83 | 92 | ## Open Threads |
84 | 93 |
|
| 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 --> |
85 | 115 | > Mark completed items `- [x]` and leave them in place — the review sweeps them to |
86 | 116 | > the archive once older than `archive_window` sessions. Don't archive them by hand. |
87 | 117 |
|
|
0 commit comments