Skip to content

feat: Make this repository's root LICENSE file the COMPLETE canonical - #1

Merged
andrei-hasna merged 1 commit into
mainfrom
factory/task-1f1c43ec25a8-f8ec41cb
Jul 29, 2026
Merged

feat: Make this repository's root LICENSE file the COMPLETE canonical#1
andrei-hasna merged 1 commit into
mainfrom
factory/task-1f1c43ec25a8-f8ec41cb

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Objective

Make this repository's root LICENSE file the COMPLETE canonical Apache License 2.0 text, byte-identical to https://www.apache.org/licenses/LICENSE-2.0.txt (202 lines: a leading blank line, the centered "Apache License" title, sections 1 through 9, "END OF TERMS AND CONDITIONS", and then the "APPENDIX: How to apply the Apache License to your work" section).

DO NOT ASSUME THE STARTING STATE. Read the current LICENSE first and identify which of these it is:
(A) A SHORT STUB (roughly 12-25 lines) containing only the Apache boilerplate NOTICE. That notice is meant for source-file headers, not as the LICENSE. Apache-2.0 section 4(a) requires shipping a copy of the License itself.
(B) A TRUNCATED or REFLOWED near-full text (roughly 120-190 lines) that has the terms but STOPS AT "END OF TERMS AND CONDITIONS" and is MISSING the APPENDIX section entirely, and/or has lost the canonical leading blank line, title centering, or line wrapping.
(C) Already byte-identical to canonical apart from a filled-in copyright line. In this case ONLY, make no change and say so.

Cases (A) and (B) BOTH require replacing the file with the full canonical text. Do NOT skip case (B) on the grounds that "the license text is already present" — a file missing the APPENDIX, or reflowed so GitHub's detector fails, is exactly what this task exists to fix. Verify by CHECKING FOR THE APPENDIX HEADING, not by eyeballing length.

COPYRIGHT: if the CURRENT file contains a specific copyright line (e.g. "Copyright 2026 Hasna, Inc." or "Copyright 2026 Hasna"), carry it across VERBATIM into the APPENDIX placeholders — preserve the exact year and exact entity, including any ", Inc.". If the current file has NO such line, leave the canonical placeholders "Copyright [yyyy] [name of copyright owner]" exactly as apache.org ships them. NEVER invent, correct, or normalise a year or an entity name.

CHANGE NO OTHER FILE, with one exception: a README line that explicitly claims a different license may be corrected to Apache-2.0. Do not touch package.json unless this repo is being relicensed from MIT (it is not, unless the objective says so). If the repo VENDORS third-party code under another license, that code and its notice stay exactly as they are.

VERIFY BEFORE FINISHING — all four must hold, and check each explicitly:

  1. LICENSE contains "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION"
  2. LICENSE contains "APPENDIX: How to apply the Apache License to your work" <-- the one most often missing
  3. LICENSE is 200-203 lines
  4. git diff --name-only lists LICENSE and nothing else (or LICENSE plus a README license line)
    Report the starting state you found (A, B, or C), the line count before and after, and the copyright line you preserved.

Verification

  • policy source: base 4497245 (immutable commit — agent-proof)
  • containment: env — allowlist env, non-login shell, run-scoped HOME (registry auth seeded for install)
  • install: pass
  • typecheck: pass
  • build: pass
  • test: pass
  • doctor (ci): ok — 11 checks passed (1 advisory)

Run run_7b3c346a151b · backend codewith · task inline
🏭 Generated by @hasnaxyz/factory


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Make this repository's root LICENSE file the COMPLETE canonical Apache License 2.0 text, byte-identical to https://www.apache.org/licenses/LICENSE-2.0.txt (202 lines: a leading blank line, the centered "Apache License" title, sections 1 through 9, "END OF TERMS AND CONDITIONS", and then the "APPENDIX: How to apply the Apache License to your work" section).

DO NOT ASSUME THE STARTING STATE. Read the current LICENSE first and identify which of these it is:
  (A) A SHORT STUB (roughly 12-25 lines) containing only the Apache boilerplate NOTICE. That notice is meant for source-file headers, not as the LICENSE. Apache-2.0 section 4(a) requires shipping a copy of the License itself.
  (B) A TRUNCATED or REFLOWED near-full text (roughly 120-190 lines) that has the terms but STOPS AT "END OF TERMS AND CONDITIONS" and is MISSING the APPENDIX section entirely, and/or has lost the canonical leading blank line, title centering, or line wrapping.
  (C) Already byte-identical to canonical apart from a filled-in copyright line. In this case ONLY, make no change and say so.

Cases (A) and (B) BOTH require replacing the file with the full canonical text. Do NOT skip case (B) on the grounds that "the license text is already present" — a file missing the APPENDIX, or reflowed so GitHub's detector fails, is exactly what this task exists to fix. Verify by CHECKING FOR THE APPENDIX HEADING, not by eyeballing length.

COPYRIGHT: if the CURRENT file contains a specific copyright line (e.g. "Copyright 2026 Hasna, Inc." or "Copyright 2026 Hasna"), carry it across VERBATIM into the APPENDIX placeholders — preserve the exact year and exact entity, including any ", Inc.". If the current file has NO such line, leave the canonical placeholders "Copyright [yyyy] [name of copyright owner]" exactly as apache.org ships them. NEVER invent, correct, or normalise a year or an entity name.

CHANGE NO OTHER FILE, with one exception: a README line that explicitly claims a different license may be corrected to Apache-2.0. Do not touch package.json unless this repo is being relicensed from MIT (it is not, unless the objective says so). If the repo VENDORS third-party code under another license, that code and its notice stay exactly as they are.

VERIFY BEFORE FINISHING — all four must hold, and check each explicitly:
  1. LICENSE contains "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION"
  2. LICENSE contains "APPENDIX: How to apply the Apache License to your work"   <-- the one most often missing
  3. LICENSE is 200-203 lines
  4. `git diff --name-only` lists LICENSE and nothing else (or LICENSE plus a README license line)
Report the starting state you found (A, B, or C), the line count before and after, and the copyright line you preserved.

X-Factory-Run: run_7b3c346a151b
@andrei-hasna
andrei-hasna merged commit bc2e9a0 into main Jul 29, 2026
3 checks passed
@andrei-hasna
andrei-hasna deleted the factory/task-1f1c43ec25a8-f8ec41cb branch July 29, 2026 13:12
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.

1 participant