Skip to content

feat(publish): send the README.md beside the entry - #2033

Merged
Lorenzobattistela merged 1 commit into
mainfrom
publish-readme
Nov 3, 2026
Merged

Lorenzobattistela merged 1 commit into
mainfrom
publish-readme

Conversation

@Lorenzobattistela

Copy link
Copy Markdown
Collaborator

bend <file> --publish now includes the README.md next to the entry file in the package. BendHub renders it on the package's page.

  • Only the README beside the entry goes along. A README.md beside any other file stays out.
  • A README over 64 KB, the most the hub accepts, is refused before mining the proof of work, with an error naming the file.
  • The loader already fetches every file in a package's manifest, so these packages import fine, with older CLIs too.

Release order

Don't ship this in a Bend release before the hub accepts READMEs (bendlang-private/bend-lang.com PR 118). Today's production hub refuses any path other than .bend, .c, .js and LICENSE. A CLI with this change would fail to publish any project that has a README.md beside its entry.

Checks

  • gates/ping.ts (SITE_REPO on the hub branch): PASS 83 / 83. Two new checks: a publish with a README at the entry plus one in sub/ stores only the first, inside the hash; a 64 KB+ README is refused.
  • gates/repo.ts: PASS 54 / 54. main.ts is at 13.0k of 16k ttok.
  • GUIDE.md is already at exactly 8000 ttok, its cap, so it doesn't mention the README. The hub's guide covers it.

🤖 Generated with Claude Code

bend --publish now takes the README.md next to the entry file into the
package, where BendHub shows it on the package's page. A README.md next
to any other file stays out, and one over 64 KB, the most the hub takes,
is refused before mining. The ping gate checks both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Lorenzobattistela
Lorenzobattistela merged commit ea66e00 into main Nov 3, 2026
1 check passed
@Lorenzobattistela
Lorenzobattistela deleted the publish-readme branch November 3, 2026 18:16
ngngardner added a commit to Emerging-Patterns/ez that referenced this pull request Nov 8, 2026
bend 2.0.40 publishes the README.md beside the entry as part of the
package (bendlang/bend#2033), and Base 2.0.40 declares `type Tool` and
Event constructors such as `Lost`. ez now builds, checks and proves on
2.0.40, and computes the hash 2.0.40's `--publish` uploads.

- The walk takes along the file named exactly README.md in the entry's
  directory, at README.md in the package, once the walk went to its end;
  a README beside any other file stays out, and one over 65536 UTF-8
  bytes refuses the package, as bend refuses it before mining
  (laws/ReadmeGoesAlong, ReadmeAsked, NoReadmeAsBefore,
  ReadmeOverRefused, StoppedWalkTakesNoReadme).
- A name taken before 2.0.40 still locks: when the walked manifest does
  not hash to the ledger's name, `ez lock` judges the checkout without
  its README, then without its README and LICENSE files; `ez lock
  --upgrade` weighs a pin the same way (laws/GitNamedWithoutReadme,
  UpgradeNamedWithoutReadme, OldNameLeavesReadmeOut,
  ReadmelessKeepsOtherFiles). GitNamedWithoutLicense and
  UpgradeNamedWithoutLicense are restated over that cascade.
- The hub description passes the README over, as the hub does
  (laws/PublishSaysDescription: hub_readme_named, hub_skips_readme).
- `M.Tool` is `M.Cli` and `PW.Tool` is `PW.ToolAsk`, off Base's names.
- ezhttp v0.23.0 (from v0.14.0): Client.Response carries bytes, read with
  body_text; BEND_LIBSSL replaces EZ_LIBSSL. Pinned by the hub's name for
  it, 0x7367809738fddd234b8d2bed772ad2cf, which 0.23.0 was published
  under without its README, so the lock judges it by the older rule.
- flake bend at 222de99 (2.0.40); [tools.bolt] v1.27.0 with `unsafe`
  dropped, `coverage` named, and the newly firing pick, concat and prefix
  rules at warn; nix-flake-check at actions feaa011.
- bend-lib.nix lays a hub package's manifest as `ez fetch` does,
  bootstrap.sh leaves hub packages to bend, and mkFresh skips its offline
  relock when the lock records a hub package (ezhttp 0.23 imports
  bend-kit-* from the hub), since `ez lock` takes hub content from the
  hub and the sandbox has no network.
- tests/publish and tests/publishing publish a package with a README;
  tests/fetch reads ezhttp's errno-named connect failure.

BREAKING CHANGE: ez's 0x hash for a package with a README.md beside its
entry now covers that README, as bend 2.0.40's `--publish` does, so `ez
add` and `ez publish` name such a package differently than before. ez
needs bend 2.0.40 or later. Ledgers written before keep their names.
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