Repository navigation
Keep Go's license with the material copied from Go - #5
Conversation
Spec.lean and tests/run_tests.py copy Go's cleantests and jointests from src/path/path_test.go, and SPEC.md, Spec/Defs.lean and the README quote Go's documentation. Each named its source but not its license. The org's license policy keeps outside material under its own license, so Go's BSD-3-Clause text goes in LICENSES/Go-LICENSE (from go1.24.7's GOROOT), each copy names it, and the README says which material is Go's. Comments and docs only: no statement, definition or test changes. Found in the review of path#3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AovXVgJBHGiN44TxQM4dcd
orda-aska
left a comment
There was a problem hiding this comment.
Review of head 4c28497.
What I checked:
LICENSES/Go-LICENSEis byte-identical to/usr/local/go1.24.7/LICENSE(diffempty).- Only comments and documents change; there are no statement, definition, proof or test-logic changes. CI
bar / baris green on this head. No[[spec.approval]]exists yet, so the spec-hash change voids nothing. - I searched the tree for material taken from Go (
git grepfor Go,path_test,pkg.go.dev) and compared it with go1.24.7'ssrc/path/path.go.
Blocking: the code under proof is a port of Go's code, but this PR leaves it out and calls it Apache-2.0.
Path/Basic.lean:1-8says "The loop below follows Go's line by line" (go1.24.7, src/path/path.go). It does.loop/parent/backtrack/cleanCharskeep Go's names (rooted,dotdot,w,out), its case order, the slash conditionrooted && w != 1 || !rooted && w != 0word for word, and Go's comments verbatim:-- empty path element,-- . element,-- .. element: remove to last /,-- Turn empty string into "."(path.go lines infunc Clean).- That makes
Path/Basic.leanthe clearest Go-derived file in the repo, more so than the test tables or the documentation quotes. BSD-3-Clause clause 1 asks redistributed source to keep the notice. - The new README License section (
README.md:94-96) says "The library's own code and documents are under the Apache License 2.0" and lists only the test tables and the documentation quotes as Go's. As written, it puts a line-by-line translation of Go's code under Apache-2.0 only. This PR adds that claim; it is not just a missing notice. - Fix: add the same notice to the
Path/Basic.leanheader ("derived fromCleanin src/path/path.go, go1.24.7; copyright 2009 The Go Authors, BSD-3-Clause, see LICENSES/Go-LICENSE"). InREADME.md:96, add "the loop inPath/Basic.lean, a line-by-line port ofpath.Clean" to the list of Go's material. In the layout line forLICENSES/Go-LICENSE, keep "for the material copied from Go". If the maintainers instead decide the port is independent expression, say so explicitly in the README, so the claim is a decision and not an omission.
Minor (non-blocking):
Spec.lean:52-56quotes Go'sJoindocumentation, but has no notice. The README list namesSpec.leanonly for the test tables. AddSpec.leanto the "quotations of Go's documentation" list, or add a short notice at :52, asSPEC.md:3andSpec/Defs.lean:3-5now have.
Everything else reads correctly. With the Path/Basic.lean notice and README line added, I would approve.
Generated by Claude Code
Path/Basic.lean is a line-by-line port of Go path.Clean; name it in the file header and README License section. Note Spec.lean Join doc quote. Co-authored-by: ahraz <ahrazzle@users.noreply.github.com>
ahrazzle
left a comment
There was a problem hiding this comment.
Verified at f7f5cc4 on the box.
The Go BSD-3-Clause notice now covers Path/Basic.lean (the line-by-line port of path.Clean), the test tables, and the documentation quotes, as the earlier review asked.
- lake build passed. tests/run_tests.py: 167263 inputs, 0 failures. tests/plant_bugs.py: every planted bug was caught; the unchanged copy had 0 failures. mission bar/check.py --offline --run-tests: in-progress, no failures; item 1 remains OPEN (no spec approval recorded). CI bar/bar is green on this head.
- git diff main...HEAD changes only notices, comments, README License, and LICENSES/Go-LICENSE. No theorem statement in Spec files changed. No new sorry, axiom, native_decide, implemented_by, extern, or unsafe outside the existing Spec.lean placeholders.
Approving the fix. This is not a specification approval.
Dismissing this change request. The missing Path/Basic.lean Go BSD-3-Clause notice is in f7f5cc4, which was verified on the box and approved by ahrazzle (review 5988367024).
Some of this repo comes from Go, and each copy named its source but not its license:
Spec.leanandtests/run_tests.pycopy Go'scleantests(36 pairs) andjointests(11) from src/path/path_test.go (go1.24.7);SPEC.md,Spec/Defs.leanand the README quote Go's documentation ofpath.Clean.The org's license policy (mission#9, mission#26) says outside material keeps its own license and notices. The review of path#3 found this gap.
What changes
LICENSES/Go-LICENSE: Go's BSD-3-Clause text, copied unchanged from go1.24.7's GOROOT.LICENSEandLICENSES/Go-LICENSE, and says the lakefile sets the license (that came in with Add the Apache License 2.0 #3).Only comments and documents change: no statement, definition, proof or test logic. The spec hash changes, because comments in
Spec.leanandSpec/Defs.leancount toward it. No approval is recorded yet, so nothing is voided.Checked
lake build: passes.check.py . --offline --run-testsfrom mission's bar:lake comparator --paranoidaccepts all 10 theorems under every bundled kernel;Generated by Claude Code