--- issue: 1 status: working --- # Source provenance preflight for the declaration atlas ## Result (2026-11-22) Downloaded the fourteen original source archive parts from the URLs pinned in ATLAS.md to a private cache outside this clone. Read the compressed bytes in part01 through part14 order, without extracting or executing source. - Observed total: **239,275,554 bytes**. - Observed SHA-256: `9631b4f020199e580ba86178cb56c6e9b09f690c2369a80dc4334aa93f49c7fc`. - Both match ATLAS.md. `provenance.json` records the observed per-part byte counts and hashes. Those per-part hashes are observations from this run, not independently authenticated upstream pins. The combined pinned digest is the integrity check. - `verify_source.py` is the reproducible streaming downloader/checker. It caches outside git, downloads at most four parts concurrently, and emits the report only after combined size and hash validation. It never extracts source. This is source-byte integrity evidence only. It does not verify the authorship, license, mathematical claims, Lean build, dependency graph, or declaration atlas. No source, proof body, archive, olean, real atlas, or fabricated declaration is included in this route. Metadata is proposed for maintainer review via PR. ## Reproduce From the repository root, choose a private cache **outside** this repository: ```text python routes/cogito-source-provenance/verify_source.py --cache --download --report ``` Repeat offline by omitting `--download`. The cache must contain all fourteen `lean.tar.gz.part01` through `lean.tar.gz.part14` files. Expected output: ```text source archive: 239275554 bytes, 14 parts, sha256 matches ATLAS.md No source was extracted; no declaration atlas or Lean build was verified. ``` ## Continuation (2026-11-22) Resumed at the operator's request. The working folder and private source cache are now on drive E. Next, inventory actual source modules and imports before preparing the pinned Lean environment. No atlas result is claimed yet. ## Earlier claim release This contribution completes only the source integrity preflight. The atlas task is not complete: there is no built Lean environment or extracted atlas in this route. The claim is released rather than left active while awaiting those inputs. PR #8 retains the tool and evidence for review; it does not close issue #1. ## Validation and limitations The real download passed size and hash validation. A separate local synthetic fixture confirmed numeric part ordering, rejection of same-length byte corruption, and rejection of a missing part. These tests are software checks, not RH evidence. The supplied fictional `examples/` fixture also passed the project's verifier; that result is not evidence for this contribution or the RH proof. `python verify.py routes/cogito-source-provenance/` outputs `Nothing to check yet`. The approved project checker does not inspect source-provenance reports or execute route scripts. No atlas manifest is supplied, so this route cannot satisfy the atlas task's acceptance criterion. No declaration count or coverage is claimed. ## Server check state For result commit `a6102892ccb918f1975a4399a420352bd52c5538`, the commit-status API returned `pending`, `total_count: 0`, `statuses: []`. The compute API reports approved rules `cccd4b165caf701d02b46db33b5d8a9246c6df2c`, no pending rule changes, the `verify` gate, and `runners: []`. The approved verifier files match those used locally. No server verdict has judged this artifact. A maintainer-controlled runner must be available for the server gate. ## Actual source module inventory `inventory_source.py` streams the same hash-checked archive. It scans source module import headers, including Unicode identifiers and nested comments, and stores the full source-module graph privately outside git. It does not extract Lean declarations, elaborate types, inspect proof terms, or build the project. Observed: **175,187 source modules**, **17,374,215 source lines**, and **1,030,531,854 source bytes**. The lexical project-module import cone rooted at `Main` reaches **all 175,187 project modules**. This source import graph therefore does not offer a smaller module build than the full project. It over-approximates the dependencies of individual theorems; it says nothing about which results are new mathematics or necessary proof-term dependencies. `Main` directly imports `Statements` and `Supplements.Kernels.MainTheoremsAll`. Module-family counts and pinned toolchain/ Mathlib revision are in `module-summary.json`. The 16,940,327-byte compressed graph is private and not committed. Its digest is in that report for reproducibility. No source excerpts or declaration types are included. Reproduce after placing the fourteen parts in a private cache: ```text python routes/cogito-source-provenance/inventory_source.py --cache --private-graph --summary ``` The scanner supports one unescaped import name per import command and rejects unexpected same-line tokens. The actual full scan succeeded. Synthetic regression tests cover Unicode imports, nested/line comments, stopping at declarations, and rejection of unsupported multi-name syntax. This is lexical metadata, not an atlas accepted by the project checker. ## Next Build the privately retained, hash-checked source with the pinned Lean 4.33.1 (`819816b2`) and Mathlib v4.33.1 (`0df444a3`) environment. Run a reviewed Lean extractor over that built environment, recording module selection, handling of generated declarations, and direct dependencies. Obtain maintainer rights and provenance review before publishing extracted types to an external artifact store. Then stage a hash-checked atlas and request the real `atlas: N declarations, sha256 ok` check. Issue #1 remains unresolved.