demo: add demo_project fixture + scripts/demo.sh walkthrough#7
Merged
Conversation
The dbt_dugout fixture has sub-second wall-clock, so the cost overlay collapses to the 60s min-billing floor with Headroom=$0 — useful for testing, but a flat demo. New synthetic fixture under tests/fixtures/demo_project/ (regenerable via tests/fixtures/generate_demo_fixture.py) drives a 24-model baseball analytics DAG through a 4-thread discrete-event scheduler. Topology is shaped so int_game_events is the bottleneck on 3 of the top 5 paths (shared-node leverage) and wall-clock is ~7.5 min (min-billing doesn't fire), yielding $2.04 run cost / $0.10 headroom / $0.61 idle cost on L. scripts/demo.sh walks through all subcommands in one take with narration beats. PAUSE=0 dry-runs. Four smoke tests lock the fixture's headline shape so regenerations with topology changes don't silently break the recorded demo (event count, thread count, top-path terminal, shared bottleneck on multiple paths, positive headroom + idle cost on L). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a longer-running, bigger-DAG fixture plus a narrated
scripts/demo.shdesigned for recording. The existingdbt_dugoutfixture is sub-second — the cost overlay there collapses to the 60s min-billing floor, which is great for testing but a flat demo.The new
tests/fixtures/demo_project/fixture is a synthetic 24-model baseball-analytics DAG scheduled across 4 threads. Shaped so:int_game_events(182s) is the slowest model on 3 of the top 5 longest paths. Showcases theanalyzeBottleneck column and the shared-node-leverage story.--warehouse-size L— ~7.5 min wall-clock (min-billing floor doesn't fire), $2.04 run cost, $0.10 headroom (5%), $0.61 idle cost (30%).tests/fixtures/generate_demo_fixture.pyruns a discrete-event scheduler to produce the JSONs deterministically; change a time or add a node and re-run.Demo walkthrough
Narrated PAUSE between commands (
PAUSE=0to dry-run). Drives:analyze,analyze --show-path,replay,replay --warehouse-size L, contrast with--warehouse-size XL, non-Snowflake path via--credits-per-hour, and--format json | jq.What the demo shows
analyze [--show-path]int_game_eventsbottlenecks 3/5 top pathsreplayreplay --warehouse-size L--warehouse-size XL--credits-per-hour 12 --rate-per-credit 1.5--format json | jq .costTests
tests/test_demo_fixture.py(4 tests) locks the fixture's headline shape so topology changes don't silently break the recorded demo:fct_batter_vs_pitcherand includesint_game_eventsint_game_eventsis the bottleneck on ≥3 of the top 5 pathsFull suite: 57 passed (was 53). ruff + mypy --strict clean.
act -j testgreen locally.Test plan
uv run pytest— 57/57 passuv run ruff check .cleanuv run mypy --strict srccleanact -j test(py3.12) green locallyscripts/demo.sh PAUSE=0completes all 8 sections without error🤖 Generated with Claude Code