Skip to content

TASK-001E: Streaming, Diagnostics, and Defects

Goal

Add bounded telemetry and preview frame flow, simple defect generation, and enough diagnostics visibility to understand the runtime without overloading the UI or memory.

Scope

  • implement bounded telemetry and preview frame pipelines
  • implement coalescing or recency-preserving lag policy
  • surface diagnostics or counters for dropped/coalesced work
  • implement simple defect generation tied to the current run
  • feed diagnostics and stream outputs into canonical app state

Non-Scope

  • advanced image processing
  • advanced metrics dashboards
  • persistent diagnostics history

AI Execution Profile

  • Model class: High-capability or Balanced
  • Reasoning effort: High
  • Prefer the stronger model if your tool struggles with concurrency or cancellation

Files Or Areas Expected To Change

  • Infrastructure producers for telemetry and frames
  • Application stream consumption and diagnostics logic
  • defect generation path and counters

Acceptance Targets

  • telemetry and preview pipelines are bounded
  • lag policy is explicit and testable
  • defect count updates are associated with the current run
  • diagnostics make dropped/coalesced behavior observable

Copy/Paste Prompt

text
Implement only TASK-001E: Streaming, Diagnostics, and Defects in this repository.

Read first:
- docs/requirements.md
  Focus on Sections 7.6, 7.7, 7.8, 7.11, 9.6, 9.7, 9.8, 9.9, and 13.3
- docs/specs/SLICE-001-first-strong-vertical-slice.md
  Focus on Streaming Policy, Run Execution, and Verification Notes
- docs/tasks/slice-001/TASK-001E-streaming-diagnostics-and-defects.md

Goal:
- Implement bounded telemetry and preview frame flow, simple defect generation, and diagnostics visibility for the first slice.

Scope:
- Implement bounded pipelines for telemetry and preview frames.
- Use explicit lag behavior:
  telemetry may coalesce to latest value
  preview frames should prefer recent frames over stale backlog
- Make dropped/coalesced behavior observable through diagnostics, counters, or logs.
- Generate simple defects and associate them with the current run.
- Feed stream-derived state into the canonical app state path rather than updating UI objects directly.

Do not:
- Add advanced image processing
- Add full analytics dashboards
- Create unbounded in-memory queues
- Bypass the canonical state path

Verification:
- Build if possible
- Add or update tests for bounded/coalesced behavior if practical
- Summarize the lag policy and how it is enforced

Important:
- Implement only this task
- Do not preemptively implement later tasks

Docs-first project memory for AI-assisted implementation.