Repository navigation
Conversation
Collaborator
Author
|
🤖 Claude Code review of
Each gives what the rule asks, and a timeline without restarts reads as before. What it raised, and what
802 tests pass, and |
A restart, the first measure of a new movement or song in the same file, now starts the beat units as the timeline's first measure does. Where a movement's first measure has no unit, meters_of supplies one, assumed and with no beat_unit_id: a copy of the movement's first unit, else of the unit in force before the movement, else the default. A movement's first measure always starts a unit, and no unit reaches back across a restart, so a first movement without a unit stays N/4 though a later one has a unit. A restart on the first measure changes nothing, and a timeline without restarts reads as before. Before, a later movement whose pickup had no unit took the previous movement's unit, not assumed, and every quarter stamp after it was off. Part of TimeLineAnnotator/project-management#323 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
meters_of now splits the rows into movements once and runs the rule for the start of a timeline on each, with the unit in force before as the fallback. Before, each movement start without a unit scanned and copied the rest of the table, which made meters_of quadratic in the number of movements (20000 one-measure movements: 0.46 s, now 0.06 s); it also parsed a movement's first unit twice and kept a condition that could never be true. The tests add a third movement that copies a supplied unit, a movement that carries the unit set in the one before it, and the measure table's rows for a restart; the restart on the first measure is now set on the row only. Part of TimeLineAnnotator/project-management#323 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
azfoo
force-pushed
the
v1/323-timemap-restart-units
branch
from
October 19, 2026 15:35
8d10fa5 to
a22d15d
Compare
This branch has not been deployed
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.
🤖 Claude
A
restartmarks the first measure of a new movement or song in the same file. It now starts the beat units again, as the timeline's first measure does, so a later movement whose first measures have no unit reads its own meter, not the previous movement's.meters_of: every movement starts with a unit, at the first row and at each row withrestart. Where a movement's first measure has none,meters_ofsupplies one, assumed and with nobeat_unit_id, since no beat carries it:starts_heretrue.restarton the first measure changes nothing, and a timeline without restarts reads as before.units.pydoesn't change.meters_ofsplits the rows into movements once, and runs the rule for the start of a timeline on each, with the unit in force before as the fallback. It stays linear in the number of rows: 20,000 one-measure movements take 0.06 s.Before, a pickup without a unit in movement 2 took the unit from the end of movement 1, not assumed. In the test's example (3/4, then 6/8 tapped in two with a one-tap pickup), the pickup read 1/4 instead of 3/8, and every quarter stamp after it was half a quarter note early.
Tests
test_timemap_meters.py,TestRestarts. Its first five tests were written first, and three of them failed before the change:After the code review, three more tests: a third movement that copies a supplied unit, a movement that carries the unit set in the one before it, and the measure table's rows for a restart (movement, time signature, assumed).
Restart cases stay out of
shared_examples.json: the app's format has no place for them.uv run --package tilia-core pytest packages/tilia-core -q: 874 passed, 21 skipped, 7 xfailed, onv1-prereleaseas of 2026-10-19.python scripts/check_packages.pypasses. black and ruff are clean.Guarantees. I neutralised the code behind each one, ran the suite, then restored it:
_movementsnever splitsstarts_hereonly on the timeline's first rowPart of TimeLineAnnotator/project-management#323
🤖 Generated with Claude Code