You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The example/ tree holds the runnable server/client wiring for every
domain — it is the composition root, not throwaway demo code. Rename it
to service/ to reflect that role and update all references: Bazel labels,
Go importpaths, Makefile compose vars and targets, docker-compose build
contexts, integration/e2e suite paths, and documentation.
Also refresh the docs for the current layout:
- Rewrite service/README.md to include the runway service and the
stovepipe Ingest/process pipeline (previously documented as Ping-only).
- Add service/runway/README.md and service/stovepipe/README.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@@ -132,7 +132,7 @@ Vendor-agnostic, pluggable interfaces with implementations in subdirectories:
132
132
133
133
A `{domain}/extension/{ext}` or `platform/extension/{ext}` package contains the behavioral interface, its `Config`, the `Factory` *interface*, and impl constructors `New(...)` that return the interface. It must **not** contain `Factory` *implementations* (`NewFactory()` constructors or factory structs) or any queue-selection logic.
134
134
135
-
Why: an impl package (e.g. `scorer/heuristic`) can't know the queue topology or the other impls, so a "which impl for which queue" decision doesn't belong there. Per-queue routing — and the small adapters that wrap a `New(...)` impl in the `Factory` interface — live in the wiring layer (e.g. `example/{domain}/{service}/server/main.go`), the one place that knows the full queue set. That's where you route on `Config.QueueName`.
135
+
Why: an impl package (e.g. `scorer/heuristic`) can't know the queue topology or the other impls, so a "which impl for which queue" decision doesn't belong there. Per-queue routing — and the small adapters that wrap a `New(...)` impl in the `Factory` interface — live in the wiring layer (e.g. `service/{domain}/{service}/server/main.go`), the one place that knows the full queue set. That's where you route on `Config.QueueName`.
136
136
137
137
Rule of thumb: if you're about to add a `NewFactory()` or a `map[queue]impl` under `{domain}/extension/` or `platform/extension/`, it belongs in the wiring layer instead.
138
138
@@ -239,11 +239,11 @@ make clean # Clean Bazel cache
2. Wire up in `example/{domain}/{service}/server/main.go`
246
+
2. Wire up in `service/{domain}/{service}/server/main.go`
247
247
248
248
**Add new extension:**
249
249
1. Create the extension under `{domain}/extension/{ext}/{impl}/` (domain-specific, e.g. `submitqueue/extension/...`) or `platform/extension/{ext}/{impl}/` (shared across domains) with factory and interfaces
Copy file name to clipboardExpand all lines: doc/rfc/submitqueue/extension-contract.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Non-obvious points:
52
52
53
53
## Mechanism
54
54
55
-
Dependencies are injected per-extension at the existing `Factory.For` (wiring: `example/submitqueue/orchestrator/server/main.go`) — only the handles a contract justifies, never the whole storage aggregator. The repeated batch→changes walk becomes one shared resolver (today's duplicated `collectChanges`, consolidated, and preserving the batch boundaries build's copy flattens). Controllers shrink to passing the identity entity they already load.
55
+
Dependencies are injected per-extension at the existing `Factory.For` (wiring: `service/submitqueue/orchestrator/server/main.go`) — only the handles a contract justifies, never the whole storage aggregator. The repeated batch→changes walk becomes one shared resolver (today's duplicated `collectChanges`, consolidated, and preserving the batch boundaries build's copy flattens). Controllers shrink to passing the identity entity they already load.
56
56
57
57
`entity.BatchChanges` is kept, not removed — it becomes the shared resolver's *detailed output* (URIs + provider details for a batch, what the scorer consumes) rather than a value the score controller assembles and passes in. Its line/file helpers move with it; only its producer changes.
0 commit comments