Skip to content

Repo refresh: user-facing docs, dev-artifact cleanup, opt-in huge pages - #1

Merged
allandng merged 4 commits into
mainfrom
claude/shuttle-repo-review-48w5i8
Jul 24, 2026
Merged

Repo refresh: user-facing docs, dev-artifact cleanup, opt-in huge pages#1
allandng merged 4 commits into
mainfrom
claude/shuttle-repo-review-48w5i8

Conversation

@allandng

@allandng allandng commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Refreshes the repository for users rather than its original build process, and lands the first post-1.0 feature.

What's in this PR

Cleanup — download only what's needed (40ba6a5)

  • Deletes ~110 KB of dev-process artifacts: PROGRESS.md (build ledger), docs/Shuttle_SRS.md, docs/Shuttle_Implementation_Plan.md, docs/SHUTTLE_AGENT_PROMPT.md. Comments in Makefile/ci.yml that pointed at them now carry their explanation inline.
  • .gitignore gains defensive entries (__pycache__/, target/, editor dirs, CMakeUserPresets.json).
  • New docs/API.md — consolidated C ABI reference: every function, error-code table, lifecycle/sizing rules, zero-copy borrow rules, segment layout + flags contract, liveness caveat, Python/Rust binding patterns. Closes the long-standing NFR-M2 gap.
  • New docs/ROADMAP.md — triaged upgrade directions: already shipped in v1, landing here, v1.x candidates (hugetlbfs, stats counters, opt-in backpressure policies, bare-metal benchmark), exploratory v2 (CUDA IPC, Windows).

Feature — opt-in transparent huge pages (7f03eab)

  • Additive C ABI v1.1 function shuttle_create_ex(name, capacity, max_payload, create_flags, err) with SHUTTLE_CREATE_HUGEPAGES: advises the mapping via madvise(MADV_HUGEPAGE) on Linux (advisory; no-op on macOS/unsupported kernels; never a correctness dependency). The flag is persisted in the header's cold identity block before the init_state release-store, so openers advise their own mapping too; unknown bits are masked. The frozen v1 surface is untouched (shuttle_create delegates with flags=0; SHUTTLE_ABI_VERSION stays 1; C/C++ flag values are static_assert-tied). The madvise call lives behind the platform seam in platform.hpp.
  • New test shuttle_hugepage_test (suite now 29): flag persisted and observed by a spawned opener, byte-exact transfer on a flagged channel, plain create leaves the bit clear, unknown bits masked. Asserts the flag contract only — never THP outcomes, which are kernel-policy-dependent and would flake in CI.

README (ef3a36e)

  • Linux-first quick start (native CMake, no Docker/Mac needed); mac+Docker harness kept as the secondary block.
  • New "Using Shuttle in your project" section (add_subdirectory / vendoring), verified by building a real consumer project against the published snippet.
  • Verification/Scope rewritten to stand alone without the deleted dev docs; test count and repository layout updated.

Verification

  • Full suite run natively on Linux under both sanitizers with the same perf-test exclusion CI uses: ASan 24/24 passed, TSan 24/24 passed (5 perf-measurement tests excluded per CI policy; new shuttle_hugepage_test green under both).
  • Consumer-project compile check of the README's CMake snippet: builds and runs.
  • Repo-wide grep confirms zero remaining references to the deleted docs; all relative links in README/API.md/ROADMAP.md resolve.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JykzcEronyifSN4RnTgjTk

claude added 4 commits July 24, 2026 05:53
…d roadmap

Delete the build-process ledger and internal planning docs (PROGRESS.md,
SRS, implementation plan, agent prompt) — development history, not useful
to library users. In their place:

- docs/API.md: consolidated C ABI reference (all functions, error codes,
  lifecycle/sizing rules, zero-copy borrow rules, segment layout and
  flags contract, liveness caveat, Python/Rust binding patterns) —
  closes the long-standing NFR-M2 documentation gap.
- docs/ROADMAP.md: triaged upgrade directions (already-shipped vs v1.x
  candidates vs exploratory).

Makefile/ci.yml comments that pointed at PROGRESS.md now carry the
explanation inline. .gitignore gains defensive entries for common
editor/toolchain droppings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JykzcEronyifSN4RnTgjTk
… ABI v1.1)

New create-time flag SHUTTLE_CREATE_HUGEPAGES advises the segment mapping
with madvise(MADV_HUGEPAGE) on Linux — purely advisory (effective only
where the kernel THP shmem policy permits), a no-op on macOS, never a
correctness dependency. The flag is persisted in the header's cold
identity block before the init_state release-store, so openers advise
their own independent mapping too; unknown create-flag bits are masked
and never persisted.

The frozen v1 surface is untouched: shuttle_create keeps its exact
signature and is now the create_flags=0 case of the additive v1.1 entry
point shuttle_create_ex (SHUTTLE_ABI_VERSION stays 1). The C flag value
is static_asserted against the C++ kFlagHugePages bit. The madvise call
lives behind the platform seam in platform.hpp, the only file allowed to
ifdef on platform.

New test shuttle_hugepage_test (suite now 29): flag persisted and
observed by a spawned opener, byte-exact transfer on a flagged channel,
plain create leaves the bit clear, unknown bits masked. Asserts the flag
contract only — never THP outcomes, which are kernel-policy-dependent
and would flake in CI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JykzcEronyifSN4RnTgjTk
…w docs

Lead the quick start with the native Linux CMake path (the production
target — CI proves it on ubuntu-24.04), keeping the mac+Docker
two-platform harness as the secondary block. New 'Using Shuttle in your
project' section: add_subdirectory/FetchContent consumption of shuttle_c
(C ABI) or shuttle_core (C++), verified by building a real consumer
against the published snippet; vendoring guidance for non-CMake builds;
pointer to shuttle_create_ex huge-page opt-in.

Verification and Scope sections now stand alone (no links to the deleted
dev-process docs); test count updated to 29; repository layout reflects
docs/API.md + docs/ROADMAP.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JykzcEronyifSN4RnTgjTk
Tag pushes matching v* create a release whose notes come from the
annotated tag message (--notes-from-tag), so release notes are curated
at tag time and versioned in git.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JykzcEronyifSN4RnTgjTk
@allandng
allandng marked this pull request as ready for review July 24, 2026 06:12
@allandng
allandng merged commit 1510a94 into main Jul 24, 2026
2 checks passed
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.

2 participants