diff --git a/PLAN.md b/PLAN.md index 4e69c95..d02a669 100644 --- a/PLAN.md +++ b/PLAN.md @@ -18,10 +18,10 @@ ## 2. Make mutation testing a reproducible release gate -- [ ] **State:** In progress — the package-native capped xtask entry point is reachable, rejects unknown packages, propagates mutest failure, and mutation-tests `hemx-axum`, `hemx-core`, `hemx-js`, and the full `hemx-test` package cleanly; full package closure remains. +- [ ] **State:** In progress — the package-native capped xtask entry point is reachable, rejects unknown packages and invalid shards, propagates mutest failure, and mutation-tests `hemx-axum`, `hemx-build`, `hemx-core`, `hemx-js`, and the full `hemx-test` package cleanly; full package closure remains. - **User value:** maintainers can run one bounded repository command and trust that meaningful Rust logic across every mutation-applicable library is either killed or explicitly justified. - **Build:** add a capped `hemx-xtask` mutation command that invokes `/opt/repositories/mutest`/`mutest` through package-native test targets rather than the broken workspace-wide example path; enumerate only current mutation-applicable library/proc-macro packages; finish adversarial tests or simplify code until every survivor is classified; keep equivalent, invariant-only, and infrastructure-inapplicable classifications inspectable and minimal; document the exact local release command in the existing readiness surface. -- **Blocked by:** none; broad survivors currently remain in `hemx-build`, `hemx-derive`, and `hemx-lsp` outside already-clean focused contracts. The mutation entry point now accepts validated native `SHARD/TOTAL` operands with shard-specific output directories while preserving the unsharded gate. The shard wrapper now correctly maps one-based public numbering to mutest's zero-based native API and grants repo-owned compiler-probe tests a 120-second per-mutant floor instead of reporting false timeouts. Corrected `hemx-build` shards `1/8` through `7/8` are covered. Shard `7/8` passed with 163 mutants (125 caught, 38 unviable). Shard `8/8` remains. The complete 470-mutant `hemx-axum` package gate now passes with 262 caught and 208 unviable after public page/form/multipart/registry/response/runtime proofs and narrow classification of infallible header parsing and streamed multipart unwrap-equivalent mutants. +- **Blocked by:** none; broad survivors currently remain in `hemx-derive` and `hemx-lsp` outside already-clean focused contracts. The mutation entry point accepts validated one-based `SHARD/TOTAL` operands, maps them to native zero-based shards, uses shard-specific output directories, grants repo-owned compiler probes a 120-second floor, and preserves the unsharded gate. All eight deterministic `hemx-build` shards now pass: 1,304 mutants total, 1,070 caught and 234 unviable, including final shard `8/8` with 159 mutants (139 caught, 20 unviable). The complete 470-mutant `hemx-axum` package gate passes with 262 caught and 208 unviable after public page/form/multipart/registry/response/runtime proofs and narrow classification of infallible header parsing and streamed multipart unwrap-equivalent mutants. - **Proof:** the new xtask mutation command exits zero within its documented bound, covers each applicable package, emits no unexplained missed mutant, and a deliberate adjacent mutation makes it fail. `cargo run -p hemx-xtask -- test` remains green. req: test/020 req: test/021 ## 3. Elect and enforce the release license policy diff --git a/hemx-build/src/lib.rs b/hemx-build/src/lib.rs index 2dae543..8799dd2 100644 --- a/hemx-build/src/lib.rs +++ b/hemx-build/src/lib.rs @@ -3539,6 +3539,13 @@ mod tests { + + + + + + + "#, ) .unwrap(); @@ -3560,6 +3567,17 @@ mod tests { assert!(generated.contains( "::hemx::FormField { name: \"avatar\", kind: ::hemx::FormControlKind::File, required: false }" )); + for field in [ + "::hemx::FormField { name: \"token\", kind: ::hemx::FormControlKind::Hidden, required: false }", + "::hemx::FormField { name: \"enabled\", kind: ::hemx::FormControlKind::Checkbox, required: false }", + "::hemx::FormField { name: \"mode\", kind: ::hemx::FormControlKind::Radio, required: false }", + "::hemx::FormField { name: \"notes\", kind: ::hemx::FormControlKind::TextArea, required: false }", + "::hemx::FormField { name: \"commit\", kind: ::hemx::FormControlKind::Submit, required: false }", + "::hemx::FormField { name: \"birthday\", kind: ::hemx::FormControlKind::Other { tag: \"input\", input_type: Some(\"date\") }, required: false }", + "::hemx::FormField { name: \"action\", kind: ::hemx::FormControlKind::Other { tag: \"button\", input_type: None }, required: false }", + ] { + assert!(generated.contains(field), "missing form field metadata {field}"); + } let syms = std::fs::read_to_string(out.join("hemx.syms")).unwrap(); assert!(syms.contains("handle_form\tsave\tprofile\n"));