Commit Graph
2 Commits
Author SHA1 Message Date
lucio eeaffafd56 Rename the tool to lucisv (Language Utility for Coding In SystemVerilog) 2026-08-25 23:36:00 -07:00
lucioandClaude Fable 5 8effef9b6b Add safety-net: runtime equivalence + convergence verification
format_source now verifies every result before returning it, per
Verible's practice: the output must re-lex to the same token stream
as the input (comments included, whitespace ignored) and formatting
it a second time must be a fixed point. Any failure returns
FormatError::Verification and the caller keeps the original text —
"never corrupt code" and idempotency are now runtime guarantees.

Normalizations (documented in the feature README): multi-line
comments/directives/attributes compare line-trimmed since the
formatter re-indents them; @(*)/@* is a whitelisted canonicalization.

The net already catches three real pre-existing bugs (closing-label
drop, block-comment re-indent drift, sens-list comment drop), which
now refuse output with exit 2 instead of corrupting files. Fixes
queued as the next feature. Checks off TODO.md §1 items 1-3.

Dev: Opus agent; QA: Sonnet agent (17 adversarial pairs, all caught);
review in docs/features/safety-net/README.md.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-18 23:40:59 -07:00