Files
browser/openspec/changes/implement-artifact-transfer-channel/tasks.md
T
2026-07-11 14:56:10 +08:00

2.2 KiB

1. Artifact Transfer Contracts

  • 1.1 Add typed run artifact transfer protocol payloads in run/protocol for open, chunk upload, status/resume, completion, and acknowledgements.
  • 1.2 Add matching platform DTO/domain contracts and conversion helpers for artifact transfer requests and responses.
  • 1.3 Add validation rules for active upload direction, owner scope, bounded chunk size, byte ranges, chunk checksums, final checksums, and completion state.

2. Platform Artifact Transfer

  • 2.1 Extend platform service behavior to open upload transfers, accept idempotent chunks, reject conflicting chunks, report resume status, and mark artifacts available only after verified completion.
  • 2.2 Implement platform artifact transfer HTTP routes using named DTOs and service methods.
  • 2.3 Add platform service/API tests for successful upload, resume status, duplicate ack, checksum mismatch, invalid owner/session, and missing-chunk completion rejection.

3. Run Artifact Queue And Client

  • 3.1 Implement a run-side local artifact queue that writes pending chunk requests to disk, lists them for retry, and removes acknowledged chunks.
  • 3.2 Extend run/api.PlatformClient with typed artifact transfer methods.
  • 3.3 Add run queue/client tests for retry retention, acknowledgement cleanup, request paths, JSON payloads, response decoding, and platform error handling.

4. Documentation

  • 4.1 Update run and platform protocol/route documentation to mark artifact open/chunk/status/complete implemented and keep control/job/log/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-artifact-transfer-channel --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-artifact-transfer-channel --strict passed with Change 'implement-artifact-transfer-channel' is valid.