Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
aa2d9bd
spike(w012): harden in-process WASM analyzer M1
1932819331hy-debug Oct 18, 2026
e021f29
fix(w012): preserve warnings and publish validated current evidence
1932819331hy-debug Oct 18, 2026
4f897ad
fix(w012): bound analysis checks and isolate context snapshots
1932819331hy-debug Oct 18, 2026
fef92ee
test(w012): verify isolated snapshots and per-request cancellation
1932819331hy-debug Oct 18, 2026
c133aee
docs(w012): link latest 79-fixture hosted parity and distinguish old …
1932819331hy-debug Oct 18, 2026
adc9100
docs(w012): mark hosted validation complete without rewriting old ben…
1932819331hy-debug Oct 18, 2026
8f40541
fix(w012): fail closed on unreadable declared Hybrid files and dedupl…
1932819331hy-debug Oct 18, 2026
5ef7ee3
test(w012): cover declared read failures, canonical dedup, and determ…
1932819331hy-debug Oct 18, 2026
e029d66
test(w012): use real Go newline escapes and valid absolute path relat…
1932819331hy-debug Oct 18, 2026
3911506
docs(w012): record hosted 113-case fail-closed and deterministic-anal…
1932819331hy-debug Oct 18, 2026
10c0f2a
docs(w012): distinguish latest 113-case hosted correctness from older…
1932819331hy-debug Oct 18, 2026
b541d66
style(w012): keep Go test imports gofmt-ordered
1932819331hy-debug Oct 18, 2026
1e6f2e2
style(w012): align analyzer pass fixture fields
1932819331hy-debug Oct 18, 2026
dc40d00
fix(w012): isolate concurrent WASM guests and preserve analyzer diagn…
1932819331hy-debug Oct 18, 2026
7b4d8c3
fix(w012): add cache-safe vet wrapper with verified .hy input snapshots
1932819331hy-debug Oct 18, 2026
585dac8
fix(w012): stop probing undeclared Hybrid files via Pass.ReadFile
1932819331hy-debug Oct 18, 2026
cb3cba8
docs(w012): add maintainer decision memo with verified evidence and f…
1932819331hy-debug Oct 18, 2026
0f321af
docs(w012): lead M1 review with falsification gates and current CI ev…
1932819331hy-debug Oct 18, 2026
cec57fb
bench(w012): add honest 25-file 100-edit public request latency probe
1932819331hy-debug Oct 18, 2026
7d0a942
test(w012): pin 25-file edit benchmark methodology and run in validat…
1932819331hy-debug Oct 18, 2026
9c04ee6
bench(w012): measure sequential guest reuse separately from safe publ…
1932819331hy-debug Oct 18, 2026
e3fe101
ci(w012): prove prebuilt WASM analyzer runs through Go without Rust i…
1932819331hy-debug Oct 18, 2026
5cf43d3
perf(w012): opt-in filesystem compilation cache for cold Wazero startup
1932819331hy-debug Oct 18, 2026
2e0a2b8
ci(w012): record cross-process opt-in WASM cache cold-start evidence
1932819331hy-debug Oct 18, 2026
9c61a79
docs(w012): publish falsifying latency and cache evidence with format…
1932819331hy-debug Oct 18, 2026
2ba8460
style(w012): gofmt benchmark/cache code and enforce formatting in CI
1932819331hy-debug Oct 18, 2026
6719fa6
docs(w012): align M1 reviewer brief with latest measured CI and falsi…
1932819331hy-debug Oct 18, 2026
79d4b16
docs(w012): refresh current M1 review evidence and mark older snapshots
1932819331hy-debug Oct 19, 2026
e863810
docs(w012): append current 25-file/100-edit benchmark sample
1932819331hy-debug Oct 19, 2026
b4bafd5
fix(w012): avoid retrying guest source free after trap
1932819331hy-debug Oct 19, 2026
a97d65d
fix(w012): prevent vettool and cache-safety flag overrides
1932819331hy-debug Oct 19, 2026
6dafd49
test(w012): reject alternate vettool and cache-invalidating flags
1932819331hy-debug Oct 19, 2026
fd4f084
fix(w012): preserve EOF diagnostic positions and review evidence
1932819331hy-debug Oct 19, 2026
61d5bd9
merge(w012): reconcile current upstream with the EOF fix
1932819331hy-debug Oct 19, 2026
0d1dbf7
docs(w012): record completed integrated validation and upstream status
1932819331hy-debug Oct 19, 2026
4149882
Merge actual upstream main into W012 EOF integration
1932819331hy-debug Oct 19, 2026
8a9e1d5
docs(w012): record verified actual-main integration
1932819331hy-debug Oct 19, 2026
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
183 changes: 183 additions & 0 deletions .github/workflows/w012-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# W012's embedding boundary is outside the generic compiler CI suite.
name: w012-validation

on:
pull_request:
paths:
- '.github/workflows/w012-validation.yml'
- 'compiler/**'
- 'spikes/w012-analyzer/**'
- 'tests/checker-corpus/**'
- 'test_wasm_parity.js'
- 'tools/env.sh'
push:
branches: [main]
paths:
- '.github/workflows/w012-validation.yml'
- 'compiler/**'
- 'spikes/w012-analyzer/**'
- 'tests/checker-corpus/**'
- 'test_wasm_parity.js'
- 'tools/env.sh'

permissions:
contents: read

jobs:
analyzer-parity:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CARGO_BUILD_JOBS: '2'
CARGO_TARGET_DIR: ${{ github.workspace }}/compiler/target
GOFLAGS: '-p=2'
HYBRID_WASM_PATH: ${{ github.workspace }}/compiler/target/wasm32-unknown-unknown/release/hy_wasm.wasm
HYBRID_NATIVE_PATH: ${{ github.workspace }}/compiler/target/release/hyb
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- name: Pinned Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.26.9'
cache: false
- name: Node for full-envelope parity
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '24.19.0'
- name: Pinned Rust and WASM target
run: |
set -euo pipefail
rustup toolchain install 1.99.0 --profile minimal --target wasm32-unknown-unknown
rustup default 1.99.0
rustc --version
go version
node --version
- name: Build both checker artifacts from this checkout
working-directory: compiler
run: |
set -euo pipefail
cargo build --locked --release -p hyb
cargo build --locked --release -p hy-wasm --target wasm32-unknown-unknown
- name: Upload prebuilt WASM for independent Go-only consumer
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: w012-prebuilt-wasm
path: compiler/target/wasm32-unknown-unknown/release/hy_wasm.wasm
if-no-files-found: error
retention-days: 7
- name: Complete native and WASM envelope parity
run: node test_wasm_parity.js
- name: Go wrapper parity, warning preservation, and failure boundaries
working-directory: spikes/w012-analyzer
run: |
set -euo pipefail
go test -race -count=1 ./...
go vet ./...
- name: Enforce gofmt for W-012 experiment and cache tests
working-directory: spikes/w012-analyzer
run: |
set -euo pipefail
unformatted="$(gofmt -l cmd/editbench/main.go cmd/editbench/main_test.go cmd/editbench/reused.go compilation_cache_test.go)"
if [ -n "$unformatted" ]; then
printf 'Unformatted Go files:\n%s\n' "$unformatted"
exit 1
fi
- name: Reproduce 25-file 100-edit request-path comparison
working-directory: spikes/w012-analyzer
run: |
set -euo pipefail
go run ./cmd/editbench -root ../.. -files 25 -edits 100 -warmup 10 \
-output "$RUNNER_TEMP/w012-edit-benchmark.json"
- name: Measure opt-in WASM cache in two separate Go processes
working-directory: spikes/w012-analyzer
env:
HYBRID_W012_CACHE_DIR: ${{ runner.temp }}/w012-wazero-compilation-cache
run: |
set -euo pipefail
mkdir -p "$HYBRID_W012_CACHE_DIR"
go build -o "$RUNNER_TEMP/w012-editbench" ./cmd/editbench
"$RUNNER_TEMP/w012-editbench" -root ../.. -files 2 -edits 2 -warmup 1 \
-output "$RUNNER_TEMP/w012-cold-cache-first.json"
"$RUNNER_TEMP/w012-editbench" -root ../.. -files 2 -edits 2 -warmup 1 \
-output "$RUNNER_TEMP/w012-cold-cache-second.json"
python3 - <<'PY'
import json, os
root = os.environ["RUNNER_TEMP"]
with open(os.path.join(root, "w012-cold-cache-first.json")) as f: first = json.load(f)
with open(os.path.join(root, "w012-cold-cache-second.json")) as f: second = json.load(f)
assert first["WASMSHA256"] == second["WASMSHA256"]
assert first["NativeSHA256"] == second["NativeSHA256"]
print("CROSS-PROCESS WASM FILESYSTEM CACHE, experimental only")
print("first cold Engine.GetEngine:", first["ColdWASMInitMS"], "ms")
print("second cold Engine.GetEngine:", second["ColdWASMInitMS"], "ms")
print("No speed threshold asserted; compare host-specific raw samples.")
PY
- name: Publish cross-process cache timings
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: w012-cross-process-cache-timings
path: ${{ runner.temp }}/w012-cold-cache-*.json
if-no-files-found: ignore
retention-days: 30
- name: Publish raw request latency samples
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: w012-request-latency-raw
path: ${{ runner.temp }}/w012-edit-benchmark.json
if-no-files-found: ignore
retention-days: 30

go-only-consumer:
needs: analyzer-parity
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout source without build artifacts
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
- name: Pinned Go toolchain (no Rust installation step)
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
with:
go-version: '1.26.9'
cache: false
- name: Retrieve WASM built by separate Rust-capable job
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: w012-prebuilt-wasm
path: compiler/target/wasm32-unknown-unknown/release
- name: Execute Hybrid analyzer using Go and precompiled WASM
working-directory: spikes/w012-analyzer
env:
HYBRID_WASM_PATH: ${{ github.workspace }}/compiler/target/wasm32-unknown-unknown/release/hy_wasm.wasm
GOFLAGS: '-p=2'
run: |
set -euo pipefail
# Poison Rust commands: any attempt to invoke cargo/rustc by name
# breaks this test. This does not mean the hosted VM lacks Rust.
mkdir -p "$RUNNER_TEMP/forbid-rust"
printf '#!/bin/sh\necho RUST_TOOLCHAIN_INVOKED >&2\nexit 87\n' > "$RUNNER_TEMP/forbid-rust/cargo"
cp "$RUNNER_TEMP/forbid-rust/cargo" "$RUNNER_TEMP/forbid-rust/rustc"
chmod +x "$RUNNER_TEMP/forbid-rust/cargo" "$RUNNER_TEMP/forbid-rust/rustc"
export PATH="$RUNNER_TEMP/forbid-rust:$PATH"
test -s "$HYBRID_WASM_PATH"
go build -o "$RUNNER_TEMP/hybvet" ./cmd/hybvet
set +e
"$RUNNER_TEMP/hybvet" vet ./testpkg > "$RUNNER_TEMP/w012-negative.log" 2>&1
result=$?
set -e
if [ "$result" -eq 0 ] || ! grep -q 'HYB-E3003' "$RUNNER_TEMP/w012-negative.log"; then
echo "Expected invalid Hybrid source to produce HYB-E3003 without Rust" >&2
cat "$RUNNER_TEMP/w012-negative.log" >&2
exit 1
fi
# Editing only .hy must be visible on the next vet pass.
cp ../../tests/checker-corpus/09-a3-map-slot-valid.hy ./testpkg/sibling.hy
"$RUNNER_TEMP/hybvet" vet ./testpkg
echo "Go+prebuilt WASM check PASS; cargo/rustc not invoked."

9 changes: 9 additions & 0 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ All SPEC §3 rows verified — see research/claims.md. Headlines: rustygo 127/14
| 5 errors | per pre-registered table | **PASS all**: E1 2.58 ns/0 allocs (two-word HyResult), E2 0 allocs, E3 1 alloc, E4 identity + documented chain loss, E5 abort contract verified | adopt HyResult + sentinel table + wrap-on-demand |
| 6 ownership usability | 10 programs, annotation count | **PASS**: 0 annotations / 0 managed / 0 outside-model (strictest reading; hand-trace); A1–A8 ambiguities + corpus gap recorded | Tier-0 real for MVP corpus; Polonius-style engine + rustc CI oracle |

## Contributor validation — W-012 EOF diagnostics (2026-10-19)

- An unterminated block ending in LF/CRLF is a real HYB-E0002 at the logical EOF line, which Go's unpadded token table omitted. Preserve EOF with token-table-only padding; source bytes and coordinate bounds remain unchanged.
- Exact branch source 6dafd497 plus the fix, pinned Go 1.26.9 / Rust 1.99.0 / Node 24.19.0: old analyzer fails four EOF cases and passes two controls; fixed cases, full Go race suite and vet pass; freshly built same-checkout native/WASM complete envelope and verdict parity are 60/60. Hosted synthetic merges have a separate corpus and are not interchangeable artifact sources.
- Preserve the original run 39195170609 raw measurements with checked archive/file digests under spikes/w012-inprocess/validation-2026-10-19; extend future timing artifacts to 30 days. See W012_M1_REVIEW.md for evidence boundaries and the still-pending November 1 M1 review.
- Historical integration 61d5bd9 joined fd4f084d with f6e4d929, the PR-reported base SHA. Fork W012 validation 39210700789 and compiler CI 39210708370 passed with rebuilt native/WASM 61/61 verdict and full-envelope parity, Go race/vet, and Go-only consumer. The later documentation head 0d1dbf7 also passed those gates in fork runs 39211484374 and 39211484338. These results validate their recorded trees, not integration with the live main branch.
- Base correction (2026-10-19): Git transport and the upstream ref/branch APIs identified actual main as aa4a9d91; the earlier 0d1dbf7 lacked 251 main commits, with f6e4d929 as merge base. Integration 4149882 now joins 0d1dbf7 with aa4a9d91, retaining the EOF fix, raw evidence, WASM project, and all upstream changes; only STATUS.md conflicted.
- Completed validation of 4149882: upstream W012 39213961382 and compiler CI 39213961322, plus fork W012 39213960125 and compiler CI 39213960076, all PASS. Independently rebuilt native/WASM artifacts pass 113/113 verdict and complete-envelope parity in each repository; Go race/vet, Go-only consumer, and compiler differential agreement pass. The upstream and fork executed merges share published tree 9a27169f. At 07:13 UTC, upstream PR #556 reports clean/mergeable with base aa4a9d91; M1 remains pending for November 1. Historical 60/60, 61/61, earlier 113/113 and raw timings retain their source labels; see W012_M1_REVIEW.md.

## Task List
- [ ] Contributor tooling patch: shape.py parses supported options before file operations; invalid flags/positionals and help preserve generated files. Maintainer validated PR #351; main status conflict resolved. Native-Linux focused 9/9, Python tooling 107/107 pass. Compiler/runtime suites not run; merge and any award pending (17 October 2026).
- [x] Installer checksum download must fail closed | Missing checksum fetch previously installed and executed an unverified archive; now aborts before extraction or replacement. Six offline installer tests added to quick CI; two regression tests fail on base `34525ee`, all six pass locally on Windows/Git Bash. Upstream CI/reward review pending (2026-10-15).
Expand Down
1 change: 1 addition & 0 deletions STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
- Wildcard holds (do NOT merge before window): #635 #637 #704 #709 #616 #446 #577 #572 #569 #566 #556 #545 #516 #505 #488 #480 #474 #464 #452 #405 #384 #381 #370 #379 #507 #412 #336; drafts #531/#465 stay with authors
- CI quota healthy (4980/5000 after ~190 approvals this session); race tempo ~15 min/landing at peak — worktree-merge-push protocol held (two ort auto-merge traps caught: silent hunk deletion ×2, unpaired conflict marker ×2)
- Next queue: wave tail + #711–#724 recon, then M1 posting (11-01), then $500 Wildcard Track ops
- W-012 actual-main integration 4149882: upstream and fork freshly rebuilt native/WASM verdict/full-envelope parity 113/113, Go race/vet/consumer and compiler CI PASS. PR #556 is clean/mergeable at 2026-10-19 07:13 UTC; M1 remains pending for November 1. Historical counts and raw timings retain their source labels; see W012_M1_REVIEW.md.
Loading
Loading