From 033e53b3818bd70d66be56dd39e0776bbb8c5b56 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Wed, 26 Aug 2026 01:26:28 -0700 Subject: [PATCH] =?UTF-8?q?README/ROADMAP:=20directive-split=20round=203?= =?UTF-8?q?=20=E2=80=94=2099.1%,=20loop=20log=20and=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- README.md | 13 +++++++++++++ ROADMAP.md | 32 +++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a885b86..932bf46 100644 --- a/README.md +++ b/README.md @@ -584,6 +584,19 @@ corpus baseline this ordering comes from: failing is in a deliberately unsupported category, except `compare_helper.sv`, whose `` `X_EACH_CSR 1 `` needs a macro body from another file — lucisv does not preprocess, so it stays a parse error +12. ~~Conditional-split constructs — an `` `ifdef``/`` `else`` region whose + arms are each an incomplete fragment of one declaration (alternative + heads sharing one body, alternative struct bodies sharing one + closing)~~ — **done**; see `docs/features/directive-split/README.md`. + Recovered as a verbatim item (exact source bytes, first line + re-indented), never reformatted inside — the + `constraint`/`covergroup`/assertions precedent. The recovery fires only + when the failed arm left a bracket open inside a conditional region that + is genuinely open at item scope; ordinary syntax errors near directives + still refuse. Unblocked 13 corpus files and moved the parse rate from + 97.6% to 99.1%. Still failing (7): macro-bracketed covergroups and + `` `X_EACH_CSR`` (need macro expansion, a deliberate non-goal) and 5 + files that are not valid standalone Verilog Like ruff, `lucisv` refuses to output anything for a file it cannot fully parse, so it can never corrupt code. diff --git a/ROADMAP.md b/ROADMAP.md index 2eefc3b..f5f157c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -66,7 +66,11 @@ Theoretical ceiling with every cluster done: ~797/820 (97.2%). ## Blocked -- `directive-split` (14 files, 1.7%) — needs a decision (open question 2). +- ~~`directive-split` (14 files, 1.7%) — needs a decision (open question 2)~~ — + **decided 2026-08-26** (owner chose option 1, verbatim pass-through + fallback) and delivered in round 3: 13 of the 14 pass; + `riscv_instr_cover_group.sv` was never a split conditional (macro-bracketed + covergroups needing expansion) and stays out of reach by design. - `invalid-or-fragment` (3), `not-verilog` (1), `other: mulcmp.v` (1, a trailing comma in a connection list) — not valid standalone Verilog; will never pass and should not. @@ -132,6 +136,32 @@ equivalence-checked and idempotent, recorded in mop-up-2's Assumptions. invalid-or-fragment 3, macro-items 1 (`` `X_EACH_CSR 1 `` needs expansion), not-verilog 1, other 1 (invalid trailing comma). +### Round 3 — 2026-08-26 (directive-split verbatim fallback) + +Owner decided open question 2: option 1, verbatim pass-through. One Opus +dev cluster, one Sonnet QA — **two QA rejection cycles** before the pass: + +| pass | outcome | +|---|---| +| dev v1 | recovery in `parse_item_inner`; trigger = closing directive + region the item never opened + unmatched open bracket; 800 → 813 | +| QA 1 | **BLOCK**: a stray unmatched `` `endif `` beside a bracket-opening item was swallowed as verbatim (exit 0) — no check that any region was ever opened | +| dev v2 | `Parser::open_conds` file-scope state, maintained in `bump`; trigger and extent scan gated on it | +| QA 2 | **BLOCK**: `open_conds` polluted by unbalanced directives *inside opaque verbatim bodies* (constraint/covergroup/property walked via `bump`) — same laundering, different door | +| dev v3 | counting moved off `bump` entirely to the single `ItemKind::Directive` producer (item scope by definition; opaque walks safe by default); recovered blocks hand back the nesting they swallow | +| QA 3 | **PASS**: no invariant violation across cross-scope interleavings, multi-split accounting, re-walk double-count probes, tolerant mode, 150-trial directive fuzz | + +Result: `{"passing":813,"total":820,"pct":99.1}` — +13 files (the 12 +`riscv_core_setting.sv` copies + `riscv_instr_pkg.sv`), strict superset of +the 800, `verify.rs` untouched, 1672 tests / 0 failed. Accepted residual +risk and follow-ups are in the feature README's Review section +(`docs/features/directive-split/README.md`). Known pre-existing issues +surfaced by QA, not caused by this round: `Fmt::raw_text` emits `Doc::Text` +with embedded newlines (printer col goes conservative, no corruption); a +blank line between a leading comment block and its item is dropped. + +Per the owner's standing instruction for this round: had QA blocked a third +time, the effort would have been stopped and the patch discarded uncommitted. + ### Re-verification — 2026-08-25 (HEAD eeaffaf, post-rename) Loop restart requested; re-scored before dispatching anything. At current