Claude/init 1wgqn0 - #14
Merged
Merged
Conversation
Everything in tests/ runs with the repository on sys.path and every data file sitting where the source says it is. That is the wrong shape for the failures releases have. The specs once lived in a top-level specs/ directory and `plainsong spec` reported "no specs found" to everybody who installed rather than cloned -- the self-verification the whole design leans on, quietly doing nothing, with a green suite. The songbook had the same fault. Neither test could have caught either. So this script never imports plainsong. It builds a wheel, installs it into a throwaway venv outside the source tree, and drives the console script from /tmp with PYTHONPATH stripped, because leaving it set is exactly how a packaging bug hides: the installed package imports and the module that answers is the one in the checkout. Then it repeats the drill against what is actually on PyPI, which is a separate question -- the tree can be right and the upload a version behind, and PyPI's JSON API twice reported an older version than pip then resolved. It checks the things that are only true from outside: that spec reads its TOMLs out of the install, that the songbook is really packaged, that a compile produces notes rather than just a file, that the rebinding guard is correct in the shipped artifact, that the MCP server answers real JSON-RPC over stdio, and that the sibling's loopback check agrees with the compiler's case by case. A check that cannot run counts as a failure rather than a skip. "We did not look" and "we looked and it was fine" are the two things this exists to keep apart. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBAjxy7cD6DzJ72NX8TJEc
Its first run reported two failures, both its own. `--json` is a global flag and has to precede the subcommand -- `plainsong --json info x`, not `plainsong info x --json`, which argparse rejects outright -- and the note total is `arrangement.notes` rather than a top-level key, the per-track counts living under `arrangement.tracks[].notes`. Nothing about the product was wrong. Every check that tests plainsong itself passed against both the built wheel and the published package, including the packaging canary, the bundled songbook, the rebinding guard in the shipped artifact, and the MCP server answering real JSON-RPC over stdio. Worth recording separately: CLAUDE.md says "Every command takes --json", which is true only of the global position. Following it literally is what produced this bug. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PBAjxy7cD6DzJ72NX8TJEc
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.
Description
[What changed and why. Link to the issue if one exists.]
Testing Done
[How you verified the change works — test output, manual steps, screenshots]
Reviewer notes: [Optional — anything you want the reviewer to know upfront]