``` Step 7 report — honest Ample AGP capability and require boundary Date: 2026-10-19 SOFTWARE CAPABILITY OUTCOME: PASS — implemented, persistent and verified. REAL NATIVE AGP ACCEPTANCE: BLOCKED — no actual layout, codec or native fixtures. NATIVE ROUND TRIPS / ECLIPS-RAY APPLICATION ACCEPTANCE: UNRUN, not passing. SCOPE AND FILES Executed prompts\step_7.md under the amended functional-MIDI continuation decision. Read reports 1–6, including report_5_fix.md, the current strict profile/summary/error APIs, related architecture/compatibility records, and the supplied official-document/demo-archive evidence observations. Created: - src\riff_groove_builder\formats\__init__.py - src\riff_groove_builder\formats\agp.py - tests\unit\test_agp.py - tests\integration\test_agp_capability.py - prompts\report_7.md Updated: - docs\formats\agp.md - docs\compatibility.md - docs\architecture.md No existing source/test/profile/resource/error/schema API was changed. Prior reports, the amended plan and unrelated pre-existing worktree content were preserved. No commits, delegation, later prompts, SDP implementation, service wiring, dependency installation/restoration or manifest changes. No native writer/parser, fake native success API or generic exporter framework. IMPLEMENTED CONTRACT formats.NativeCapability is a frozen/slotted concrete dataclass with exactly: - part: Part - format: Literal["agp", "sdp"] - available: bool - reason: str The shared value type does not implement SDP or register any codec. The result is not an output artifact, path or caller-supplied authorization. formats.agp exposes: - check_agp_capability(part: Part, profile: InstrumentProfile) -> NativeCapability - require_agp_capability(part: Part, profile: InstrumentProfile) -> NativeCapability Both reject requests other than lead/bass, revalidate the whole mutable profile through checked_profile, enforce existing target/part/format associations, and reject a valid profile belonging to the wrong part. No path is accepted. Check returns only an immutable capability value, never an artifact path. For every valid matching lead/bass profile: part = requested part format = "agp" available = false reason = "agp_layout_not_established" This remains true for standard profiles, instrument mapping fixtures and mapping-attestation metadata. Neither mapping_kind, product/version strings nor mapping provenance establishes a native codec. The current profile model already rejects native_available=true; mutation/unchecked copies do not bypass that validation. No shared profile rules were weakened. Require performs a fresh check and raises NativeFormatUnavailableError: code = NATIVE_FORMAT_UNAVAILABLE details = { "format": "agp", "part": "lead" or "bass", "reason": "agp_layout_not_established" } Other failures are not mislabeled native-unavailable: - Bad/drum part: InvalidRequestError / INVALID_REQUEST, fixed reason=unsupported_agp_part and format=agp. - Valid wrong-part profile: ProfilePartMismatchError / PROFILE_REQUIRED, reason=wrong_part with requested part and format. - Wrong model type, corrupt/mutated profile or inconsistent target/format: InvalidProfileError / SERIALIZATION_ERROR, reason=invalid_profile_model. - Unexpected programming failures propagate; no catch-all fallback conversion. Future callers must preflight before preparing/touching output paths. Only the named unavailable condition can inform allowed, explicitly reported MIDI fallback. Invalid requests/profiles and actual serialization/IO failures cannot be hidden. Fallback policy, warnings, staging/publication and MCP integration are not implemented by this step; Step 3 handlers remain unchanged. TEST COVERAGE AND OBSERVED EFFECTS 68 new unit cases: - Typed explicit lead/bass results, immutability and repeatability. - Standard/native-false and instrument/unknown-layout results. - Mapping attestation and native metadata cannot enable a codec. - Safe named unavailable context. - Invalid/drum parts, wrong-target/part profiles, wrong model types. - Deep mutation of range/aliases/provenance, inconsistent native target/format, invalid channel/schema, unchecked copies and incomplete constructed models. - Fresh require validation after an earlier check and propagation of unexpected validation failures rather than fallback success. 6 new integration cases: - Real production registry selection for lead/bass. - Guarded pathlib open/mkdir/touch/read/write/stat/rename/replace/unlink, builtins.open and os.open: no calls during capability/require. - Empty output stays empty; nonexistent child directory stays absent. - Existing AGP-named sentinel retains bytes, identity, size and mtime. This operator-data sentinel is explicitly NOT a native AGP fixture. - Corrupt profile leaves existing output intact. - Explicit independent Standard MIDI composition/compilation writes and validates real MThd .mid bytes; no .agp file or fake artifact path. VERIFICATION COMMANDS AND EXACT FINAL RESULTS Environment: repository .venv, Windows AMD64, CPython 3.13.13. Observed installed versions: Pydantic 2.14.1, Mido 1.3.3, pytest 9.1.1, Ruff 0.17.1 and mypy 2.4.0. Only this interpreter/OS/dependency configuration was executed. Repository-local scratch setup for pytest/build subprocesses: $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' Focused new tests: & '.\.venv\Scripts\python.exe' -m pytest tests\unit\test_agp.py tests\integration\test_agp_capability.py -q --tb=short PASS: 74 passed in 0.30s; 0 failed, 0 skipped. Relevant accepted regressions: & '.\.venv\Scripts\python.exe' -m pytest tests\unit\test_profiles.py tests\unit\test_standard_profiles.py tests\unit\test_articulations.py tests\unit\test_midi.py tests\unit\test_package.py tests\unit\test_errors.py tests\integration\test_articulation_midi.py tests\integration\test_midi_files.py tests\integration\test_text_to_midi.py tests\integration\test_distribution.py -q --tb=short PASS: 354 passed in 18.20s; 0 failed, 0 skipped. Includes profile/standard-map/compiler mechanics, independent MIDIUtil and actual MIDI read-back, text-to-MIDI, package/error regressions, offline sdist/wheel build/install and installed/ZIP-wheel profile resource checks. These packaging/MIDI checks do not certify native files or plugin behavior. No full-suite execution is claimed; validation was deliberately focused on new behavior and relevant existing regressions as requested. Owned-file formatting: & '.\.venv\Scripts\python.exe' -m ruff format src\riff_groove_builder\formats tests\unit\test_agp.py tests\integration\test_agp_capability.py PASS: 1 file reformatted, 3 files left unchanged. Whole-project static checks: & '.\.venv\Scripts\python.exe' -m ruff check . PASS: All checks passed! & '.\.venv\Scripts\python.exe' -m ruff format --check . PASS: 54 files already formatted. & '.\.venv\Scripts\python.exe' -m mypy --strict src tests PASS: Success: no issues found in 32 source files. git --no-pager diff --check PASS: no tracked-diff whitespace errors. Existing implementation work is untracked; Ruff checks cover actual authored Python files independently. Editor test discovery returned "No tests found in the files"; this was not counted as a pass or skip. The repository-venv pytest commands above provide execution evidence. Editor problems reported no errors in all four new Python files. No broad ignores, dependency changes or relaxed checks. ISSUES ENCOUNTERED AND RESOLVED Initial static checks found four constant-setattr lint findings, one format difference, an intentionally invalid schema assignment rejected by mypy and a test request using "midi" instead of the existing contract spelling "mid". Used ordinary valid-type mutation, a dynamic all-fields frozen-value test, unchecked-copy schema validation and the authoritative "mid" literal; formatted only owned files. All focused tests then passed, followed by the regression and final whole-project static checks. A metadata-only version probe had an extra parenthesis; the corrected probe verified the versions recorded above. No implementation/test/static-check failure remains. EVIDENCE CONCLUSIONS — NO NEW NATIVE SCHEMA The supplied prior observations, not new downloads in this step, establish: - Raw https://www.amplesound.net/en/manual.asp exposes public Main_Panel_Manual-AME.pdf, Main_Panel_Manual-AMR.pdf, Guitar_Riffer.pdf, Guitar_Strummer.pdf and Settings_and_CPCv2.pdf links under /en/. - Main-panel PDFs contain range/articulation labels. Riffer documents MIDI import/export and preset Save/Load UI. Neither fact establishes an AGP binary layout, required musical fields or installed-product acceptance. - Prior unauthenticated metadata inspection of https://www.amplesound.net/dl0822/ds/AME-Eclipse.zip found MIDI, DAW projects and plugin-state files but no AGP files. This supplied no native fixture; absence there is NOT proof that AGP does not exist or cannot hold music. docs\formats\agp.md records exact links, source/observation limitations, expected future _lead.agp and _bass.agp roles, separate product/build/native-version handling and the missing schema/fixture gate. No archive/manual/factory music was downloaded or copied; no native fixture, private upload, guessed-URL sweep or access-control bypass occurred. REAL NATIVE GATE — BLOCKED / APPLICATION CHECKS UNRUN Still required independently for Eclips and Ray: - Exact installed identity/version/build, preset and native save/load operation. - Proof that the requested file category stores the required notes, rhythm, dynamics and techniques rather than only settings or external references. - Actual container/encoding/version identification and musical-field schema; lengths/checksums/compression/dependency semantics and unknown-field handling. - Lawful empty/one-note/multi-note exports plus controlled tempo/meter, timing/duration, velocity and articulation differences; redistribution permission or a documented local-only fixture/test procedure. - Evidence-based serializer/fixture and corrupt/version rejection tests. - Real generated-file load, inspect, save, close/reload acceptance in both exact installed products, preserving musical content; separate host/Cubase routing/import evidence as appropriate. No real AGP serialization, native round trip, corrupt-native-file parser test, Eclips/Ray load/save/reload or Cubase application test ran. These are UNRUN, not passing automated checks or skips. Public manuals/MIDI mappings, self- consistent invented encodings and renamed MIDI cannot close this gate. CLEANUP AND READINESS Final remaining relevant UUID test/build workspaces: 0. Root build directory: absent. Existing venv, caches, dist products, scratch and unrelated worktree content were preserved. No background process/service was started. Implementation/tests/docs and this fenced report persist. Ready for review and the next independent capability/service work: YES, using this explicit unavailable boundary and the already independent Standard MIDI path. No later prompt/work was started. Software capability objective: PASS. Full native AGP acceptance: BLOCKED; real native/application checks: UNRUN. ```