Skip to content

Advance Aero self-hosting: multi-function emission and checked diagnostics - #92

Draft
RobVanProd wants to merge 3 commits into
masterfrom
agent/aero-self-hosting-2026-09-16
Draft

RobVanProd wants to merge 3 commits into
masterfrom
agent/aero-self-hosting-2026-09-16

Conversation

@RobVanProd

Copy link
Copy Markdown
Owner

The Aero-authored compiler previously refused otherwise valid arithmetic modules at the verifier boundary. This checkpoint verifies and emits multiple functions, preserves single-function LLVM, repairs result ownership and admits the established node bound. It also adds an independent stderr byte runtime and a checked diagnostic operation in the Rust bootstrap.

Published head: ff10caca3d95fb64a90369afe148bea4f5ef45df (tree a7684379e4a6fb8067a1e8f41e0f4c1bb12a696b). This draft is cumulative work toward self-hosting; it does not claim self-compilation or protected acceptance.

Validation on Linux with Rust 1.98.1 and LLVM/Clang 22.1.8:

  • Full repository gate: formatting, correctness Clippy, 1,041 passed / 0 failed / 16 preexisting ignored, 119 result targets; completed exit 0 on the exact published tree.
  • Aero ingestion/emission target: 70 passing tests, including exact LLVM and native execution at O0/O2, corrupted metadata and foreign-function result refusals.
  • Separate stderr runtime: six native ABI tests, independent sticky channel errors and binary bytes. Checked diagnostic backend: seven new tests plus earlier-profile compatibility.

The three commits retain their exact tested tree identities and gate totals in commit messages. The canonical compiler still stops at its first unresolved identifier; connected parameters/statements/control flow, compiler-subset semantics and lowering, source-level stderr admission, the compiler process interface and same-source stage convergence remain open. Windows execution is not established by the local Linux run.

Further implementation is in progress locally and will be added only after its checkpoint gate passes. No release or package is published.

Admit arithmetic functions above 512 syntax nodes within the existing 65536
node capacity. Serialize every checked result with its defining instruction's
function owner, preserving global result IDs and one-function bytes.

Preserve red-first regressions, source-derived owner/range checks, expired
expectation vectors and the connected-AST design for the remaining H1 work.
These are prerequisites; canonical self-source still fails semantic analysis.

Verification completed on exact tree f7489ef:
- ./tools/test.sh: exit 0; formatting and correctness Clippy passed.
- 1023 tests passed, 0 failed, 16 pre-existing ignored; 118 reported targets.
- Rust 1.98.1 and LLVM/Clang 22.1.8 on Linux.
- Focused native O0/O2 node-bound, owner and compatibility probes passed.
- Independent arena prediction matched: +57 nodes, +45 values, +26
  operators, no blocks, +8 calls; 240 reachable nodes remain.

No Windows execution or published self-hosting acceptance is claimed.
Validate complete per-function instruction ranges, ownership, provenance and
terminal Returns. Reject cross-function operands and match each result to its
real definition. Emit functions in ID order with the derived entry and preserve
the one-function LLVM bytes. Keep expired expectation vectors with exact output
grading and preserve all genuine refusal paths.

Add a separate stderr byte runtime with independent sticky errors, binary output
and flush-before-success. Source/profile integration remains a later change.

Verification completed on exact tree 12fb40e:
- ./tools/test.sh exited 0; formatting and correctness Clippy passed.
- 1034 passed, 0 failed, 16 pre-existing ignored; 119 reported targets.
- Full focused ingestion target: 70 passed, 0 failed/ignored, 230.65 s.
- LLVM/Clang 22.1.8 O0/O2: exact module bytes and independent native execution.
- 510-function boundary: 26305 emitted bytes; entry returned 510.
- Corrupted ranges, owners, origins, Returns and foreign operands fail before output.
- Six stderr ABI tests pass with exact bytes and sticky-error/channel isolation.
- Independent canonical census prediction matches 19589 nodes,16910+737 values,
  6778 operators,1403 blocks,1230 calls; only 240 nodes remain reachable.

Canonical source still fails semantic analysis at its first identifier. No
connected-AST, self-hosting, Windows execution or public acceptance claim.
Introduce ExactI32ByteDiagnosticsV0 with a distinct checked stderr operation,
strict verifier admission and conditional LLVM declaration/call emission.
Earlier profiles reject that operation. The separate runtime preserves the
existing production runtime and independent channel state. Source-level stderr
admission and CLI runtime linkage remain the next bounded checkpoint.

Preserve historical storage authority hashes in comments while refreshing the
three exact IR/verifier sentinels for the reviewed additive operation. Freeze
connected-AST design and record completed focused and compatibility evidence.

Validation: full ./tools/test.sh completed exit 0 on immutable tree
a768437, with cargo fmt --check,
correctness Clippy and 1041 passed / 0 failed / 16 preexisting ignored tests
across 119 result targets. Rust 1.98.1 and LLVM/Clang 22.1.8 on Linux.
Log: /home/lsd/Aero/h1e-checked-full-gate.log.
No claim of Windows execution, self-hosting or stage convergence.
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