Skip to content

revert: #506 bounds-check elimination (main CI red since merge)#511

Merged
cs01 merged 1 commit intomainfrom
revert/506-bounds-check-elim
Apr 14, 2026
Merged

revert: #506 bounds-check elimination (main CI red since merge)#511
cs01 merged 1 commit intomainfrom
revert/506-bounds-check-elim

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Apr 14, 2026

Main CI has been failing since #506 merged at 22:40 UTC. Stage1 self-hosting test semantic/binary-type-in-function fails because checkBinaryTypesDeep stops catching "hello" - 5 inside function bodies when chad is self-hosted. Stage0 (node-driven) is unaffected.

Local verification: building stage1 chad from this revert branch and running it directly against the fixture correctly emits cannot use '-' between 'string' and 'number' and exits 1.

Reverting to unblock all work on main. The perf work from #506 (bounds-check elimination) is a real improvement and should be re-applied, but it needs a proper self-hosting-safe implementation and a CI gate that waits for stage1 to finish before declaring green.

Followups needed (separate PRs)

  1. Re-implement bounds-check elimination with full stage0→stage1→stage2 self-hosting verification before merge. The root cause of the miscompilation isn't yet understood — needs deeper investigation into why stage1 chad's checkBinaryTypesDeep silently drops its binary-op type check when compiled through perf: bounds-check elimination in loop-indexed array access #506's codegen path.

  2. Fix the pre-push auto-merge hook (~/.claude/hooks/pre-push-rebase.sh). It currently evaluates all_passed on the PR's statusCheckRollup at push time and triggers auto-merge if everything currently visible is green. GitHub populates the rollup incrementally as workflows start, so PRs with slow build-linux-glibc / build-macos jobs get merged after the fast checks (format-check, build, benchmarks) report success but before the slow ones have started. The hook should verify all expected jobs from the CI workflow file are COMPLETED before merging.

Diff

8 files changed, 6 insertions(+), 557 deletions(-)

@cs01 cs01 merged commit 437cdd9 into main Apr 14, 2026
6 checks passed
@cs01 cs01 deleted the revert/506-bounds-check-elim branch April 14, 2026 04:11
@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results (Linux x86-64)

Benchmark C ChadScript Go Node Place
Binary Trees 1.345s 1.253s 2.723s 1.159s 🥈
Cold Start 0.9ms 0.8ms 1.1ms 27.5ms 🥇
Fibonacci 0.814s 0.763s 1.559s 3.166s 🥇
File I/O 0.117s 0.090s 0.084s 0.198s 🥈
JSON Parse/Stringify 0.004s 0.005s 0.017s 0.015s 🥈
Matrix Multiply 0.444s 0.652s 0.611s 0.364s #4
Monte Carlo Pi 0.389s 0.410s 0.405s 2.249s 🥉
N-Body Simulation 1.667s 2.117s 2.202s 2.387s 🥈
Quicksort 0.215s 0.246s 0.213s 0.262s 🥉
SQLite 0.347s 0.368s 0.441s 🥈
Sieve of Eratosthenes 0.015s 0.026s 0.020s 0.038s 🥉
String Manipulation 0.008s 0.018s 0.016s 0.036s 🥉

CLI Tool Benchmarks

Benchmark ChadScript grep node xxd Place
Hex Dump 0.426s 1.037s 0.135s 🥈
Recursive Grep 0.019s 0.010s 0.097s 🥈

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