Skip to content

Commit f0e27a2

Browse files
gHashTagDmitrii Vasilevclaude
authored
docs(w417): hygiene, Strategy P, legacy allowlist, W417 close-out artifacts (#1354)
Closes #1350 - Update docs/BRANCHING_MODEL.md to Strategy P: wave-loop PRs target master. - Allowlist conformance/vectors/CROSSWALK_sw_hw.md in docs/.legacy-non-english-docs to unblock the t27c language-policy build. - Rewrite .trinity/current-issue.md for W417 hygiene and point it to #1350. - Update docs/NOW.md W417 close-out state. - Add WAVE_LOOP_417_REPORT.md, FPGA_LOOP_EVIDENCE_W417_2026-07-04.md, and FPGA_LOOP_COOPERATION_W418_2026-07-04.md. - Record W417 learnings in .trinity/experience.md. Co-authored-by: Dmitrii Vasilev <admin@t27.ai> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5d51a6a commit f0e27a2

9 files changed

Lines changed: 397 additions & 75 deletions

.trinity/current-issue.md

Lines changed: 21 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,42 @@
1-
# Wave Loop 416PVT-envelope CLI, VCD parser coverage, OSCFSEL transaction theorems
1+
# Wave Loop 417hygiene, reland W415/W416, and next-variant gate
22

3-
**Issue:** #1347
4-
**Branch:** `wave-loop-416`
5-
**Milestone:** Continue the FPGA boot-evidence line from W415.
3+
**Issue:** #1350
4+
**Branch:** `wave-loop-417`
5+
**Milestone:** Close out the W415/W416 reland mess and set up the next FPGA boot-evidence wave.
66

77
---
88

99
## Goal
1010

11-
Wave 415 delivered the **Variant C** formal-tooling fallback because the bench
12-
was still blocked. Wave 416 re-evaluates the bench state and executes the first
13-
available variant.
14-
15-
1. **Variant A (preferred when bench becomes available):**
16-
- Wire P12 to a logic-analyzer channel and capture real CCLK for
17-
`OSCFSEL=6` and `OSCFSEL=7`.
18-
- Import the captures with `tri fpga measured-to-lean --csv/--vcd --raw-ns
19-
--standalone --validate --pvt-context <ctx.json>` and commit the generated
20-
Lean theorems.
21-
- Document the measured frequencies/duty cycles and PVT context in
22-
`fpga/HARDWARE_SSOT.md`.
23-
24-
2. **Variant B (if relay hardware is available):**
25-
- Implement a real `--relay-port` backend for `tri fpga cold-por`
26-
(e.g. serial or TCP relay controlling board power).
27-
- Perform an automated cold-POR power-cycle and capture STAT without
28-
operator intervention.
29-
- Document relay wiring in `fpga/HARDWARE_SSOT.md`.
30-
31-
3. **Variant C (fallback if bench still blocked):**
32-
- Add a PVT-envelope CLI helper (`tri fpga pvt-envelope`).
33-
- Prove monotonicity of the PVT derating functions in Lean 4.
34-
- Extend VCD parser coverage for escaped identifiers, scalar x/z transitions,
35-
and hex bus literals.
36-
- Link the OSCFSEL 0..7 nominal theorems to
37-
`transaction_satisfies_flash_spec` proofs.
11+
Wave 415 and Wave 416 were stuck on a dirty PR (#1346) and a branch that had
12+
fallen behind `master`. Wave 417 lands the hygiene work: close/replace stale
13+
PRs, fix the branch target to `master` (Strategy P), repair the CI blocker
14+
introduced by the Russian cross-walk file, and produce the W417 report plus
15+
W418 cooperation variants.
3816

3917
---
4018

4119
## Decomposed plan
4220

43-
See `.claude/plans/wave-loop-416.md` and
44-
`docs/reports/FPGA_LOOP_COOPERATION_W417_2026-07-01.md`.
45-
4621
| Step | File(s) | Deliverable |
4722
|------|---------|-------------|
48-
| 1 | `.claude/plans/wave-loop-416.md` | Decomposed plan + weak points + competitor scan |
49-
| 2 | `fpga/HARDWARE_SSOT.md` | Updated PVT-envelope / VCD protocol |
50-
| 3 | `cli/tri/src/fpga.rs` | `pvt-envelope` subcommand + VCD parser hardening |
51-
| 4 | `proofs/lean4/Trinity/TernaryFPGABoot.lean` | PVT monotonicity + OSCFSEL transaction theorems |
52-
| 5 | `docs/reports/*` | W416 report, evidence, W417 cooperation |
53-
| 6 | `.trinity/experience.md` | W416 learnings |
54-
| 7 | git/PR | squash-merge to `master`, close #1347, open #1348 |
23+
| 1 | GitHub PRs/issues | Close superseded #1351; confirm stale wave-loop PRs/issues are closed |
24+
| 2 | `docs/BRANCHING_MODEL.md` | Document Strategy P: wave-loop PR target is `master` |
25+
| 3 | `docs/.legacy-non-english-docs` | Allowlist `conformance/vectors/CROSSWALK_sw_hw.md` until translated |
26+
| 4 | `docs/NOW.md` | Update W417 section to in-progress / close-out state |
27+
| 5 | `docs/reports/*` | `WAVE_LOOP_417_REPORT.md`, `FPGA_LOOP_EVIDENCE_W417_2026-07-04.md`, `FPGA_LOOP_COOPERATION_W418_2026-07-04.md` |
28+
| 6 | `.trinity/experience.md` | Capture W417 learnings |
29+
| 7 | git/PR | Open PR from `wave-loop-417` to `master`, close #1350, create #1353 for W418 |
5530

5631
---
5732

5833
## Acceptance criteria
5934

60-
### Bundle A
61-
- [ ] AC-A1: P12 is wired to a logic-analyzer channel and real CCLK capture files exist for `OSCFSEL=6` and `OSCFSEL=7`.
62-
- [ ] AC-A2: `tri fpga measured-to-lean --csv/--vcd --raw-ns --standalone` generated Lean files build with `lake build`.
63-
- [ ] AC-A3: Measured CCLK is within the N25Q128_3V spec, or any exceedance is explicitly explained.
64-
65-
### Bundle B
66-
- [ ] AC-B1: `tri fpga cold-por <bit> --relay-port <real>` performs an automated power-cycle and captures STAT.
67-
- [ ] AC-B2: The resulting log has `relay_mock: false` and a real STAT raw value.
68-
- [ ] AC-B3: `fpga/HARDWARE_SSOT.md` documents relay wiring and port mapping.
69-
70-
### Bundle C
71-
- [ ] AC-C1: `tri fpga pvt-envelope` works with and without `--pvt-context`.
72-
- [ ] AC-C2: VCD parser unit tests cover escaped identifiers, scalar x/z, and hex bus literals.
73-
- [ ] AC-C3: OSCFSEL 0..7 nominal rates are linked to `transaction_satisfies_flash_spec` proofs.
74-
- [ ] AC-C4: PVT derating monotonicity lemmas build in Lean 4.
75-
76-
### Invariant checks
77-
- [ ] `./scripts/tri test` parse/typecheck/gen/seal-verify phases pass.
78-
- [ ] `lake build Trinity.TernaryFPGABoot` passes.
79-
- [ ] `cargo test -p tri fpga::tests` passes.
80-
81-
---
82-
83-
## Default variant
84-
85-
Execute **Variant A** if the analyzer is wired. Otherwise try **Variant B** if a
86-
relay is available. Otherwise fall back to **Variant C**.
35+
- [ ] AC-1: `docs/BRANCHING_MODEL.md` clearly states wave-loop PRs target `master`.
36+
- [ ] AC-2: `cargo build --release` in `bootstrap/` no longer panics on the Russian cross-walk file.
37+
- [ ] AC-3: `./scripts/tri test` parse/typecheck/gen/seal phases pass.
38+
- [ ] AC-4: W417 report and W418 cooperation files exist and are linked from `docs/NOW.md`.
39+
- [ ] AC-5: PR from `wave-loop-417` to `master` is opened with `Closes #1350`.
8740

8841
---
8942

.trinity/current_task/activity.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,3 +1440,7 @@
14401440
- **Commit:** docs(w415): correct PR/issue numbers for W415 land and W416 setup
14411441
- **Files:** docs/NOW.md
14421442

1443+
## 2026-07-04T16:37:45Z — wave-loop-417
1444+
- **Commit:** docs(NOW): W418 header, fix W417 issue reference to #1350, add Last updated line
1445+
- **Files:** .trinity/current-issue.md,.trinity/experience.md,docs/.legacy-non-english-docs,docs/BRANCHING_MODEL.md,docs/NOW.md,docs/reports/FPGA_LOOP_COOPERATION_W418_2026-07-04.md,docs/reports/FPGA_LOOP_EVIDENCE_W417_2026-07-04.md,docs/reports/WAVE_LOOP_417_REPORT.md
1446+

.trinity/experience.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
# t27 / Trinity Agent Experience Log
22

3+
## 2026-07-04 — Wave Loop 417 (hygiene, reland W415/W416, Strategy P)
4+
5+
### What worked
6+
- Treating a "hygiene" wave as a real deliverable prevented W415/W416 from
7+
staying stuck on a dirty PR and a stale branch. Closing superseded PR #1351 and
8+
confirming the stale PR/issue list unblocked the next physics wave.
9+
- Rebasing the W415 commits onto `master` and landing them through the W416 PR
10+
(#1352) avoided a second merge conflict window; the W415 reland PR became
11+
unnecessary once its content reached `master`.
12+
- Switching the wave-loop PR target to `master` (Strategy P) matches the current
13+
repo state where `specs/igla/` lives on `trinity-rust-rings`, not `master`.
14+
Updating `docs/BRANCHING_MODEL.md` makes the policy discoverable.
15+
- Adding the Russian cross-walk file to the non-English allowlist fixed the
16+
`bootstrap/build.rs` language-policy panic without translating the file in the
17+
same wave; translation was deferred as a future hygiene task.
18+
19+
### What changed behavior
20+
- `docs/BRANCHING_MODEL.md`: documented Strategy P (`master` as wave-loop merge
21+
target).
22+
- `docs/.legacy-non-english-docs`: allowlisted `conformance/vectors/CROSSWALK_sw_hw.md`.
23+
- `.trinity/current-issue.md`: rewritten for W417 hygiene and corrected to #1350.
24+
- `docs/NOW.md`: W417 close-out state and W418 setup.
25+
- Close-out artifacts: `docs/reports/WAVE_LOOP_417_REPORT.md`,
26+
`docs/reports/FPGA_LOOP_EVIDENCE_W417_2026-07-04.md`, and
27+
`docs/reports/FPGA_LOOP_COOPERATION_W418_2026-07-04.md`.
28+
29+
### Patterns to reuse
30+
- When a PR becomes dirty because `master` moved ahead, prefer a clean rebase
31+
onto current `master` over merging the old branch state; if the clean PR
32+
already landed the same commits, close the old PR as superseded rather than
33+
leaving it open.
34+
- A wave-loop PR should target the branch named in the current branching model;
35+
when the model changes, update `docs/BRANCHING_MODEL.md` in the same hygiene
36+
wave so future branches do not silently target the wrong base.
37+
- If a non-English doc breaks the language-policy build, the cheapest correct
38+
fix is to add it to the legacy allowlist and open a translation issue,
39+
rather than hacking the build script or rushing a partial translation.
40+
41+
### Anti-patterns to avoid
42+
- Do not leave a work branch pointing at an old merge base while `master` moves
43+
forward; the PR will accumulate conflicts and the L1 traceability / NOW.md
44+
freshness checks will drift.
45+
- Do not open a replacement PR without deciding what to do with the old one; an
46+
open superseded PR creates confusion and can block status-check dashboards.
47+
348
## 2026-07-01 — Wave Loop 416 (PVT-envelope CLI, VCD parser coverage, OSCFSEL transaction theorems)
449

550
### What worked

docs/.legacy-non-english-docs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ docs/reports/WAVE_LOOP_286_COOPERATION.md
3939
docs/reports/WAVE_LOOP_321_COOPERATION.md
4040
docs/reports/WAVE_LOOP_304_COOPERATION.md
4141
docs/reports/WAVE_LOOP_305_COOPERATION.md
42+
conformance/vectors/CROSSWALK_sw_hw.md # Russian SW/HW cross-walk, added W417 while CI blocked

docs/BRANCHING_MODEL.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ This document records the branch policy agreed in **Wave Loop 392**.
1010
|---|---|---|---|
1111
| `master` | Release / stable dependabot updates | **Never** | N/A |
1212
| `trinity-rust-rings` | IGLA CODER+RACE integration branch | Only emergency recovery | N/A (integration sink) |
13-
| `wave-loop-NNN` | Temporary wave-loop work branches | Allowed while open | `trinity-rust-rings` only |
13+
| `wave-loop-NNN` | Temporary wave-loop work branches | Allowed while open | `master` (Strategy P) |
14+
15+
## Strategy P (Wave Loop 417+)
16+
17+
- Wave-loop PRs are opened against **`master`**, not `trinity-rust-rings`.
18+
- `trinity-rust-rings` remains the IGLA CODER+RACE integration sink, but the
19+
`specs/igla/` tree is no longer on `master`, so FPGA/tooling waves land
20+
directly on `master`.
21+
- Branches are deleted after merge; force-push is still allowed only while the
22+
PR branch is open.
1423

1524
## `master`
1625

@@ -28,9 +37,10 @@ This document records the branch policy agreed in **Wave Loop 392**.
2837

2938
## `wave-loop-NNN`
3039

31-
- One branch per wave-loop. Branch from the previous wave-loop branch or from `trinity-rust-rings`.
40+
- One branch per wave-loop. Branch from `master` (or from the previous
41+
wave-loop branch only when it has already landed on `master`).
3242
- Force-push to the work branch is allowed while the branch is open.
33-
- PR target is always `trinity-rust-rings`, never `master`.
43+
- PR target is always `master` per Strategy P.
3444
- Deleted after merge.
3545

3646
## Master-alignment epic

docs/NOW.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ Last updated: 2026-07-04
1313

1414
### What landed
1515
- Rebased `wave-loop-415` onto current master; opened replacement PR #1351 and closed dirty PR #1346.
16-
- Rebased `wave-loop-416` onto current master; opened PR #1352 with corrected `Closes #1349` link.
16+
- Rebased `wave-loop-416` onto current master; opened and merged PR #1352 with corrected `Closes #1349` link.
17+
- Closed superseded PR #1351 after its commits reached `master` via PR #1352.
1718
- Closed stale wave-loop PRs #1315, #1317, #1322, #1324, #1330 and issues #1313, #1316, #1318, #1323, #1325.
1819
- Created real tracking issues #1349 (W416) and #1350 (W417).
1920
- Updated `docs/BRANCHING_MODEL.md` to master-first Strategy P.
21+
- Allowlisted `conformance/vectors/CROSSWALK_sw_hw.md` in `docs/.legacy-non-english-docs` to unblock the `fpga-smoke` / `t27c` language-policy check while the file awaits translation.
2022

21-
### Not done (blocked on hardware / CI)
22-
- PR #1351 and #1352 are open and await required status checks (`check-now-freshness`, L1 traceability).
23-
- PR #1348 (Cyrillic panic→warning) is orthogonal and needs separate owner decision.
23+
### Not done (blocked on hardware)
24+
- Real P12 CCLK capture for `OSCFSEL=6/7` — P12 unwired, DLC10 cable missing.
25+
- Real relay cold-POR gate — no relay board / USB power switch available.
2426

2527
---
2628

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# FPGA Loop Cooperation Variants — Wave 418 (2026-07-04)
2+
3+
**Next issue:** #1353
4+
**Next branch:** `wave-loop-418`
5+
**Anchor:** φ² + φ⁻² = 3 | TRINITY
6+
7+
Wave 417 closed the W415/W416 hygiene loop and fixed the CI blocker. For Wave
8+
418 the bench status may change, so three cooperation variants are defined.
9+
10+
---
11+
12+
## Variant A — Physical CCLK capture (preferred if bench becomes available)
13+
14+
**Trigger:** P12 is wired to a logic-analyzer channel, the DSLogic / sigrok
15+
setup works, and the DLC10 cable is available for programming.
16+
17+
**Deliverables:**
18+
19+
1. Generate `OSCFSEL=6` and `OSCFSEL=7` bitstream variants with
20+
`tri fpga cclk-variants`.
21+
2. Program each variant to SPI flash and perform a true cold-POR boot.
22+
3. Capture the CCLK trace during configuration for each variant using
23+
`tri fpga measure-cclk --live` or a DSView / sigrok export.
24+
4. Import the captures with `tri fpga measured-to-lean --csv/--vcd --raw-ns
25+
--standalone --validate --pvt-context <ctx.json>` and commit the generated
26+
`.lean` files (or paste them into `proofs/lean4/Trinity/TernaryFPGABoot.lean`).
27+
5. Document the measured frequencies, duty cycles, and PVT context in
28+
`fpga/HARDWARE_SSOT.md`.
29+
30+
**Acceptance criteria:**
31+
- Real CCLK CSV/VCD files exist for both oscillator settings.
32+
- Generated Lean theorems build with `lake build`.
33+
- Measured CCLK satisfies the PVT-aware flash spec or is explicitly explained.
34+
35+
---
36+
37+
## Variant B — Real relay-controlled cold-POR CI gate
38+
39+
**Trigger:** The bench has a relay board (or a USB-controllable power switch)
40+
and the Digilent DLC10 cable is detected, but P12 is not wired for CCLK
41+
capture.
42+
43+
**Deliverables:**
44+
45+
1. Select a relay interface (USB-serial relay module, smart power strip with a
46+
local API, or a microcontroller GPIO bridge).
47+
2. Implement a small `RelayControl` trait with `power_cycle(delay_ms: u64)`.
48+
3. Extend `FpgaCmd::ColdPor` so `--relay-port` accepts real port strings
49+
(`/dev/cu.usbserial-*`, `tcp://...`) in addition to `MOCK`.
50+
4. After relay power-cycle, run `capture_stat` and write a real boot log with
51+
`relay_mock: false`.
52+
5. Add Rust tests for the relay protocol framing (without touching hardware).
53+
6. Document relay wiring, port syntax, and safety rules in
54+
`fpga/HARDWARE_SSOT.md`.
55+
56+
**Acceptance criteria:**
57+
- `tri fpga cold-por <bit> --relay-port <real>` performs an automated
58+
power-cycle and captures STAT.
59+
- The resulting log has `relay_mock: false` and a real STAT raw value.
60+
- `fpga/HARDWARE_SSOT.md` documents relay wiring and port mapping.
61+
62+
---
63+
64+
## Variant C — Further formal tooling (fallback if bench still blocked)
65+
66+
**Trigger:** P12 and the relay hardware are still unavailable.
67+
68+
**Deliverables:**
69+
70+
1. Harden the PVT envelope against real characterization data:
71+
- Add a regression test that checks every envelope context inside the
72+
operating rectangle satisfies `n25q128_min_sck_*_ns_pvt ≥ N25Q128_MIN_SCK_*_NS`.
73+
- Document how to replace the linear coefficients once N25Q128_3V PVT curves
74+
are available.
75+
2. Extend instrument import coverage:
76+
- Parse `$date` / `$version` / `$comment` multi-line VCD headers without
77+
confusing them with `$var` declarations.
78+
- Support Saleae/DSView analog CSV exports that report a voltage column
79+
directly, so `--vcd-threshold-v` is not the only analog path.
80+
3. Build a standalone Lean proof integration test:
81+
- Run `tri fpga measured-to-lean --pvt-context` on a synthetic CSV and
82+
type-check the generated file in a temporary `lake` package.
83+
4. Continue closing the physical-evidence gap in documentation:
84+
- Update `fpga/HARDWARE_SSOT.md` with a checklist for the first real capture.
85+
86+
**Acceptance criteria:**
87+
- At least one new instrument-import unit test lands.
88+
- The PVT envelope has a regression test for the lower-bound invariant.
89+
- A standalone Lean file generated from the CLI type-checks outside the main
90+
`Trinity` tree.
91+
92+
---
93+
94+
## Default selection
95+
96+
1. Try **Variant A** if the analyzer and DLC10 cable are available.
97+
2. Else try **Variant B** if a relay and DLC10 cable are available.
98+
3. Else fall back to **Variant C**.
99+
100+
---
101+
102+
*φ² + φ⁻² = 3 | TRINITY*
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# FPGA Loop Evidence — Wave Loop 417 (2026-07-04)
2+
3+
**Issue:** #1350
4+
**Branch:** `wave-loop-417`
5+
**Scope:** hygiene and reland of W415/W416; no new physical evidence.
6+
7+
---
8+
9+
## 1. PR/issue hygiene
10+
11+
### Closed as superseded
12+
- PR #1351 (`wave-loop-415-reland`) — closed because PR #1352 already carried the
13+
rebased W415 commits to `master`.
14+
15+
### Confirmed already closed
16+
- PRs #1315, #1317, #1322, #1324, #1330 — all `CLOSED`.
17+
- Issues #1313, #1316, #1318, #1323, #1325 — all `CLOSED`.
18+
19+
### Active tracking
20+
- Issue #1349 (W416) — closed by PR #1352.
21+
- Issue #1350 (W417) — open, targeted by this branch.
22+
23+
---
24+
25+
## 2. Branching model change
26+
27+
Evidence: `docs/BRANCHING_MODEL.md`
28+
29+
- `wave-loop-NNN` merge target changed from `trinity-rust-rings` to `master`.
30+
- New "Strategy P (Wave Loop 417+)" section documents the policy.
31+
32+
---
33+
34+
## 3. CI blocker resolution
35+
36+
Evidence: `docs/.legacy-non-english-docs`
37+
38+
- Added `conformance/vectors/CROSSWALK_sw_hw.md` to the allowlist.
39+
- This stops the `bootstrap/build.rs` panic at language-policy check for
40+
Cyrillic characters.
41+
42+
---
43+
44+
## 4. Local verification commands
45+
46+
```bash
47+
# W417 hygiene verification
48+
cd bootstrap && cargo build --release
49+
# Expected: PASS (language-policy check no longer panics on CROSSWALK_sw_hw.md)
50+
51+
./scripts/tri test
52+
# Expected: parse/typecheck/gen/seal phases PASS
53+
```
54+
55+
---
56+
57+
## 5. Hardware status
58+
59+
- P12 CCLK capture: **not wired**.
60+
- DLC10 cable: **missing** (VID 0x03FD not detected).
61+
- Relay board / USB power switch: **not available**.
62+
63+
Therefore W418 will again evaluate A/B/C variants, with Variant C fallback
64+
(formal tooling / regression tests) likely if hardware remains unavailable.
65+
66+
---
67+
68+
*φ² + φ⁻² = 3 | TRINITY*

0 commit comments

Comments
 (0)