Skip to content

The acceptance scenarios write their contracts inline; lib/contracts is gone; the tests that import them use test/lib/contracts - #3349

Merged
ehartford merged 2 commits into
mainfrom
uat-inline
Nov 15, 2026
Merged

ehartford merged 2 commits into
mainfrom
uat-inline

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Eric, 2026-11-14: "we should not store acceptance scenario support files in lib/contracts. we should write them inline with the UATs that require them." lib/ is With's library; a contract for SDL, zlib, bzip2, libcurl or SQLite is knowledge about another project's package (its place for users is the registry, #3118).

  • uat/{zlib,bzip2,libcurl,sqlite3,sdl}.uat: the copy lib/contracts/<lib>.w … step is write src/contracts/<lib>.w: with the contract inline. The contract text is unchanged except the sentence that said where the file lives.
  • lib/contracts/ is deleted.
  • Eighteen tests import four of these contracts with use contracts.<lib>, which resolved through the repository's lib/. They now resolve through test/lib/contracts/ (sqlite3, libcurl, zlib, bzip2). SDL has no test and lives only in its scenario.
  • examples/c-interop: the example owns its SQLite contract (Eric's choice): its header is reworded (comment lines only) and the examples lane no longer checks it byte for byte against a toolchain copy.
  • README and the AI guide point at the example's contract; the release runbook, the example's README and four test comments no longer name the old path; InitTemplates.w carries the guide's changed line.
  • Build: lib/contracts is no longer an input of three targets; build/uncited-claims.tsv drops its four lines.

Battery: GREEN on the top commit (all five scenarios pass with the inline contracts). The first run was red: I had deleted the directory before finding the eighteen tests that import through it.

Eric Hartford added 2 commits November 15, 2026 00:05
…is gone (a scenario's support file is not With's library); the c-interop example owns its SQLite contract
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