Cubase-MCP-GAJ3T.MusicGen.R.../prompts/report_5.md

334 lines
18 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

```
Step 5 report — versioned profiles and articulation compiler
Date: 2026-10-19
MECHANICS: IMPLEMENTED AND VERIFIED.
FULL STEP 5 PRODUCTION ACCEPTANCE: BLOCKED — authoritative target maps missing.
NATIVE/APPLICATION STATUS: separately unresolved; no native support or acceptance claimed.
READY FOR STEP 6: NO. Passing synthetic mechanics does not close the production gate.
SCOPE AND CHANGED FILES
Created:
- src\riff_groove_builder\profiles.py
- src\riff_groove_builder\articulations.py
- src\riff_groove_builder\data\__init__.py
- src\riff_groove_builder\data\profiles\__init__.py
- tests\unit\test_profiles.py
- tests\unit\test_articulations.py
- tests\integration\test_articulation_midi.py
- tests\fixtures\profiles\synthetic-lead.json
- tests\fixtures\profiles\synthetic-bass.json
- tests\fixtures\profiles\synthetic-drums.json
- docs\articulation-profiles.md
- prompts\report_5.md
Updated:
- README.md
- docs\architecture.md
- docs\compatibility.md
Reused the approved plan, accepted reports 1–4, current strict domain/error
contracts, and reviewed exact MIDI writer/validator. No shared schemas, errors,
MIDI APIs, manifest, dependency constraints, server/CLI, reviewed tool contract,
or prior report required changes.
No delegation, commits, later prompts, text composer, native codecs, service
wiring, or replacement of the development-only unfinished generation handler.
The public stdio profile listing remains honestly empty and generation remains
explicitly unimplemented. Generic compiler APIs are not connected to the tools.
PROFILE API, VALIDATION, AND RESOURCE DECISIONS
Public internal-pipeline APIs:
- parse_profile(str | bytes) -> InstrumentProfile
- checked_profile(InstrumentProfile) -> InstrumentProfile
- load_profile_registry(*, package=..., declared=...) -> ProfileRegistry
- ProfileRegistry.summaries() -> list[ProfileSummary]
- ProfileRegistry.select(parts, ProfileSelection) -> dict[Part, InstrumentProfile]
- compile_score(Score, dict[Part, InstrumentProfile], *, ppq=960) -> EventPlan
Schema version is the exact string "1". Models reuse ContractModel, Part,
Channel, MidiData, RationalBeat, PositiveBeat, ProfileSelection, and the reviewed
ProfileSummary. Profiles declare explicit identity/version/build/preset,
provenance, default status, part/channel, inclusive pitched range or logical
drum voice map, canonical normal technique, aliases, velocity layers, and
typed keyswitch/CC actions. There is no generic plugin framework or executable
settings bag.
JSON parsing rejects duplicate object keys and malformed documents. Strict
models reject unknown fields, invalid numeric types/ranges, inconsistent
identity/provenance/capabilities, ambiguous aliases/voices, invalid controls,
incomplete state declarations, and musical/switch pitch collisions.
Mutable input graphs are defensively revalidated at compiler/registry boundaries.
Test-only profiles require test.* IDs, SYNTHETIC product names, no claimed vendor
sources, and no default flag. The production registry rejects test-only input
instead of advertising it. Verified metadata requires source coverage for
identity, range/voices, channels, actions, state/reset, timing, and velocity,
with matching versions and explicit build/preset. This validates completeness
of an attestation, not the truth of its assertions; human evidence review is
still mandatory. In-memory registry-policy fixtures use clearly marked
TEST-HARNESS references and are not real evidence or packaged mappings.
Production resource manifest:
riff_groove_builder.data.profiles.PROFILE_RESOURCES = ()
Production profile JSON files: ZERO.
Production public summaries: [].
Minimal resource package initializers make the explicit empty registry
wheel-safe. importlib.resources, not cwd-relative filesystem paths, loads the
package and checks its JSON resources against the manifest. An absent/broken
package, missing or undeclared JSON, duplicate manifest entries/IDs/defaults,
invalid maps, corrupt documents, and synthetic leakage are explicit failures,
not empty-registry success.
Selection is deterministic and returns defensive copies. Explicit IDs must
exist and match the requested part. Only an explicitly declared unique verified
default is automatic; even one nondefault requires an explicit choice.
Missing/ambiguous/wrong-part cases use named ProfileRequiredError,
ProfileNotFoundError, AmbiguousProfileError, or ProfilePartMismatchError.
InvalidProfileError/ProfileRegistryError retain SERIALIZATION_ERROR;
ArticulationCompileError and existing timing/writer exceptions cover unsafe
compilation. Unsupported techniques use UnsupportedArticulationError.
Messages are actionable and details contain fixed safe reasons, not raw JSON,
unsupported input text, validation messages, exception causes, or private paths.
VELOCITY, TIMING, STATE, AND ORDERING
Intensity intervals cover 0–1 without gaps/overlap: [low, high), with final
high=1 inclusive. Velocity ranges are positive 1–127, ordered, disjoint, and
monotonic. Within a selected layer, complete linear interpolation rounds to
nearest integer, ties to even. No clamping or guessed layers. Tests cover
both endpoints, internal boundaries, and half-even cases.
Every action lead/gate/release offset is exact rational quarter-note beats.
All declared timing, including unused techniques, must fit the selected PPQ.
Off-grid timing fails through the reviewed beats_to_ticks helper.
Keyswitches declare pulse/hold, note, velocity, positive gate, lead, and release
offset. Pulse releases use gate and cannot declare a separate release offset.
Holds use gate as a minimum positive duration, releasing after the final
compatible active note plus offset. Undersized holds fail, not silently extend.
Latched switches are pulses. CCs declare selection/reset values and timing;
momentary CCs require explicit resets, and latched CCs cannot declare resets.
Latched techniques explicitly cover the same CC set to prevent state leakage.
Each selected part owns one explicit, distinct channel, including empty tracks.
No default channel-9 drum route, GM-as-SD3 map, pitch, controller, or technique
is invented. Voice and articulation resolution uses only the selected map.
Latched selections deduplicate across compatible overlaps and repeated notes
through rests. Controlled overlapping notes must use the same canonical
technique; incompatible overlaps and too-early selection leads fail explicitly.
Velocity-only profiles permit overlapping different techniques without global
control state. Same physical musical-pitch overlaps are never merged away.
Compatible momentary notes form one active interval. Held switches stay active
until its last release; CC selections and pulse switches remain per-note.
Final CC resets/held-switch releases respect declared offsets. Per-note pulses
that overlap the same physical switch fail; exact off/on retrigger boundaries
are preserved.
A momentary overlay establishes the actual declared normal selection first
when needed, finishing positive baseline switch pulses before overlay controls.
After final release/reset, normal is restored using its actual actions, not
a universal invented reset. Setup/restoration needs enough room before later
demands. Ambiguous overlapping state/physical controls fail conservatively.
Raw exact integer schedules determine one common pre-roll:
max(0, -earliest scheduled event). All parts shift equally; Score.start is only
a logical origin. The shared end includes musical duration, physical switch/
reset tails, and declared normal-restoration readiness even when that readiness
occurs after the final physical event.
Same-tick priorities:
0 = musical/switch releases
10 = CC resets
20 = selection/restoration switches and CCs, causally sequenced
30 = musical onsets
Per-track sequences are unique and deterministic. All musical/switch notes have
positive-duration paired releases. The compiler enforces the 100,000-event
budget incrementally, constructs the reviewed EventPlan, and calls
validate_event_plan before returning. Tests accept exactly 100,000 events and
reject overflow. No success-shaped fallback hides errors.
REAL MIDI AND WHEEL EVIDENCE
The synthetic three-part integration score uses logical origin 2 beats,
arbitrary channels 2/5/12, overlapping compatible palm-muted lead/bass/drum
notes, explicit normal restoration, and boundary musical retriggers.
Independent hand-derived absolute event lists check every compiled event and
the real saved file parsed by Mido. Expected common boundaries:
- musical_start_tick = 120
- musical_end_tick = 3960
- shared end_tick = 4020
Tests check note/keyswitch pairing and positive durations, channels, velocity,
CC selections/resets, event ordering, conductor tempo, all track EOTs, actual
saved-content validation, and repeat output byte equality with tested Mido.
These arbitrary fixture values are NOT real Eclips/Ray/SD3 or GM evidence.
All prior independent MIDIUtil writer/read-back regressions also pass unchanged.
The new wheel test builds sdist then wheel offline with --no-isolation, installs
the wheel offline with --no-deps into a unique target, and probes both that
installation and direct wheel-ZIP resource loading from outside the checkout.
Probes use -I -B and the existing development runtime dependencies; they prove
resource/import layout, not every dependency version or a clean full dependency
installation. They verify the imported profiles module location, package
initializers, empty manifest/JSON set, empty summaries, and typed missing map.
Final focused probe evidence:
cwd: D:\_Repos\Code\GAJ3T\MCPs\MusicGen
isolated: 1
profiles: []
installed module:
.test-artifacts\articulation-caf1de20694445e99ca53ec51b44680f\installed\riff_groove_builder\profiles.py
ZIP module:
.test-artifacts\articulation-caf1de20694445e99ca53ec51b44680f\dist\gaj3t_musicgen_riff_groove_builder-0.1.0-py3-none-any.whl\riff_groove_builder\profiles.py
Both locations were actual wheel contents, not source/editable profile imports.
Their unique workspace was removed after the checks. Existing distribution
tests additionally build/install an isolated package-only wheel venv and check
silent initializer imports outside the checkout.
BOUNDED PUBLIC OFFICIAL EVIDENCE CHECK
Exactly three unauthenticated public official URLs were fetched on 2026-10-19:
1. https://www.amplesound.net/en/manual.asp
Returned only "amplesound.net", not usable mapping documentation.
No exact Eclips/Ray edition/build, numeric ranges, switches, channels,
timing, CC/reset rules, or velocity-layer evidence was obtained.
2. https://www.toontrack.com/manual/superior-drummer-3/
Page states login is required to view Toontrack manuals.
No credentials, authentication, or access bypass was attempted.
No usable selected SD3 mapping/build/library/preset details were obtained.
3. https://www.toontrack.com/product/superior-drummer-3/
Retrieved trademark/registered-design notices, not the required numeric map,
switching semantics, or installed preset/library/build information.
Research stopped there rather than guessing URLs or spending the session on
unresolved documentation. Existing evidence and prior reports likewise contain
no verified target map. No private files/code/credentials were sent to third
parties; no licensed manual was copied or user fixture uploaded.
Finding: production mapping evidence remains unresolved. ZERO production
profiles were invented. Passing synthetic mechanics cannot establish actual
target compatibility, close the production gate, or authorize native_available.
EXACT VERIFICATION COMMANDS AND OUTCOMES
Environment: repository .venv; Windows AMD64; CPython 3.13.13.
Existing tested environment: Pydantic 2.14.1, Mido 1.3.3, MIDIUtil 1.2.1,
MCP 1.30.0, pytest 9.1.1, Ruff 0.17.1, mypy 2.4.0.
No dependency manifests changed and no runtime/dev dependencies were installed
or restored. Package-only offline wheel installation occurred inside tests.
Other runtimes, OSes, vendor instruments, and dependency versions were not run.
Commands ran from the repository root. Repository-local scratch setup:
$scratch = New-Item -ItemType Directory -Force '.test-artifacts\scratch'
$env:TEMP = $scratch.FullName
$env:TMP = $scratch.FullName
$env:TMPDIR = $scratch.FullName
$env:PIP_NO_INDEX = '1'
Final focused new tests:
& '.\.venv\Scripts\python.exe' -m pytest tests\unit\test_profiles.py tests\unit\test_articulations.py tests\integration\test_articulation_midi.py -q -s --tb=short
PASS: 137 passed in 9.11s; 0 failed, 0 skipped; no warnings reported.
Includes real MIDI disk read-back and built-wheel installed/ZIP resource probes.
Used the explicitly authorized known-working repository-venv pytest fallback;
no editor test-discovery pass is claimed.
Directly affected accepted regressions:
& '.\.venv\Scripts\python.exe' -m pytest tests\unit\test_midi.py tests\integration\test_midi_files.py tests\unit\test_schemas.py tests\unit\test_errors.py tests\integration\test_contracts.py tests\unit\test_server.py tests\integration\test_stdio.py tests\unit\test_package.py tests\integration\test_distribution.py -q --tb=short
PASS: 515 passed in 22.01s; 0 failed, 0 skipped.
Includes all accepted MIDI, contract/error, real stdio/unfinished-handler,
package, and distribution checks.
Final complete current suite:
& '.\.venv\Scripts\python.exe' -m pytest -q --tb=short
PASS: 652 passed in 30.88s; 0 failed, 0 skipped; no warnings reported.
All 515 prior regressions and 137 new checks pass together on final code.
& '.\.venv\Scripts\python.exe' -m ruff check .
PASS: All checks passed!
& '.\.venv\Scripts\python.exe' -m ruff format --check .
PASS: 38 files already formatted.
& '.\.venv\Scripts\python.exe' -m mypy
PASS: Success: no issues found in 22 source files.
& '.\.venv\Scripts\python.exe' -m pip check
PASS: No broken requirements found.
git --no-pager diff --check
PASS: no tracked-diff whitespace errors. Existing work is untracked; full Ruff
checks additionally cover the new Python files rather than relying on git diff.
Editor problems queries: no errors in both new source modules and all three
new test modules. Strict lint/type configuration was not weakened.
Formatting command used during implementation:
& '.\.venv\Scripts\python.exe' -m ruff format src\riff_groove_builder\profiles.py src\riff_groove_builder\articulations.py tests\unit\test_profiles.py tests\unit\test_articulations.py tests\integration\test_articulation_midi.py
Resource initializers were also included in the initial formatting pass.
ISSUES AND CORRECTIONS
The initial focused run passed 122 tests. Early static checks found union-list
attribute inference, test exception-variable inference, invariant note-list
typing, formatting/line lengths, and one missing explicit zip(strict=False).
These were fixed with precise annotations, distinct variable names, and normal
formatting; no broad suppressions or checker relaxation.
Additional inspection and regressions tightened disjoint velocity ranges,
complete half-even interpolation rather than rounding only the velocity offset,
mutated-profile serialization safety, selection-part validation, and shared
end coverage for normal-restoration readiness after the last physical event.
Expanded focused runs passed 135, then final 137 tests; the earlier complete
650-test run was superseded by the final 652-test run above.
An early direct-wheel build left an ignored root build directory. The wheel
test now builds through the sdist with all intermediates in its unique local
scratch workspace; the owned root build directory was removed. Final inspection:
- remaining owned articulation/distribution/MIDI/stdio test workspaces: 0
- root build directory present: false
- remaining matching repository Python test child processes: 0
- production profile JSON count: 0
Pre-existing venv, scratch, caches, and dist products were preserved.
No background services were started. Test subprocess waits are bounded and
unique workspaces are removed in fixture finally cleanup.
PRECISE PRODUCTION/NATIVE BLOCKERS AND READINESS
To close full Step 5 production acceptance, obtain lawful authoritative evidence
and reviewable provenance for EACH requested real target:
- exact Eclips/Ray vendor product name, edition and installed build/version;
- exact SD3 installed build, library, active map and mapping/preset version;
- numeric playable ranges or every logical drum voice's physical MIDI number;
- actual zero-based channels and channel-state assumptions;
- canonical techniques/aliases, numeric keyswitches and positive velocities;
- latch/hold/momentary behavior, retrigger/polyphony constraints and normal state;
- CC selections, reset values, interaction rules and normal-restoration actions;
- explicit lead/gate/release/reset timing representable at selected PPQ;
- complete velocity-layer boundaries and intensity behavior;
- source/version/permission records and target-behavior verification.
Octave labels alone, assumed GM maps, generic product pages, and synthetic
values do not satisfy those requirements. Metadata attestations do not replace
review of the underlying evidence. No such evidence was fabricated here.
Native gates remain independently OPEN: AGP/SDP musical-content semantics,
supported layouts/versions, lawful controlled exports/permission or local-only
procedures, and real plugin/Cubase load/save/reload acceptance. Native files
were not generated. No application acceptance test ran or was counted as a
passing automated test or skip. MIDI mapping evidence alone could not close
those native gates.
Conclusion:
- Generic versioned profile/articulation compiler mechanics: VERIFIED.
- Full Step 5 production acceptance: BLOCKED by missing real mapping evidence.
- Production registry: explicitly and reliably EMPTY, including built wheels.
- Native and actual application compatibility: UNVERIFIED, separately gated.
- Ready for Step 6: NO. Stop here; no later prompt or implementation started.
```