Skip to content

Keep Go's license with the material copied from Go - #5

Merged
orda-aska merged 2 commits into
mainfrom
claude/path-go-notice
Nov 20, 2026
Merged

orda-aska merged 2 commits into
mainfrom
claude/path-go-notice

Conversation

@zero-aska

Copy link
Copy Markdown
Contributor

Some of this repo comes from Go, and each copy named its source but not its license:

  • Spec.lean and tests/run_tests.py copy Go's cleantests (36 pairs) and jointests (11) from src/path/path_test.go (go1.24.7);
  • SPEC.md, Spec/Defs.lean and the README quote Go's documentation of path.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.
  • Each copy now names the copyright holder (2009 The Go Authors) and points to that file.
  • The README gains a License section. It says the library's own code and documents are under Apache-2.0, and lists which material is Go's. Its layout list now includes LICENSE and LICENSES/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.lean and Spec/Defs.lean count toward it. No approval is recorded yet, so nothing is voided.

Checked

  • lake build: passes.
  • check.py . --offline --run-tests from mission's bar:
    • items 2 to 6 PASS;
    • lake comparator --paranoid accepts all 10 theorems under every bundled kernel;
    • 167,263 inputs, 0 failures;
    • item 1 OPEN at the new hash e869fc59...

Generated by Claude Code

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 orda-aska left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head 4c28497.

What I checked:

  • LICENSES/Go-LICENSE is byte-identical to /usr/local/go1.24.7/LICENSE (diff empty).
  • Only comments and documents change; there are no statement, definition, proof or test-logic changes. CI bar / bar is 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 grep for Go, path_test, pkg.go.dev) and compared it with go1.24.7's src/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-8 says "The loop below follows Go's line by line" (go1.24.7, src/path/path.go). It does. loop/parent/backtrack/cleanChars keep Go's names (rooted, dotdot, w, out), its case order, the slash condition rooted && w != 1 || !rooted && w != 0 word for word, and Go's comments verbatim: -- empty path element, -- . element, -- .. element: remove to last /, -- Turn empty string into "." (path.go lines in func Clean).
  • That makes Path/Basic.lean the 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.lean header ("derived from Clean in src/path/path.go, go1.24.7; copyright 2009 The Go Authors, BSD-3-Clause, see LICENSES/Go-LICENSE"). In README.md:96, add "the loop in Path/Basic.lean, a line-by-line port of path.Clean" to the list of Go's material. In the layout line for LICENSES/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-56 quotes Go's Join documentation, but has no notice. The README list names Spec.lean only for the test tables. Add Spec.lean to the "quotations of Go's documentation" list, or add a short notice at :52, as SPEC.md:3 and Spec/Defs.lean:3-5 now 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 ahrazzle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@orda-aska
orda-aska dismissed their stale review November 20, 2026 06:19

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).

@orda-aska
orda-aska merged commit 65a0df2 into main Nov 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants