Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
eff55f1
Add dataflow grammar audit + PR comment workflow
mikemol Jan 31, 2026
ff4ae15
Enhance dataflow grammar reporting
mikemol Jan 31, 2026
7b33a42
Bind CNF-2 policy at edge, route tests through bound configs
mikemol Jan 31, 2026
acf5ff4
Bundle arena swizzles for cycle core
mikemol Jan 31, 2026
51a56e0
Bundle IC wiring endpoints and cycle swizzles
mikemol Jan 31, 2026
0585f14
Bundle IC runtime execution + add runtime JIT ops
mikemol Jan 31, 2026
2cf0a76
Fix IC protocol import cycle
mikemol Jan 31, 2026
e9524ec
Fix IC jit defaults import
mikemol Jan 31, 2026
307aa68
Fix runtime defaults init order
mikemol Jan 31, 2026
47ab498
Add baseline pytest suite and CI gating
mikemol Jan 31, 2026
30a4d31
Fix IC runtime ops default init order
mikemol Jan 31, 2026
2a3d6cf
Add preflight smoke gate before CI matrix
mikemol Jan 31, 2026
6da2b50
Add doc front-matter re-internment signal
mikemol Jan 31, 2026
26e8511
Enforce dataflow bundle invariants in audit
mikemol Jan 31, 2026
96c6feb
Allow preflight collect-only to pass when no tests
mikemol Jan 31, 2026
6d0daab
Fix cnf2 bound config resolution
mikemol Jan 31, 2026
e5f6c3e
Fix dataflow grammar audit return types
mikemol Jan 31, 2026
e9f30b8
Document dataflow bundles and fix audit scope
mikemol Jan 31, 2026
3c9571f
Promote dataflow bundles to dataclasses
mikemol Jan 31, 2026
9e8f5da
Add type-flow audit and kwargs bundle use
mikemol Jan 31, 2026
8ee600c
Add repo-wide type flow audit
mikemol Jan 31, 2026
35721f1
Extend type audit across repo and report
mikemol Jan 31, 2026
4c7cd82
Add mermaid type-flow diagrams
mikemol Jan 31, 2026
59e4812
Make CNF2 runtime always-on via runtime_fns
mikemol Jan 31, 2026
31bf60f
Remove CNF2 enabled gating hooks
mikemol Jan 31, 2026
cd9c623
Remove slot1 gate and add constant flow audit
mikemol Jan 31, 2026
58dcf5d
Fix CNF2 bound commit_stratum default
mikemol Jan 31, 2026
b06587b
Tighten typing across DI and CNF2 helpers
mikemol Jan 31, 2026
05a28dd
Fix IC jit_entrypoints import cycle
mikemol Jan 31, 2026
ad64c0d
Clarify ledger settlement semantics and speed interning
mikemol Feb 1, 2026
e8c2a5d
Add spillway bound lemma and tie to arena allocation
mikemol Feb 1, 2026
7f0adc2
Fix spillway lemma pattern
mikemol Feb 1, 2026
d6d97f2
Bundle ledger indexes and default tests to CPU
mikemol Feb 1, 2026
55a81e2
Add intern_nodes LedgerIndex entrypoints
mikemol Feb 1, 2026
1ec624e
Allow intern_nodes to accept LedgerIndex
mikemol Feb 1, 2026
185f231
Introduce LedgerState and cap JAX GPU mem in tests
mikemol Feb 1, 2026
770f08f
Add CNF-2 LedgerState entrypoints
mikemol Feb 1, 2026
d222686
Add LedgerState CNF-2 JIT entrypoints
mikemol Feb 1, 2026
a7c1939
Cap JAX GPU memory in CI
mikemol Feb 1, 2026
19d0e6c
Route CNF-2 facade to LedgerState entrypoints
mikemol Feb 1, 2026
f14b871
Document LedgerState return behavior in CNF-2 facade
mikemol Feb 1, 2026
76df9d2
Use LedgerState in BSP CLI
mikemol Feb 1, 2026
109ba3b
Allow LedgerState in intern_nodes and harness
mikemol Feb 1, 2026
6065e4e
Make LedgerState transparent and carry intern config
mikemol Feb 1, 2026
29eef45
Preserve LedgerState in min_prism CNF-2 harness
mikemol Feb 1, 2026
bb2a384
Bind ledger index across commit/intern paths
mikemol Feb 1, 2026
2f7d84a
Use gabion dataflow audit when available
mikemol Feb 1, 2026
db88f9c
Clean up policy binding helpers and fix arena CLI defaults
mikemol Feb 2, 2026
83144d7
Tighten guard cfg wrappers and document scatter bundles
mikemol Feb 2, 2026
0c0fedc
Fix intrinsic jit wrapper for Ledger inputs
mikemol Feb 2, 2026
897c7f9
Fix ledger state derivation in q projection
mikemol Feb 2, 2026
5842b71
Add optional BSP intrinsic profiling guard
mikemol Feb 2, 2026
09bdcb0
Honor intern overrides in CNF2 state and revalidate interned strata
mikemol Feb 2, 2026
2c06c02
Add JAX compile cache hook and fix coord intern
mikemol Feb 2, 2026
399a1ca
Make baseline pytest verbose and install jaxtyping
mikemol Feb 2, 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
7 changes: 6 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
doc_revision: 1
reader_reintern: "Reader-only: re-intern if doc_revision changed since you last read this doc."
---

