ADR-015: streams depth — carried-metadata keys, global-FIFO ordering, StreamEvent, trim_to (OQ-12 resolved)

This commit is contained in:
glm-5.3-flash committed 2026-10-05 14:15:28 +00:00
1 parent 04a04651dc
commit 8c4ec48f92
12 files changed
+562 -110

No files matched your search

+32 -6
View File
@@ -1,10 +1,11 @@
---
status: draft
last_updated: 2026-10-04 (streams corrected to documented/in-scope —
last_updated: 2026-10-05 (streams corrected to documented/in-scope —
operator-authority record: type-filtered event watching from multiple
places, e.g. repo-change subscriptions in a git app. No consumer doc
carries the row yet; applications above the paused crates are the
wanters. rate-limits + result-storage remain the keep-with-flag rows.)
places, e.g. repo-change subscriptions in a git app. alkcall row added
2026-10-05 as ecosystem-shape evidence for streams (no per-key-ordering
need named anywhere); rate-limits + result-storage remain the
keep-with-flag rows.)
---
# alkstore — consumer-driven scope inventory
@@ -48,6 +49,24 @@ which scope decisions OQ-ST-01 still has to take per feature.
## The consumers and their artifacts
- **alkcall** — `/workspace/@alkdev/alkcall/docs/architecture/`
(Phase 1, 51 ADRs, several reviewed; reference checkout per the
AGENTS.md §3 posture). The call protocol crate
(bidirectional RPC on ALPN `alk/call`: Query/Mutation/Sub/Pub
operation types, subscriptions, channels). Added 2026-10-05 as an
*ecosystem-shape* consumer: it is not (yet) a direct store
consumer with named rows, but its pub/sub vocabulary —
`Subscription` ops (server→client streaming, ADR-021), `Pub`
(client→server streaming, ADR-046), `channel/resources/subscribe`
(snapshot + change events, ADR-037), and the futures
broker/fan-out mechanism (ADR-046's Gap B, deferred to channels,
OQ-22) — is the shape downstream crates' reactive ops will take.
The operator's note (2026-10-05): alkstore is meant as the base
storage layer for this broader ecosystem, and the store's streams
are what backs that vocabulary durably. Its ordering posture is
per-stream/per-channel (ordered, reliable, per-transport-stream) —
**no alkcall document names server-enforced per-key ordering**;
correlation is by request ID and delivery is per-connection.
- **alkfs** — `/workspace/@alkdev/alkfs/docs/research/phase-0.md`
(Phase 0, 2026-09-23; 17 OQs). The VFS/workspace crate; its ancestor
POC (`alknet-filesystem-poc`) used honker directly (honker-core 0.2.4
@@ -136,6 +155,7 @@ feature.
| Consumer | Evidence | Need | Confidence |
|---|---|---|---|
| family-wide (reactivity requirement) | user/planning record, 2026-10-04 (operator's authority — the REQ-2 recording convention) | watching for specific event *types* from several different places at once. Concrete example: a git app at gitea/gitlab scale — users and other apps subscribe to changes on a repo. Many cases along these lines. | **documented** (operator-authority record; no consumer doc has grown the section yet) |
| alkcall (ecosystem shape) | alkcall `docs/architecture/`: decisions/021 (Sub, the Subscription streaming handler), decisions/046 (Pub + the `Subscription`→`Sub` rename + Gap B fan-out), decisions/037 (`channel/resources/subscribe`), open-questions OQ-22 | a durable substrate for the pub/sub vocabulary: subscribe-type ops backed by a stream that survives disconnect/restart (per-consumer offset + replay), and a broker/fan-out (one stream, N matching subscribers) over durable events when the channels session takes Gap B up. Ordering: global per-stream FIFO suffices for every named shape — no alkcall op names per-key ordering; the topic/event-type dimension routes to *separate streams* (one per topic), not keys within one stream. | **operator-authority** (operator record 2026-10-05 — alkstore is the base storage layer for the ecosystem these ops shape; evidence is the alkcall ADRs + that record; added 2026-10-05) |
Verdict: **in scope, first-class.** Corrected 2026-10-04 — the initial
draft (earlier the same day) graded this **absent** because no consumer
@@ -153,7 +173,11 @@ nothing written down yet carries the row — which is expected, not
suspicious. Design note for OQ-ST-04: on the Postgres side this is a
NOTIFY-triggered durable event table with per-consumer cursors (the
pg-boss-family shape); the per-consumer offset contract, not the
storage shape, is the seam to pin.
storage shape, is the seam to pin. **Added 2026-10-05** (the alkcall
row, evidence for OQ-12): the subscription vocabulary's ordering need
is per-stream FIFO — topic/event-type filtering routes to separate
streams, not per-key ordering within one; no current or planned
ecosystem op names server-enforced per-key ordering.
### rate limits
@@ -220,7 +244,9 @@ none of them yet.
- The inventory covers artifacts existing as of 2026-10-04: alkfs
phase-0, alkgit architecture (reviewed), alkblobs architecture
(draft-but-ADR'd), alknet-filesystem POC summary. If a new consumer
(draft-but-ADR'd), alknet-filesystem POC summary. *(Extended
2026-10-05: alkcall's architecture added as ecosystem-shape
evidence.)* If a new consumer
is added to the family (alksftp, the alknet rewrite, the ops
platform), a row gets added here *before* it is assumed into a scope
decision — the same discipline as alkblobs' requirements.md ("when a