Repository navigation
Phase 6C: add real-world MIDI playback corpus lane - #89
Conversation
There was a problem hiding this comment.
Sorry @EmergentMonk, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 1 day and 23 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex Please Review this exact SHA 88c105a against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking. This PR implements the current MIDI real-world corpus roadmap item. Review especially: manifest-pinned private corpus identity, standard-library SMF analysis, cross-track polyphony/overlap accounting, the boundary between untouched native MidiLoader import and the deterministic Sampulse audibility projection, raw MIDI/ZIP privacy exclusion, frozen-candidate representative direct-load evidence, and self-contained public component summaries. Original Psycle remains explicitly unobserved/unclassified in this donor-first phase. |
Reviewer's GuideThis PR introduces a private, manifest-bound real-world MIDI corpus lane with standard-library source analysis, native C-Psycle import evidence, a clearly separated deterministic Sampulse execution projection, frozen candidate direct-load observations, privacy-safe artifacts, and a continuously exercised synthetic CI path; all results remain observational with parity_status UNKNOWN. Sequence diagram for MIDI corpus donor observation and playback projectionsequenceDiagram
participant Workflow as PrivateWorkflow
participant Analyzer as phase6c-midi-corpus.py
participant Probe as MidiCorpusProbe
participant Loader as SongReader_MidiLoader
participant Player as Player
participant FileOut as FileOutDriver
Workflow->>Analyzer: prepare-bundle
Analyzer->>Analyzer: parse_smf
Analyzer-->>Workflow: manifest-bound private stems
Workflow->>Probe: process stem
Probe->>Loader: load MThd SMF
Loader-->>Probe: untouched imported tracker graph
Probe->>Probe: digest imported events
Probe->>Probe: attach deterministic Sampulse substrate
Probe->>Player: render 16-beat projection
Player->>FileOut: write transient WAV
FileOut-->>Probe: non-silent render
Probe-->>Workflow: sanitized observation and hashes
Workflow->>Workflow: delete MIDI, ZIP, and WAV bytes
Flow diagram for the MIDI corpus stress progressionflowchart LR
A[FM Doom<br/>gentle baseline] --> B[Celestial Mechanics<br/>older export behavior]
B --> C[Deterministic Pattern<br/>controlled follow-tempo]
C --> D[Blue Glare<br/>dense tempo maps]
D --> E[Polyrhythmic Patterns<br/>overlap and polyphony]
E --> F[NGC3603 Quantum Demoscene<br/>16-channel routing stress]
Flow diagram for continuous synthetic MIDI CI validationflowchart LR
Fixture[Generate SMF1/480 fixture] --> Import[SongReader / MidiLoader]
Import --> Digest[Digest untouched event graph]
Digest --> Project[Project notes to deterministic Sampulse]
Project --> Render[Player -> FileOutDriver]
Render --> Validate[Validate non-silent WAV and contract fields]
Validate --> Delete[Delete transient MIDI and WAV]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88c105ac4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4dfadffdf7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Please Review this exact SHA 460f04f against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking. This head addresses the two latest P1 findings as well: candidate-player identity now includes an immediate clean-rebuild attestation (initial canonical build hash must equal the clean rebuild hash, and this attestation runs in ordinary CI); MidiLoader now flushes pending end-of-track note-offs, and the synthetic SMF runtime contract requires exactly two imported releases before the non-silent projection render. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 460f04f946
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Please Review this exact SHA 5603de2 against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5603de2b31
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Please Review this exact SHA 80ecfb6 against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80ecfb6ef3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Please Review this exact SHA 1b0520c against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b0520c537
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Please Review this exact SHA 274f790 against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 274f7906da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Please Review this exact SHA 798303d against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Implements the next item in
phase6c/LEGACY_PLAYBACK_IMPORT.md: the contributor-supplied MIDI real-world playback corpus.This phase uses the six manifest-pinned SMF stem sets to move from a gentle real-world workload through dense tempo/polyphony/overlap stress and finally full 16-channel routing stress.
The corpus remains external/private. Raw MIDI and ZIP bytes are not committed and are not uploaded as evidence artifacts.
Stress progression
The observation order is frozen as:
Executable corpus contract
phase6c/reference-corpus/manifest.jsonis upgraded to schema v2 and freezes:The Python corpus analyser independently parses SMF1/480 input using only the standard library. It does not normalize the malformed key-signature metadata away.
Native C-Psycle import boundary
C-Psycle has a real
MThd/MidiLoaderSongReader path.For every real stem, the donor lane freezes the untouched imported tracker graph before adding any sound source:
This is native MIDI import evidence, not an extension-only check.
Deterministic execution projection
SMF import does not choose an instrument or instantiate a machine. Therefore successful import alone is not treated as audible playback.
After the untouched graph is digested, the probe attaches one project-owned deterministic classic Sampler substrate:
Player -> FileOutDriverrenders a transient WAV;The projection proves that the imported event graph can execute through the engine. It is explicitly not evidence of native MIDI instrument-selection semantics.
Frozen C++ candidate boundary
The sanitized C++ candidate has internal MIDI-event machinery but no retained SMF loader entry point (
MThd/MidiLoader).The private workflow runs one manifest-bound representative stem from each set against the frozen candidate player and records the scoped direct-load rejection. That boundary says nothing about the candidate's internal MIDI event or plugin support.
Original Psycle boundary
Pinned Psycle 1.12.0 x86 is not observed or classified in this phase.
This is donor-first real-world robustness evidence. Any later original-reference MIDI claim must be a separate version-pinned observation.
All corpus outputs retain
parity_status: UNKNOWN, and no compatibility-matrix row is added or promoted.Private real-corpus workflow
Adds:
.github/workflows/phase6c-midi-corpus-private.ymlManual trigger:
workflow_dispatchRequired masked repository secret:
PSYCLE_PHASE6C_MIDI_CORPUS_URLThe secret points to an outer transport ZIP containing the six exact archive files. The outer ZIP is not authoritative; each inner archive must match its frozen filename and SHA-256.
Each real stem is processed privately. Raw MIDI, ZIP and transient WAV bytes are deleted before artifact upload.
Uploaded artifacts contain only:
midiloader.c;Continuous CI
Ordinary PR CI requires no private corpus.
It creates a project-owned SMF1/480 fixture and runs the same C probe end-to-end through:
The Python contract tests also exercise:
Temporary roadmap
The MIDI phase remains observationally pending until the private workflow is dispatched with
PSYCLE_PHASE6C_MIDI_CORPUS_URL, but the implementation and continuously testable execution path are introduced by this PR.Summary by Sourcery
Introduce a private, identity-bound MIDI corpus lane that validates C-Psycle import robustness and deterministic engine execution without promoting compatibility parity.
New Features:
Bug Fixes:
Enhancements:
Build:
CI:
Documentation:
Tests: