Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
78e182a
phase6c: add private MIDI corpus harness
EmergentMonk Oct 1, 2026
a870500
phase6c: formalize MIDI corpus evidence contract
EmergentMonk Oct 1, 2026
c0ba79d
phase6c: add real-world MIDI donor playback probe
EmergentMonk Oct 1, 2026
49c0ddd
phase6c: keep unfrozen Blue Glare track total optional
EmergentMonk Oct 1, 2026
13c713c
phase6c: allow explicitly unfrozen corpus aggregates
EmergentMonk Oct 1, 2026
2c93ab2
phase6c: use canonical FNV-1a offset basis
EmergentMonk Oct 1, 2026
4016983
phase6c: add synthetic MIDI probe fixture
EmergentMonk Oct 1, 2026
d7be061
phase6c: compute MIDI polyphony across SMF tracks
EmergentMonk Oct 1, 2026
70e5c90
phase6c: correct MIDI transition type contract
EmergentMonk Oct 1, 2026
4adfabe
phase6c: bind MIDI corpus support artifacts
EmergentMonk Oct 1, 2026
4e90755
phase6c: add private MIDI real-world corpus workflow
EmergentMonk Oct 1, 2026
c8bb323
phase6c: harden MIDI corpus summary validation
EmergentMonk Oct 1, 2026
2e609cc
phase6c: add MIDI corpus contract tests
EmergentMonk Oct 1, 2026
784249a
phase6c: gate MIDI corpus import and playback projection
EmergentMonk Oct 1, 2026
35db134
phase6c: regress MIDI corpus workflow integration
EmergentMonk Oct 1, 2026
86595ff
docs: advance legacy roadmap to MIDI corpus
EmergentMonk Oct 1, 2026
88c105a
phase6c: pin MIDI corpus archive identities
EmergentMonk Oct 1, 2026
ae67857
phase6c: preserve per-stem MIDI tempo-map counts
EmergentMonk Oct 1, 2026
d6c4e00
phase6c: validate per-stem MIDI tempo maps
EmergentMonk Oct 1, 2026
6f97e8c
phase6c: pin per-stem MIDI tempo-map counts
EmergentMonk Oct 1, 2026
a6979a6
phase6c: exercise cross-track MIDI polyphony
EmergentMonk Oct 1, 2026
b0bdf1d
phase6c: expose MIDI projection probe failures
EmergentMonk Oct 1, 2026
71a2336
phase6c: restore retained MIDI file loader gate
EmergentMonk Oct 1, 2026
494fb3e
phase6c: regress retained MIDI loader gate
EmergentMonk Oct 1, 2026
a31759c
docs: record restored retained MIDI loader gate
EmergentMonk Oct 1, 2026
3fb6bbe
phase6c: harden MIDI corpus identity and interval metrics
EmergentMonk Oct 1, 2026
80e70d5
phase6c: regress MIDI corpus evidence hardening
EmergentMonk Oct 1, 2026
7f9f76e
phase6c: initialize MIDI note pattern entries
EmergentMonk Oct 1, 2026
7d621a4
phase6c: bind MIDI stems and frozen candidate provenance
EmergentMonk Oct 1, 2026
d3eab4f
phase6c: import candidate identity runtime support
EmergentMonk Oct 1, 2026
4431e20
phase6c: verify MIDI observations from pinned private inputs
EmergentMonk Oct 1, 2026
5691ff4
phase6c: regress pinned MIDI stems and candidate identity
EmergentMonk Oct 1, 2026
509a909
phase6c: bind MIDI observations to exact stem identities
EmergentMonk Oct 1, 2026
2995fc1
phase6c: align candidate representative test identity
EmergentMonk Oct 1, 2026
a76d155
phase6c: keep MIDI test syntax portable
EmergentMonk Oct 1, 2026
cf8b495
phase6c: capture MIDI probe crash backtrace
EmergentMonk Oct 1, 2026
4b88020
phase6c: ignore ended Sampulse foreground voices
EmergentMonk Oct 1, 2026
4dfadff
phase6c: preserve MIDI crash diagnostics
EmergentMonk Oct 1, 2026
c2e5948
phase6c: flush final MIDI note-offs
EmergentMonk Oct 1, 2026
742a3ef
phase6c: attest candidate player with clean rebuild
EmergentMonk Oct 1, 2026
214ab0e
phase6c: keep MIDI note-off flush private
EmergentMonk Oct 1, 2026
5964474
phase6c: keep candidate rebuild identity singular
EmergentMonk Oct 1, 2026
de9edcd
phase6c: gate final MIDI release import
EmergentMonk Oct 1, 2026
f359f6d
phase6c: regress candidate rebuild and MIDI releases
EmergentMonk Oct 1, 2026
62ceb1e
phase6c: expose candidate clean-rebuild attestation
EmergentMonk Oct 1, 2026
c344326
phase6c: run candidate clean-rebuild attestation in CI
EmergentMonk Oct 1, 2026
460f04f
phase6c: regress candidate attestation workflow
EmergentMonk Oct 1, 2026
afc7dce
phase6c: bind donor probe to clean source build
EmergentMonk Oct 1, 2026
9cb27e6
phase6c: harden MIDI corpus provenance and channel coverage
EmergentMonk Oct 1, 2026
5603de2
phase6c: attest canonical rebuild and stabilize MIDI projection
EmergentMonk Oct 2, 2026
6d95e2f
phase6c: close MIDI corpus release and privacy gaps
EmergentMonk Oct 2, 2026
80ecfb6
phase6c: align MIDI corpus contract assertions
EmergentMonk Oct 2, 2026
ac54c65
phase6c: harden MIDI corpus evidence and voice reuse
EmergentMonk Oct 6, 2026
0b8c4a4
phase6c: bind tempo evidence to corpus aggregates
EmergentMonk Oct 6, 2026
1b0520c
phase6c: align tempo summary regression data
EmergentMonk Oct 6, 2026
73a1121
phase6c: bind MIDI semantics and candidate evidence
EmergentMonk Oct 6, 2026
274f790
phase6c: align SysEx reader linkage
EmergentMonk Oct 6, 2026
16b154a
phase6c: bind MIDI note and controller semantics
EmergentMonk Oct 6, 2026
798303d
phase6c: preserve exact MIDI tick positions
EmergentMonk Oct 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/phase6c-legacy-playback-import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
- 'scripts/phase6c-build-historical-it-observer.py'
- 'scripts/phase6c-validate-historical-it-original.py'
- '.github/workflows/phase6c-historical-it-private.yml'
- 'scripts/phase6c-midi-corpus.py'
- 'tests/phase6c_midi_corpus.py'
- 'tests/phase6c_midi_corpus_probe.c'
- '.github/workflows/phase6c-midi-corpus-private.yml'
- 'cpsycle/**'
- 'psycle-cpp-r12005-sanitized/**'
- '.github/workflows/phase6c-legacy-playback-import.yml'
Expand Down Expand Up @@ -57,6 +61,10 @@ on:
- 'scripts/phase6c-build-historical-it-observer.py'
- 'scripts/phase6c-validate-historical-it-original.py'
- '.github/workflows/phase6c-historical-it-private.yml'
- 'scripts/phase6c-midi-corpus.py'
- 'tests/phase6c_midi_corpus.py'
- 'tests/phase6c_midi_corpus_probe.c'
- '.github/workflows/phase6c-midi-corpus-private.yml'
- 'cpsycle/**'
- 'psycle-cpp-r12005-sanitized/**'
- '.github/workflows/phase6c-legacy-playback-import.yml'
Expand All @@ -83,6 +91,7 @@ jobs:
run: |
python3 tests/phase6c_legacy_module_import.py
python3 tests/phase6c_historical_it.py
python3 tests/phase6c_midi_corpus.py

- name: Generate canonical IT fixture
run: |
Expand Down Expand Up @@ -143,6 +152,65 @@ jobs:
- name: Build C-Psycle donor player libraries
run: make -C cpsycle/player -j1

- name: Build synthetic MIDI corpus execution probe
shell: bash
run: |
set -euo pipefail
python3 scripts/phase6c-midi-corpus.py write-synthetic \
phase6c-generated/phase6c-midi-synthetic.mid
gcc -std=gnu11 -g -O0 -fno-omit-frame-pointer \
-Wall -Wextra -Werror=implicit-function-declaration \
-Icpsycle/script/src -Icpsycle/thread/src -Icpsycle/container/src \
-Icpsycle/file/src -Icpsycle/diversalis/src -Icpsycle/src \
-Icpsycle/audio/src -Icpsycle/dsp/src $(pkg-config --cflags lua) \
tests/phase6c_midi_corpus_probe.c \
-o phase6c-generated/phase6c-midi-corpus-probe \
-Lcpsycle/thread/src -Lcpsycle/script/src -Lcpsycle/container/src \
-Lcpsycle/dsp/src -Lcpsycle/audio/src -Lcpsycle/file/src \
-Wl,--no-as-needed -laudio -lthread -llilv-0 -ldsp -lscript -lfile \
-lm $(pkg-config --libs lua) -lpthread -ldl -lstdc++ -lcontainer

- name: Prove synthetic SMF import and non-silent projection
shell: bash
run: |
set -euo pipefail
chmod +x phase6c-generated/phase6c-midi-corpus-probe
phase6c-generated/phase6c-midi-corpus-probe \
phase6c-generated/phase6c-midi-synthetic.mid \
phase6c-generated/phase6c-midi-synthetic.wav \
> phase6c-generated/phase6c-midi-synthetic.log 2>&1
cat phase6c-generated/phase6c-midi-synthetic.log
tail -n 1 phase6c-generated/phase6c-midi-synthetic.log \
> phase6c-generated/phase6c-midi-synthetic.json
python3 - <<'PY'
import json
from pathlib import Path
observation = json.loads(
Path("phase6c-generated/phase6c-midi-synthetic.json").read_text(
encoding="utf-8"
)
)
assert observation["schema_version"] == 1
assert observation["phase"] == "6C"
assert observation["contract"] == "legacy-midi-real-world-donor"
assert observation["evidence_role"] == "cpsycle-donor-observation"
assert observation["load_result"] == "accepted"
assert observation["sequence_tracks"] == 2
assert observation["patterns"] == 2
assert observation["imported_notes"] == 2
assert observation["machines_before_projection"] == 0
assert observation["projection_notes"] == 2
assert observation["projection_kind"] == "deterministic-sampulse"
assert observation["render_frames"] > 0
assert observation["render_peak"] > 0
assert observation["non_silent_projection"] is True
assert observation["parity_status"] == "UNKNOWN"
assert len(observation["import_event_digest_fnv64"]) == 16
PY
rm -f \
phase6c-generated/phase6c-midi-synthetic.mid \
phase6c-generated/phase6c-midi-synthetic.wav

- name: Build donor IT loader probe
shell: bash
run: |
Expand Down
279 changes: 279 additions & 0 deletions .github/workflows/phase6c-midi-corpus-private.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
name: Phase 6C MIDI real-world corpus private observation

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: phase6c-midi-corpus-${{ github.ref }}
cancel-in-progress: false

jobs:
donor-real-world-midi:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Acquire and verify private MIDI corpus
shell: bash
env:
MIDI_CORPUS_URL: ${{ secrets.PSYCLE_PHASE6C_MIDI_CORPUS_URL }}
run: |
set -euo pipefail
[[ -n "$MIDI_CORPUS_URL" ]] || {
echo "PSYCLE_PHASE6C_MIDI_CORPUS_URL secret is not configured" >&2
exit 2
}
BUNDLE="$RUNNER_TEMP/phase6c-midi-corpus-bundle.zip"
curl -fsSL --retry 3 --output "$BUNDLE" "$MIDI_CORPUS_URL"
rm -rf phase6c-midi-private
python3 scripts/phase6c-midi-corpus.py prepare-bundle "$BUNDLE" phase6c-midi-private
echo "MIDI_CORPUS_BUNDLE=$BUNDLE" >> "$GITHUB_ENV"

- name: Install donor build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential pkg-config liblua5.4-dev liblilv-dev

- name: Build C-Psycle donor and MIDI corpus probe
shell: bash
run: |
set -euo pipefail
make -C cpsycle/player -j1
mkdir -p phase6c-midi-public/observations
gcc -std=gnu11 -g -O0 -fno-omit-frame-pointer -Wall -Wextra -Werror=implicit-function-declaration -Icpsycle/script/src -Icpsycle/thread/src -Icpsycle/container/src -Icpsycle/file/src -Icpsycle/diversalis/src -Icpsycle/src -Icpsycle/audio/src -Icpsycle/dsp/src $(pkg-config --cflags lua) tests/phase6c_midi_corpus_probe.c -o phase6c-midi-public/phase6c-midi-corpus-probe -Lcpsycle/thread/src -Lcpsycle/script/src -Lcpsycle/container/src -Lcpsycle/dsp/src -Lcpsycle/audio/src -Lcpsycle/file/src -Wl,--no-as-needed -laudio -lthread -llilv-0 -ldsp -lscript -lfile -lm $(pkg-config --libs lua) -lpthread -ldl -lstdc++ -lcontainer
cp -- cpsycle/audio/src/midiloader.c phase6c-midi-public/midiloader.c
chmod +x phase6c-midi-public/phase6c-midi-corpus-probe

- name: Observe all real-world MIDI stems
shell: bash
run: |
set -euo pipefail
python3 - <<'PY'
import hashlib
import json
import os
from pathlib import Path
import subprocess

private_root = Path("phase6c-midi-private")
analysis = json.loads(
(private_root / "corpus-analysis.json").read_text(encoding="utf-8")
)
public = Path("phase6c-midi-public")
observations = public / "observations"
probe = (public / "phase6c-midi-corpus-probe").resolve()
revision = subprocess.check_output(
["git", "rev-parse", "HEAD"], text=True
).strip()

def sha(path: Path) -> str:
return hashlib.sha256(path.read_bytes()).hexdigest()

for set_info in analysis["sets"]:
print(f"== {set_info['name']} ==")
for stem in set_info["stems"]:
source = (private_root / stem["private_path"]).resolve()
if sha(source) != stem["sha256"]:
raise SystemExit(f"{stem['stem_id']}: private stem hash changed")
wav = Path(os.environ["RUNNER_TEMP"]) / f"{stem['stem_id']}.wav"
proc = subprocess.run(
[str(probe), str(source), str(wav)],
stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
check=False,
)
if proc.returncode != 0:
print(proc.stdout)
raise SystemExit(
f"{stem['stem_id']}: donor probe failed with exit {proc.returncode}"
)
lines = [line for line in proc.stdout.splitlines() if line.strip()]
observation = json.loads(lines[-1])
if observation["phase"] != "6C":
raise SystemExit(f"{stem['stem_id']}: donor phase changed")
if observation["contract"] != "legacy-midi-real-world-donor":
raise SystemExit(f"{stem['stem_id']}: donor contract changed")
if not wav.is_file():
raise SystemExit(f"{stem['stem_id']}: projection WAV missing")
source_analysis_bytes = json.dumps(
stem["analysis"], sort_keys=True, separators=(",", ":")
).encode()
observation.update({
"stem_id": stem["stem_id"],
"set_name": set_info["name"],
"source_relative_name": stem["relative_name"],
"source_sha256": stem["sha256"],
"source_size_bytes": stem["size_bytes"],
"source_analysis_sha256": hashlib.sha256(
source_analysis_bytes
).hexdigest(),
"probe_output_sha256": hashlib.sha256(
proc.stdout.encode()
).hexdigest(),
"render_sha256": sha(wav),
"render_size_bytes": wav.stat().st_size,
"source_revision": revision,
"private_input_required": True,
"fixture_redistributed": False,
"projection_boundary": (
"untouched imported event graph was digested before "
"retargeting notes/releases/MIDI CC to a deterministic "
"project-owned Sampulse substrate for a 16-beat FileOut render"
),
})
(observations / f"{stem['stem_id']}.json").write_text(
json.dumps(observation, indent=2, sort_keys=True) + "\n",
encoding="utf-8",
)
wav.unlink()
PY

- name: Build sanitized donor corpus summary
shell: bash
run: |
set -euo pipefail
python3 scripts/phase6c-midi-corpus.py donor-summary phase6c-midi-private/corpus-analysis.json phase6c-midi-public/observations --probe phase6c-midi-public/phase6c-midi-corpus-probe --source phase6c-midi-public/midiloader.c --output phase6c-midi-public/donor-midi-corpus.json
rm -rf -- phase6c-midi-private
rm -f -- "$MIDI_CORPUS_BUNDLE"
python3 scripts/phase6c-midi-corpus.py audit-public phase6c-midi-public

- name: Upload sanitized donor MIDI corpus evidence
uses: actions/upload-artifact@v4
with:
name: phase6c-midi-real-world-donor
path: phase6c-midi-public/
if-no-files-found: error

candidate-midi-boundary:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Acquire and verify private MIDI corpus
shell: bash
env:
MIDI_CORPUS_URL: ${{ secrets.PSYCLE_PHASE6C_MIDI_CORPUS_URL }}
run: |
set -euo pipefail
[[ -n "$MIDI_CORPUS_URL" ]] || {
echo "PSYCLE_PHASE6C_MIDI_CORPUS_URL secret is not configured" >&2
exit 2
}
BUNDLE="$RUNNER_TEMP/phase6c-midi-corpus-bundle.zip"
curl -fsSL --retry 3 --output "$BUNDLE" "$MIDI_CORPUS_URL"
rm -rf phase6c-midi-private
python3 scripts/phase6c-midi-corpus.py prepare-bundle "$BUNDLE" phase6c-midi-private
echo "MIDI_CORPUS_BUNDLE=$BUNDLE" >> "$GITHUB_ENV"

- name: Install candidate build dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ca-certificates curl subversion file build-essential pkg-config qt5-qmake qtbase5-dev libboost-thread-dev libboost-filesystem-dev libboost-system-dev libboost-chrono-dev libboost-date-time-dev libxml++2.6-dev zlib1g-dev libsoxr-dev libasound2-dev libjack-jackd2-dev liblilv-dev liblua5.4-dev

- name: Verify frozen candidate identities
shell: bash
run: |
set -euo pipefail
scripts/phase6-upstream-audit.sh phase6-upstream-audit
bash scripts/phase6b-sanitized-manifest.sh phase6-upstream-audit phase6b-sanitized-manifest
bash scripts/phase6b-verify-committed-source.sh psycle-cpp-r12005-sanitized phase6b-sanitized-manifest
bash scripts/phase6b-verify-qmake-support.sh psycle-cpp-r12005-sanitized/build-systems/qmake

- name: Stage pinned candidate build dependencies
shell: bash
run: |
set -euo pipefail
DEST='psycle-cpp-r12005-sanitized/psycle-plugins/src/psycle/plugin_interface.hpp'
ARCHIVE_COMMIT='1863c4177d38d37e8eba9e4eb8857e5023debe6d'
EXPECTED_BLOB='2cf4d8f756fa58098fd84b7b44d0ebe1350594c5'
test ! -e "$DEST"
mkdir -p "$(dirname "$DEST")"
curl -fsSL --retry 3 "https://raw.githubusercontent.com/QSOLKCB/PSYCLE-LINUX/$ARCHIVE_COMMIT/cpsycle/plugins/psycle/plugin_interface.hpp" -o "$DEST"
[[ "$(git hash-object "$DEST")" == "$EXPECTED_BLOB" ]]
DEST='psycle-cpp-r12005-sanitized/diversalis'
test ! -e "$DEST"
exported=false
for attempt in 1 2 3 4; do
rm -rf -- "$DEST"
if svn export --quiet --force -r 12005 'https://svn.code.sf.net/p/psycle/code/trunk/diversalis@12005' "$DEST"; then
exported=true
break
fi
sleep "$((attempt * 2))"
done
[[ "$exported" == true ]]

- name: Build frozen C++ candidate player
shell: bash
working-directory: psycle-cpp-r12005-sanitized/psycle-player
run: |
set -euo pipefail
qmake CONFIG-=shared CONFIG+=release psycle-player.pro
make -j2

- name: Observe representative direct-MIDI boundary
shell: bash
run: |
set -euo pipefail
mkdir -p phase6c-midi-candidate-public
PLAYER='psycle-cpp-r12005-sanitized/psycle-player/++qmake/psycle-player'
cp -- "$PLAYER" phase6c-midi-candidate-public/candidate-psycle-player
chmod +x phase6c-midi-candidate-public/candidate-psycle-player
python3 scripts/phase6c-midi-corpus.py candidate-boundary phase6c-midi-private/corpus-analysis.json phase6c-midi-candidate-public/candidate-psycle-player phase6c-midi-candidate-public/candidate-midi-boundary.json
rm -rf -- phase6c-midi-private
rm -f -- "$MIDI_CORPUS_BUNDLE"
python3 scripts/phase6c-midi-corpus.py audit-public phase6c-midi-candidate-public

- name: Upload sanitized candidate MIDI boundary evidence
uses: actions/upload-artifact@v4
with:
name: phase6c-midi-real-world-candidate
path: phase6c-midi-candidate-public/
if-no-files-found: error

midi-corpus-summary:
needs: [donor-real-world-midi, candidate-midi-boundary]
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download donor evidence
uses: actions/download-artifact@v4
with:
name: phase6c-midi-real-world-donor
path: phase6c-midi-summary/donor

- name: Download candidate evidence
uses: actions/download-artifact@v4
with:
name: phase6c-midi-real-world-candidate
path: phase6c-midi-summary/candidate

- name: Build public-safe corpus summary
shell: bash
run: |
set -euo pipefail
python3 scripts/phase6c-midi-corpus.py summary --donor phase6c-midi-summary/donor/donor-midi-corpus.json --candidate phase6c-midi-summary/candidate/candidate-midi-boundary.json --output phase6c-midi-summary/midi-real-world-corpus-summary.json
printf '%s\n' 'private-input-required: PSYCLE_PHASE6C_MIDI_CORPUS_URL' 'outer transport ZIP contains the six manifest-pinned MIDI archives' 'raw MIDI and ZIP bytes are intentionally excluded from evidence artifacts' > phase6c-midi-summary/private-input-required.txt
python3 scripts/phase6c-midi-corpus.py audit-public phase6c-midi-summary

- name: Upload public-safe MIDI corpus summary
uses: actions/upload-artifact@v4
with:
name: phase6c-midi-real-world-corpus-summary
path: phase6c-midi-summary/
if-no-files-found: error
Loading
Loading