3.2 KiB
3.2 KiB
Execution Prompt: Streaming Simplification
You are implementing STREAMING_SIMPLIFICATION in /home/matiss/Documents/Final Year Project.
Objective
Deliver a WebRTC-only streaming architecture for this codebase by implementing the four artifacts:
docs/STREAMING_SIMPLIFICATION_IMPLEMENTATION_PLAN.mddocs/STREAMING_SIMPLIFICATION_ABSOLUTE_CHECKLIST.mddocs/STREAMING_SIMPLIFICATION_VALIDATION_MATRIX.md- This execution prompt.
Governing constraints
- Preserve device token auth and role checks.
- Keep request/accept/end endpoints and WebRTC signaling functional.
- Remove socket JPEG frame fallback from runtime path.
- Keep rollback-capable behavior using
SIMPLE_STREAMINGwhere possible. - Do not reintroduce any media-path dependency on mock provider endpoints.
Execution sequence (strict)
- Implement all backend stream endpoint and session-state simplifications first.
- Simplify realtime gateway signaling path second.
- Update web frontend streaming controller and pages.
- Update mobile frontend streaming behavior.
- Update docs, config notes, and OpenAPI/event description.
- Run validation matrix gating; do not mark complete until all required evidence rows are filled.
Completion gates
Gate A — Backend
Backend/routes/streams.tsfollows simplified lifecycle only.Backend/realtime/gateway.tscontains no frame-relay path in active flow.- Unauthorized access checks remain strict and verifiable.
Gate B — Frontends
- Web and Mobile each have one stream state machine and one active rendering strategy.
- No scheduled frame-relay sender/receiver code remains in runtime path.
- End-of-stream cleanup is deterministic and symmetric.
Gate C — Delivery readiness
- OpenAPI/docs updated for simplified contract.
- Feature flag/rollback documented.
- Validation matrix entries populated from observed evidence.
Evidence rules
For every checklist line in docs/STREAMING_SIMPLIFICATION_ABSOLUTE_CHECKLIST.md:
- Fill corresponding row in
docs/STREAMING_SIMPLIFICATION_VALIDATION_MATRIX.mdfrom pending -> done. - Populate columns:
- Code Evidence: file path + symbols/line references
- Test Evidence: command output or test report artifact names
- Runtime Evidence: screenshot/video/log excerpt references and scenario details
- Keep one evidence item per row if possible; if blocked, include blocker and retry plan.
Required validation commands (when execution resumes)
- Backend: validate API/types/contracts compile/build and lint status.
- Gateway: static check that
stream:framehandlers are absent in effective runtime mode. - Frontend: build check for both web and mobile after removing unused imports/state.
- Runtime smoke checks:
- client request -> camera accept -> stream start -> stream end
- unauthorized request rejection
- cleanup path after end and reconnect
Final report format
Return a final report with:
- Completed tasks grouped by file.
- Validation matrix fully updated.
- Any deviations from this spec and why.
- Exact first and second risk identified after rollout.
Do not introduce additional assumptions not covered in the checklist without updating the checklist and matrix.