# Copilot Instructions

Follow `POLICY_SEED.md` as the authoritative control policy.
Expand All @@ -9,4 +14,4 @@ Key requirements:
- For workflow changes, run `python scripts/policy_check.py --workflows`.
- Use `mise exec -- python` for policy tooling to ensure dependencies resolve.

If a request conflicts with `POLICY_SEED.md`, stop and ask for clarification.
If a request conflicts with `POLICY_SEED.md`, stop and ask for clarification.
186 changes: 167 additions & 19 deletions .github/workflows/ci-milestones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ permissions:

env:
PYTHON_VERSION: "3.14"
XLA_PYTHON_CLIENT_PREALLOCATE: "false"
XLA_PYTHON_CLIENT_ALLOCATOR: "platform"
PRISM_JAX_GPU_MEM_CAP_MB: "128"

jobs:
changes:
Expand Down Expand Up @@ -158,15 +161,95 @@ jobs:
run: |
scripts/check_agda.sh

preflight-smoke:
needs: [changes, policy-check, audit, smoke-exports, agda-check]
if: needs.changes.outputs.code_changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies (preflight)
run: |
python -m pip install --upgrade pip
python -m pip install pytest jax jaxlib
- name: Import smoke (ic_vm, prism_vm)
run: |
python -c "import ic_vm; import prism_vm"
- name: Collect-only harness import graph
run: |
mkdir -p artifacts
set -euo pipefail
pytest -c pytest.baseline.ini \
--collect-only tests/harness.py \
2>&1 | tee artifacts/pytest-preflight-collect.txt || true
- name: Run pytest smokes (preflight)
run: |
mkdir -p artifacts
set -euo pipefail
pytest -c pytest.baseline.ini -q \
tests/test_harness_jit_cfg_smoke.py \
tests/test_harness_cnf2_cfg_smoke.py \
tests/test_ic_guard_cfg_smoke.py \
--junitxml artifacts/pytest-preflight.xml \
2>&1 | tee artifacts/pytest-preflight.txt
- name: Upload preflight artifacts
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: pytest-preflight
path: artifacts/
if-no-files-found: ignore

baseline-tests:
needs: [changes, policy-check, audit, smoke-exports, agda-check, preflight-smoke]
if: needs.changes.outputs.code_changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist jax jaxlib jaxtyping beartype
- name: Record telemetry metadata (baseline)
run: |
mkdir -p artifacts
python scripts/record_telemetry_metadata.py \
--out artifacts/telemetry_metadata_baseline.json \
--milestone baseline \
--label "pytest-baseline" \
--extra job=baseline-tests
- name: Run pytest (baseline)
run: |
mkdir -p artifacts
set -euo pipefail
pytest -c pytest.baseline.ini \
-n auto -vv -ra \
--junitxml artifacts/pytest-baseline.xml \
2>&1 | tee artifacts/pytest-baseline.txt
- name: Upload pytest artifact (baseline)
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: pytest-baseline
path: artifacts/
if-no-files-found: ignore

