Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
76d8c0d
Phase 0: integration branch with the API batch (spf_dag, EdgePriority…
networmix Oct 3, 2026
df3b894
Phase 0: version 0.12.0 on the integration branch; lint excludes for …
networmix Oct 3, 2026
b476639
Phase 1a: graph on integer units with B′ edge ids and the min-cost fl…
networmix Oct 5, 2026
231eb85
Phase 1b: the integer ledger, the placement kernels and the internal …
networmix Oct 5, 2026
2088f3b
Phase 1c: the policy engine, the evaluators and the DagCache; the 1a …
networmix Oct 6, 2026
a48ca9d
Two small speed-ups, results unchanged
networmix Oct 6, 2026
3e1f3ea
Phase 1d: the public search, KSP and the frozen DagCache
networmix Oct 8, 2026
c1c9de7
Phase 1e: graph construction by counting passes
networmix Oct 12, 2026
16e5100
Cleanup: the rebuilt Core made coherent, documented and tested
networmix Oct 12, 2026
cb4dd8e
dev/perf: a minimal A/B/A timing tool
networmix Oct 12, 2026
a6a24c0
Portability fixes found by the first CI run
networmix Oct 12, 2026
b61fa9e
Negative controls independent of the platform and the tracer
networmix Oct 12, 2026
b0e0646
Zero-capacity links stay in routing
networmix Oct 18, 2026
3f1587b
Pooled sources, the origin and the new result shape
networmix Oct 18, 2026
4a3346b
Forwarding programs, Pinned over programs, weights and black holes
networmix Oct 18, 2026
d856b97
T1 tunnels, reservations kept apart from traffic, T0 removed
networmix Oct 19, 2026
6b1a53f
T2: the controller's equal tunnels per head
networmix Oct 19, 2026
b0d3a6e
The unified API of contract r9
networmix Oct 19, 2026
bf0e9f8
Fixes from the step-4 audit
networmix Oct 19, 2026
9357f4f
One rule for error classes
networmix Oct 20, 2026
b697fdf
Lists of actions in one call
networmix Oct 20, 2026
915d71e
A demand that can carry nothing changes no other result
networmix Oct 20, 2026
eac5fd3
Concurrency: the GIL released, one gate per ledger
networmix Oct 21, 2026
b21c14b
Units: the exact conversion rule in texts, types and tests
networmix Oct 21, 2026
28aebc1
Faster edge-failure sensitivity and K shortest paths, same results
networmix Oct 21, 2026
81fc0a3
Timing harness: function alignment on both sides
networmix Oct 21, 2026
fc07102
Fixes from the step-8 milestone audit
networmix Oct 21, 2026
cf8178a
ShortestPaths keeps its static preparation across epochs
networmix Oct 22, 2026
807df2d
CentralizedTE: sources in proportion to given weights
networmix Oct 22, 2026
0884f1f
Docs: plain and exact explanations for 0.12.0
networmix Oct 25, 2026
3f32e73
Lean proofs of the round-robin rule
networmix Oct 25, 2026
6f8b6bf
README and changelog written for people
networmix Oct 27, 2026
6541209
Tests check documentation only by running it
networmix Oct 27, 2026
11490c9
Release 0.12.0
networmix Oct 27, 2026
5dd49c8
Tests build and pass on Linux, free-threaded and older Pythons
networmix Oct 27, 2026
b39c2bc
The heartbeat test no longer depends on a fast machine
networmix Oct 27, 2026
1ac67ff
Allocation-failure tests pass on Python 3.11-3.13; daemon threads exi…
networmix Oct 27, 2026
2097a35
Tests pass on Windows and without the private hooks
networmix Oct 27, 2026
e228820
Fault sweeps get thirty minutes under sanitizers
networmix Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ branch = True
data_file = build/coverage/.coverage
source =
netgraph_core
omit =
python/netgraph_core/_docs.py

[report]
show_missing = True
Expand Down
78 changes: 78 additions & 0 deletions .github/ci-constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Exact versions for CI's Python environments and for the coverage venv of `make cov`, so a new
# release of a tool cannot change a CI result without a change in this repository: the accepted
# development environment's versions, and for what only Linux, Windows or Python 3.11 installs,
# the version a resolver chose for those platforms (its marker says where it applies). pip itself
# is one of them: a job installs this pip (`pip install -U -c` this file, which also downgrades a
# newer one) before anything else. They reach a build environment only through the mechanism of
# the tool that fills it: pip's own isolated build takes --build-constraint or
# PIP_BUILD_CONSTRAINT (since pip 26.2 never -c or PIP_CONSTRAINT), `python -m build` takes
# PIP_CONSTRAINT, and its uv installer (the release wheels) UV_CONSTRAINT. NumPy 2.5 needs Python
# 3.12; Python 3.11 gets the last NumPy that supports it. Update deliberately.
build==1.5.0
certifi==2026.7.22
cfgv==3.5.0
charset-normalizer==3.5.1
cmake==4.4.2
colorlog==6.12.0
coverage==7.15.4
distlib==0.4.3
docutils==0.23
filelock==3.32.3
gcovr==8.6
id==1.6.1
identify==2.6.19
idna==3.19
iniconfig==2.3.0
jaraco.classes==3.4.0
jaraco.context==6.1.2
jaraco.functools==4.6.0
Jinja2==3.1.6
keyring==25.7.0
lxml==6.1.2
markdown-it-py==4.2.0
MarkupSafe==3.0.3
mdurl==0.1.2
more-itertools==11.1.0
nh3==0.3.6
ninja==1.13.0
nodeenv==1.10.0
packaging==26.3
pathspec==1.1.1
pip==26.2.1
platformdirs==4.11.3
pluggy==1.6.0
pre_commit==4.6.2
pybind11==3.1.0
pybind11-stubgen==3.0.0
Pygments==2.21.0
pyproject_hooks==1.2.0
pyright==1.1.401
pytest==9.1.1
pytest-cov==7.1.0
python-discovery==1.5.2
PyYAML==6.0.3
readme_renderer==45.0
requests==2.34.2
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==15.0.0
ruff==0.11.13
scikit_build_core==1.0.3
setuptools==84.0.0
twine==7.0.0
typing_extensions==4.16.0
urllib3==2.7.0
virtualenv==21.7.4
wheel==0.48.0
numpy==2.5.2; python_version >= "3.12"
numpy==2.4.4; python_version < "3.12"
backports.tarfile==1.2.0; python_version < "3.12"
importlib_metadata==9.0.1; python_version < "3.12"
zipp==4.1.1; python_version < "3.12"
cffi==2.1.1; sys_platform == "linux"
cryptography==50.0.2; sys_platform == "linux"
jeepney==0.9.0; sys_platform == "linux"
pycparser==3.11; sys_platform == "linux"
SecretStorage==3.5.0; sys_platform == "linux"
colorama==0.4.6; sys_platform == "win32"
pywin32-ctypes==0.2.3; sys_platform == "win32"
187 changes: 187 additions & 0 deletions .github/workflows/proofs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
name: Lean verification

on:
pull_request:
push:
branches: ["**"]
workflow_dispatch:
workflow_call:
inputs:
sdist-artifact:
description: Existing source artifact to check, rather than building a new archive
type: string
default: ""
wheels-pattern:
description: Existing release wheel artifacts corresponding to that archive
type: string
default: ""

permissions:
contents: read

env:
LEAN_NUM_THREADS: "2"
PROOFS_DEPENDENCY_ORIGIN: cache+local

jobs:
model:
name: Lean proofs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# Official action, pinned to its reviewed source. The package's own entry point
# controls build/audit/replay; the action supplies Elan and the pinned mathlib cache.
- uses: leanprover/lean-action@24581d74d674803a25a81b10b059c5c0cdd344c6
with:
lake-package-directory: proofs
auto-config: "false"
build: "false"
test: "false"
lint: "false"
use-github-cache: "false"
use-mathlib-cache: "true"
- name: Model proofs, fingerprints and fresh kernel replay
run: bash dev/proofs/run.sh replay
- name: Real-discovery negative controls
run: bash dev/proofs/run.sh test
- uses: actions/upload-artifact@v4
if: always()
with:
name: lean-model-evidence
path: |
build/proofs/check.json
build/proofs/replay.json
build/proofs/*.log
if-no-files-found: error

distribution:
name: Lean distribution
runs-on: ubuntu-22.04
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/ci-constraints.txt
PIP_BUILD_CONSTRAINT: ${{ github.workspace }}/.github/ci-constraints.txt
CMAKE_BUILD_PARALLEL_LEVEL: "4"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Pinned packaging tools
run: |
python -m pip install -U -c .github/ci-constraints.txt pip
python -m pip install -c .github/ci-constraints.txt build
- uses: actions/download-artifact@v4
if: inputs.sdist-artifact != ''
with:
name: ${{ inputs.sdist-artifact }}
path: build/proofs/dist
- uses: actions/download-artifact@v4
if: inputs.wheels-pattern != ''
with:
pattern: ${{ inputs.wheels-pattern }}
merge-multiple: true
path: build/proofs/dist
- name: Build candidate distributions with excluded local by-products present
if: inputs.sdist-artifact == ''
run: |
mkdir -p proofs/.lake build/proofs
echo must-not-ship > proofs/.lake/packaging-plant.keep
echo must-not-ship > build/proofs/generated-report.keep
python -m build --sdist --wheel --outdir build/proofs/dist \
--config-setting=build-dir=build/proofs/wheel-build
- name: Check exact members, record archive identity and extract
shell: bash
run: |
sdists=(build/proofs/dist/*.tar.gz)
wheels=(build/proofs/dist/*.whl)
[[ ${#sdists[@]} -eq 1 && -f ${sdists[0]} ]]
[[ -f ${wheels[0]} ]]
proof_extract="$RUNNER_TEMP/netgraph-core-proofs-sdist"
echo "PROOFS_EXTRACTED=$proof_extract" >> "$GITHUB_ENV"
args=(--sdist "${sdists[0]}" --receipt build/proofs/receipt.json --extract "$proof_extract")
for wheel in "${wheels[@]}"; do args+=(--wheel "$wheel"); done
python -I -B dev/proofs/package.py "${args[@]}"
test ! -e "$proof_extract/.git"
test ! -e "$proof_extract/dev"
test ! -e "$proof_extract/proofs/.lake"
! git -C "$proof_extract" rev-parse --show-toplevel
- uses: leanprover/lean-action@24581d74d674803a25a81b10b059c5c0cdd344c6
with:
lake-package-directory: ${{ env.PROOFS_EXTRACTED }}/proofs
auto-config: "false"
build: "false"
test: "false"
lint: "false"
use-github-cache: "false"
use-mathlib-cache: "true"
- name: Check proofs using only the extracted source and pinned dependencies
run: |
cd "$PROOFS_EXTRACTED/proofs"
lake --wfail build
lake exe proof-audit --output "$GITHUB_WORKSPACE/build/proofs/sdist-check.json"
lake env leanchecker --fresh Checks > "$GITHUB_WORKSPACE/build/proofs/sdist-replay.log" 2>&1
python -I -B Checks/audit.py --verify-report "$GITHUB_WORKSPACE/build/proofs/sdist-check.json"
- name: Recheck artifact identities after proof execution
shell: bash
run: |
args=(--verify --sdist build/proofs/dist/*.tar.gz --receipt build/proofs/receipt.json)
for wheel in build/proofs/dist/*.whl; do args+=(--wheel "$wheel"); done
python -I -B dev/proofs/package.py "${args[@]}"
- uses: actions/upload-artifact@v4
with:
name: proof-distribution-receipt
path: |
build/proofs/receipt.json
build/proofs/sdist-check.json
build/proofs/sdist-replay.log
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: lean-native-wheels
path: build/proofs/dist/*.whl
if-no-files-found: error

bridge:
name: Lean bridge
needs: [model, distribution]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/download-artifact@v4
with:
name: lean-model-evidence
path: build/proofs
- uses: actions/download-artifact@v4
with:
name: lean-native-wheels
path: build/proofs/wheels
- name: Install the selected native wheel
run: |
python -m pip install -U -c .github/ci-constraints.txt pip
python -m pip install -c .github/ci-constraints.txt numpy
python -m pip install --no-index --no-deps --find-links build/proofs/wheels \
--report build/proofs/install.json netgraph-core
python - <<'PY'
import json, os
from urllib.parse import unquote, urlparse
data = json.load(open('build/proofs/install.json'))
installed = [x for x in data['install'] if x['metadata']['name'] == 'netgraph-core']
assert len(installed) == 1
url = urlparse(installed[0]['download_info']['url'])
assert url.scheme == 'file'
with open(os.environ['GITHUB_ENV'], 'a') as f:
f.write('PROOFS_WHEEL=' + unquote(url.path) + '\n')
PY
- name: Exact native comparisons against current model evidence
run: PROOFS_NATIVE_PYTHON=$(command -v python) bash dev/proofs/run.sh bridge
- uses: actions/upload-artifact@v4
with:
name: lean-bridge-evidence
path: build/proofs/bridge.json
if-no-files-found: error
Loading
Loading