Skip to content

The Sublet primitives move to a shared home, because there is a second port - #11

Merged
apaznikov merged 1 commit into
devfrom
prep/sublet-shared-home
Sep 13, 2026
Merged

apaznikov merged 1 commit into
devfrom
prep/sublet-shared-home

Conversation

@biecho

@biecho biecho commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

sublet.h sat beside SQLite's patch while there was one port. The layout decision of 2026-09-10 said it would move when a second allocator was ported, and it has been: PostgreSQL's memory contexts call the same primitives. The PostgreSQL port itself follows in postgres/1 and postgres/2, stacked on this.

The reason is not tidiness. The recipe being the same for every allocator is a claim the paper makes, and a recipe that exists twice is two recipes.

What changes beyond the move

  • Both SQLite builds put capstone/sublet on the include path, still only inside the branch that applies a Sublet patch, so the unprotected build never sees a Sublet file. The patch's own directory stays on the path too, for anything a program's port keeps beside it.
  • The patch's header comment and the reuse experiment's provenance line name the new path, so the recorded hash still identifies the primitives it ran against.
  • repo-layout.md gains the row and the rule. The existing rule, that a protection port lives apart from the compatibility port, now names both directories the unprotected build must not read.

Verified

The Capstone domain arm builds with the Sublet patch applied and sublet.h resolved from its new home, and the file exists nowhere else in the tree.

Noticed while verifying, not fixed here

fetch-sqlite-src.sh can no longer succeed. It pins a SHA3 of https://sqlite.org/src/tarball/sqlite.tar.gz?r=version-3.53.3, which Fossil generates on demand and does not deliver byte-identically, so the checksum fails on every fresh fetch. test/speedtest1.c is also present in the sqlite-src-3530300 tree that fetch-sqlite.sh produces, which is a stable pinned archive, so taking it from there would remove the dependency. Reported rather than changed, since it is outside this branch's subject.

…d port

sublet.h sat beside SQLite's patch while there was one port. The layout
decision of 2026-09-10 said it would move when a second allocator was ported,
and it has been: PostgreSQL's memory contexts call the same primitives.

So it lives in capstone/sublet/ now, with a README that says what the file is
and what it is not. The reason is not tidiness. The recipe being the same for
every allocator is a claim the paper makes, and a recipe that exists twice is
two recipes.

What changes beyond the move:

Both SQLite builds put capstone/sublet on the include path, and they still do
it only inside the branch that applies a Sublet patch, so the unprotected
build never sees a Sublet file. The patch's own directory stays on the path
too, for anything a program's port keeps beside it.

The patch's header comment and the reuse experiment's provenance line name the
new path, so the recorded hash still identifies the primitives it ran against.

repo-layout.md gains the row and the rule. The existing rule, that a
protection port lives apart from the compatibility port, now names both
directories the unprotected build must not read.

Verified: the Capstone domain arm builds with the Sublet patch applied and
sublet.h resolved from its new home, and the file exists nowhere else in the
tree.
Copilot AI lite review requested due to automatic review settings September 12, 2026 14:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

3 participants