tests:
needs: [changes, policy-check, audit, smoke-exports]
needs: [changes, policy-check, audit, smoke-exports, agda-check, preflight-smoke, baseline-tests]
if: needs.changes.outputs.code_changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
milestone: [m1, m2, m3, m4, m5]
suite: [m2, m3, m4, m5]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
Expand All @@ -175,25 +258,26 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist jax jaxlib
- name: Record telemetry metadata
python -m pip install pytest pytest-xdist jax jaxlib jaxtyping beartype
- name: Record telemetry metadata (suite)
run: |
mkdir -p artifacts
python scripts/record_telemetry_metadata.py \
--out artifacts/telemetry_metadata_${{ matrix.milestone }}.json \
--milestone ${{ matrix.milestone }} \
--label "pytest-${{ matrix.milestone }}" \
--out artifacts/telemetry_metadata_${{ matrix.suite }}.json \
--milestone ${{ matrix.suite }} \
--label "pytest-${{ matrix.suite }}" \
--extra job=tests
- name: Run pytest (milestone)
- name: Run pytest (suite)
run: |
mkdir -p artifacts
set -euo pipefail
pytest -c pytest.${{ matrix.milestone }}.ini \
config="pytest.${{ matrix.suite }}.ini"
pytest -c "$config" \
-n auto \
--junitxml artifacts/pytest-${{ matrix.milestone }}.xml \
2>&1 | tee artifacts/pytest-${{ matrix.milestone }}.txt
--junitxml artifacts/pytest-${{ matrix.suite }}.xml \
2>&1 | tee artifacts/pytest-${{ matrix.suite }}.txt
- name: Run damage metrics fixture (arena)
if: matrix.milestone == 'm4'
if: matrix.suite == 'm4'
run: |
mkdir -p artifacts
set -euo pipefail
Expand All @@ -210,7 +294,7 @@ jobs:
--inputs artifacts/damage_metrics.txt artifacts/damage_metrics_tile32.txt \
--out artifacts/damage_metrics_delta.txt
- name: Capture host performance baselines
if: matrix.milestone == 'm4'
if: matrix.suite == 'm4'
run: |
mkdir -p artifacts
python scripts/audit_host_performance.py \
Expand All @@ -226,7 +310,7 @@ jobs:
--engine cnf2 --iterations 5 --warmup 1 \
--json-out artifacts/host_memory_cnf2.json
- name: Capture CPU trace baselines
if: matrix.milestone == 'm4'
if: matrix.suite == 'm4'
run: |
mkdir -p artifacts
python scripts/capture_trace.py \
Expand All @@ -235,7 +319,7 @@ jobs:
python scripts/trace_analyze.py \
--report-only --json-out artifacts/trace_cpu_report.json
- name: Capture m5 servo trace baselines
if: matrix.milestone == 'm5'
if: matrix.suite == 'm5'
run: |
mkdir -p artifacts
rm -rf /tmp/jax-trace
Expand Down Expand Up @@ -266,12 +350,76 @@ jobs:
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: pytest-${{ matrix.milestone }}
name: pytest-${{ matrix.suite }}
path: artifacts/
if-no-files-found: ignore

baseline-tests-gpu:
needs: [changes, policy-check, audit, smoke-exports, agda-check, preflight-smoke, baseline-tests]
if: needs.changes.outputs.code_changed == 'true' && github.actor == github.repository_owner && needs.policy-check.result == 'success' && needs.audit.result == 'success'
runs-on: [self-hosted, cassian, gpu, local]
timeout-minutes: 30
env:
XLA_FLAGS: "--xla_gpu_enable_command_buffer="
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Ensure mise Python is installed (self-hosted)
run: |
if ! command -v mise >/dev/null 2>&1; then
echo "mise is required on the self-hosted runner" >&2
exit 1
fi
mise install
- name: Verify python version (self-hosted)
run: |
mise exec -- python - <<'PY'
import os
import sys
want = os.environ["PYTHON_VERSION"]
version = sys.version.split()[0]
if not version.startswith(want):
raise SystemExit(f"Expected Python {want}, found {version}")
print("Python version:", version)
PY
- name: Install test dependencies (GPU)
run: |
mise exec -- python -m pip install --upgrade pip
mise exec -- python -m pip install pytest nvidia-ml-py jaxtyping beartype "jax[cuda12]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
- name: Verify GPU backend
run: |
mise exec -- python - <<'PY'
import jax
gpus = jax.devices("gpu")
if not gpus:
raise SystemExit("GPU backend required but not available")
print("GPU devices:", gpus)
PY
- name: Record telemetry metadata (gpu baseline)
run: |
mkdir -p artifacts
mise exec -- python scripts/record_telemetry_metadata.py \
--out artifacts/telemetry_metadata_gpu_baseline.json \
--milestone baseline \
--backend gpu \
--label "pytest-gpu-baseline" \
--extra job=baseline-tests-gpu
- name: Run pytest (baseline, gpu)
run: |
mkdir -p artifacts
set -euo pipefail
mise exec -- python -m pytest -c pytest.baseline.ini \
--junitxml artifacts/pytest-gpu-baseline.xml \
2>&1 | tee artifacts/pytest-gpu-baseline.txt
- name: Upload pytest artifact (gpu baseline)
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: pytest-gpu-baseline
path: artifacts/
if-no-files-found: ignore

tests-gpu:
needs: [changes, policy-check, audit, smoke-exports]
needs: [changes, policy-check, audit, smoke-exports, agda-check, preflight-smoke, baseline-tests, baseline-tests-gpu]
if: needs.changes.outputs.code_changed == 'true' && github.actor == github.repository_owner && needs.policy-check.result == 'success' && needs.audit.result == 'success'
runs-on: [self-hosted, cassian, gpu, local]
timeout-minutes: 30
Expand Down Expand Up @@ -304,7 +452,7 @@ jobs:
- name: Install test dependencies (GPU)
run: |
mise exec -- python -m pip install --upgrade pip
mise exec -- python -m pip install pytest nvidia-ml-py "jax[cuda12]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
mise exec -- python -m pip install pytest nvidia-ml-py jaxtyping beartype "jax[cuda12]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
- name: Verify GPU backend
run: |
mise exec -- python - <<'PY'
Expand Down Expand Up @@ -356,7 +504,7 @@ jobs:

collect-report:
runs-on: ubuntu-latest
needs: [changes, policy-check, audit, smoke-exports, agda-check, tests, tests-gpu]
needs: [changes, policy-check, audit, smoke-exports, agda-check, preflight-smoke, baseline-tests, baseline-tests-gpu, tests, tests-gpu]
if: always() && needs.policy-check.result == 'success' && needs.audit.result == 'success'
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/pr-dataflow-grammar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: pr-dataflow-grammar

on:
pull_request:
paths:
- "scripts/**"
- "src/**"
- ".github/workflows/pr-dataflow-grammar.yml"

permissions:
contents: read

jobs:
dataflow-grammar:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.14"
- name: Install graphviz
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Render dataflow grammar graph
run: |
./scripts/render_dataflow_grammar.sh src artifacts/dataflow_grammar
- name: Upload dataflow artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: dataflow-grammar
path: artifacts/dataflow_grammar
- name: Comment on PR with artifact link
if: github.event.pull_request.head.repo.full_name == github.repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
set -euo pipefail
python - <<'PY'
import json
import os
import pathlib
import urllib.request

token = os.environ["GITHUB_TOKEN"]
repo = os.environ["REPO"]
issue = os.environ["PR_NUMBER"]
run_url = os.environ["RUN_URL"]
report_path = pathlib.Path("artifacts/dataflow_grammar/report.md")
if report_path.exists():
report = report_path.read_text()
else:
report = "<!-- dataflow-grammar -->\nDataflow grammar graph generated.\n"
footer = f"\n\n- Artifact: dataflow-grammar\n- Download: {run_url}\n"
body = report + footer
if len(body) > 60000:
body = body[:60000] + "\n\n(truncated)\n" + footer

url = f"https://api.github.com/repos/{repo}/issues/{issue}/comments"
req = urllib.request.Request(
url,
data=json.dumps({"body": body}).encode("utf-8"),
headers={
"Authorization": f"Bearer {token}",
"Accept": "application/vnd.github+json",
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req) as resp:
resp.read()
PY
7 changes: 6 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
doc_revision: 1
reader_reintern: "Reader-only: re-intern if doc_revision changed since you last read this doc."
---

# AGENTS.md

This repository is governed by `POLICY_SEED.md`. Treat it as authoritative.
Expand All @@ -13,4 +18,4 @@ This repository is governed by `POLICY_SEED.md`. Treat it as authoritative.
- Hooks are advisory; CI policy checks are authoritative.
- Use `mise exec -- python` for policy tooling so dependencies resolve as expected.

If any request conflicts with `POLICY_SEED.md`, stop and ask for guidance.
If any request conflicts with `POLICY_SEED.md`, stop and ask for guidance.
Loading
Loading