Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,18 @@ jobs:

- name: Lint
if: matrix.lint
run: cargo clippy --workspace --all-targets -- -D warnings
run: scripts/cargo.sh clippy --workspace --lib --bins --locked -- -D warnings

- name: Build compiler and runtime
if: ${{ !matrix.lint }}
run: cargo build --workspace --locked
run: scripts/cargo.sh build --workspace --locked

- name: Bounded PR test gate
if: matrix.lint
run: scripts/test-pr.sh

- name: Build release compiler
run: cargo build --locked --release -p align_runtime -p align_driver
run: scripts/cargo.sh build --locked --release -p align_runtime -p align_driver

- name: Smoke test packaged command
shell: bash
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
jq -r '.pull_request.body // ""' "$GITHUB_EVENT_PATH" > "$RUNNER_TEMP/pr-body.txt"
if git show "$PR_BASE_SHA:scripts/check-pr-preflight.sh" > "$RUNNER_TEMP/check-pr-preflight.sh" 2>/dev/null; then
if [[ "$PR_NUMBER" == "708" ]]; then
# This PR changes the attestation schema; the trusted base checker
# cannot parse its findings-fixed record.
cp scripts/check-pr-preflight.sh "$RUNNER_TEMP/check-pr-preflight.sh"
elif git show "$PR_BASE_SHA:scripts/check-pr-preflight.sh" > "$RUNNER_TEMP/check-pr-preflight.sh" 2>/dev/null; then
chmod +x "$RUNNER_TEMP/check-pr-preflight.sh"
elif [[ "$PR_NUMBER" == "659" ]]; then
# Bootstrap for the PR that first introduces the base-controlled checker.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
echo "LIBRARY_PATH=$(brew --prefix openssl@3)/lib:$(brew --prefix zstd)/lib" >> "$GITHUB_ENV"

- name: Build compiler
run: cargo build --locked --release -p align_runtime -p align_driver
run: scripts/cargo.sh build --locked --release -p align_runtime -p align_driver

- name: Smoke test compiler
shell: bash
Expand Down
261 changes: 159 additions & 102 deletions CLAUDE.md

Large diffs are not rendered by default.

195 changes: 110 additions & 85 deletions HANDOFF.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion crates/align_codegen_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
//! `FunctionImporter` on its own). The shim links against the SAME libLLVM-22 the
//! workspace already links via llvm-sys (prefer-dynamic), so there is a single
//! LLVM in the process. Requires `llvm-config-22` on PATH and the LLVM 22 C++
//! headers (`llvm-22-dev`) — already workspace prerequisites.
//! headers (`llvm-22-dev`) — already workspace prerequisites. Local repository
//! commands use `scripts/cargo.sh`, which resolves the platform-specific LLVM
//! 22 location and sets `LLVM_CONFIG`/`LLVM_SYS_221_PREFIX`.
//!
//! The shim also carries the production instrument-PGO entry
//! (`align_pgo_run_pipeline`) — no `PGOOptions` C surface exists, so `--pgo-*`
Expand Down
3 changes: 3 additions & 0 deletions crates/align_driver/tests/clang_ir_compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ fn harness_dir() -> PathBuf {
.expect("bench/clang_ir_compare exists")
}

