Global AI Hackathon with Qwen Cloud · Track 2 — AI Showrunner

Your near-miss, tomorrow's safety film.

An agent film crew turns a real incident report into a 90-second cinematic safety re-enactment — scripted, storyboarded, shot, QC'd, and provenance-signed under a hard render budget. The ledger says $2.71. The alternative says $15,000.

0
tests passing
0%
line coverage
$0.00
of $4.00 budget ledger
byte-identical
deterministic replay

Scene 01 · The demo

One command rebuilds the whole film. Offline. Zero keys.

The graded artifact runs on FakeQwen, a deterministic transport — a socket guard blocks all network calls, and the replayed manifest is verified byte-for-byte against the committed cache.

Foreshadow hero banner — your near-miss, tomorrow's safety film, showing the agent pipeline and $2.71 ledger
$ foreshadow replay --incident forkliftreplaying forklift at $4 (offline, FakeQwen, demo keys) [ done] screenplay (beats=3, title=Aisle Seven) [ done] shot_plan (shots=8) [ done] budget_alloc (mix=hero:3 conn:3 kb:2) [ done] storyboard (batch_discount=0.5, frames=8) [ done] render (kenburns=2, rendered=6) [ done] qc (demoted=0, rejected=0, reviewed=6) [ done] publish (invariants=I1-I4 PASS, leaves=36)  spent $2.7051 of $4.00 merkle root 4a7e3aa0bd296923… invariants I1-I4 PASS committed cache: byte-identical

Scene 02 · The crew

The budget is the product.

Track 2 asks for maximum output quality under a limited budget. Foreshadow makes that constraint the signature feature — and signs the receipts.

qwen3.6-flash

Line Producer — a knapsack with opinions

Every storyboard shot gets a narrative weight; the allocator solves a knapsack over weight × tier cost under a hard dollar cap. Each demotion is priced into a regret log ("saved $0.90, narrative weight 2/10"), and a kill switch aborts at 2.5× budget. Quality measurably climbs 49.8% → 78.4% → 92.0% across the $2/$4/$8 sweep.

Ed25519

Merkle-rooted provenance

36 SHA-256 leaves roll into a Merkle root signed with Ed25519. foreshadow verify re-hashes everything and proves invariants I1–I4; a 1-byte tamper fails.

replay

Deterministic replay

The same incident replays to a byte-identical signed manifest on every machine — the root and signature match the committed cache exactly.

zero keys

Offline judge path

A session-wide socket guard blocks the network; 421 tests, the replay, and the provenance check all pass with zero keys. verify_offline.py exits 0.

wan2.7-i2v · qwen3-vl-plus

An eight-surface Qwen film crew

Screenwriter (qwen3.7-max + thinking) → Art Dept (qwen-image-2.0-pro) → DP (wan2.7-i2v hero shots, wan2.6-i2v-flash connective tier) → QC Critic (qwen3-vl-plus) → Narrator (cosyvoice-v3-plus), plus structured output and Batch −50% fan-out. One platform, one bill — which is what makes a single cost ledger possible at all.

Scene 03 · No smoke, no mirrors

Honest by design.

A provenance tool that oversold itself would be a contradiction. These disclosure lines are quoted from the README — what's real, what's mocked, and where the line is.

The graded replay writes deterministic stub media … so replay stays byte-identical on every machine.

For something watchable, foreshadow preview renders a real, playable MP4 animatic — clearly stamped as an animatic, not AI footage.

— README · Status / Pending

Chat surfaces are fully implemented … image/video/TTS surfaces are payload-complete builders that raise LiveSurfaceNotVerified until a key is present.

The graded artifact runs on FakeQwen; real wan2.7-i2v runs only behind DASHSCOPE_API_KEY.

— README · Live Qwen integration

Signing proves pipeline integrity, not narrative truth — documented honestly, not hidden.

A fabricated report would yield a validly-signed fabricated film. The threat model says so out loud, in docs/SPEC-PROVENANCE.md.

— README · Provenance & verification

Scene 04 · Q&A

Questions a judge would ask.

Is the demo really offline?

Yes. scripts/verify_offline.py installs a socket guard that makes any network call raise, replays forklift@$4 from scratch, verifies invariants I1–I4, and confirms the fresh manifest is byte-identical to the committed cache. Exit 0 means it reproduced with zero network and zero keys. The 421-test suite runs under the same guard.

What is FakeQwen?

A deterministic, keyless stand-in for the Qwen Cloud transport. It returns seeded, mechanistic responses for every surface so the pipeline, ledger, QC loop, and provenance chain are fully exercised — and replays byte-identically. The live transport (qwen/live.py) implements the chat surfaces on the OpenAI-compatible endpoint and gates image/video/TTS behind DASHSCOPE_API_KEY.

How do I run it?

Python 3.12+, no keys:

python -m venv .venv
./.venv/bin/pip install -e ".[dev]"
./.venv/bin/pytest                        # 421 passed, 100% cov
./.venv/bin/foreshadow replay --incident forklift
./.venv/bin/foreshadow preview --incident forklift  # playable .mp4
Which Qwen models does it use?

qwen3.7-max (+ thinking) for the screenplay and structured shot plan, qwen3.6-flash for allocation rationale, qwen-image-2.0-pro for character sheets and storyboards, wan2.7-i2v / wan2.6-i2v-flash for the two video tiers, qwen3-vl-plus for dailies QC, and cosyvoice-v3-plus for narration. All ids are pinned in config.ALLOWED_MODELS; any other id raises before a call is built.

Is film.mp4 a real video?

On the offline path, no — it's a signed edit-list stub kept byte-identical for replay determinism, and the README says so plainly. foreshadow preview renders a real, playable H.264 animatic (title cards + narration script + Ken-Burns motion) from the same deterministic shot plan. Real AI video generation runs only in live mode with a key.

What's the license?

MIT, © 2026 Edy Cu. Bug reports and PRs welcome — see .github/CONTRIBUTING.md for the pre-PR checklist (ruff, pytest --cov, verify_offline.py).

Final scene

Roll the film on your incident log.

Clone it, replay it, verify the signature yourself. No keys, no network, no trust required.