146 lines
7.7 KiB
Markdown
146 lines
7.7 KiB
Markdown
# Step 9: Publish and verify the usable local MCP executable
|
|
|
|
## Objective, prerequisites and honest completion boundary
|
|
|
|
Read the updated [plan](plan.md), [Step 8 report](report_8.md), latest profile
|
|
report and current source/tests.
|
|
|
|
Accepted supported slice: two real MCP tools, documented AGLP/AME Lead MIDI
|
|
generation, explicit native fallback, seven identities/five unavailable mappings,
|
|
and 868 passing tests. Step 8 report/code was reviewed; 272 targeted tests passed
|
|
independently. Native Steps 6/7 remain blocked, not completed.
|
|
|
|
Publish a self-contained Windows x64 local executable and verify real stdio
|
|
generation from that published executable. Provide copyable local-client setup
|
|
and a retained generated MIDI example. This is a supported-slice deployment,
|
|
not a false claim that all products/native formats/application checks passed.
|
|
|
|
Execute only this step. Preserve existing work. Do not change orchestrator
|
|
prompts/plan, create later prompts, commit, delegate, install products, add HTTP/
|
|
containers/audio/CLI generation features, invent mappings/native output or
|
|
modify user VS Code/global MCP settings.
|
|
|
|
## Files/artifacts to create or modify
|
|
|
|
```text
|
|
src\GAJ3T.MusicGen.RiffGrooveBuilder.Server\
|
|
Properties\PublishProfiles\win-x64.pubxml
|
|
GAJ3T.MusicGen.RiffGrooveBuilder.Server.csproj # Only if required for publication
|
|
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\
|
|
Publishing\PublishedServerTests.cs
|
|
Stdio\McpProcess.cs # Reuse/extend existing harness
|
|
docs\local-deployment.md
|
|
docs\format-compatibility.md
|
|
README.md
|
|
prompts\report_9.md
|
|
artifacts\publish\win-x64\ # Ignored generated publication
|
|
artifacts\examples\ame-lead-example.mid # Actual generated example, not vendor data
|
|
```
|
|
|
|
Small necessary test/script helpers are allowed. No production package upgrade
|
|
or new project. Dependency locks may change only through restore if RID-specific
|
|
assets truly require it; retain exact existing package versions.
|
|
|
|
## Publish configuration and execution
|
|
|
|
- Keep the existing assembly/executable name so known test/client paths stay
|
|
consistent. Use Microsoft.NET.Sdk/net10.0/OutputType=Exe, no web SDK.
|
|
- Profile: Release, win-x64, SelfContained=true, PublishSingleFile=true,
|
|
PublishTrimmed=false, PublishAot=false, UseAppHost=true,
|
|
IncludeNativeLibrariesForSelfExtract=true.
|
|
- Embed existing catalogs and preserve cwd-independent resource loading.
|
|
Verify the pinned DryWetMIDI package deployment instead of assuming native
|
|
extraction/device dependencies irrelevant. Do not use playback/device APIs.
|
|
- Publish into the explicit artifacts\publish\win-x64 directory. Inspect any
|
|
existing output before cleanup; do not recursively remove broad directories
|
|
or delete unrelated files. Build-tool overwrite of its own publication files
|
|
is normal; no indiscriminate repository/global cleanup.
|
|
- Restore only when changed manifests or the actual publish command requires
|
|
missing RID assets/runtime packs. Do not change system SDK/global PATH.
|
|
|
|
Expected reproducible command:
|
|
|
|
```powershell
|
|
dotnet publish .\src\GAJ3T.MusicGen.RiffGrooveBuilder.Server\GAJ3T.MusicGen.RiffGrooveBuilder.Server.csproj -p:PublishProfile=win-x64 -o .\artifacts\publish\win-x64
|
|
```
|
|
|
|
## Real published-process checks
|
|
|
|
- Reuse the process/test harness to target an explicit published executable
|
|
path. Any optional test-only path override must remain test infrastructure,
|
|
not an application CLI/runtime configuration feature.
|
|
- Launch from an unrelated existing working directory, with redirected streams,
|
|
bounded timeouts, concurrent draining and cleanup scoped to owned processes.
|
|
- Initialize MCP, discover exactly two tools, list seven instruments/two
|
|
Documented profiles, and generate with explicit admitted AME or AGLP profile.
|
|
- Request MIDI-only with fallback=false and inspect the actual returned file
|
|
using DryWetMIDI: type1/960 PPQ, conductor/Lead, tempo/meter, 32 expected notes,
|
|
switch26 on0/off30, shared lead-in120 and end15480 for the standard PM example.
|
|
- Check native-request fallback produces one MIDI, disabled fallback produces
|
|
failure/no output, unavailable selected roles remain explicit, and existing
|
|
files are preserved. Stdout must contain protocol messages only.
|
|
- Confirm no source-tree loose DLL/catalog/cwd dependency is used at runtime.
|
|
If possible, launch a copy of the publish payload in an isolated task-owned
|
|
directory without build outputs to prove packaging rather than cwd luck.
|
|
- Document extraction/sidecars/symbols and OS/architecture assumptions. No
|
|
long-lived helper/server should be left running after validation.
|
|
|
|
## Retained example
|
|
|
|
Through the actual published stdio tool, generate a fresh example using:
|
|
|
|
- description: `4 bars at 120 BPM in E minor, 4/4: palm-muted eighth-note lead`
|
|
- formats: `["mid"]`
|
|
- explicit profile: `ample-ame-documented-defaults-2026-10-20`
|
|
- fallbackToMidi: false
|
|
- output: the explicit repository artifacts\examples directory
|
|
- projectName: `ame-lead-example`
|
|
|
|
Retain that generated file as a demonstration the owner can import, with its
|
|
Documented compatibility warning and no claim of actual Cubase/VST acceptance.
|
|
Verify read-back with the existing DryWetMIDI test infrastructure, not a second
|
|
handwritten parser. Never overwrite an existing user example blindly; if the
|
|
destination already exists, preserve it and choose/report a distinct new stem.
|
|
No fake/vendor MIDI or native fixture is to be copied into this deliverable.
|
|
|
|
## Local client instructions
|
|
|
|
- Document the absolute published executable command, stdio transport, no HTTP
|
|
URL, no shell wrapper requirement, and explicit profile selection.
|
|
- Include a copyable VS Code MCP configuration example (servers/type=stdio/
|
|
command/args) and tool arguments for the supported MIDI-only example.
|
|
- Do not edit .vscode/mcp.json, user/global settings or register/start a service.
|
|
- Clearly state current capability limits: AGLP/AME documented-default Lead only,
|
|
five unavailable mappings, no AGP/SDP writer, default native formats trigger
|
|
explicit MIDI fallback, and documented mappings are not application-Verified.
|
|
- Explain ordinary launch/shutdown (client owns stdin/EOF/process), collisions,
|
|
cancellation boundary, output location and troubleshooting via stderr.
|
|
|
|
## Runtime-free and application acceptance
|
|
|
|
Self-contained publish must include its runtime, but running on the SDK machine
|
|
alone is NOT proof of a runtime-free Windows environment. Inspect publication
|
|
and, if useful, host tracing to distinguish bundled runtime use; do not present
|
|
setting DOTNET_ROOT to a fake path as equivalent to removing system runtimes.
|
|
|
|
If no matching runtime-free machine is available, explicitly mark that check
|
|
pending. Likewise do not claim Cubase/Ample/SD3 import, audible playback or native
|
|
reopen was tested without actually having and operating those applications.
|
|
Do not install a container, VM, vendor product or system-wide dependency to
|
|
simulate those checks in this step.
|
|
|
|
## Validation and mandatory report
|
|
|
|
Run focused published-process tests with the actual published payload, then
|
|
Release solution build, the complete suite and locked restore. Record the
|
|
reproducible publish/test commands, actual file list/size, example read-back,
|
|
process readiness/exit evidence and any missing checks.
|
|
|
|
When complete, write your end-of-step report to ./prompts/report_9.md including: what was implemented, test results (pass/fail with details), any issues encountered, and whether you're ready for the next step
|
|
|
|
Exactly one plain triple-backtick fence encloses the entire report. Distinguish
|
|
supported-slice publication success from full requested-product completion.
|
|
Include exact artifact/example paths, commands/counts, architecture/extraction
|
|
facts and all runtime-free/licensed-app/native/mapping limitations.
|
|
Stop after the report for review; do not start further work.
|