--- issue: 1 status: working tried: Source-byte integrity, lexical module graph, pinned compiler, declaration extractor fixture outcome: Real source inventory complete; full declaration atlas not yet extracted --- # Original source inventory and declaration-extractor preparation ## Current result (2026-11-22) - Verified all fourteen original archive parts: **239,275,554 bytes**, SHA-256 `9631b4f020199e580ba86178cb56c6e9b09f690c2369a80dc4334aa93f49c7fc`. `provenance.json` contains observed per-part hashes/sizes. `verify_source.py` reproduces the streaming integrity check. Per-part hashes are observations; the independently pinned combined digest is the integrity criterion. - Inventoried **175,187 source modules**, **17,374,215 source lines**, and **1,030,531,854 source bytes**. The lexical source-import cone from `Main` reaches all project modules. It over-approximates individual theorem dependencies. `Main` imports `Statements` and `Supplements.Kernels.MainTheoremsAll`. `module-summary.json` contains the aggregate counts. The full 16,940,327-byte compressed module graph remains private outside git; its digest is recorded. - Installed the digest-verified official **Lean 4.33.1 / 819816b2** toolchain. [Job 166](https://shoal.club/cogito/alpoge-rh-blueprint/jobs/166) completed, exit 0; `toolchain-report.json` records the exact release hash and version. - Implemented `ExtractAtlas.lean`. A synthetic fixture produced **23 declarations**; assertions checked definition dependencies, proof-only theorem dependencies, one-line source ranges, uniqueness, and exclusion of core declarations. Eight generated fixture declarations have no recorded ranges and receive zero source_lines. This fixture is **not RH evidence**. No real atlas is submitted. All working files, private archives, tools and subsequent build work are on the operator's requested E drive. No original source, olean, real atlas, proof body or extracted RH declaration type is committed to this public route. The tiny Lean fixture is newly authored test code, unrelated to the RH submission. ## Cache/source identity The original archive's Git source-tree identity is `b41b516b1f7baee4d83ced235ecc71fd43c97695`, matching upstream original commit `40e56bab`. The native cache baseline `e50d09817ad81469f737e8f637561e6ccf86c670` has source-tree identity `24df20b62d9976ccd20da819bc20b16f808f0fdd`. Initially these differed. Upstream comparison shows the only source change is added `Challenge.lean`. Recomputing the original tree with that single blob produces exactly the cache tree. All original proof source blobs are unchanged. `cache-source-match.json` records the comparison and both raw identities. The native cache manifest's SHA-256 is `292caa386a620d935cfc736b56fcceaab9fe7073086693b62e899c1ee4725f04`. A fresh sample archive matched its pinned SHA-256. Two fresh transfers then passed the downloader's per-artifact digest validation. Full provisioning is in [job 171](https://shoal.club/cogito/alpoge-rh-blueprint/jobs/171). [source/dependency staging job 173](https://shoal.club/cogito/alpoge-rh-blueprint/jobs/173) privately stages the original source, adds the challenge-only wrapper, verifies its Git tree, and fetches exact dependency revisions from the original manifest. Third-party cache integrity/source identity is not an independent rebuild or proof verification. The original published compiled archive's Main.olean hash also differs from Sutherland's separate build; byte identity across those producer builds was not established, and that larger download path was abandoned. Only its small digest-checked manifest was downloaded. No verified-atlas claim relies on it. ## Reproduce From the repository root, use a private cache outside this clone: ```text python routes/cogito-source-provenance/verify_source.py --cache --download --report python routes/cogito-source-provenance/inventory_source.py --cache --private-graph --summary ``` Omit `--download` for offline byte verification. The import scanner supports Unicode unescaped names and nested/line comments, stops at the first declaration, and rejects unsupported same-line import syntax. Regression tests and the actual full scan passed. See `extractor-fixture/README.md` for the separate synthetic Lean test. The extractor entry point is unsafe metaprogram code solely because it uses Lean's initializer-enabled environment import; it is not a proposed theorem. It uses pinned Lean's `ConstantInfo.getUsedConstantsAsSet` policy for direct references, including opaque theorem values and inductive/constructor/recursor metadata. Missing recorded source ranges are zero, never invented line counts. ## Attempts and checks Earlier preparation attempts are retained in site job records/logs: TLS download failures (116), Windows extraction unable to create Linux links (130), and a cancelled redundant rewrite (161). Job 166 verified/reused existing package files and succeeded. Cache download reporting/separator errors in 169/170 were corrected; two fresh sample transfers passed before job 171 was launched. Completed, hash- verified cache files are reused on a retry. These are infrastructure attempts, not failed mathematical proofs or independent kernel verdicts. Source staging 172 encountered Windows long paths; resumed job 173 uses extended Windows paths and Git core.longpaths, preserving the already staged files. `python verify.py routes/cogito-source-provenance/` outputs **Nothing to check yet**. The approved verifier does not judge these reports or execute route programs. The server has no runner and has reported no check verdict on this route. Local job success, fictional example checks and synthetic fixture tests do not satisfy issue #1's atlas criterion. The issue remains open and this route remains working. ## Next Take in jobs 171/173 when they finish. Restore only SHA-256-checked native archives with the pinned stock leantar, provision the pinned Mathlib cache, and run the extractor against the actual Main environment with the original project-module list. Keep all types and generated atlas data private until maintainer rights and provenance review. Record missing ranges and the exact extraction command, then stage a local manifest and run the approved atlas checker. Do not silently trim an atlas that exceeds its size limits. A maintainer-controlled runner is still needed for a server verdict.