Skip to content

feat(s0): bootstrap Rust workspace skeleton - #1

Merged
PhysShell merged 1 commit into
mainfrom
claude/music-core-cli-setup-C2zXh
May 18, 2026
Merged

feat(s0): bootstrap Rust workspace skeleton#1
PhysShell merged 1 commit into
mainfrom
claude/music-core-cli-setup-C2zXh

Conversation

@PhysShell

Copy link
Copy Markdown
Owner

Three crates — core, cli, plugin — with the full internal event model
(Pitch, Ticks, Velocity, Tempo, TimeSignature, Articulation, Note, Rest,
Event, Bar, Phrase) in griff-core. griff-cli produces a minimal binary.
griff-plugin is intentionally empty pending S10.

Linter config mirrors azdo-server-cli: clippy groups denied wholesale,
curated restriction lints opted in, rustfmt/deny/toolchain files in place.

Acceptance: cargo test + cargo clippy --all-targets -- -D warnings +
cargo fmt --check are green.

Three crates — core, cli, plugin — with the full internal event model
(Pitch, Ticks, Velocity, Tempo, TimeSignature, Articulation, Note, Rest,
Event, Bar, Phrase) in griff-core. griff-cli produces a minimal binary.
griff-plugin is intentionally empty pending S10.

Linter config mirrors azdo-server-cli: clippy groups denied wholesale,
curated restriction lints opted in, rustfmt/deny/toolchain files in place.

Acceptance: cargo test + cargo clippy --all-targets -- -D warnings +
            cargo fmt --check are green.
@PhysShell
PhysShell merged commit eb21f9d into main May 18, 2026
PhysShell pushed a commit that referenced this pull request Jun 3, 2026
The follow-up P2 commit re-blessed both 80x20 terminal goldens by hand because
its environment could not fetch crates (ratatui CONNECT 403), so the tests never
ran. The guessed frames were one column off on the section-band row: under the
new ceiling-division `fit`, the Solo section marker shifts by one column, which
the blind re-bless did not capture, and both characterization tests failed.

Regenerated both goldens from the actual rendered output and verified the full
preview suite (50 passed) and `cargo test --workspace` green, with fmt/clippy
clean. The code fixes themselves (#1 right-edge note skip, #2 ceiling fit, #3
all-voice bar classification) were correct and compile; only the goldens were
wrong.

https://claude.ai/code/session_016RxVPiPMnFjyV8HmepFWAT
PhysShell added a commit that referenced this pull request Jul 12, 2026
before A=0215ecf (unbiased anchor) / after B=1a3c965 (reflecting full-ladder
traversal). RhythmCopy+Repeat wraps gone (>12: candidate 398/16->0, winner
19->0), reachability preserved, no boundary saturation, non-target strategies
identical, anchor selection unbiased (no 2x skew), deterministic. Verdict:
wrap-free traversal fixes residual register defect; no rerank axis justified.
PhysShell added a commit that referenced this pull request Jul 12, 2026
before A=0215ecf (unbiased anchor) / after B=1a3c965 (reflecting full-ladder
traversal). RhythmCopy+Repeat wraps gone (>12: candidate 398/16->0, winner
19->0), reachability preserved, no boundary saturation, non-target strategies
identical, anchor selection unbiased (no 2x skew), deterministic. Verdict:
wrap-free traversal fixes residual register defect; no rerank axis justified.
PhysShell added a commit that referenced this pull request Jul 12, 2026
before A=0215ecf (unbiased anchor) / after B=1a3c965 (reflecting full-ladder
traversal). RhythmCopy+Repeat wraps gone (>12: candidate 398/16->0, winner
19->0), reachability preserved, no boundary saturation, non-target strategies
identical, anchor selection unbiased (no 2x skew), deterministic. Verdict:
wrap-free traversal fixes residual register defect; no rerank axis justified.
PhysShell added a commit that referenced this pull request Jul 29, 2026
…-circuit

Regressions for the second exact-head re-review (fail against 6375e8b):

#1 the whole artifact JSON graph must reject foreign fields, not only the plan
   root — rogue fields planted at every depth:
   - ledger_rejects_unknown_field_at_root / _in_batch / _in_event
   - ledger_rejects_unknown_field_in_action_payload (proves the *actual* serde
     version denies inside an internally-tagged variant, not just the attribute)
   - ledger_rejects_unknown_field_in_split_target
   - plan_rejects_unknown_field_in_embedded_batch
   (plan_rejects_unknown_field_in_assignment already passes — Assignment is
   strict — kept as boundary coverage.)

#2 verify_plan must refuse a structurally invalid embedded batch *before* digest,
   fingerprint, or replay:
   - verify_plan_short_circuits_on_invalid_batch asserts only the structural
     refusal is returned, never UnknownDecisionSource / PlanDigestMismatch /
     DecisionDigestMismatch / DecisionProjectionMismatch.

#3 an intra-batch duplicate event_id must be emitted exactly once:
   - intra_batch_duplicate_event_id_emitted_once (validate_ledger currently
     double-counts it via validate_batch + its own pass).

Logic unchanged, so these are RED.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012T7SRMiXmZe5v1imtrKMPi
PhysShell added a commit that referenced this pull request Jul 29, 2026
#1 strict JSON across the whole artifact graph. deny_unknown_fields now also on
   DecisionsLedger, DecisionBatch, DecisionEvent, Action (internally tagged; the
   serde 1.0.229 in the lockfile denies rogue fields inside a variant payload
   while still accepting the `kind` tag — proven by
   ledger_rejects_unknown_field_in_action_payload), and SplitTarget. A foreign
   field at any depth is now rejected, not silently discarded before digesting.

#2 verify_plan short-circuits a structurally invalid embedded batch:
   validate_batch(&plan.decision_batch)? runs first, so an invalid ordinal or a
   duplicate event_id refuses before any digest, fingerprint, or replay — the
   removed mid-function validate_batch no longer let those run.

#3 an intra-batch duplicate event_id is emitted exactly once. validate_batch's
   positional check is split out (batch_order_errors); validate_ledger runs that
   per batch plus a single ledger-wide event_id uniqueness pass, so a duplicate
   (intra- or cross-batch) is reported once, not twice. Standalone validate_batch
   keeps its ordering + intra-batch-uniqueness contract.

Includes an incidental rustfmt pass over the RED tests added in the previous
commit. 45/45 tests pass; clippy (all=deny, pedantic=warn) and fmt clean under nix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012T7SRMiXmZe5v1imtrKMPi
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.

1 participant