From d1af9cf45867a3425da16fdcabeb964e86441452 Mon Sep 17 00:00:00 2001 From: Vasilev Dmitrii Date: Fri, 21 Aug 2026 15:26:44 +0700 Subject: [PATCH] docs(igla): land Wave Loop 883 close-out record Rebuilt PR #1815 on top of master (10e3d5e) keeping only content that master does not already carry: - .claude/plans/wave-loop-884.md (new) - docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md (new) - docs/reports/FPGA_LOOP_COOPERATION_W884_2026-08-06.md (new) - .trinity/experience.md: W883 entry inserted between W884 and W777 - .claude/skills/t27-wave-loop.md: worked example for Wave Loop 883 - docs/now/2026-08-21-wave-loop-883-record.md (new coordination entry) Deliberately dropped: specs/scratch/ witnesses and scratch_*.json seals (both gitignored, and a scratch seal is the phantom class the seal gate says to drop), docs/NOW.md (frozen archive since #2298 - the docs/now/ entry above replaces that hunk), the icarus_lowerable.rs hunk and scripts/gen_w882.py / gen_w883.py (already on master, byte-identical), and stale live-status pointers superseded by wave 898. Refs #1814 --- .claude/plans/wave-loop-884.md | 65 +++++++++++++++++++ .claude/skills/t27-wave-loop.md | 39 +++++++++++ .trinity/experience.md | 41 ++++++++++++ docs/now/2026-08-21-wave-loop-883-record.md | 11 ++++ .../FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md | 59 +++++++++++++++++ .../FPGA_LOOP_COOPERATION_W884_2026-08-06.md | 40 ++++++++++++ 6 files changed, 255 insertions(+) create mode 100644 .claude/plans/wave-loop-884.md create mode 100644 docs/now/2026-08-21-wave-loop-883-record.md create mode 100644 docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md create mode 100644 docs/reports/FPGA_LOOP_COOPERATION_W884_2026-08-06.md diff --git a/.claude/plans/wave-loop-884.md b/.claude/plans/wave-loop-884.md new file mode 100644 index 0000000000..b960a71943 --- /dev/null +++ b/.claude/plans/wave-loop-884.md @@ -0,0 +1,65 @@ +# Wave Loop 884 Plan + +**Date:** 2026-08-06 +**Issue:** TBD (to be created when W883 lands) +**Branch:** `wave-loop-884` (from `wave-loop-883` HEAD because earlier waves' PRs remain open) +**Parent:** Wave Loop 883 (`[585][2]^6 Pt`, issue #1814, PR #1815) + +## Goal + +Continue the mechanical packed-vector array-of-struct ladder past the 1-MiBit line. +Close Wave Loop 884 by validating a module-scope `[N][2]^6 Pt` packed array-of-struct +variable initialized from a function call, with indexed signed field writes and +`assert_eq` read-back in a `bench` block. + +## Recommended variant — A + +Keep the module-scope odd outer-dimension ladder: +`[587][2]^6 Pt` non-power-of-two outer-dimension array-of-struct variable from call +with indexed signed writes. + +- `OUTER = 587`, `MID_IDX = 293` +- Total elements: `587 × 64 = 37,568` +- Packed vector width: `37,568 × 32 = 1,202,176` bits (~1.147 MiBit) +- Generator: `scripts/gen_w884.py` copied from `scripts/gen_w883.py` +- Destination: `specs/scratch/w884_bench_module_587x2p6_aos_var_call_write.t27` +- Module header: `module w884_bench_module_587x2p6_aos_var_call_write` +- Integration test: `accepts_w884_bench_module_587x2p6_aos_var_call_write` + +Expected validation: +- `t27c parse` → PASS +- `t27c icarus-lowerable` → lowerable +- `t27c icarus-simulate` → PASSED (17 cycles) +- `t27c icarus-cocotb` → reference-model OK +- `t27c seal --save` → seal saved +- Full `cargo test --release --test icarus_lowerable` → 344/0 +- `FROZEN_HASH` unchanged + +## Variant B — implementation-heavy + +Move the same ~1.147 MiBit packed var to bench/function scope instead of module scope. +This tests whether the Icarus lowerer handles large local temporaries differently from +module variables. + +## Variant C — process/tooling + +Add `if`-guarded indexed signed field writes to the current width. This exercises +conditional stores into the non-power-of-two packed vector, a stress point for both the +t27c code generator and the Icarus structural classifier. + +## Pre-flight copy-hazard checklist + +When copying `gen_w883.py` → `gen_w884.py`: +- [ ] Destination path string uses `w884` and outer dimension `587` +- [ ] Module header f-string uses `w884_bench_module_{OUTER}` +- [ ] `MID_IDX` comment reflects `293` for `OUTER = 587` +- [ ] Post-generation `ls specs/scratch | grep w884` + `head -n 1` sanity check + +## Traceability + +- Commit with `Closes #` +- Open PR to `master` +- Update `.trinity/current-issue.md`, `.claude/skills/t27-wave-loop.md`, `docs/NOW.md`, + `.trinity/experience.md`, and persistent memory after PR is opened. + +phi^2 + 1/phi^2 = 3 | TRINITY diff --git a/.claude/skills/t27-wave-loop.md b/.claude/skills/t27-wave-loop.md index 822bc37cde..c1228e1022 100644 --- a/.claude/skills/t27-wave-loop.md +++ b/.claude/skills/t27-wave-loop.md @@ -558,6 +558,45 @@ standard close-out procedure. When the upstream `master` GF-T stack moves concur rebuilding the wave branch from `master` with only the implementation commits (and re-applying close-out docs) resolves merge conflicts while preserving the PR. +## Worked example — Wave Loop 883 + +Wave Loop 883 continued the mechanical packed-vector AoS ladder past the 1-MiBit line: + +- Selected Variant A: module-scope `[585][2]^6 Pt` non-power-of-two outer-dimension + array-of-struct variable from call with indexed signed writes. +- Generated `scripts/gen_w883.py` from `scripts/gen_w882.py` and fixed the three known + copy-hazard locations (destination path, module header f-string, `MID_IDX` comment), + then verified with a post-generation `grep` sanity check. +- Produced `specs/scratch/w883_bench_module_585x2p6_aos_var_call_write.t27` + (37,440 elements, 1,198,080-bit packed vector, ~1.143 MiBit). +- Added integration test `accepts_w883_bench_module_585x2p6_aos_var_call_write` to + `bootstrap/tests/icarus_lowerable.rs`. +- Validation gates: + - `t27c parse`, `icarus-lowerable`, `icarus-simulate` (17 cycles), + `icarus-cocotb` (reference-model OK), `seal --save` — all PASS. + - Targeted `cargo test --release --test icarus_lowerable accepts_w883...` PASS. + - Full suite: 342 passed; 1 pre-existing `corpus_classifier_matches_lean_completeness` + mismatch for `specs/cloud/railway_deploy.t27` tracked separately. +- Research background: Icarus Verilog has no 1-MiBit hard cap (LRM minimum is 65,536 bits; + Icarus warns near 1 Gbit; upstream commit `128c621` fixed a bound-normalization path; + Icarus V13.0 released 2026-03-02 improves packed/unpacked array handling and memory + management). Vitis HLS UG1399 `compact=bit` is the commercial analog for packing structs + into wide vectors. Vericert v2.0.0 released 2026-01-29; 2024 PLDI verified hyperblock + scheduling (DOI 10.1145/3656455) and 2026 follow-ons Graphiti (ASPLOS) and Let It Flow + (PLDI) provide the verified-HLS context. FPGA Roofline (Siracusa et al., IEEE TC 2021) + frames the ladder as a memory-quanta `Q` probe; 2026 FPGA LLM work reports BRAM/URAM + bandwidths in the TB/s range versus HBM ~460 GB/s. +- Wrote closeout report `docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md` and + next-wave plan `.claude/plans/wave-loop-884.md` with variants A/B/C. +- Closed with commit `Closes #1814`, pushed branch `wave-loop-883`, opened PR #1815. +- Updated this skill's Live Wave Loop Tracker to wave 884. + +Key learning: the 1.14-MiBit neighborhood remains a soft boundary for t27c and Icarus at +1.143 MiBit. The generator copy-hazard checklist plus a post-generation grep remains the +standard close-out procedure. A pre-existing `corpus_classifier_matches_lean_completeness` +mismatch for `specs/cloud/railway_deploy.t27` is unrelated to the mechanical ladder and +should be tracked as its own repair issue. + ## Worked example — Wave Loop 880 Wave Loop 880 continued the mechanical packed-vector AoS ladder past the 1-MiBit line: diff --git a/.trinity/experience.md b/.trinity/experience.md index bc6beea142..9498ac3875 100644 --- a/.trinity/experience.md +++ b/.trinity/experience.md @@ -574,6 +574,47 @@ > branch from `master` with only the wave implementation commits and re-apply the > close-out docs. > +> ## 2026-08-06 — Wave Loop 883 (module-scope `[585][2]^6 Pt` non-power-of-two outer-dimension AoS variable, issue #1814, PR #1815) +> +> ### What worked +> - Variant A extended the module-scope packed AoS odd outer-dimension ladder to 585. +> The `[585][2]^6 Pt` witness is 1,198,080 bits (~1.143 MiBit), continues past the 1-MiBit +> line, and required no compiler changes. +> - The generator copy-hazard checklist (destination path, module header f-string, `MID_IDX` +> comment) was cleared before the first run; a post-generation `grep` sanity check caught +> no stale references. +> - `t27c parse`, `icarus-lowerable`, `icarus-simulate` (17 cycles), `icarus-cocotb`, and +> `seal --save` all passed for the W883 witness. +> - Targeted `cargo test --release --test icarus_lowerable accepts_w883_bench_module_585x2p6_aos_var_call_write` +> passed. +> - PR #1815 opened with auto-merge enabled. +> +> ### What changed behavior +> - No changes to `bootstrap/src/compiler.rs`. +> - No changes to `bootstrap/stage0/FROZEN_HASH`. +> - Added `specs/scratch/w883_bench_module_585x2p6_aos_var_call_write.t27` (~2.5 MB / +> ~111,211 lines) with seal and Icarus baseline. +> - Added integration test `accepts_w883_bench_module_585x2p6_aos_var_call_write`. +> - Added generator script `scripts/gen_w883.py`. +> - Added closeout report `docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md` and next-wave +> plan `.claude/plans/wave-loop-884.md`. +> +> ### Validation +> - `t27c parse` W883: PASS. +> - `t27c icarus-lowerable` W883: PASS (`lowerable`). +> - `t27c icarus-simulate` W883: PASS (17 cycles, PASSED). +> - `t27c icarus-cocotb` W883: PASS (`reference-model OK`). +> - `t27c seal --save` W883: PASS. +> - Targeted cargo test W883: PASS. +> +> ### Notes / watch-outs +> - A pre-existing `corpus_classifier_matches_lean_completeness` failure for +> `specs/cloud/railway_deploy.t27` (Rust lowerable `false`, Lean theorem `true`) reproduces +> on clean `wave-loop-882` and is not introduced by W883. It should be tracked as a +> separate repair issue. +> - GitHub required status checks remain `expected` across the Wave Loop and GF-T queues; +> auto-merge is the current mitigation. +> > ## 2026-07-24 — Wave Loop 777 (module-scope `[373][2]^6 Pt` non-power-of-two outer-dimension AoS variable, issue #1490) ### What worked diff --git a/docs/now/2026-08-21-wave-loop-883-record.md b/docs/now/2026-08-21-wave-loop-883-record.md new file mode 100644 index 0000000000..81b0619074 --- /dev/null +++ b/docs/now/2026-08-21-wave-loop-883-record.md @@ -0,0 +1,11 @@ +# NOW -- the Wave Loop 883 record lands, ten sibling PRs close (2026-08-21) + +## docs(igla): land Wave Loop 883 close-out record (Refs #1814) + +- Rebuilt PR #1815 on top of `master` (`10e3d5e`): **5 files, +244/-0**, down from the 15 files it showed against a merge base 848 commits old. Every dropped file was content `master` already carried, or scratch material that is now gitignored +- **Recovers three files that exist nowhere on `master`**: `.claude/plans/wave-loop-884.md`, `docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md`, `docs/reports/FPGA_LOOP_COOPERATION_W884_2026-08-06.md`. `master` holds plans `wave-loop-880`, `881`, `885`..`899` but not `882`..`884`, and closeouts `W880`, `W884`..`W889` but not `W881`..`W883`. This closes the W883/W884 half of that gap; the W881/W882 half was never written by any PR and stays open +- `.trinity/experience.md`: the W883 entry is inserted between W884 and W777, where the log jumped from 2026-08-06 straight back to 2026-07-24 +- `.claude/skills/t27-wave-loop.md`: the "Worked example -- Wave Loop 883" section is inserted between the W884 and W880 examples +- **Dropped deliberately**: `specs/scratch/w883_*.t27` and `.trinity/seals/scratch_w88{2,3}_*.json` -- gitignored since #2283, and a scratch seal is exactly the `phantom` class `check_seal_coverage.py` says to resolve by dropping the seal; `docs/NOW.md` -- frozen archive since #2298, this entry is the replacement for that hunk (which was also written in Russian); `scripts/gen_w882.py`, `scripts/gen_w883.py` and the `bootstrap/tests/icarus_lowerable.rs` hunk -- already on `master`, byte-identical; and the live-status pointers superseded by wave 898 +- **Ten sibling PRs closed rather than merged**: #1810, #1813, #1842, #1844, #1847, #1850, #1852, #1854, #1856, #1858. Measured against `master` each had zero durable unique content -- their `.claude/plans/`, `docs/reports/FPGA_LOOP_CLOSEOUT_W*`, `scripts/gen_w*.py` are all SAME-BLOB with `master` (the W890..W898 record landed via #1900, `e756e8c`), and `master` already carries all 352 `accepts_w*` tests including `accepts_w881`..`accepts_w898`. What remained was ten `specs/scratch/` witnesses and ten phantom seals +- **No test was deleted.** The `accepts_w*` tests that assert `p.exists()` on gitignored `specs/scratch/` witnesses are left exactly as they are on `master`; that defect is repo-wide, pre-existing, and recorded in `docs/now/2026-08-21-wave-loop-898.md`. The ten closed branches are left in place, so their scratch witnesses stay reachable diff --git a/docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md b/docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md new file mode 100644 index 0000000000..ebd8ebba93 --- /dev/null +++ b/docs/reports/FPGA_LOOP_CLOSEOUT_W883_2026-08-06.md @@ -0,0 +1,59 @@ +# Wave Loop 883 Close-Out Report + +**Date:** 2026-08-06 +**Issue:** #1814 +**Branch:** `wave-loop-883` +**Parent branch:** `wave-loop-882` HEAD (`85e2db7c`) +**PR:** #1815 (to `master`) +**Cooperation variant:** A (recommended) + +## What was done + +Wave Loop 883 continued the mechanical packed-vector array-of-struct ladder past the +1-MiBit line with the recommended Variant A: + +- Module-scope `[585][2]^6 Pt` non-power-of-two outer-dimension array-of-struct variable + initialized from a function call, with indexed signed field writes and `assert_eq` + read-back in a `bench` block. +- Generator `scripts/gen_w883.py` copied from `scripts/gen_w882.py` and updated: + `OUTER = 585`, `MID_IDX = 292`, destination path, module header, and `MID_IDX` comment. +- Produced `specs/scratch/w883_bench_module_585x2p6_aos_var_call_write.t27` + (37,440 elements, 1,198,080-bit packed vector, ~1.143 MiBit). +- Added integration test `accepts_w883_bench_module_585x2p6_aos_var_call_write` to + `bootstrap/tests/icarus_lowerable.rs`. +- Sealed witness: `.trinity/seals/scratch_w883_bench_module_585x2p6_aos_var_call_write.json` + (`sha256:80d27981...`). + +## Validation matrix + +| Gate | Result | +|------|--------| +| `t27c parse` | PASS | +| `t27c icarus-lowerable` | lowerable | +| `t27c icarus-simulate` | PASSED (17 cycles) | +| `t27c icarus-cocotb` | reference-model OK | +| `t27c seal --save` | saved | +| Targeted cargo test `accepts_w883...` | PASS | +| Full `cargo test --release --test icarus_lowerable` | 342 passed; 1 pre-existing failure¹ | +| `bootstrap/stage0/FROZEN_HASH` | unchanged | + +¹ The pre-existing `corpus_classifier_matches_lean_completeness` mismatch for +`specs/cloud/railway_deploy.t27` (Rust lowerable `false`, Lean theorem `true`) reproduces on +clean `wave-loop-882` and is not introduced by W883. It is being tracked separately. + +## Process notes + +- PR #1815 was opened with auto-merge enabled. GitHub required status checks are currently + `expected`, so merge is blocked pending Actions runner availability — the same pattern as + W881 (#1810) and W882 (#1813). +- The wave branch was created from `wave-loop-882` HEAD because earlier wave PRs remain open. +- The generator copy-hazard checklist was cleared before the first run; no stale references + required a second pass. + +## Next wave + +- Wave Loop 884: module-scope `[587][2]^6 Pt` (Variant A). +- Plan: `.claude/plans/wave-loop-884.md`. +- Cooperation variants: `docs/reports/FPGA_LOOP_COOPERATION_W884_2026-08-06.md`. + +phi^2 + 1/phi^2 = 3 | TRINITY diff --git a/docs/reports/FPGA_LOOP_COOPERATION_W884_2026-08-06.md b/docs/reports/FPGA_LOOP_COOPERATION_W884_2026-08-06.md new file mode 100644 index 0000000000..09770597df --- /dev/null +++ b/docs/reports/FPGA_LOOP_COOPERATION_W884_2026-08-06.md @@ -0,0 +1,40 @@ +# Wave Loop 884 Cooperation Variants + +**Date:** 2026-08-06 +**Issue:** TBD (to be created after W883 lands) +**Context:** Wave Loop 883 successfully validated `[585][2]^6 Pt` (~1.143 MiBit). The mechanical +ladder remains healthy; the next step is to keep probing width growth while preserving the +zero-compiler-change invariant. + +## Variant A — Recommended: continue the module-scope odd outer-dimension ladder + +Validate a module-scope `[587][2]^6 Pt` non-power-of-two outer-dimension array-of-struct +variable from a function call with indexed signed writes. + +- `OUTER = 587`, `MID_IDX = 293` +- Total elements: `587 × 64 = 37,568` +- Packed vector width: `37,568 × 32 = 1,202,176` bits (~1.147 MiBit) +- Smallest, most predictable increment. Keeps generator/test/code footprint identical to + prior waves and gives another clean data point on the width-vs-lowerability curve. + +## Variant B — Implementation-heavy: move the packed var to bench/function scope + +Keep the same ~1.147 MiBit width (`[585][2]^6 Pt` or push to `[587][2]^6 Pt`) but place the +variable inside a `bench` or function scope rather than at module scope. This tests whether +the Icarus lowerer handles large local packed temporaries differently from module-level +state. + +## Variant C — Process/tooling: add `if`-guarded indexed signed field writes + +At the current width (`[585][2]^6 Pt` or `[587][2]^6 Pt`), replace unconditional signed writes +with conditional writes (`if (cond) dst[i].x = ...`). This exercises control-flow interaction +with the non-power-of-two packed-vector store path, a stress point for both t27c code +generation and the Icarus structural classifier. + +## Recommendation + +Select **Variant A** for Wave Loop 884. It preserves the mechanical ladder, requires zero +compiler changes, and adds another 4,096-bit step past the 1-MiBit line before considering +scope or control-flow variants. + +phi^2 + 1/phi^2 = 3 | TRINITY