Repository navigation
Publishing: LICENSE files, the terms notice, and the client version - #1013
Merged
Merged
Conversation
…directory named license, says on every publish that the hub is public and permanent under its terms and which license the package carries (MIT-0 without a LICENSE, with a warning), and every request to the hub and bend-lang.com carries User-Agent: bend/<version> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…PDX_RE, the first 5 lines, a letter in the id, spaces collapsed), and the ping gate checks each case against the hub's /package/<hash>.json Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…r-Agent Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # gates/ping.ts
Merged
Phylliida
pushed a commit
to Phylliida/bend
that referenced
this pull request
Sep 27, 2026
…endlang#1013) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All changes are in
bend --publish(cli_publish,pkg_filesinbend2/main.ts). How packages are read, fetched and hashed doesn't change.What changed
LICENSE(case-sensitive; checked withreaddirSync, so it works on a case-insensitive disk too) is published at the matching path. It's just one more entry infiles, so the hash formula is the same.LICENSE, warning. If no file is named exactlyLICENSE, the CLI warns that the package is MIT-0 and says to put the license in a file namedLICENSEbeside the entry file. There are no special cases forLICENSE.md,COPYINGand so on.licensedirectories are refused. A directory namedlicensein any case (for exampleLicense/x.bend) is refused inpkg_files, before the proof of work is mined.LICENSE(ties go to the first path in string order). Its SPDX id follows the hub's rule inhubdb.ts, copied exactly:SPDX_RE, only the first 5 lines, at least one letter in the id, runs of whitespace collapsed. If there's no id, the notice sayssee <path>. The CLI doesn't recognize license titles the way the hub does, so a title-only LICENSE showssee <path>. With noLICENSE, it showsMIT-0, the default (no LICENSE file): …#s18.4.bend/<VERSION>. In CLI mode only,ua_fetchwrapsfetchso every request toBEND_HUBorORIGINcarries it: publish, publish-check, link, register, name lookups, package reads, the Bender login and the version check. Name lookups happen inbend.ts, which isn't edited; the wrapper covers them. Requests to other hosts (a program's own) are left alone.LICENSEnext to the entry file, ideally with an SPDX line; without one the package is MIT-0; you are responsible for what you publish, so pick the right license; adding aLICENSEchanges the hash, so publish it as a new version.Tests (
gates/ping.ts)The gate's Caddy stand-in now serves the store's files under
/0x<hash>/, as the real Caddy does, and records every request's method, path and User-Agent. Its new checks, run with the installed executable against the localhub.ts:LICENSEbeside the entry and one beside an importedsub/two.bendare both published. The printed hash equals the hash of all four files, and the hub servessub/LICENSE.License: MIT (LICENSE)). Each case from the table is also published, and the notice must match the hub'slicense.idfrom/package/<hash>.json: a\r\nending,(MIT OR Apache-2.0)collapsed to one space,#and//markers (no id),MIT <see below>(no id),()(no id), and the SPDX line on the 6th line (no id). With a looser regex inmain.ts, the three rows it treats differently fail.LICENSE.md, it isn't published (the hash covers only the.bendfiles), and the notice shows MIT-0 plus the warning.License/two.bendis refused before mining: exit 1, no "mining" line, no POST reaches the hub./name/lookup and/checkall carrybend/<ver>. With theua_fetch()call removed, this check fails.SITE_REPO=~/work/hoc-credits bun gates/ping.tsgivesPASS: 32 / 32(the site checkout is onsite-fixes, which has #36).gates/repo.tsgivesPASS: 46 / 46(main.ts is at 9694 of its 10000 ttok cap).tscfinds no errors inmain.tsorping.ts.Release order
LICENSEfiles until bend-lang.com PR #36 is deployed. Don't release a CLI with this change until then. The LICENSE check inping.tsalso needs a site checkout that includes #36.🤖 Generated with Claude Code