223 lines
15 KiB
Markdown
223 lines
15 KiB
Markdown
```
|
|
STEP 8 REPORT — Supported MCP MIDI / explicit native-fallback slice
|
|
Date: 2026-10-20
|
|
|
|
SUPPORTED-SLICE IMPLEMENTATION / AUTOMATED VALIDATION: PASS.
|
|
READY FOR ORCHESTRATOR REVIEW: YES.
|
|
FULL REQUESTED-PRODUCT / NATIVE / APPLICATION READINESS: FALSE / BLOCKED.
|
|
Steps 6/7 remain blocked, not completed. Publishing and application acceptance
|
|
were not started. Stop here for orchestrator review.
|
|
|
|
IMPLEMENTED
|
|
- Production registers exactly list_instrument_profiles and generate_project.
|
|
Empty and synthetic test registries remain supported; existing lifecycle,
|
|
framing, cancellation, admission, internal-error logging and stdout behavior
|
|
are preserved.
|
|
- Added dependency-free typed Core request/result/discovery DTOs. Tool schemas
|
|
use explicit required inputs, fixed objects with additionalProperties:false,
|
|
string enums, nonempty unique formats, non-null supplied optional fields and
|
|
strict nested profile objects. Runtime validation matches these constraints,
|
|
including exact enum casing and duplicate rejection.
|
|
- Kept the existing typed registry/serializer. Added only input-schema override,
|
|
raw-argument validation and output-schema refinement hooks, plus camel-case
|
|
string-enum serialization. Output schemas include required nullable failure
|
|
fields and a conditional success/failure constraint. Successful results require
|
|
composition/timing, artifacts/targets and no errors; failed results have no
|
|
artifacts and nonempty errors. Artifact byte counts must be positive.
|
|
- structuredContent and the single text JSON content entry match exactly.
|
|
isError is true only for failed results, never complete/explicit MIDI fallback.
|
|
Contract errors remain JSON-RPC -32602; unexpected errors remain logged -32603.
|
|
|
|
DISCOVERY / EVIDENCE / SELECTION
|
|
- Discovery returns seven declared identities and the two admitted Documented
|
|
Lead profiles, with role filters retaining unavailable targets:
|
|
ample-aglp-documented-defaults-2026-10-20
|
|
ample-ame-documented-defaults-2026-10-20
|
|
- Includes stable/vendor/product identity, documentation URL, instrument/profile
|
|
binding, honest product/version and mapping revision, playable range/channel,
|
|
articulation mechanisms and constraints, evidence and immutable compatibility
|
|
notes. No synthetic fixture is exposed.
|
|
- MIDI writer capability is implemented; AGP/SDP writers are unavailable.
|
|
Native/application compatibility remains unverified, not application-tested.
|
|
- Every Documented generation includes a source-only, NOT installed/application-
|
|
verified warning carrying the exact version, configuration, routing and timing
|
|
compatibility notes. Writer timing remains engineering policy, not certified
|
|
plugin latency or a vendor minimum.
|
|
- No automatic role profile defaults or instrument substitutions. Missing Lead
|
|
selection lists both available IDs. Missing Bass/Drums mappings fail the whole
|
|
arrangement; unknown/wrong-role and unselected-role profiles also fail.
|
|
ABJ, AGM, AGT, AMR and SD3 remain unmapped and visible.
|
|
|
|
GENERATION / FALLBACK / FILESYSTEM
|
|
- Actual pipeline: bounded text parser/composition planner -> admitted explicit
|
|
catalog selection -> existing articulation planner -> real safe MIDI writer.
|
|
No text grammar, profile values, native codecs or mappings were invented.
|
|
- Omitted formats use applicable native formats plus MIDI. Lead-only therefore
|
|
means AGP+MIDI, not an inapplicable SDP request.
|
|
- Applicable native requests with fallbackToMidi=true (the default) produce one
|
|
complete combined MIDI artifact, status=fallback, per-native-target reasons
|
|
and native-unavailable warnings. Explicit MIDI reuses that file.
|
|
- Disabled native fallback fails preflight with no directory/artifact.
|
|
MIDI-only works with fallback=false and status=complete.
|
|
Inapplicable formats are errors, not fallback opportunities.
|
|
- Result targets cover every applicable selected-role/requested-format pair,
|
|
carrying instrumentId/profileId, outcome, actual paths and diagnostics.
|
|
All failures have no usable artifact paths or partial success.
|
|
- Output is <projectName>.mid, using the existing type-1/960-PPQ conductor plus
|
|
selected named role tracks. Source pitches/velocities and controls survive.
|
|
- Extracted genuinely shared filename validation for service and MIDI writer:
|
|
reject traversal/separators, reserved Windows devices (including superscript
|
|
device digits), alternate streams, control characters and trailing dot/space.
|
|
Absolute output directories reject traversal and device syntax, including
|
|
alternate separator forms.
|
|
- Extracted shared MIDI meter/global-extent capability preflight within
|
|
MidiFileBuilder, used by service and builder before directory creation.
|
|
/256 and oversized four-byte SMF deltas fail explicitly, never trigger fallback.
|
|
No duplicate MIDI construction or speculative multi-output transaction layer.
|
|
- Only after semantic/profile/format preflight is the explicit directory created.
|
|
Existing writer stages with CreateNew beside the destination and publishes
|
|
File.Move(overwrite:false). Existing files, directory collisions and races are
|
|
preserved. Failure/cancellation cleans only request-owned staging.
|
|
A directory created before an I/O failure may remain empty; unrelated
|
|
directories/files are not recursively removed.
|
|
- I/O/access errors return actionable failed results, never fallback success.
|
|
Unexpected failures propagate to the existing logged internal-error boundary.
|
|
Existing writer cleanup/close aggregation remains intact.
|
|
|
|
RESPONSIVENESS / CANCELLATION
|
|
- GenerationService.GenerateAsync schedules parsing/planning and all synchronous
|
|
filesystem/DryWetMIDI work on a worker, off the transport reader. Discovery also
|
|
runs its handler work off that reader.
|
|
- Deterministic blocked synchronous-work tests prove ping responses and
|
|
cancellation can be read before generation completes. Unexpected worker errors
|
|
are logged and do not corrupt protocol output.
|
|
- Cancellation propagates, prevents publication when observed beforehand and
|
|
leaves no request artifact/stage. Existing writer tests exercise cancellation
|
|
during synchronous serialization and cleanup.
|
|
- DryWetMIDI serialization has no token API and cannot be interrupted internally;
|
|
checks occur around it and before publication. Publication remains the commit
|
|
point: cancellation racing after the final check/move does not undo that file.
|
|
EOF cancels active requests; clients must keep stdin open until responses.
|
|
|
|
REAL SUBPROCESS RPC / FILE READ-BACK EVIDENCE
|
|
- Tests launch the actual Release Server apphost from an unrelated existing OS
|
|
working directory, initialize MCP 2025-11-25, discover both schemas, list real
|
|
profiles and invoke generate_project with description:
|
|
palm-muted eighth-note lead
|
|
- Five real successful file cases:
|
|
AME formats=[mid], fallback=false -> complete
|
|
AGLP formats=[mid], fallback=false -> complete
|
|
AGLP formats=[agp], fallback=true -> fallback
|
|
AME formats=[agp,mid], fallback=true -> fallback
|
|
AGLP formats omitted, fallback=true -> fallback (AGP+MIDI targets)
|
|
- Each response identifies exactly one existing 371-byte .mid, with matching
|
|
absolute path/byte count/profile ID/role, source-only warnings and per-target
|
|
outcomes. No .agp/.sdp/duplicate .mid placeholder is created.
|
|
- Example actual native-only fallback path from the detailed evidence run:
|
|
D:\_Repos\Code\GAJ3T\MCPs\MusicGen\GAJ3T.MusicGen.Riff-Groove-Builder.Net\tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\bin\Release\net10.0\rpc-generation-9f89f26e1c5f47caa8882656a55c3357\rpc-song.mid
|
|
SHA256:
|
|
6F5791FB5C3A7A17E54AAF6436963E4D5723FB948057585060C09BF9B2AFCA3E
|
|
All five files have this same content hash for the common supported PM case;
|
|
the selected product/profile remains explicit in response metadata/warnings.
|
|
- DryWetMIDI.Read with stored EOTs and missing-EOT abort verifies:
|
|
SMF type 1, 960 PPQ; exactly Conductor and Lead;
|
|
tick-zero 500000 microseconds/quarter (120 BPM), 4/4 metadata;
|
|
32 pitch-64 velocity-96 musical notes on zero-based channel 0;
|
|
starts 120 + 480*i, each duration 480, i=0..31;
|
|
one PM26/velocity100 keyswitch at tick0, paired explicit release at30;
|
|
66 channel events, explicit zero-release-velocity note-offs, no stuck notes;
|
|
shared lead-in120, musical extent15360, two EOTs at15480.
|
|
- Additional actual RPC cases cover role-filter discovery, missing/wrong-role/
|
|
unselected profiles, unavailable selected roles, disabled fallback, inapplicable
|
|
formats, invalid text/path/name/contracts, MIDI limits, existing-file protection,
|
|
read-ahead cancellation and subsequent ping. Protocol-only stdout and bounded
|
|
process-owned cleanup remain enforced.
|
|
- Tests read files while present, then delete only their own checkout-local test
|
|
directories. The example path is evidence of an actual completed run, not a
|
|
promised retained artifact. No vendor/native fixtures or generated files are
|
|
retained.
|
|
|
|
CHANGED FILES (21 Step 8 deliverables, including this report)
|
|
README.md
|
|
docs\mcp-protocol.md
|
|
docs\format-compatibility.md
|
|
docs\articulation-mappings.md
|
|
docs\text-description-contract.md
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Generation\GenerateProjectRequest.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Generation\GenerationResult.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\Generation\ProfileCatalogResult.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\GenerationService.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Output\OutputPath.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Midi\MidiFileBuilder.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\Midi\MidiFileWriter.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Server\Program.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Server\Tools\MusicGenTools.cs
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Server\Tools\McpToolDefinition.cs
|
|
tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\Generation\GenerationServiceTests.cs
|
|
tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\Protocol\MusicGenToolsTests.cs
|
|
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\Stdio\McpGenerationTests.cs
|
|
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\Stdio\McpProtocolTests.cs
|
|
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\Stdio\McpProcess.cs
|
|
prompts\report_8.md
|
|
|
|
EXACT FINAL VALIDATION COMMANDS / COUNTS
|
|
Repository root, installed SDK 10.0.400, unchanged DryWetMIDI [8.0.3].
|
|
Each dotnet shell used these process-local settings:
|
|
$env:PATH = 'C:\Program Files\dotnet;' + $env:PATH
|
|
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
|
$env:DOTNET_NOLOGO = '1'
|
|
|
|
1. dotnet test .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-restore --filter 'FullyQualifiedName~.Generation.|FullyQualifiedName~MusicGenToolsTests|FullyQualifiedName~McpGenerationTests|FullyQualifiedName~McpProtocolTests|FullyQualifiedName~.Midi.' --verbosity minimal
|
|
PASS, exit0: 208 unit + 64 integration = 272; 0 failed, 0 skipped.
|
|
2. dotnet build .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-restore --verbosity minimal
|
|
PASS, exit0: all five projects; 0 warnings, 0 errors.
|
|
3. dotnet test .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-build --verbosity minimal
|
|
PASS, exit0: 780 unit + 88 integration = 868; 0 failed, 0 skipped.
|
|
Accepted baseline714 retained; net +154 (122 unit, 32 subprocess integration).
|
|
4. dotnet restore .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx --locked-mode --verbosity minimal
|
|
PASS, exit0: all five projects up to date; unchanged manifests/locks/versions.
|
|
5. dotnet test .\tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests.csproj -c Release --no-build --filter FullyQualifiedName~RealRpcGeneratesReadableDocumentedMidiAndOneHonestFallbackArtifact --logger 'console;verbosity=detailed'
|
|
PASS, exit0: 5 passed, 0 failed/skipped; printed actual paths, 371-byte counts,
|
|
hashes and read-back facts above.
|
|
6. git --no-pager diff --check
|
|
PASS, exit0 before report; report-only addition rechecked afterward.
|
|
|
|
DEVELOPMENT CORRECTIONS / OTHER VALIDATION
|
|
- Editor runTests reported "No tests found"; used the established dotnet CLI
|
|
fallback. This editor result is not counted as passing tests.
|
|
- Initial focused unit command:
|
|
dotnet test .\tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests.csproj -c Release --no-restore --filter 'FullyQualifiedName~.Generation.|FullyQualifiedName~MusicGenToolsTests' --verbosity minimal
|
|
First attempt: compile failure CS9007 in two new raw interpolated JSON test
|
|
strings; replaced them with JsonSerializer-built envelopes.
|
|
Next attempt: 110 passed/2 failed, because two new limit tests incorrectly used
|
|
"in" before a numeric meter. Corrected tests to the unchanged documented grammar.
|
|
- First combined focused build/test attempt:
|
|
dotnet test .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-restore --filter 'FullyQualifiedName~.Generation.|FullyQualifiedName~MusicGenToolsTests|FullyQualifiedName~McpGenerationTests|FullyQualifiedName~McpProtocolTests|FullyQualifiedName~MidiFileWriterTests' --verbosity minimal
|
|
Unit139 passed; integration compilation failed CS8604 in a new source-note
|
|
assertion. Made the asserted source-note string explicitly non-null.
|
|
- All above failures were corrected; later focused runs passed before further
|
|
coverage expansion, and final commands1-5 passed after the last source/test edit.
|
|
- Editor problems over src/tests: no errors. Core csproj still contains zero
|
|
PackageReference/ProjectReference elements. No package/project/lock changes.
|
|
- Final cleanup audit checks src/tests for .mid/.midi/.agp/.sdp/.stage files and
|
|
owned generation/music-tools/rpc-generation test directories.
|
|
- Existing source-backed profile work and all other pre-existing modifications,
|
|
including prompts\plan.md, prompts\report_4.md, prompts\step_4_fix.md and the
|
|
existing prompts\step_8.md, were preserved. No orchestration prompt/plan edits.
|
|
|
|
SCOPE / REMAINING BLOCKERS / STOP
|
|
- Supported explicit AGLP/AME Lead MIDI and native-fallback MCP slice is usable
|
|
and ready for orchestrator review, not full-scope application readiness.
|
|
- Five mappings remain unavailable: ABJ/AMR numeric anchors and relevant PM
|
|
thresholds, AGM/AGT product-specific numeric anchors, SD3 authorized selected
|
|
library/map/controller scope. No Bass/Drums substitute or GM guess was added.
|
|
- AGP/SDP authorized codecs/fixtures and exact native-extension/import semantics
|
|
remain unresolved. No native writer or native-success claim exists.
|
|
- No VST/Ample/SD3/Cubase import, audible/application verification, exact installed
|
|
version acceptance, runtime-free deployment or publishing was performed.
|
|
Source Documentation, RPC execution and MIDI file read-back are not those gates.
|
|
- No new package/project, public CLI generation command, VST scanning/loading,
|
|
native format, publishing, commit or delegation. No later worker step started.
|
|
- STOP after this report for orchestrator review.
|
|
```
|