test(build): close package mutation gate
Exercise every generated form-control variant through public code generation and record all eight deterministic hemx-build shards clean: 1,304 mutants, 1,070 caught and 234 unviable. req: form/004 req: codegen/005 req: test/021 req: test/022 req: test/023
This commit is contained in:
@@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
## 2. Make mutation testing a reproducible release gate
|
## 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.
|
- **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.
|
- **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
|
- **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
|
## 3. Elect and enforce the release license policy
|
||||||
|
|||||||
@@ -3539,6 +3539,13 @@ mod tests {
|
|||||||
<input name="count" type="number" min="1" max="10" step="1">
|
<input name="count" type="number" min="1" max="10" step="1">
|
||||||
<select name="labels" multiple></select>
|
<select name="labels" multiple></select>
|
||||||
<input name="avatar" type="file">
|
<input name="avatar" type="file">
|
||||||
|
<input name="token" type="hidden">
|
||||||
|
<input name="enabled" type="checkbox">
|
||||||
|
<input name="mode" type="radio">
|
||||||
|
<textarea name="notes"></textarea>
|
||||||
|
<input name="commit" type="submit">
|
||||||
|
<input name="birthday" type="date">
|
||||||
|
<button name="action" type="button">Preview</button>
|
||||||
</form>"#,
|
</form>"#,
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
@@ -3560,6 +3567,17 @@ mod tests {
|
|||||||
assert!(generated.contains(
|
assert!(generated.contains(
|
||||||
"::hemx::FormField { name: \"avatar\", kind: ::hemx::FormControlKind::File, required: false }"
|
"::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();
|
let syms = std::fs::read_to_string(out.join("hemx.syms")).unwrap();
|
||||||
assert!(syms.contains("handle_form\tsave\tprofile\n"));
|
assert!(syms.contains("handle_form\tsave\tprofile\n"));
|
||||||
|
|||||||
Reference in New Issue
Block a user