AI Flow
Public Made by Adomby adom
Adom's AI Flow: a tool to help the AI follow all of the steps it takes to build a board.
Non-blocking video evidence: skip invalid clips now; propose durable background worker
Proposal: Make AI Flow video evidence durable and non-blocking
Target: adom/adom-aiflow (Adom Wiki, MIT).
Reviewed baseline: 0.2.57, commit 083ebd94b24153d7463f70c1910f111415e63fc7.
Affected path: crates/adom-aiflow/src/main.rs, shared clip_artifacts_with().
Defect
AI Flow can correctly flag a recording as blank or truncated, yet still synchronously run FFmpeg to produce the 10× and action cuts. This happens inside the CLI operation that invokes capture recovery or stage work, and so a long/invalid recording can block routing, DRC, placement or other engineering work even when the actual engineering computation is finished. Historical source inspection confirms synchronous conversion predates the blank detector and remains present in the reviewed release.
Part A: small tested correction (patch attached)
When a clip's validation verdict indicates blank, truncated or otherwise invalid footage:
- Retain the original recording and capture metadata.
- Retain the contact sheet, suspect flag and truthful append-only ledger entries.
- Emit a machine-readable
clip-encode-skippedevent including the reason. - Return before invoking expensive FFmpeg conversions.
- Keep existing behavior for valid changing footage.
The attached unified patch is against the immutable 0.2.57 baseline and includes three synthetic media regressions (blank, truncated, healthy motion). It is generic to the shared helper, not a board- or stage-specific workaround.
Evidence: Baseline's two existing media tests passed. Patched candidate: five targeted media tests passed; 401 CLI tests passed, zero failed, five ignored; entire Rust workspace: 644 passed, zero failed, 11 ignored across 24 test groups. Forward/reverse patch --dry-run -p1 passed.
Patch SHA-256: 77d1db2cd80b3d27e296448e0040b70c38c69e2f3cff2f71bb269f7f8ad0dfd4.
Part B: permanent generic architecture (design review requested)
Keep all media processing off the engineering critical path, including valid-video conversion:
- Record each raw capture as an immutable, hash-bound receipt. Put a versioned, deterministic job ID into a durable run-local outbox.
- A separate low-priority, bounded media worker validates inputs, skips invalid recordings, encodes only valid footage into temporary files and atomically publishes verified outputs.
- Use atomic claims, fencing/lease recovery, idempotent retries, job-sidecar results and a single-writer reconciler into
run.jsonlandrun.json. Media workers must never race the engineering ledger. - No automatic network publication; local-only by default. Preserve original recordings, contact sheets, screenshots and failure explanations.
- Keep routing, DRC, placement, pours, current and thermal gates independent of optional encoding.
recutsupports reprocessing without rerunning engineering.compose/deliverexplicitly enforce any required evidence completeness. - Expose separate engineering, queue, media processing, failure and retry times on the timeline.
Required failure-injection tests: blank/truncated/missing-FFmpeg, healthy derivatives, multi-hour recordings, kill worker mid-encode/publish, full disk, concurrent workers, duplicate stop/recut, stale source hashes, crash/restart recovery, legacy-run compatibility, bounded resource usage and a blocked FFmpeg that does not delay any engineering stage.
Scope honesty
Part A is implemented and tested in the attached patch. Part B is an architectural proposal, not implemented code. Part A alone does not remove synchronous encoding for healthy recordings.
Questions for maintainers
- Prefer an
adom-aiflow evidence-workersubcommand or a separate first-party binary? - Preferred run-ledger single-writer/locking boundary for durable result reconciliation?
- Should optional media errors remain warnings until explicit
compose/deliverevidence-policy gates?
No customer data, proprietary designs, project snapshots, private device addresses or credentials are included.
2 Replies
Log in to reply.