Repository navigation
feat(packages): source packages, a project imports the modules of a locked package (PK-01..PK-04) - #162
Conversation
#161) A language-1.2 project declares [[source_package]] (kind path, a member of the workspace named by lexlean-workspace.toml), pinned in lexlean.lock by tree and manifest digest; imports are closed at link, a package definition is an ordinary definition of the importing project, and verify replays package modules with their origin in the records. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
…te it; canonical fixture Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
… (source-package schemas; main at d22266b) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
…b on the merged tree Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN
|
Maintainer review: approved at CI. Run 39017295556 on this head: all 24 jobs green (host legs, Against #161, point by point (SPEC §10.5, the code, the register).
Two decisions I accept, both in the PR and to be lifted by a later issue, not silently: Not in this PR, on purpose. Merging with a merge commit pinned to this head. Every other PR with language-1.2 records now merges main and regenerates once. Generated by Claude Code |
…rows (generated records taken from main, to be regenerated)
…3f0c7 into #155) Main moved under this branch with #162 (source packages), #153 (stdlib), #160 (bootstrap) and #165 (PK-05). The merge keeps this branch's side of the four points that matter (the 53 renamed private names of LexLeanText.lex.tex, legacy certificate E rendered with legacy_decoder() and no `import all`, SM-33, the decoder) and takes main's tree for every generated record, which is regenerated here. - register 404 (403 on main + SM-33): README, SPEC §31 total, table.len(), spec_links.rs set by hand; - language-1.2 compiler-semantics ID 91b3cb51... -> 63dd4c08...: every lock that carried the old one is substituted and `lock --check` is current; - regenerated in order: check-golden, check-fixtures, check-calculus, check-production-export, verify-examples (the language-1.2 examples, compiler, stdlib, bootstrap; languages 1.0/1.1 examples are untouched by this branch and were not rewritten), validate-model --write; - local checks passed: validate-model, validate-spec-links, check-test-inventory, check-golden, conformance_{sm_33,lm_02,sp_14,rt_02,rt_04,bs_01,pk_05,rp_07,rp_14, rp_11,sl_01,sp_05,sp_09}. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WG9wejRSGKo2jLG8BLxPs5
Refs #161
Ready for review. Contains main at 8a84467 (with #82 and #160) and the language-1.2 records regenerated once on that combined tree. The design is the maintainer's, on #161.
What is here
[[source_package]](language 1.2 only;package,version,kind = "path",path), canonical-serialized afterartifact_source, omitted when empty. Any other kind isLLC0101, not stubbed.lexlean-workspace.toml(spec, sortedmembers): the nearest ancestor of the project root; the project and each package path must be listed members, resolved from the workspace root; no.., no symlink, reads confined to the manifest andsource_roots(SPEC §10.5).[[source_package]]rows (id, version, kind, source, module_prefix,tree_sha256,manifest_sha256, imports), the transitive closure. Every command recomputes them (source_package::load_locked) and refuses a mismatch with the package and both digests.PkgLib.Util); scopes import only their own modules and the packages they declare. A package definition is an ordinary definition (no module of a package is analysed for production roots, no re-export).fmtnever rewrites a package file.verifyunder the package's prefix;originin the build manifest, the snapshot and the attestation (origins).source_idhashes the lock, so it carries the pins.model/errors.toml):LLC0105pin mismatch,LLC0106undeclared / two sources,LLC0107prefix claimed twice,LLC0108workspace rule,LLR3009import of an undeclared package; symlink and escape areLLS8001.PK-01..PK-04, SPEC §31,features/suites/packages.feature,conformance_pk_01..04, fixtures undertests/packages/workspace. The register is 402 (398 on main + 4).Decisions accepted on #161
versionis a required field of[[source_package]].lexicon_sources and noartifact_sourceor[pdf]; its glossaries are the importing project's.Records
The language-1.2 locks, oracles, fixtures, calculus files, production-export packages and verification records are regenerated once, on main 8a84467, with the repository's writers (
lexlean lock,check-golden --write,check-fixtures --write,check-calculus --write,check-production-export --write,verify-examples --write). Languages 1.0 and 1.1 are byte-identical.bootstrap/is relocked and regenerated with the rest.Not here, on purpose
bootstrap/pilot importsstdlib/, the vendored copy and its equivalence assertion deleted) follows as a second PR from main after this lands.Local evidence
Linux x86-64, Lean 4.32.1, one process each:
conformance_pk_01..04,vr_13,vr_23,rp_07,rp_11,rp_14,rt_01,rt_02,rt_04,sp_05,sp_09,sp_14,sl_01,lm_01..03,lm_13,bs_01;validate-model(402 ids, 85 codes),validate-spec-links,check-test-inventory,check-golden,cargo fmt --check, clippy-D warnings,cargo test -p lexlean.verify-exampleswas not run to the end foruor-atlaslocally (language 1.0, no record moves; its Lean run was rejected on this 4-core machine); CI's Atlas leg is its evidence.🤖 Generated with Claude Code
https://claude.ai/code/session_01AinddrUH9xHeNmR6FTWypN