Skip to content
Closed
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
71 changes: 71 additions & 0 deletions .claude/plans/wave-loop-890.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Wave Loop 890 Plan

**Issue:** #1841 — feat(igla): Wave Loop 890 — module-scope `[599][2]^6 Pt` non-power-of-two outer-dimension array-of-struct variable from call with indexed signed writes

---

## Goal

Continue the mechanical packed-vector array-of-struct ladder one step past W889. The target witness is module-scope `[599][2]^6 Pt`:

- Outer dimension: 599 (non-power-of-two)
- Inner struct: `[2]^6 Pt` = 2 fields × 6 trits × 32 bits = 384 bits per element
- Total elements: 599 × 64 = 38,336
- Packed vector width: 38,336 × 32 = 1,226,752 bits (~1.170 MiBit)

The pattern is identical to W881–W889: a module-scope variable initialized from a pure `make_grid(0)` call, with indexed signed field writes and `assert_eq` read-back inside a `bench` block.

---

## Variants

### A — Mechanical increment (recommended)
- Copy `scripts/gen_w889.py` → `scripts/gen_w890.py`.
- Update copy-hazard checklist: destination path, module header, `MID_IDX` comment.
- Set `OUTER = 599`, `MID_IDX = 299`.
- Generate spec, run gates, add integration test, seal, open PR #TBD with `Closes #1841`.
- Expected zero compiler / `FROZEN_HASH` changes.

### B — Increase inner struct width
- Keep outer dimension 599 but expand the inner struct to `[2]^8 Pt` or `[4]^6 Pt`.
- Same total-element probe but larger per-element footprint.
- Could reveal whether the ceiling is element count vs total packed width.
- Larger generated spec and longer CI; skip unless Variant A is uneventful and we want a second data point.

### C — Variable signed-index stress
- Within the W890 spec, replace the constant `MID_IDX` writes with a loop variable or offset expression.
- Tests Icarus index normalization and cocotb reference-model agreement under dynamic signed indices.
- Risk of compiler/reference-model delta; run only as a separate scratch experiment, not the main wave.

---

## Procedure

1. Create and push branch `wave-loop-890` from `wave-loop-889` HEAD (earlier waves' PRs still open).
2. Copy generator, fix three stale-reference locations, verify with `grep`.
3. `python3 scripts/gen_w890.py`.
4. Run direct gates:
- `t27c parse`
- `t27c icarus-lowerable`
- `t27c icarus-simulate`
- `t27c icarus-cocotb`
- `t27c seal --save` + `seal --verify`
5. Add `accepts_w890_bench_module_599x2p6_aos_var_call_write` to `bootstrap/tests/icarus_lowerable.rs`.
6. Run targeted cargo test.
7. Commit with `Closes #1841`, push, open PR, enable auto-merge.
8. Write closeout report, update trackers, skills, and persistent memory.

---

## Acceptance

- [ ] `t27c parse` PASS
- [ ] `t27c icarus-lowerable` → `lowerable`
- [ ] `t27c icarus-simulate` → `PASSED`
- [ ] `t27c icarus-cocotb` → reference-model OK
- [ ] `t27c seal --verify` → `MATCH`
- [ ] Targeted cargo test PASS
- [ ] `FROZEN_HASH` unchanged
- [ ] PR opened referencing #1841

phi^2 + 1/phi^2 = 3 | TRINITY
71 changes: 71 additions & 0 deletions .claude/plans/wave-loop-891.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Wave Loop 891 Plan

**Issue:** #1843 — feat(igla): Wave Loop 891 — module-scope `[601][2]^6 Pt` non-power-of-two outer-dimension array-of-struct variable from call with indexed signed writes

---

## Goal

Continue the mechanical packed-vector array-of-struct ladder one step past W890. The target witness is module-scope `[601][2]^6 Pt`:

- Outer dimension: 601 (non-power-of-two)
- Inner struct: `[2]^6 Pt` = 2 fields × 6 trits × 32 bits = 384 bits per element
- Total elements: 601 × 64 = 38,464
- Packed vector width: 38,464 × 32 = 1,230,848 bits (~1.174 MiBit)

The pattern is identical to W881–W890: a module-scope variable initialized from a pure `make_grid(0)` call, with indexed signed field writes and `assert_eq` read-back inside a `bench` block.

---

## Variants

### A — Mechanical increment (recommended)
- Copy `scripts/gen_w890.py` → `scripts/gen_w891.py`.
- Update copy-hazard checklist: destination path, module header, `MID_IDX` comment.
- Set `OUTER = 601`, `MID_IDX = 300`.
- Generate spec, run gates, add integration test, seal, open PR #TBD with `Closes #1843`.
- Expected zero compiler / `FROZEN_HASH` changes.

### B — Increase inner struct width
- Keep outer dimension 601 but expand the inner struct to `[2]^8 Pt` or `[4]^6 Pt`.
- Same total-element probe but larger per-element footprint.
- Could reveal whether the ceiling is element count vs total packed width.
- Larger generated spec and longer CI; skip unless Variant A is uneventful and we want a second data point.

### C — Variable signed-index stress
- Within the W891 spec, replace the constant `MID_IDX` writes with a loop variable or offset expression.
- Tests Icarus index normalization and cocotb reference-model agreement under dynamic signed indices.
- Risk of compiler/reference-model delta; run only as a separate scratch experiment, not the main wave.

---

## Procedure

1. Create and push branch `wave-loop-891` from `wave-loop-890` HEAD (earlier waves' PRs still open).
2. Copy generator, fix three stale-reference locations, verify with `grep`.
3. `python3 scripts/gen_w891.py`.
4. Run direct gates:
- `t27c parse`
- `t27c icarus-lowerable`
- `t27c icarus-simulate`
- `t27c icarus-cocotb`
- `t27c seal --save` + `seal --verify`
5. Add `accepts_w891_bench_module_601x2p6_aos_var_call_write` to `bootstrap/tests/icarus_lowerable.rs`.
6. Run targeted cargo test.
7. Commit with `Closes #1843`, push, open PR, enable auto-merge.
8. Write closeout report, update trackers, skills, and persistent memory.

---

## Acceptance

- [ ] `t27c parse` PASS
- [ ] `t27c icarus-lowerable` → `lowerable`
- [ ] `t27c icarus-simulate` → `PASSED`
- [ ] `t27c icarus-cocotb` → reference-model OK
- [ ] `t27c seal --verify` → `MATCH`
- [ ] Targeted cargo test PASS
- [ ] `FROZEN_HASH` unchanged
- [ ] PR opened referencing #1843

phi^2 + 1/phi^2 = 3 | TRINITY
7 changes: 5 additions & 2 deletions .claude/skills/t27-master-executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ Update it at the end of every loop.
- **W885** — issue #1830, PR #1831 (`[589][2]^6 Pt`) — `MERGED`.
- **W886** — issue #1832, PR #1833 (`[591][2]^6 Pt`) — `MERGED`.
- **W887** — issue #1834, PR #1835 (`[593][2]^6 Pt`) — `MERGED`.
- **W888** — issue #1836, PR #1837 (`[595][2]^6 Pt`) — `OPEN`, auto-merge enabled; merge
- **W888** — issue #1836, PR #1837 (`[595][2]^6 Pt`) — `MERGED`.
- **W889** — issue #1838, PR #1840 (`[597][2]^6 Pt`) — `OPEN`, auto-merge enabled; merge
state `BLOCKED` pending required checks.
- **W889** — issue #1838, branch TBD (`[597][2]^6 Pt`) — ready to start once W888 lands.
- **W890** — issue #1841, PR #1842 (`[599][2]^6 Pt`) — `OPEN`, auto-merge enabled; merge
state `BLOCKED` pending required checks.
- **W891** — issue #1843, branch TBD (`[601][2]^6 Pt`) — ready to start once W890 lands.

### GF-T PR queue (Refs #1764)
The GF-T stack has largely landed on `master`. Remaining open PRs are wave-loop branches
Expand Down
65 changes: 65 additions & 0 deletions .claude/skills/t27-wave-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,71 @@ Phase complete: [phase name]
→ Phase [next phase number]: [next phase name]
```

## Worked example — Wave Loop 890

Wave Loop 890 continued the mechanical packed-vector AoS ladder past the 1-MiBit line:

- Selected Variant A: module-scope `[599][2]^6 Pt` non-power-of-two outer-dimension
array-of-struct variable from call with indexed signed writes.
- Generated `scripts/gen_w890.py` from `scripts/gen_w889.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 (`OUTER = 599`, `MID_IDX = 299`).
- Produced `specs/scratch/w890_bench_module_599x2p6_aos_var_call_write.t27`
(38,336 elements, 1,226,752-bit packed vector, ~1.170 MiBit).
- Added integration test `accepts_w890_bench_module_599x2p6_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_w890...` PASS.
- Full suite: 349 passed; 1 pre-existing `corpus_classifier_matches_lean_completeness`
mismatch for `specs/cloud/railway_deploy.t27` tracked separately.
- Research background: same context as W888/W889 (Icarus V13, `128c621` bound-normalization fix,
Vitis HLS UG1399 `compact=bit`, Vericert v2.0.0, Roofline). 1.170 MiBit still comfortably
below Icarus practical limits.
- Wrote closeout report `docs/reports/FPGA_LOOP_CLOSEOUT_W890_2026-08-06.md` and
next-wave plan `.claude/plans/wave-loop-891.md` with variants A/B/C.
- Closed with commit `Closes #1841`, pushed branch `wave-loop-890`, opened PR #1842.
- Updated this skill's Live Wave Loop Tracker to wave 891.

Key learning: the 1.17-MiBit neighborhood remains a soft boundary for t27c and Icarus at
1.170 MiBit. The mechanical generator-copy checklist is sufficient to keep the ladder moving
without compiler changes; full `icarus_lowerable` suite runtime is ~46 seconds and still CI-friendly.

## Worked example — Wave Loop 889

Wave Loop 889 continued the mechanical packed-vector AoS ladder past the 1-MiBit line:

- Selected Variant A: module-scope `[597][2]^6 Pt` non-power-of-two outer-dimension
array-of-struct variable from call with indexed signed writes.
- Generated `scripts/gen_w889.py` from `scripts/gen_w888.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 (`OUTER = 597`, `MID_IDX = 298`).
- Produced `specs/scratch/w889_bench_module_597x2p6_aos_var_call_write.t27`
(38,208 elements, 1,222,656-bit packed vector, ~1.166 MiBit).
- Added integration test `accepts_w889_bench_module_597x2p6_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_w889...` PASS.
- Full suite: 348 passed; 1 pre-existing `corpus_classifier_matches_lean_completeness`
mismatch for `specs/cloud/railway_deploy.t27` tracked separately.
- Research background: same context as W888 (Icarus V13, `128c621` bound-normalization fix,
Vitis HLS UG1399 `compact=bit`, Vericert v2.0.0, Roofline). 1.166 MiBit still comfortably
below Icarus practical limits.
- Wrote closeout report `docs/reports/FPGA_LOOP_CLOSEOUT_W889_2026-08-06.md` and
next-wave plan `.claude/plans/wave-loop-890.md` with variants A/B/C.
- Closed with commit `Closes #1838`, pushed branch `wave-loop-889`, opened PR #1840.
Rebased onto latest master after W888 and GF-T PR #1839 landed; `git rebase --skip` dropped
the duplicate close-out commit cleanly.
- Updated this skill's Live Wave Loop Tracker to wave 890.

Key learning: the 1.17-MiBit neighborhood remains a soft boundary for t27c and Icarus at
1.166 MiBit. If the previous-wave close-out commit conflicts with master because the same
squashed content already landed, skipping that redundant commit lets the implementation apply
cleanly and preserves a clean linear branch.

## Worked example — Wave Loop 888

Wave Loop 888 continued the mechanical packed-vector AoS ladder past the 1-MiBit line:
Expand Down
10 changes: 6 additions & 4 deletions .claude/skills/wave-loop-autopilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ criteria, generator copy-hazard checklist, and open backlog.
| 885 | #1830 | wave-loop-885 | 589 | 294 | 37,696 | 1,206,272 | 1.151 | merged | #1831 |
| 886 | #1832 | wave-loop-886 | 591 | 295 | 37,824 | 1,210,368 | 1.155 | merged | #1833 |
| 887 | #1834 | wave-loop-887 | 593 | 296 | 37,952 | 1,214,464 | 1.159 | merged | #1835 |
| 888 | #1836 | wave-loop-888 | 595 | 297 | 38,080 | 1,218,560 | 1.162 | open | #1837 |
| **889** | **#1838** | **wave-loop-889 (READY)** | **597** | **298** | **38,208** | **1,222,656** | **1.166** | **READY** | **TBD** |
| 890 | TBD | wave-loop-890 | 599 | 299 | 38,336 | 1,226,752 | 1.170 | planned | TBD |
| 891 | TBD | wave-loop-891 | 601 | 300 | 38,464 | 1,230,848 | 1.174 | planned | TBD |
| 888 | #1836 | wave-loop-888 | 595 | 297 | 38,080 | 1,218,560 | 1.162 | merged | #1837 |
| 889 | #1838 | wave-loop-889 | 597 | 298 | 38,208 | 1,222,656 | 1.166 | open | #1840 |
| 890 | #1841 | wave-loop-890 | 599 | 299 | 38,336 | 1,226,752 | 1.170 | open | #1842 |
| **891** | **#1843** | **wave-loop-891 (READY)** | **601** | **300** | **38,464** | **1,230,848** | **1.174** | **READY** | **TBD** |
| 892 | TBD | wave-loop-892 | 603 | 301 | 38,592 | 1,234,944 | 1.178 | planned | TBD |
| 893 | TBD | wave-loop-893 | 605 | 302 | 38,720 | 1,239,040 | 1.182 | planned | TBD |

### Run-list notes
- Issue numbers follow the observed pattern (issue = previous issue + 2).
Expand Down
31 changes: 23 additions & 8 deletions .trinity/current-issue.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
# Current Issue — Wave Loop 889
# Current Issue — Wave Loop 891

**Issue:** #1838 — feat(igla): Wave Loop 889 — module-scope [597][2]^6 Pt non-power-of-two outer-dimension array-of-struct variable from call with indexed signed writes
**Issue:** #1843 — feat(igla): Wave Loop 891 — module-scope [601][2]^6 Pt non-power-of-two outer-dimension array-of-struct variable from call with indexed signed writes

**Branch:** `wave-loop-889`
**Branch:** `wave-loop-891` (TBD)

**PR:** TBD

**Spec:** `specs/scratch/w889_bench_module_597x2p6_aos_var_call_write.t27`
**Spec:** `specs/scratch/w891_bench_module_601x2p6_aos_var_call_write.t27`

**Outer dimension:** 597 (non-power-of-two)
**Outer dimension:** 601 (non-power-of-two)
**Inner struct:** `[2]^6 Pt` (2 fields × 6 trits × 32 bits = 384 bits per element)
**Total elements:** 597 × 64 = 38,208 structs
**Packed vector width:** 38,208 × 32 = 1,222,656 bits (~1.166 MiBit)
**Total elements:** 601 × 64 = 38,464 structs
**Packed vector width:** 38,464 × 32 = 1,230,848 bits (~1.174 MiBit)

**Pattern:** module-scope array-of-struct variable initialized from a function call, then mutated via signed-index field writes and read back with `assert_eq` inside a `bench` block.

**Next issue:** TBD (Wave Loop 890)
**Next issue:** TBD (Wave Loop 892)

---

## Acceptance

- [ ] `t27c parse` PASS
- [ ] `t27c icarus-lowerable` → `lowerable`
- [ ] `t27c icarus-simulate` → `PASSED`
- [ ] `t27c icarus-cocotb` → reference-model OK
- [ ] `t27c seal --save` saved and `seal --verify` MATCH
- [ ] `cargo test --release --test icarus_lowerable accepts_w891_bench_module_601x2p6_aos_var_call_write` PASS
- [ ] `FROZEN_HASH` unchanged
- [ ] PR opened with `Closes #1843`

phi^2 + 1/phi^2 = 3 | TRINITY
78 changes: 78 additions & 0 deletions .trinity/experience.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
> ## 2026-08-06 — Wave Loop 890 (module-scope `[599][2]^6 Pt` non-power-of-two outer-dimension AoS variable, issue #1841, PR #1842)
>
> ### What worked
> - Variant A extended the module-scope packed AoS odd outer-dimension ladder to 599.
> The `[599][2]^6 Pt` witness is 1,226,752 bits (~1.170 MiBit), continues past the 1-MiBit
> line, and required no compiler changes.
> - The generator copy-hazard checklist was cleared before the first run.
> - `t27c parse`, `icarus-lowerable`, `icarus-simulate` (17 cycles), `icarus-cocotb`, and
> `seal --save` all passed for the W890 witness.
> - Targeted `cargo test --release --test icarus_lowerable accepts_w890_bench_module_599x2p6_aos_var_call_write`
> passed.
> - PR #1842 opened; auto-merge enabled.
>
> ### What changed behavior
> - No changes to `bootstrap/src/compiler.rs`.
> - No changes to `bootstrap/stage0/FROZEN_HASH`.
> - Added `specs/scratch/w890_bench_module_599x2p6_aos_var_call_write.t27` (~2.6 MB /
> ~113,871 lines) with seal and Icarus baseline.
> - Added integration test `accepts_w890_bench_module_599x2p6_aos_var_call_write`.
> - Added generator script `scripts/gen_w890.py`.
> - Added closeout report `docs/reports/FPGA_LOOP_CLOSEOUT_W890_2026-08-06.md` and next-wave
> plan `.claude/plans/wave-loop-891.md`.
>
> ### Validation
> - `t27c parse` W890: PASS.
> - `t27c icarus-lowerable` W890: PASS (`lowerable`).
> - `t27c icarus-simulate` W890: PASS (17 cycles, PASSED).
> - `t27c icarus-cocotb` W890: PASS (`reference-model OK`).
> - `t27c seal --save` W890: PASS.
> - Targeted cargo test W890: 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`) is not
> introduced by W890. It reproduces on clean master and should be tracked separately.
> - The full `icarus_lowerable` suite now reports 349 passed; 1 failed (the pre-existing
> mismatch above).
>
> ## 2026-08-06 — Wave Loop 889 (module-scope `[597][2]^6 Pt` non-power-of-two outer-dimension AoS variable, issue #1838, PR #1840)
>
> ### What worked
> - Variant A extended the module-scope packed AoS odd outer-dimension ladder to 597.
> The `[597][2]^6 Pt` witness is 1,222,656 bits (~1.166 MiBit), continues past the 1-MiBit
> line, and required no compiler changes.
> - The generator copy-hazard checklist was cleared before the first run.
> - `t27c parse`, `icarus-lowerable`, `icarus-simulate` (17 cycles), `icarus-cocotb`, and
> `seal --save` all passed for the W889 witness.
> - Targeted `cargo test --release --test icarus_lowerable accepts_w889_bench_module_597x2p6_aos_var_call_write`
> passed.
> - PR #1840 opened; auto-merge enabled. The branch was rebased onto latest master after
> W888 and GF-T PR #1839 landed; the duplicate W888 close-out commit was skipped with
> `git rebase --skip`.
>
> ### What changed behavior
> - No changes to `bootstrap/src/compiler.rs`.
> - No changes to `bootstrap/stage0/FROZEN_HASH`.
> - Added `specs/scratch/w889_bench_module_597x2p6_aos_var_call_write.t27` (~2.6 MB /
> ~113,491 lines) with seal and Icarus baseline.
> - Added integration test `accepts_w889_bench_module_597x2p6_aos_var_call_write`.
> - Added generator script `scripts/gen_w889.py`.
> - Added closeout report `docs/reports/FPGA_LOOP_CLOSEOUT_W889_2026-08-06.md` and next-wave
> plan `.claude/plans/wave-loop-890.md`.
>
> ### Validation
> - `t27c parse` W889: PASS.
> - `t27c icarus-lowerable` W889: PASS (`lowerable`).
> - `t27c icarus-simulate` W889: PASS (17 cycles, PASSED).
> - `t27c icarus-cocotb` W889: PASS (`reference-model OK`).
> - `t27c seal --save` W889: PASS.
> - Targeted cargo test W889: 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`) is not
> introduced by W889. It reproduces on clean master and should be tracked separately.
> - The full `icarus_lowerable` suite now reports 348 passed; 1 failed (the pre-existing
> mismatch above).
>
> ## 2026-08-06 — Wave Loop 888 (module-scope `[595][2]^6 Pt` non-power-of-two outer-dimension AoS variable, issue #1836, PR #1837)
>
> ### What worked
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"gen_hash_c": "sha256:44fa766633aabb7aef62db802a6ff717f70b33c933d7ee5bf0d13425d1dde16e",
"gen_hash_rust": "sha256:e9b27ba3e139f662f1fe2c922c51d32b5f7c21100f1980599a12928a83c7c3f2",
"gen_hash_verilog": "sha256:c91fff3bec810f5804e3b8f3aa6946c6c299f4aed65bda8711212d4947444520",
"gen_hash_zig": "sha256:ac551ad89a8ec8ab48d3c950f3a2c9e1a86e71c31c42078deceea6da9443c8e4",
"module": "w889_bench_module_597x2p6_aos_var_call_write",
"ring": 12,
"sealed_at": "2026-08-07T07:04:34Z",
"spec_hash": "sha256:79cc3481a6fd588a1b3ea2f6024b1717c58922837216703d9444aa0459e9c20a",
"spec_path": "specs/scratch/w889_bench_module_597x2p6_aos_var_call_write.t27"
}
Loading
Loading