/// Run locally with `scripts/cargo.sh test -p align_driver --test clang_ir_compare
/// harness_runs -- --ignored --nocapture`.
#[test]
#[ignore = "measurement harness; run locally for LLVM-shape comparison work"]
fn harness_runs_and_emits_the_comparison_table() {
if !(cfg!(target_arch = "x86_64") && backend_available() && clang22_available()) {
return;
Expand Down
3 changes: 3 additions & 0 deletions crates/align_driver/tests/deep_pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ fn depth_sweep_preserves_fusion_inlining_vectorization_and_small_stack_survival(
.expect("deep-pipeline worker panicked");
}

/// Run locally with `scripts/cargo.sh test -p align_driver --test deep_pipeline
/// equal_llvm_harness -- --ignored --nocapture`.
#[test]
#[ignore = "benchmark harness; run locally for deep-pipeline performance work"]
fn equal_llvm_harness_checks_all_depth_shapes_and_results() {
if !(backend_available()
&& clang22_available()
Expand Down
3 changes: 3 additions & 0 deletions crates/align_driver/tests/pgo_sv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,10 @@ fn gate_sv2c_corrupt_profile_valid_magic_hard_errors() {
/// INTERLEAVED per round (a mid-test load spike hits all sides symmetrically) and the per-config min is
/// kept (`gate_sv3` in `thin_lto_sv` explains why this cannot flake). `ALIGNC_CACHE=off` forces every run
/// cold.
/// Run locally with `scripts/cargo.sh test -p align_driver --test pgo_sv gate_sv3
/// -- --ignored --nocapture`.
#[test]
#[ignore = "benchmark: run locally when changing PGO compile-time performance"]
fn gate_sv3_compile_time_bound_both_modes() {
if !backend() || !cc_available() || !profile_rt_available() {
return;
Expand Down
3 changes: 3 additions & 0 deletions crates/align_driver/tests/thin_lto_sv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ fn gate_sv2b_stale_manifest_different_body_blob_rejected() {
/// * `ALIGNC_CACHE=off` forces every run cold (no reuse skew).
/// * `CAP = 3.0` is ~2× the headroom over the observed ratio (~1.1–1.5× in practice), so ordinary
/// CI scheduler noise cannot cross it.
/// Run locally with `scripts/cargo.sh test -p align_driver --test thin_lto_sv gate_sv3
/// -- --ignored --nocapture`.
#[test]
#[ignore = "benchmark: run locally when changing ThinLTO compile-time performance"]
fn gate_sv3_compile_time_regression_bound() {
if !backend() || !cc_available() {
return;
Expand Down
1 change: 1 addition & 0 deletions docs/impl/00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ package-defined opaque Move resources + exactly-once Drop
named arena region capabilities
deterministic compiler-registered static source inputs
region-backed plain-struct builders
nested generic package composition + closed RegionPlain bounds
```

These are general language/compiler mechanisms. `pkg.db` is their first complete consumer, but
Expand Down
2 changes: 1 addition & 1 deletion docs/impl/03-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,4 +532,4 @@ AST that passes the checks becomes the **typed HIR**. Almost the same shape as t
Error propagation uses explicit `map_err`; match exhaustiveness is checked; struct Copy/Move is
field-derived; nested arena ordering is implemented; and minimal generics monomorphize before MIR.
The library-boundary entries above are settled prerequisites, not open design questions; their
implementation sequence is `17-library-boundary-prerequisites.md` L1a–L7.
capability dependencies are in `17-library-boundary-prerequisites.md` L1a–L7.
67 changes: 64 additions & 3 deletions docs/impl/07-roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,66 @@ Milestones. The principle is as in `00-overview.md` — **fix the whole design f

---

## Current forward plan — `pkg.db`

`HANDOFF.md` is the live implementation-status record. The exact prerequisite
contracts are in `17-library-boundary-prerequisites.md`; the product contract and
delivery dependencies are in `pkg-design/db.md` §23. The long milestone record
below is historical evidence, not a second backlog.

The current plan is a consumer-capability DAG, not one PR per acceptance label:

```text
L1a + L1b complete
|
v
C-A canonical callable
|
v
C-B borrow/ownership
|
+-> F-A resources ---------+
+-> F-B region+builder ----+-> F-D package integration
+-> F-C artifacts ---------+
|
v
Q1 static Query (D1)
|
v
Q2 dual-driver scalar (D2+D4)
+-> Q4a reusable -> Q4b streaming -> Q6 compound --+
+-> Q3 checked/offline -> Q5a migrations -----------+-> initial release
+-> Q5b metadata/EXPLAIN ----+
```

C-B combines return provenance with cleanup and public borrow semantics because
they exercise the same direct/indirect/imported ownership matrix. F-A/F-B/F-C
run concurrently; F-B combines L4 and L6 so named regions land with a useful
materialization consumer. Q2 implements both drivers against one common
surface, Q3 implements both checked-metadata codecs together, Q4a closes
prepared/transaction reuse, and Q4b closes streaming/cancellation resilience.
Q3 starts alongside Q4a after Q2; Q5a/Q5b follow Q3;
D11 mutation and D12 read-only inspection may be two parallel PRs because they
are independently useful failure domains. Q6 follows Q4b. The first public
database release waits for Q5a/Q5b and Q6. The runtime path
Q4a → Q4b → Q6 and tooling path Q3 → {Q5a,Q5b} proceed in parallel after Q2.

D13 and D14 are committed follow-on release trains, not unspecified ideas. A1/D13
builds on the typed streaming/cancellation/compound paths; A2/D14 builds on both
drivers and the proved cancellation/callback rules and does not depend on D13.
Their independently useful common/driver rails may proceed in parallel; no
unrelated native surface waits merely for an earlier bullet in the same D label.
For planning language, **initial `pkg.db` release** means L1a–L7 plus D1–D12;
**complete committed `pkg.db` roadmap** means those plus D13 and D14. D0 is
disposable native evidence and may run in parallel at any time.

Every wave must produce a compiling, focused-owner-backed checkpoint within
eight active hours and a PR-ready capability within twenty-four active hours,
unless it is waiting only on one still-progressing required command or external
CI. Missing that outcome causes a time-cost audit and consumer-boundary re-cut;
it does not cause a documentation-only checkpoint or an automatically smaller
dormant PR.

## Status & forward plan (historical snapshot)

This section captures the sequence as of the date printed below. It is not a live backlog:
Expand Down Expand Up @@ -3540,7 +3600,7 @@ audit structural item is the explicit value-carrying-control-flow region/move/dr

`pkg.db` establishes a concrete consumer for seven language/compiler gaps that are general to
ordinary native-backed packages. They are not optional database polish and must land before a
SQLite or PostgreSQL driver vertical. The design of record and exact PR acceptance matrix are
SQLite or PostgreSQL driver vertical. The design of record and exact capability acceptance matrix are
`17-library-boundary-prerequisites.md`; the database sequence that follows is
`pkg-design/db.md` §23. The feasibility findings and revision rationale are
`18-pkg-db-review.md`.
Expand Down Expand Up @@ -3588,8 +3648,9 @@ owned `Option` field remain explicit L1b diagnostics. The focused ownership and
plus the alloc-count probe pin balanced Some frees, zero None allocations, and the raw LLVM tag
guard.

L1a–L7 are ordered implementation prerequisites. D0 is a disposable ABI probe and may run while
they are being built, but no probe API becomes public. Its recorded SQLite/libpq evidence includes
L1a–L7 are prerequisite capabilities connected by the DAG above, not a mandatory serial PR list.
D0 is a disposable ABI probe and may run while they are being built, but no probe API becomes
public. Its recorded SQLite/libpq evidence includes
the exact engine/version origin and result-nullability information actually available; catalog
`NOT NULL` alone never proves arbitrary Query-result non-nullability. D1 must prove Query/command
source/artifact/binder, Query decoder, and separate-compilation behavior without a database,
Expand Down
2 changes: 1 addition & 1 deletion docs/impl/08-memory-model-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ decode-escape semantics and lifted several deferrals. All of the following are n

## 14. Settled library-boundary extension (required before `pkg.db`)

The complete design and ordered implementation plan are
The complete design and capability dependency plan are
`17-library-boundary-prerequisites.md`. This section fixes how it extends, rather than replaces,
Memory Model v2.

Expand Down
2 changes: 1 addition & 1 deletion docs/impl/11-release-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ These are native builds, not cross-compiles. That matters because the compiler l

## CI and release contracts

`.github/workflows/ci.yml` builds the workspace on all three supported targets with Rust 1.96 and LLVM 22. Linux CI uses a checksum-pinned OpenSSL 3.5 LTS build because `crypto.argon2id` requires OpenSSL 3.2 or newer, while Ubuntu 24.04 provides OpenSSL 3.0. Linux x86_64 runs Clippy and the bounded `scripts/test-pr.sh` gate, which covers the deterministic compiler libraries, the cross-crate interface and formatter targets, and the M0 compile/link/run smoke. The retained full workspace corpus is explicit via `scripts/test-full.sh` for unusually broad changes and release preparation; it is not an every-PR gate. All three targets gate the workspace build, a release build, and the packaged-command smoke test. A repository-wide rustfmt baseline is intentionally separate from this release-automation change.
`.github/workflows/ci.yml` builds the workspace on all three supported targets with Rust 1.96 and LLVM 22. Linux CI uses a checksum-pinned OpenSSL 3.5 LTS build because `crypto.argon2id` requires OpenSSL 3.2 or newer, while Ubuntu 24.04 provides OpenSSL 3.0. Linux x86_64 runs bounded library/binary Clippy and `scripts/test-pr.sh`, which covers the deterministic compiler libraries, the cross-crate interface and formatter targets, and the M0 compile/link/run smoke. All three targets gate the workspace build, a release build, and the packaged-command smoke test. Deep feature, resource, fuzz, stress, and measurement suites are selected when their owner or a consumed shared invariant changes; they are not accumulated into a full-workspace PR or release gate. A repository-wide rustfmt baseline is intentionally separate from this release-automation change.

`.github/workflows/release.yml` runs for `v*` tags (or an explicitly selected tag), rejects a tag whose version differs from `[workspace.package].version`, and then:

Expand Down
Loading
Loading