[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A5XTH4VG4YSGXB9QQZKP9A":3,"skill-same:01M7A5XTH4VG4YSGXB9QQZKP9A":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7A5XTH4VG4YSGXB9QQZKP9A","property-testing",null,"Property-based testing with hegel (Antithesis's Hypothesis-based library): which properties to reach for, generator patterns, shrinking, replay, CI determinism. Use when adding property tests, fuzzing a parser\u002Fconverter\u002Fcodec, or a test needs generated rather than example inputs.","harivansh-afk\u002Floom-index-e2e","harivansh-afk","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F73809867?v=4","01M7A5RBDGB0YMBHVWXCS0VYE7","hari","01M7A5RBEKV38Y878XPTCR4SJ3",0,"MIT","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: property-testing\ndescription: \"Property-based testing with hegel (Antithesis's Hypothesis-based library): which properties to reach for, generator patterns, shrinking, replay, CI determinism. Use when adding property tests, fuzzing a parser\u002Fconverter\u002Fcodec, or a test needs generated rather than example inputs.\"\n---\n\n## Property testing with hegel\n\nRepo-owned Rust crates use `hegeltest` (workspace dev-dependency; lib name\n`hegel`). It is Antithesis's Hypothesis-based property-testing library:\npure-Rust engine, `#[hegel::test]` under plain `cargo test`, automatic\nshrinking to a minimal counterexample, and a failure database (`.hegel\u002F`,\ngitignored) that replays the last counterexample first on the next run.\nReference suites: `packages\u002Fix2nix\u002Ftests\u002Fproperties.rs`,\n`packages\u002Fminecraft\u002Fnbt\u002Ftests\u002Fproperty.rs`.\n\n## Which properties earn their keep\n\nIn rough order of value per line:\n\n1. **Never panics**: feed `gs::text()` (or arbitrary bytes) to any parser,\n   decoder, or converter; assert it returns `Ok`\u002F`Err` rather than\n   panicking. Cheapest test, catches the most.\n2. **Round trip**: serialize then reparse (or encode\u002Fdecode) and compare.\n   For a transpiler the analogue is: generated well-formed source converts,\n   and the output parses cleanly under an independent parser (ix2nix uses\n   `rnix` as its oracle).\n3. **Determinism \u002F idempotence**: same input twice gives identical output;\n   `f(f(x)) == f(x)` where claimed.\n4. **Model-based**: compare against an obviously-correct implementation\n   (BTreeMap vs your map; a slow interpreter vs your fast path).\n\n## Generator patterns\n\n- Recursive structures: `gs::deferred::\u003CT>()` + `handle = node.generator()`\n  + `node.set(hegel::one_of!(...))`; bound growth with `.max_size(n)` on\n  `gs::vecs`, or the tree can explode.\n- `gs::sampled_from` takes a slice (`&[..][..]`), not an array.\n- Keep generated programs *well-formed by construction* (fixed distinct\n  binder names, deduplicated object keys) and let values carry the\n  randomness; otherwise the property tests your generator, not the code.\n  Two real generator traps from ix2nix: `${...}` interpolation only exists\n  inside backtick templates, and `=> {}` is a block, not an object literal.\n- The generator, not the assertion, is where a property fails silently: one\n  that iterates a collected set passes when the set is always empty. Breaking\n  the code under test does not catch that, so invert a new property once,\n  watch it fail, then restore. ix2nix's `$ref`-resolution property passed with\n  `assert!(refs(&parsed).is_empty())` in place of its real assertion, proving\n  no generated schema ever carried a `$ref`. Two causes, one of them a\n  production bug: the generator's type vocabulary omitted the alias name, and\n  `export default ((a: int) => a)` recorded no parameters because the mapper\n  matched the arrow without peeling the parenthesis.\n- A composite generator is a function returning `impl Generator\u003CT>` built\n  from `.map` over `hegel::tuples!(...)`; `#[hegel::composite]` exists for\n  the draw-style equivalent.\n\n## Budget, replay, CI\n\n- Default is 100 test cases; override with `#[hegel::test(test_cases = N)]`.\n  Keep CI at the default; run big budgets ad hoc.\n- Runs are randomized per invocation, so CI is a rolling fuzzer: a red main\n  property test means hegel found a real counterexample that was always\n  legal input. Fix forward; never re-run to green. The failure database\n  gives local replay, but CI sandboxes start fresh, so copy the printed\n  `let source = ...` shrunk case into a regression `#[test]` alongside the\n  fix (see `bool_and_boolean_both_lower` in ix2nix).\n- The engine and macros come from crates.io (`hegeltest`,\n  `default-features = false`); no Python, no network at test time, so tests\n  run unchanged inside nix sandboxes.\n\n## Antithesis\n\nHegel is Antithesis's PBT family (hegel.dev): the same tests can later run\nunder the Antithesis platform for guided exploration, and the `antithesis`\nfeature wires assertions into its SDK. Do not enable that feature for\nordinary CI; it is for workloads launched via the antithesis-* skills.\n","## Property testing with hegel\n\nRepo-owned Rust crates use `hegeltest` (workspace dev-dependency; lib name\n`hegel`). It is Antithesis's Hypothesis-based property-testing library:\npure-Rust engine, `#[hegel::test]` under plain `cargo test`, automatic\nshrinking to a minimal counterexample, and a failure database (`.hegel\u002F`,\ngitignored) that replays the last counterexample first on the next run.\nReference suites: `packages\u002Fix2nix\u002Ftests\u002Fproperties.rs`,\n`packages\u002Fminecraft\u002Fnbt\u002Ftests\u002Fproperty.rs`.\n\n## Which properties earn their keep\n\nIn rough order of value per line:\n\n1. **Never panics**: feed `gs::text()` (or arbitrary bytes) to any parser,\n   decoder, or converter; assert it returns `Ok`\u002F`Err` rather than\n   panicking. Cheapest test, catches the most.\n2. **Round trip**: serialize then reparse (or encode\u002Fdecode) and compare.\n   For a transpiler the analogue is: generated well-formed source converts,\n   and the output parses cleanly under an independent parser (ix2nix uses\n   `rnix` as its oracle).\n3. **Determinism \u002F idempotence**: same input twice gives identical output;\n   `f(f(x)) == f(x)` where claimed.\n4. **Model-based**: compare against an obviously-correct implementation\n   (BTreeMap vs your map; a slow interpreter vs your fast path).\n\n## Generator patterns\n\n- Recursive structures: `gs::deferred::\u003CT>()` + `handle = node.generator()`\n  + `node.set(hegel::one_of!(...))`; bound growth with `.max_size(n)` on\n  `gs::vecs`, or the tree can explode.\n- `gs::sampled_from` takes a slice (`&[..][..]`), not an array.\n- Keep generated programs *well-formed by construction* (fixed distinct\n  binder names, deduplicated object keys) and let values carry the\n  randomness; otherwise the property tests your generator, not the code.\n  Two real generator traps from ix2nix: `${...}` interpolation only exists\n  inside backtick templates, and `=> {}` is a block, not an object literal.\n- The generator, not the assertion, is where a property fails silently: one\n  that iterates a collected set passes when the set is always empty. Breaking\n  the code under test does not catch that, so invert a new property once,\n  watch it fail, then restore. ix2nix's `$ref`-resolution property passed with\n  `assert!(refs(&parsed).is_empty())` in place of its real assertion, proving\n  no generated schema ever carried a `$ref`. Two causes, one of them a\n  production bug: the generator's type vocabulary omitted the alias name, and\n  `export default ((a: int) => a)` recorded no parameters because the mapper\n  matched the arrow without peeling the parenthesis.\n- A composite generator is a function returning `impl Generator\u003CT>` built\n  from `.map` over `hegel::tuples!(...)`; `#[hegel::composite]` exists for\n  the draw-style equivalent.\n\n## Budget, replay, CI\n\n- Default is 100 test cases; override with `#[hegel::test(test_cases = N)]`.\n  Keep CI at the default; run big budgets ad hoc.\n- Runs are randomized per invocation, so CI is a rolling fuzzer: a red main\n  property test means hegel found a real counterexample that was always\n  legal input. Fix forward; never re-run to green. The failure database\n  gives local replay, but CI sandboxes start fresh, so copy the printed\n  `let source = ...` shrunk case into a regression `#[test]` alongside the\n  fix (see `bool_and_boolean_both_lower` in ix2nix).\n- The engine and macros come from crates.io (`hegeltest`,\n  `default-features = false`); no Python, no network at test time, so tests\n  run unchanged inside nix sandboxes.\n\n## Antithesis\n\nHegel is Antithesis's PBT family (hegel.dev): the same tests can later run\nunder the Antithesis platform for guided exploration, and the `antithesis`\nfeature wires assertions into its SDK. Do not enable that feature for\nordinary CI; it is for workloads launched via the antithesis-* skills.\n",{"name":5,"description":7},"main","bed3e79e169c9952618f13b255bbe21164bd8bc1","skills\u002Fproperty-testing","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e","https:\u002F\u002Fgithub.com\u002Fharivansh-afk","hari.cafe","2026-08-05 23:54:30",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add harivansh-afk\u002Floom-index-e2e --skill property-testing",{"tool":37,"command":38},"bunx","bunx skills add harivansh-afk\u002Floom-index-e2e --skill property-testing",{"tool":40,"command":41},"pnpm","pnpm dlx skills add harivansh-afk\u002Floom-index-e2e --skill property-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-testing\u002FSKILL.md",true,[],[46,53,60,67,74,80],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7A62MBAXZSSHSTKTJF9M9T0","pdf-processing","Extract text and tables from PDF files","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fviews\u002Fhome-manager\u002Ftests\u002Fmodules\u002Fprograms\u002Fopencode\u002Fskills-bulk\u002Fpdf-processing\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7A62K1VTVFVSPV9V49PKK4N","git-release","Create consistent releases and changelogs","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fviews\u002Fhome-manager\u002Ftests\u002Fmodules\u002Fprograms\u002Fopencode\u002Fskills-bulk\u002Fgit-release\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7A62HPD2TYCNA8MSV4PRGRP","data-analysis","Help analyze datasets and results","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fviews\u002Fhome-manager\u002Ftests\u002Fmodules\u002Fprograms\u002Fopencode\u002Fskill-dir\u002Fdata-analysis\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7A62G35PP698FP9TEZWYZ3V","release-notes","Draft release notes from commits and merged pull requests.","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fviews\u002Fhome-manager\u002Ftests\u002Fmodules\u002Fprograms\u002Fgithub-copilot-cli\u002Fskills\u002Frelease-notes\u002FSKILL.md",[],[],{"skillNo":75,"name":62,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7A62EJX21A1E72WR5CX6W3M","Summarize structured outputs and highlight regressions.","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fviews\u002Fhome-manager\u002Ftests\u002Fmodules\u002Fprograms\u002Fgithub-copilot-cli\u002Fskills\u002Fdata-analysis\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7A62DC2X7X7AYFPF1DG2NBC","skill-one","Example skill for tests.","https:\u002F\u002Fgithub.com\u002Fharivansh-afk\u002Floom-index-e2e\u002Fblob\u002Fmain\u002Fviews\u002Fhome-manager\u002Ftests\u002Fmodules\u002Fprograms\u002Fcodex\u002Fskills-dir\u002Fskill-one\u002FSKILL.md",[],[]]