Skip to content

demo: add demo.tape and make demo target#80

Merged
winebarrel merged 4 commits into
mainfrom
docs-add-demo-tape
May 5, 2026
Merged

demo: add demo.tape and make demo target#80
winebarrel merged 4 commits into
mainfrom
docs-add-demo-tape

Conversation

@winebarrel

Copy link
Copy Markdown
Owner

Summary

  • New demo.tape (pistachio-style VHS recording script) walks through the headline plan → apply → re-plan empty → dump → modify → re-plan → re-apply round-trip on a small posts schema. Adapts pistachio's tape to MySQL syntax (INT AUTO_INCREMENT, PRIMARY KEY (id), inline KEY for the secondary index) and replaces pist with myschema.
  • New make demo target runs clean-schema (resets MYSQL_DB to an empty state) and invokes vhs demo.tape. The DSN is built inline from the existing MYSQL_* vars so a custom host / port carries through. Recorder still needs vhs + bat + the myschema binary on PATH; documented in the recipe comment.
  • .gitignore gains demo.gif (VHS output) and *.bak (the cp schema.sql schema.sql.bak byproduct of the diff demo step), matching pistachio.
  • TODO.md: drop the "Demo asciinema or gif (pistachio-style)" item now that the tape is in place.

Test plan

  • No code changes; doc/build-tooling only.
  • make demo recipe builds the DSN from MYSQL_* vars, so a custom MySQL setup carries through without further edits.
  • Smoke-record by running make demo against a local MySQL once VHS is installed (the recording is the deliverable; left to the recorder).

🤖 Generated with Claude Code

winebarrel and others added 2 commits May 5, 2026 21:08
`demo.tape` is a [VHS](https://github.com/charmbracelet/vhs) script
that records a 60-second walkthrough of the `plan → apply → re-plan
empty → dump → modify → re-plan → re-apply` round-trip, mirroring
pistachio's `demo.tape` shape (single shell, `bat`-coloured SQL,
heredoc'd schema file, sed'd column-add diff). The schema is a
two-column `posts` table with a secondary index, evolved to add a
`body` column — small enough to fit one screen, big enough to
exercise the headline ergonomics.

Recording requires VHS + `bat` on PATH and a fresh database
reachable through `MYSCHEMA_DSN` (the tape doesn't export it; the
recording environment is responsible, same as pistachio's
convention). The `sed -i ''` form is macOS-specific; Linux
recorders should drop the empty `''` argument.

TODO.md: drop the "Demo asciinema or gif" item now that the tape
is in place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- `make demo` runs `clean-schema` (resets MYSQL_DB so the recording
  starts from an empty database) then invokes `vhs demo.tape`. The
  DSN is built inline from the same MYSQL_* vars test / clean-schema
  already use, so a custom host / port carries through. Recorder
  still needs vhs + bat + the `myschema` binary on PATH —
  documented in the recipe comment. Mirrors pistachio's `make demo`
  shape (one line, depends on the schema-reset target).
- `.gitignore` gains `demo.gif` (the VHS output) and `*.bak`
  (demo.tape's `cp schema.sql schema.sql.bak` byproduct), matching
  pistachio.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 12:27
Added an image to the README for better visualization.
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.62%. Comparing base (32fd267) to head (a235a63).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   86.62%   86.62%           
=======================================
  Files          30       30           
  Lines        3237     3237           
=======================================
  Hits         2804     2804           
  Misses        267      267           
  Partials      166      166           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a recordable, repeatable CLI demo flow (VHS tape + Makefile target) to showcase myschema’s core plan → apply → re-plan → dump → modify → re-plan → re-apply workflow, and updates repo hygiene/docs accordingly.

Changes:

  • Add demo.tape to generate demo.gif via VHS demonstrating a small posts schema round-trip.
  • Add make demo target to reset the demo DB and run the VHS recording with a constructed MYSCHEMA_DSN.
  • Update .gitignore for demo byproducts and remove the now-completed demo TODO item.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

File Description
TODO.md Removes the demo placeholder item now that a demo tape exists.
Makefile Adds demo target that resets the DB and runs vhs demo.tape with a DSN built from MYSQL_*.
demo.tape New VHS tape that records a myschema walkthrough into demo.gif.
.gitignore Ignores demo output (demo.gif) and backup files (*.bak).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile
Comment thread demo.tape
Comment thread demo.tape
MYSQL_PWD was carried over from earlier scaffolding but isn't
exercised in development — make targets call mysql / myschema
without password against the local docker compose MySQL, and the
CI / test paths inherit credentials from MYSCHEMA_TEST_DSN. Drop
the var (and its export) to keep the env surface minimal; if a
password-protected MySQL setup ever needs it, the operator can
prepend `MYSQL_PWD=… make …` and rely on the mysql client picking
it up directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@winebarrel winebarrel enabled auto-merge May 5, 2026 12:40
@winebarrel winebarrel merged commit 3c609c0 into main May 5, 2026
3 checks passed
@winebarrel winebarrel deleted the docs-add-demo-tape branch May 5, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants