Skip to content

Take the markdown fences out of the example files - #20

Merged
SuperInstance merged 1 commit into
masterfrom
claude/init-1wgqn0
Aug 25, 2026
Merged

Take the markdown fences out of the example files#20
SuperInstance merged 1 commit into
masterfrom
claude/init-1wgqn0

Conversation

@SuperInstance

Copy link
Copy Markdown
Owner

A pre-ship pass: play-test the shipped artifact end to end, clean up what it turned over, and change nothing that isn't a defect.

The one thing that needed fixing

All eight files in examples/ opened with ```plainsong and closed with ```. They are .song files, not markdown. The parser skips the fence, so nothing sounded wrong and nothing warned.

It still mattered: these files are the first thing anyone reads to learn the notation, and the failure mode observed while probing this tool with small models was an agent copying an example verbatim. What it would copy is a fence.

No music moved, and that is checked rather than claimed — the corpus fingerprint hashes the compiled arrangement, not the source, so anything audible would show. It reads 6,321 files compiling exactly as recorded, unchanged. 16 deletions, 8 files.

Play-test of the actual shipped wheel

Built plainsong-1.5.0-py3-none-any.whl, installed it into a clean venv outside the tree, and drove the documented surface — 17 commands, all passing. Then verified the outputs were real rather than trusting exit codes:

Artifact Checked
MIDI MThd header, 783 bytes, 63 note-on events
WAV 21.2s @ 44100Hz, peak 29162 — audible, not silence
SVG parses as XML, 39 elements
transpose Am→Dm moved the chord row correctly (i–VI–III–VII)
MCP 27 tools listed; deprecation on stderr; stdio stdout carries only JSON-RPC

Plus the check CI structurally cannot run, because it has no browser:

python3 tools/demo_differential.py
  6/8  triplets  3/4  sustains  rests  stacks  repeated rows  chord qualities
  all agree

Eight cases, note-for-note identical between the browser demo's own JavaScript compiler and this one.

Two things I investigated and deliberately did not change

plainsong check examples reports 3 warnings. All three are intentional:

  • Two are sections whose chords stop short of the section on purpose — one is an outro literally named "fading sonar".
  • The third is edge-3-dense-chords.song, whose degenerate tokens (e2-.-g2, c3--e3) are already documented in examples/edge-cases/BUGS.md as testing that they degrade gracefully to 2-note chords.

Changing any of them would alter the music to silence a warning, which is backwards.

I also chased what looked like a defect — check --json appearing to report path: None — and it was my own misreading. The key is source, and it identifies every file correctly. No change made.

Ship gate

stdlib-only (the 12 platform jobs) 705 tests, 0 errors, 0 failures
pytest clean
specs 7/7
ruff check / format --check clean
corpus fingerprint 6,321 files compile to identical music
verify_release.py --stage wheel 10 passed, 0 failed
browser differential all agree

Working tree is clean — no build artifacts tracked, no stray worktrees, all caches gitignored.


Generated by Claude Code

All eight files in examples/ opened with a ```plainsong fence and closed with
```. They are .song files, not markdown, so the fence meant nothing -- the
parser skips it, nothing sounded wrong and nothing warned.

It still mattered. These files are the first thing anyone reads to learn the
notation, and the failure mode observed while probing this tool with small
models was an agent copying an example verbatim. What it would copy is a fence.

No music moved, and that is checked rather than claimed: the corpus fingerprint
hashes the compiled arrangement rather than the source, so a change that altered
anything audible would show. It reads 6,321 files compiling exactly as recorded,
unchanged.

The three warnings `check examples` reports were investigated and left alone.
Two are sections whose chords deliberately stop short of the section -- one is an
outro named "fading sonar" -- and the third is edge-3-dense-chords.song, whose
degenerate tokens BUGS.md already documents as testing graceful degradation.
Changing any of them would change the music to silence a warning, which is
backwards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PBAjxy7cD6DzJ72NX8TJEc
@SuperInstance
SuperInstance merged commit 441b632 into master Aug 25, 2026
17 checks passed
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