From 4686a9c391e99b879b9f0d542b451b25eff6a265 Mon Sep 17 00:00:00 2001 From: Julian Cuni Date: Thu, 30 Apr 2026 21:47:53 +0200 Subject: [PATCH] Fill in commit SHA for Phase 1 tasks 1.5-1.8 in ROADMAP and task files --- .planning/ROADMAP.md | 8 ++++---- .planning/phase-1-throughput/05-stream-consumer.md | 2 +- .planning/phase-1-throughput/06-device-state.md | 2 +- .planning/phase-1-throughput/07-position-writer.md | 2 +- .planning/phase-1-throughput/08-main-wiring.md | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 2a7dab0..1eec1b9 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -51,10 +51,10 @@ These rules govern every task. Any deviation must be discussed and documented as | 1.2 | [Core types & contracts](./phase-1-throughput/02-core-types.md) | 🟩 | `290a08e` | | 1.3 | [Configuration & logging](./phase-1-throughput/03-config-and-logging.md) | 🟩 | `290a08e` | | 1.4 | [Postgres connection & `positions` hypertable](./phase-1-throughput/04-postgres-schema.md) | 🟩 | `290a08e` | -| 1.5 | [Redis Stream consumer (XREADGROUP)](./phase-1-throughput/05-stream-consumer.md) | 🟩 | *(pending commit SHA)* | -| 1.6 | [Per-device in-memory state](./phase-1-throughput/06-device-state.md) | 🟩 | *(pending commit SHA)* | -| 1.7 | [Position writer (batched upsert)](./phase-1-throughput/07-position-writer.md) | 🟩 | *(pending commit SHA)* | -| 1.8 | [Main wiring & ACK semantics](./phase-1-throughput/08-main-wiring.md) | 🟩 | *(pending commit SHA)* | +| 1.5 | [Redis Stream consumer (XREADGROUP)](./phase-1-throughput/05-stream-consumer.md) | 🟩 | `68d3da3` | +| 1.6 | [Per-device in-memory state](./phase-1-throughput/06-device-state.md) | 🟩 | `68d3da3` | +| 1.7 | [Position writer (batched upsert)](./phase-1-throughput/07-position-writer.md) | 🟩 | `68d3da3` | +| 1.8 | [Main wiring & ACK semantics](./phase-1-throughput/08-main-wiring.md) | 🟩 | `68d3da3` | | 1.9 | [Observability (Prometheus metrics + /healthz + /readyz)](./phase-1-throughput/09-observability.md) | ⬜ | — | | 1.10 | [Integration test (testcontainers Redis + Postgres)](./phase-1-throughput/10-integration-test.md) | ⬜ | — | | 1.11 | [Dockerfile & Gitea workflow](./phase-1-throughput/11-dockerfile-and-ci.md) | ⬜ | — | diff --git a/.planning/phase-1-throughput/05-stream-consumer.md b/.planning/phase-1-throughput/05-stream-consumer.md index 0be74b9..dde98e0 100644 --- a/.planning/phase-1-throughput/05-stream-consumer.md +++ b/.planning/phase-1-throughput/05-stream-consumer.md @@ -90,4 +90,4 @@ On `start()`: ## Done -`src/core/consumer.ts` — XREADGROUP loop with `ensureConsumerGroup`, `decodeBatch`, partial-ACK semantics, `connectRedis` (co-located, not in `src/db/`), and clean stop. `test/consumer.test.ts` — 11 tests covering happy path, partial ACK, BUSYGROUP swallow, decode error skip, missing payload skip, XREADGROUP backoff, clean stop. *(pending commit SHA)* +`src/core/consumer.ts` — XREADGROUP loop with `ensureConsumerGroup`, `decodeBatch`, partial-ACK semantics, `connectRedis` (co-located, not in `src/db/`), and clean stop. `test/consumer.test.ts` — 11 tests covering happy path, partial ACK, BUSYGROUP swallow, decode error skip, missing payload skip, XREADGROUP backoff, clean stop. Landed in `68d3da3`. diff --git a/.planning/phase-1-throughput/06-device-state.md b/.planning/phase-1-throughput/06-device-state.md index 38523e6..7495050 100644 --- a/.planning/phase-1-throughput/06-device-state.md +++ b/.planning/phase-1-throughput/06-device-state.md @@ -78,4 +78,4 @@ The interface is built to extend: Phase 2 may add fields, but the existing field ## Done -`src/core/state.ts` — LRU Map using delete+set bump trick, `last_seen = max(prev, position.timestamp)` semantics, `evictedTotal()` counter. `test/state.test.ts` — 14 tests covering new-device creation, session counter increment, LRU eviction at cap, LRU re-touch, evictedTotal, out-of-order timestamp rejection, get/size. *(pending commit SHA)* +`src/core/state.ts` — LRU Map using delete+set bump trick, `last_seen = max(prev, position.timestamp)` semantics, `evictedTotal()` counter. `test/state.test.ts` — 14 tests covering new-device creation, session counter increment, LRU eviction at cap, LRU re-touch, evictedTotal, out-of-order timestamp rejection, get/size. Landed in `68d3da3`. diff --git a/.planning/phase-1-throughput/07-position-writer.md b/.planning/phase-1-throughput/07-position-writer.md index f9a648e..5303af1 100644 --- a/.planning/phase-1-throughput/07-position-writer.md +++ b/.planning/phase-1-throughput/07-position-writer.md @@ -91,6 +91,6 @@ If a transaction-wide failure occurs (Pool dead, transient network), all records ## Done -`src/core/writer.ts` — multi-row INSERT with RETURNING, duplicate detection by (device_id, ts) set diff, sequential chunking, bigint/Buffer attribute serialization (handles Buffer.toJSON shape). `test/writer.test.ts` — 14 tests covering happy path, all-duplicate, mixed, pool error, chunk split, Buffer base64, bigint string, parameter ordering, metrics. *(pending commit SHA)* +`src/core/writer.ts` — multi-row INSERT with RETURNING, duplicate detection by (device_id, ts) set diff, sequential chunking, bigint/Buffer attribute serialization (handles Buffer.toJSON shape). `test/writer.test.ts` — 14 tests covering happy path, all-duplicate, mixed, pool error, chunk split, Buffer base64, bigint string, parameter ordering, metrics. Landed in `68d3da3`. **Note:** The spec's `RETURNING (xmax = 0) AS inserted` idiom was replaced with a simpler set-difference approach — compare RETURNING rows against input by (device_id, ts). The xmax approach is mentioned in the spec but then immediately qualified: "rows that hit the conflict are NOT returned." The set-diff is cleaner and avoids confusion. The spec's own Note section confirms this is the right approach. diff --git a/.planning/phase-1-throughput/08-main-wiring.md b/.planning/phase-1-throughput/08-main-wiring.md index 79a7f58..dea150e 100644 --- a/.planning/phase-1-throughput/08-main-wiring.md +++ b/.planning/phase-1-throughput/08-main-wiring.md @@ -97,4 +97,4 @@ After this task lands you should be able to run `pnpm dev` against a local Redis ## Done -`src/main.ts` — full pipeline wiring: Postgres pool → migrations → Redis → state store → writer → sink → consumer → graceful shutdown stub. Metrics shim uses `logger.trace`. Sink ordering: state.update before writer.write per spec. *(pending commit SHA)* +`src/main.ts` — full pipeline wiring: Postgres pool → migrations → Redis → state store → writer → sink → consumer → graceful shutdown stub. Metrics shim uses `logger.trace`. Sink ordering: state.update before writer.write per spec. Landed in `68d3da3`.