Files
browser/openspec/changes/implement-log-ingest-pipeline/tasks.md
T
2026-07-11 14:56:10 +08:00

2.0 KiB

1. Log Contracts

  • 1.1 Add typed run log ingest protocol payloads in run/protocol for entries, batch ingest, acknowledgements, and stream cursors.
  • 1.2 Add matching platform DTO/domain contracts and conversion helpers for log batch ingest and query.
  • 1.3 Add validation rules for bounded log batches, stream identity, sequence ranges, checksum, and query limits.

2. Platform Log Ingest

  • 2.1 Extend platform service behavior to ingest contiguous batches, acknowledge duplicates, reject out-of-order/conflicting batches, update LogStream.LatestSeq, and query entries after a cursor.
  • 2.2 Implement platform log ingest/query HTTP routes using named DTOs and service methods.
  • 2.3 Add platform service/API tests for accepted batches, duplicate ack, out-of-order rejection, missing stream, and cursor query.

3. Run Log Spool And Client

  • 3.1 Implement a run-side local spool abstraction that writes pending batches to disk, lists them for retry, and removes acknowledged ranges.
  • 3.2 Extend run/api.PlatformClient with a typed log batch ingest method.
  • 3.3 Add run spool/client tests for retry retention, acknowledgement cleanup, request path, JSON payload, response decoding, and platform error handling.

4. Documentation

  • 4.1 Update run and platform protocol/route documentation to mark log batch ingest/query implemented and keep control/job/artifact/game-client channels separate.

5. Verification

  • 5.1 Run go test ./... from platform/ and record evidence.
  • 5.2 Run go test ./... from run/ and record evidence.
  • 5.3 Run scripts/check-structure.sh and record evidence.
  • 5.4 Run openspec validate implement-log-ingest-pipeline --strict and record evidence.

Evidence

  • 2026-07-03: go test ./... from platform/ passed.
  • 2026-07-03: go test ./... from run/ passed.
  • 2026-07-03: scripts/check-structure.sh passed with structure check passed.
  • 2026-07-03: openspec validate implement-log-ingest-pipeline --strict passed with Change 'implement-log-ingest-pipeline' is valid.