6.3 KiB
6.3 KiB
1. Run-Side Channel Isolation
- 1.1 Add deterministic run tests that simulate slow or retrying artifact/file transfer work while control heartbeat and job ack/progress/result calls continue through bounded client calls.
- 1.2 Add run tests proving log spool selection, upload acknowledgement, and retry cleanup continue while artifact/file chunks are queued, slow, or retrying.
- 1.3 Add run tests proving artifact/file retry listing, chunk acknowledgement, and cleanup continue while log batches are queued, slow, or retrying.
- 1.4 Update run scheduling, retry queue, or worker orchestration code only where needed to make the tests pass without exposing host paths, raw credentials, direct sockets, or large inline payloads through lightweight channels.
- 1.5 Run
cd run && GOCACHE=/private/tmp/browser-go-build-cache go test ./... -count=1and record evidence.
2. Platform Interleaving and Validation
- 2.1 Add platform service/API tests that interleave valid heartbeat, job ack/result, log batch ingest, and artifact transfer requests for one registered run endpoint.
- 2.2 Prove each interleaved platform route mutates only its own state and preserves existing idempotency semantics.
- 2.3 Add negative platform tests proving control, job, and log routes reject artifact chunks, file bodies, host paths, raw credentials, direct sockets, and channel-owned transport payloads from other routes.
- 2.4 Update platform validators, DTOs, service logic, or route documentation only where needed to enforce the isolation contract.
- 2.5 Run
cd platform && GOCACHE=/private/tmp/browser-go-build-cache go test ./... -count=1and record evidence.
3. Protocol Documentation
- 3.1 Update
run/protocol/*.md,run/spool/README.md,run/artifact/README.md,platform/protocol/run-contracts.md, orplatform/api/routes.mdas needed to document channel priority and payload boundaries. - 3.2 Confirm docs state that control/job calls remain lightweight, log ingest is durable and independently retried, artifact/file transfer is chunked and lower priority, and lightweight routes never accept heavy transfer payloads.
4. Verification and Stream Handoff
- 4.1 Record implementation evidence in this tasks file only after each command has actually run.
- 4.2 Run
scripts/check-structure.shand record evidence. - 4.3 Run
openspec validate harden-log-artifact-channel-isolation --strictand record evidence. - 4.4 Update
openspec/changes/architecture-delivery-stream/delivery-plan.mdto markharden-log-artifact-channel-isolationcomplete only after evidence exists and move the next queue item to active. - 4.5 Update
openspec/changes/architecture-delivery-stream/NEXT_CHANGE.mdwith the next implementation/generator handoff after this change closes.
Evidence
-
Run-side channel isolation:
- Added
run/api/channel_isolation_test.go, proving heartbeat, terminal job result, and log ingest complete while an artifact chunk upload is deliberately blocked. - Added
run/spool/channel_isolation_test.go, proving log acknowledgement cleanup remains independent from artifact backlog and artifact acknowledgement cleanup remains independent from log backlog. - No run scheduling or queue production code changes were required; existing separate client calls and separate
logs/artifactsspool areas satisfied the new regression tests. - Initial sandbox run of
cd run && GOCACHE=/private/tmp/browser-go-build-cache go test ./api ./spool -count=1was blocked byhttptestloopback bind permissions afterrun/spoolpassed. - Escalated rerun of
cd run && GOCACHE=/private/tmp/browser-go-build-cache go test ./api ./spool -count=1passed forbrowser.local/run/apiandbrowser.local/run/spool. - Full sandbox run of
cd run && GOCACHE=/private/tmp/browser-go-build-cache go test ./... -count=1was blocked byhttptestloopback bind permissions inrun/apiandrun/runtime; non-listener packages passed. - Escalated rerun of
cd run && GOCACHE=/private/tmp/browser-go-build-cache go test ./... -count=1passed forapi,config,protocol,runtime, andspool.
- Added
-
Platform interleaving and validation:
- Added
platform/api/channel_isolation_handlers_test.go, proving interleaved heartbeat, job ack/result, log batch ingest, and artifact transfer requests mutate only their own channel state. - Added negative API coverage proving lightweight control/job/log routes reject artifact chunks, inline log arrays, host paths, raw credential fragments, direct socket strings, and heavy transfer payload fields through strict JSON decoding.
- Added rejection-state coverage proving a rejected heavy heartbeat payload does not mutate endpoint capacity or store heavy payload text.
- Focused command
cd platform && GOCACHE=/private/tmp/browser-go-build-cache go test ./api -run 'TestRunChannelAPI|TestLightweightRunRoutes' -count=1passed. - Full command
cd platform && GOCACHE=/private/tmp/browser-go-build-cache go test ./... -count=1passed forapi,config,domain,dto,model,repo,service, andvalidator.
- Added
-
Protocol documentation:
- Updated
run/spool/README.md,run/artifact/README.md,run/protocol/artifact.md,run/protocol/log-ingest.md, andrun/protocol/job.mdwith channel priority, independent retry, and heavy-payload boundary rules. - Updated
platform/protocol/run-contracts.mdandplatform/api/routes.mdto state that control/job calls remain lightweight, log ingest is durable and independently retried, artifact/file transfer is lower priority and chunked, and lightweight routes reject heavy transfer payloads.
- Updated
-
Final gates and stream handoff:
scripts/check-structure.shpassed withstructure check passed.openspec validate harden-log-artifact-channel-isolation --strictpassed withChange 'harden-log-artifact-channel-isolation' is valid; the process exited 0. PostHog telemetry flush reportedENOTFOUND edge.openspec.dev, which did not affect validation.openspec/changes/architecture-delivery-stream/delivery-plan.mdnow marksharden-log-artifact-channel-isolationcomplete andimplement-local-debug-workspaceactive.openspec/changes/architecture-delivery-stream/NEXT_CHANGE.mdnow points the next generator chat at creatingimplement-local-debug-workspace, because that OpenSpec directory does not exist yet.