Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto eol=lf
*.gguf binary
*.wfsl binary
*.npz binary
*.bin binary
110 changes: 110 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: ci

on:
push:
branches:
- main
- "feat/**"
- "fix/**"
pull_request:
pull_request_review:

permissions:
contents: read
pull-requests: read

jobs:
standalone:
name: standalone (${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022]
steps:
- name: Checkout repository with LF line endings
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.2.2
with:
fetch-depth: 0

- name: Set up Python 3.12
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"

- name: Install standalone test dependencies
run: python -m pip install --upgrade pip pytest numpy

- name: Verify Plane 1 SHA-256 lineage and LF control-byte gate
run: python ./bin/mcproof --json lineage --verify

- name: Verify datasets/SHA256SUMS manifest (294 files)
run: |
python - <<'PY'
import hashlib
import pathlib

ds = pathlib.Path("datasets")
lines = [
ln.strip()
for ln in (ds / "SHA256SUMS").read_text(encoding="utf-8").splitlines()
if ln.strip()
]
if len(lines) != 294:
raise SystemExit(f"expected 294 SHA256SUMS lines, got {len(lines)}")
listed: set[str] = set()
for ln in lines:
sha, rel = ln.split(" ", 1)
digest = hashlib.sha256((ds / rel).read_bytes()).hexdigest()
if digest != sha:
raise SystemExit(f"digest mismatch on {rel}: {digest} != {sha}")
listed.add(rel)
actual = {
p.relative_to(ds).as_posix()
for p in ds.rglob("*")
if p.is_file() and p.name != "SHA256SUMS" and ".mde" not in p.parts
}
if listed != actual:
raise SystemExit(f"manifest set mismatch: {sorted(listed ^ actual)}")
print("SHA256SUMS OK:", len(listed))
PY

- name: Run vendored prose, duplicate-reference, leak, and receipt gates
run: |
python - <<'PY'
import os
import pathlib
import subprocess
import sys

docs = [
str(p)
for p in sorted(pathlib.Path(".").rglob("*.md"))
if not any(
part in p.parts
for part in (".git", ".lake", ".venv", ".pytest_cache", "targets")
)
]
run_env = {**os.environ, "PYTHONPATH": "src"}
r1 = subprocess.run([sys.executable, "-m", "mcproof.prose_gate", *docs], env=run_env, check=False)
r2 = subprocess.run([sys.executable, "-m", "mcproof.prose_gate", "--dupes", *docs], env=run_env, check=False)
sys.exit(r1.returncode or r2.returncode)
PY
python verification/leak_audit.py
python verification/build_final_receipt.py
git diff --exit-code verification/VERIFICATION_RECEIPT.json

- name: Run standalone pytest suite under strict Python flags
run: python -O -B -W error -m pytest -v

bar:
uses: Proven-Commons/mission/.github/workflows/verified-bar.yml@7b22e542f0db0f3013ab1439cf5d1947676a5083 # pinned mission commit
with:
project-dir: lean
bar-ref: 7b22e542f0db0f3013ab1439cf5d1947676a5083
permissions:
contents: read
pull-requests: read
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Python
__pycache__/
*.py[cod]
*.egg-info/
dist/
build/
.venv/
.pytest_cache/
.ruff_cache/
.mypy_cache/

# Lean / Lake
lean/.lake/

# MDE broker ephemeral state
.mde/
datasets/.mde/

# Large checkpoints, raw activations, isolated worktrees, and sealed response dumps
checkpoints/
compile/checkpoints/
compile/artifacts/*.npz
stack/worktrees/
stack/results/smoke/
stack/results/final/*.jsonl
verification/rederived_p2b/
verification/stack_sealed_receipts/

# OS
.DS_Store
132 changes: 132 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
Source code in this repository is licensed under the Apache License, Version 2.0.
Documentation and specifications in `spec/` and markdown files are licensed under CC BY 4.0.

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner.

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License.
Loading
Loading