Development and validation¶
Feature verification and caller evidence¶
The root governance.json indexes existing independent
reference tests by stable properties. It adds no Python or Rust runtime dependency.
An optional Node caller can run node scripts/verify-feature.mjs --plan and then
node scripts/verify-feature.mjs homology.projection --input fixture=repository-v1.
Install the locked Python environment first and set PYTHON to that environment’s
interpreter. homology.transport and homology.serialization select the existing
transport/rank and restoration tests. Omitting feature ids selects all indexed checks.
The projection obligations include idempotence, AP=0, PD=0 and preservation of every cycle’s homology class; the existing nontrivial-homology zero projection is a required negative case. Solver feasibility, exact current objectives, certified optimality, resource exhaustion, unavailable computations and valid zero stay distinct. No property test is promoted to a general formal proof.
The caller records source commit, index digest, fixture identity, actual command,
environment, exit result and per-property log references under ignored
.task-artifacts/verification. Dirty or changed source, missing evidence, skips
and zero-test commands remain incomplete. These are caller-reported observations.
Native extensions, GUDHI comparisons and performance claims retain their existing
separate requirements below; reference coverage cannot discharge those obligations.
Reference environment¶
Python 3.10+ and uv; the runtime uses only the standard library. From the repository root:
uv sync --locked --python 3.10
uv run --locked python -m unittest discover -s tests -v
uv run --locked python examples/single_scale.py
uv run --locked python examples/filtration.py
uv run --locked ruff check .
uv run --locked ruff format --check .
uv build --no-build-isolation
pwsh -NoProfile -File ./scripts/check_docs.ps1
git diff --check
Missing native dependencies explicitly skip native tests. A reference pass does not
validate native code. uv build creates local artifacts; public uploading follows
the release procedure below. There is no independent typecheck command.
The standalone fixed-boundary query has a focused standard-library test command:
uv run --locked python -m unittest discover -s tests -p test_filling.py -v
It checks independent all-chain optima for H1 areas/H2 volumes, small F2 matrices,
infeasibility obstructions, source/basis binding, interrupted results, exact
arithmetic, wire round trips and untrusted certificate replay. No new dependency
or native extension is required. examples/single_scale.py also runs a filling query.
Birth-pair cycle checks¶
uv run --locked python -m unittest discover -s tests -p test_optimal_cycle.py -v
uv run --locked python examples/filtration.py
The standard-library suite compares every chain on small birth windows, including filled faces, wrong historical classes, repeated scales, both stage conventions, finite/infinite features, original basis permutations, equal-cost ties, exact 3-4-5 geometry, original-point IDs, disconnected chains, cancellation/budgets, the rank-17 unsupported case and untrusted certificate replay. Frozen HomCloud outputs retain different-objective rows as representative comparisons only.
Optional source replay uses the fixed official HomCloud 5.4.0 archive, without installing HomCloud or its compiled extension. From the repository root:
New-Item -ItemType Directory -Force .task-artifacts | Out-Null
Invoke-WebRequest 'https://files.pythonhosted.org/packages/2c/14/0e520f2019bbea4e027adb464cd19055323bd892c220b03190685e32d058/homcloud-5.4.0.tar.gz' -OutFile .task-artifacts/homcloud-5.4.0.tar.gz
$archiveHash = (Get-FileHash .task-artifacts/homcloud-5.4.0.tar.gz -Algorithm SHA256).Hash.ToLowerInvariant()
if ($archiveHash -ne '41a095599249cbc0092a835d6888eb252a6c4cd7935ac71481cd37e00f9e883b') { throw 'HomCloud archive hash mismatch' }
tar -xf .task-artifacts/homcloud-5.4.0.tar.gz -C .task-artifacts homcloud-5.4.0/homcloud/optimal_one_cycle.py
$env:HOMOLOGY_HOMCLOUD_SOURCE = (Resolve-Path .task-artifacts/homcloud-5.4.0/homcloud/optimal_one_cycle.py).Path
uv run --locked python -m unittest discover -s tests -p test_optimal_cycle.py -v
Remove-Item Env:HOMOLOGY_HOMCLOUD_SOURCE
The test verifies the file hash and executes only the unchanged upstream pure Python functions, excluding the unused native import/entry. Public Pair or C++ integration is outside this comparison. Without this environment variable, only the live source replay is skipped; frozen comparisons and independent enumeration still run. No new locked/runtime dependency is required.
Native and oracle checks¶
Build/install the matching wheel using the native guide.
$env:HOMOLOGY_NATIVE_REQUIRED = '1'
uv run --locked --no-sync python -m unittest discover -s tests -v
cargo +1.98.1 fmt --manifest-path native/Cargo.toml --check
cargo +1.98.1 clippy --manifest-path native/Cargo.toml --locked --all-targets -- -D warnings
$env:PYO3_PYTHON = Join-Path (Get-Location) '.venv/Scripts/python.exe'
cargo +1.98.1 test --manifest-path native/Cargo.toml --locked --lib
Use .venv/bin/python on Linux. Rebuild after Rust changes; --no-sync retains the extension.
The optional GUDHI test environment is locked independently:
uv sync --locked --group oracle --group oracle-secondary --python 3.12
$env:HOMOLOGY_GUDHI_REQUIRED = '1'
uv run --locked --group oracle --group oracle-secondary python -m unittest discover -s tests -p test_simplicial_inputs.py -v
uv run --locked --group oracle --group oracle-secondary python -m unittest discover -s tests -p test_gudhi_oracle.py -v
uv run --locked --group oracle --group oracle-secondary python -m unittest discover -s tests -p test_oracle_corpus.py -v
These tests compare actual simplicial inputs and F2 stage Betti/barcode/rank results. The 77-input regression also checks same-P geometry and snapshot restoration. Oracles never populate production results. See fixture provenance.
Documentation and GitHub Pages¶
Pair-volume and fixed-boundary filling use only the reference runtime and the existing locked development dependencies. Run their independent enumeration, geometry/source, budget, wire-recovery and certificate-tampering checks with:
uv run --locked python -m unittest discover -s tests -p test_filling.py -v
The pair tests enumerate original simplex sets for all finite pairs of four fixed total orders, including equal scales, both stage conventions and reversed coordinate orders. They separately measure triangle area and tetrahedral volume, distinguish upper mass from boundary mass and fixed-boundary optimization, and verify that semantic replay does not call the solver’s solve/kernel routines.
Sphinx + MyST + Furo requires Python 3.11+; CI uses 3.12.
uv venv .task-artifacts/docs-env --python 3.12
uv pip install --python .task-artifacts/docs-env/Scripts/python.exe -r docs/requirements.txt
.task-artifacts/docs-env/Scripts/python.exe -m sphinx -E -n -W --keep-going -b html docs/en .task-artifacts/docs-site
.task-artifacts/docs-env/Scripts/python.exe -m sphinx -E -n -W --keep-going -b html docs .task-artifacts/docs-site/zh
.task-artifacts/docs-env/Scripts/python.exe -m sphinx -E -n -W --keep-going -b html -D html_baseurl=https://proffitteoy.github.io/homology-operator/en/ docs/en .task-artifacts/docs-site/en
On Linux use bin/python. English is served at index.html by default; Chinese
is served at zh/index.html. Existing en/index.html URLs remain available.
Run the PowerShell 7 Markdown checker and execute changed
code snippets separately. The checker rejects inconsistent table widths and unprotected
math delimiters. Use GitHub backtick-protected inline math and math fences; shared
Sphinx configuration converts them to MyST math nodes at build time. The checker
rejects GitHub’s forbidden \operatorname; use \mathrm{...} for upright names.
It does not fully validate TeX syntax, remote availability, or heading anchors.
After editing formulas, also check GitHub’s client rendering.
Successful main builds deploy both languages to
GitHub Pages; pull requests only build.
Change-specific validation and CI¶
Validate input shapes/AD=0/positive weights; all four projection conditions; same-P geometry and arithmetic; transport composition/rank/oracle agreement; certificate replay; identity mixing/tampering; JSON and legacy round trips. Native changes require independent reference/enumeration checks and word boundaries.
Reference CI checks Linux Python 3.10/3.12 and isolated reference wheels. Native CI
checks Windows Python 3.10 and Linux Python 3.12 with Rust fmt/Clippy,
cargo test --lib, required Python native differential tests and isolated dual
wheels. Oracle CI forces GUDHI comparisons. Documentation CI builds
both languages strictly and deploys main. Local and remote results belong to their
exact source identities. Temporary outputs and wheels stay in ignored directories.
Feature reference/source changes can be checked independently with
python -m unittest discover -s tests -p test_family.py -v and
python -m unittest discover -s tests -p test_backend_integration.py -v in the
locked environment. The former includes independent coset/rank/PH comparisons,
both stage conventions, raw source and full-history rejection, fixed research
pairs, and schema 3 round trips. The latter checks references across the existing
portable/compact/native action families, including restoration without native.
Run python examples/filtration.py to exercise both algebra-only and simplex
provenance paths. No additional runtime or test dependency is required.
Public releases¶
The homology-operator distribution provides an OS-independent wheel and source
archive. Version 0.0.2 has a standard-library-only runtime. The optional Rust
package is built separately from matching source and is not uploaded to PyPI.
During 0.x, patch releases preserve the public API; breaking changes require a
minor-version increase and release notes. Regression tests cover existing schema
1/2 restoration and preserve historical fixture versions/hashes.
Before release, synchronize pyproject.toml, __version__, uv.lock, CITATION.cff,
and the documentation version. Run the checks above, including strict builds of
both documentation languages, and verify all main CI for the release commit.
New result provenance reports the installed package version.
Register a pending publisher on PyPI
with project homology-operator, owner proffitteoy, repository homology-operator,
workflow release.yml, and environment pypi.
The release workflow runs on a published
GitHub Release whose tag is v plus the package version, such as v0.0.2.
It tests Python 3.10/3.12, builds/checks wheel and sdist metadata, and runs the full
applicable suite against the isolated wheel before uploading those same artifacts.
The publishing job uses the pypi environment and short-lived OIDC identity.
uv build --no-build-isolation
uv tool run --from twine==6.2.0 twine check --strict dist/*
gh release create v0.0.2 --target <verified-commit-sha> --title "homology-operator 0.0.2" --notes-file <release-notes-file>
Verify the workflow, PyPI version record, uploaded SHA-256 digests, and a fresh installation from PyPI. A GitHub Release or successful build alone does not prove that PyPI uploading completed.
Complete-workflow optimization, frozen 2026-10-18¶
This branch preserves the candidate measured against main
a11bf50b8c8320651e9ac015566778d957af9c17. Windows 11 build 26100,
CPython 3.12.13 AMD64 and the matching Rust 1.98.1 baseline extension were used.
Each configuration has ten randomly ordered paired fresh processes, with ten
separate paired peak-working-set workers. Seed 20261018 and 10,000 paired
median-log-ratio bootstrap resamples are fixed. Pipeline admission requires at
least 5% median improvement and a 95% ratio interval entirely below 1, or at
least 10% peak-memory improvement with at most 5% median timing regression.
No declared negative control exceeds 20% median time or peak-memory regression.
Workflow |
Baseline / candidate pipeline ms |
Candidate / baseline |
Paired 95% ratio interval |
Median worker peak MiB, baseline / candidate |
|---|---|---|---|---|
|
2055.50 / 1368.78 |
0.666 |
0.651–0.669 |
44.12 / 44.21 |
|
1720.84 / 1128.23 |
0.656 |
0.646–0.664 |
44.05 / 44.07 |
|
10446.28 / 3230.18 |
0.309 |
0.306–0.310 |
70.47 / 69.04 |
|
10175.05 / 2868.44 |
0.282 |
0.280–0.284 |
71.13 / 70.00 |
|
30709.91 / 8987.19 |
0.293 |
0.291–0.294 |
69.72 / 69.91 |
|
2922.05 / 1284.61 |
0.440 |
0.434–0.444 |
38.92 / 38.02 |
|
1779.94 / 1369.06 |
0.769 |
0.757–0.780 |
34.12 / 34.45 |
There are 1,340 matched timing and 1,340 separate peak-memory samples across 65 main configurations and two complete-corpus configurations. The corpus contains 77 fixed inputs and 158 degree families; it measures stage geometry, stage snapshot recovery and barcode readout. The T1–T5/fan workflows separately measure five exact geometry queries, source location, family storage/recovery and independent query replay. Joint case suffixes name chain dimension and cyclic input count; neighboring input pairs also request distance and support intersection/union. Declared unsupported/exhausted query states are retained.
Pipeline phases can nest and must not be summed. Cold runs include conversion and construction; warm geometry runs reuse prepared objects but still query, store and recover. The enclosing process-request latency additionally includes launch/import, experiment-record output and parent JSON parsing, and is retained separately from pipeline timing. RSS captures the worker OS high-water mark after the workflow and measurement-record encoding; final log transmission is outside that capture point. It is not a logical-entry or hard-memory limit.
P1 allocation/iteration experiments and the P2 sparse/dense alternatives were rejected by the declared timing-regression rule. They are not enabled: final Rust source and the loaded native binary match the baseline. P3 retains packed incremental exact search with unchanged order/checkpoints; P4 retains packed independent verification, canonical-codec leaf dispatch and same-call-only minimum-class alias replay. P5 native/shim self-time was below the 20% target workflow gate, so no SIMD path was introduced. Exhaustive search domains and public APIs, schemas, certificates and versions remain unchanged.
The frozen evidence archive
retains source/input/binary identities, final raw samples and complete outputs,
marginal comparisons, rejected native controls and a standard-library replay
entry point. Content-addressed repeated outputs reduce the selected archive to
about 14 MB. Verification losslessly reconstructs all eight original sample
streams and their byte hashes, including CRLF. Redundant partial streams, pilots,
routine logs and caches are omitted. The original 148 MB ZIP remains a separate
local historical artifact, not a product or archive-branch dependency.
The final source snapshot is final-v2.
Source-file signature (SHA256 of the sorted filename/byte-SHA256 mapping):
cbbef4a6fbe2aa0633f09aaf2d10ac5da9a86adc9710747b09a084bc9961851c. Full report.json SHA256:
611c7a6e054c072169736fef5627b404bff9fc6c7fc2d4011c88a7ab66ffd7cd.
Export the archive to a new folder, then run:
git fetch origin archive/fullflow-evidence-20261018
git archive --format=zip --output=.task-artifacts/fullflow-evidence.zip 734281a46342239d078d83841cc22a1787cadcd3
Expand-Archive .task-artifacts/fullflow-evidence.zip -DestinationPath .task-artifacts/fullflow-evidence
Set-Location .task-artifacts/fullflow-evidence
python reproduce.py verify
python reproduce.py summarize
python reproduce.py materialize --out replay-work
python replay-work/replay.py run --phase pilot --select geometry-T2-cold
python replay-work/replay.py run --phase acceptance
Byte verification and table reconstruction are portable. Full historical RSS
replay requires Windows; bundled native binaries require x64 CPython 3.12.
--build-native rebuilds with Rust 1.98.1, a platform compiler and
maturin==1.15.0, using independent build directories. --experiment kernel
and --experiment ablation replay the retained component experiments.
No Topp or PH oracle supplies production results.
Revalidation on 2026-11-23: 275 tests with native/GUDHI required (two optional live HomCloud source replays skipped); reference-only validation also passes with its optional backend skips. Isolated reference/native wheels, examples, Ruff, Rust checks, packaging and strict bilingual documentation checks pass locally. These measurements do not imply a main merge, new remote CI, release, general speedup, or a comparison against PH-only functionality.