Skip to content

feat!: build, check and hash packages as bend 2.0.40 does - #165

Merged
ngngardner merged 1 commit into
masterfrom
feat/bend-2.0.40
Nov 8, 2026
Merged

ngngardner merged 1 commit into
masterfrom
feat/bend-2.0.40

Conversation

@ngngardner

Copy link
Copy Markdown
Contributor

Moves ez to bend 2.0.40 (flake bend 222de99). ez builds, checks and proves on 2.0.40, and its 0x hash equals the one bend 2.0.40's --publish uploads, README included.

The README walk rule (mirrors bend 2.0.40 pkg_files, bendlang/bend#2033)

  • Once the walk went to its end (stop Going), the file named exactly README.md in the entry's directory (P.join(P.dir(entry), "README.md")) goes along as Hit{"README.md", text}, placed at README.md at the top of the package. A README beside any other file stays out.
  • Not given by the tree: the walk asks for it (from disk: one more read). Absent: the package is as before.
  • Over 65536 bytes, counted in the UTF-8 bytes the sha256 is taken over, refuses: ez: <dir>/README.md cannot be published: it is over 65536 bytes, the most BendHub takes (bend uses >; exactly 65536 is taken).
  • A walk that stopped (missing module, climb, question, fuel, bad name) is judged as before.
  • Names taken before 2.0.40 still lock: walked manifest ≠ name → judged without README; ≠ again → without README and LICENSE files (the pre-2.0.27 rule). ez lock --upgrade weighs pins the same way.
  • The hub description passes README.md over (the hub's own listing shows it: bend-ml-tensor-array with LICENSE, README.md, main.bend is described by main.bend's first line).

Laws (spec-first, one file each): ReadmeGoesAlong, ReadmeAsked, NoReadmeAsBefore, ReadmeOverRefused, StoppedWalkTakesNoReadme, OldNameLeavesReadmeOut, ReadmelessKeepsOtherFiles, GitNamedWithoutReadme, UpgradeNamedWithoutReadme; PublishSaysDescription gains hub_readme_named and hub_skips_readme. Intended guarantee changes: GitNamedWithoutLicense and UpgradeNamedWithoutLicense are restated over the new cascade (an extra hypothesis that the README-less manifest is not the name, and bare(readmeless(..))); hub_first_by_path takes a "not the README" hypothesis.

Evidence that ez's hash equals bend 2.0.40's

  • ezhttp at the 0.23.0 commit (has a README): ez add → 0x8673751971e75cc0377d73b25bc4d890; BEND_HUB=<local oracle, compiled> bend 2.0.40 main.bend --publish → publishing 25 files, 346872 bytes, as 0x8673751971e75cc0377d73b25bc4d890, oracle answered the same hash, manifest lists README.md. ez 1.13.0 (old walk) gave 0x7367….
  • README of exactly 65536 bytes: ez and bend both 0x15266f12772510c4291b397dfd2955f6; 65537 bytes: both refuse.
  • tests/publish.bend (now with src/README.md beside the entry, plus READMEs at the top and in src/util that must stay out, with quotes, backslash, tab and non-ASCII): hash and manifest equal bend's, the oracle serves the README as written, no other README goes along. tests/publishing.bend: the README is published and the description still comes from lib.bend.

Other changes

  • M.Tool → M.Cli, PW.Tool → PW.ToolAsk (Base 2.0.40 type Tool).
  • ezhttp v0.14.0 → v0.23.0: Client.Response{status, headers, reason, bytes} read with Http.body_text; BEND_LIBSSL replaces EZ_LIBSSL in the wrapper and shell. Pinned by the hub's hash for [email protected], 0x7367809738fddd234b8d2bed772ad2cf, which was published without its README; ez lock locks it by the pre-2.0.40 rule (live use of GitNamedWithoutReadme).
  • [tools.bolt] v1.27.0: def unsafe() removed, def coverage() named (warn, as the laws group); the newly added/widened pick (C003, 3), concat (U004, 2), prefix (U017, 1) rules set to warn by slug on code that predates them — needs a follow-up issue (I could not open one).
  • ci.yml nix-flake-check at actions feaa011.
  • bend-lib.nix writes a hub package's manifest (as ez fetch does); bootstrap.sh skips hub packages (bend fetches them). mkFresh skips the offline relock when the lock records a hub package: ez lock takes hub content from the hub and the sandbox has no network. Checked by hand instead: a clone with the lock removed relocks byte for byte with network.
  • tests/fetch.bend: ezhttp ≥0.18 names the errno (…: ECONNREFUSED (111)); only the name is compared.
  • README/guide/RFC name bend 2.0.40; RFC gets the behavior change, a WP36 row and the BOM / case-blind-disk README gaps.

Gate

  • bend 2.0.40: PROOF.bend → ALL PROOFS CHECK (the only PROOF.bend outside .ez/.claude); main.bend --check-only → only the unsafe/foreign verdict.
  • nix flake check passes (x86_64-linux).
  • bolt 1.27: 0 errors, 326 warnings.
  • ez test (bin/ez.bin from the tree, bend 2.0.40): 9/12. cli, git and relock fail identically on master with bend 2.0.38 (pre-existing).

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.

🤖 Generated with Claude Code

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 relocks from a
  lock that keeps only its [lock] and [names] tables, since a hub name a
  dependency imports by is the hub's answer and the sandbox is offline.
- 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.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ngngardner
ngngardner enabled auto-merge (squash) November 8, 2026 18:39
@ngngardner
ngngardner merged commit 35ace28 into master Nov 8, 2026
5 checks passed
@ngngardner
ngngardner deleted the feat/bend-2.0.40 branch November 8, 2026 18:43
noah-emp pushed a commit that referenced this pull request Nov 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.14.0](v1.13.0...v1.14.0)
(2026-11-08)


### ⚠ BREAKING CHANGES

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

### Features

* build, check and hash packages as bend 2.0.40 does
([#165](#165))
([35ace28](35ace28))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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