Langsung ke konten
Skillpedia
Testing20k Β· #10430

Hardening

Fungsinya

Mempertajam tes perangkat lunak dengan memeriksa aturan umum di balik tes contoh di seluruh input yang dihasilkan secara otomatis. Skill ini ditujukan untuk developer yang ingin menemukan bug yang terlewat oleh contoh-contoh mereka.

Kapan dipakai

  • βœ“Saat tes Anda lolos tetapi Anda menduga tes itu melewatkan kasus tepi.
  • βœ“Saat Anda ingin memeriksa aturan sebuah fungsi pada banyak input acak.
  • βœ“Saat kasus yang gagal perlu diperkecil menjadi contoh terkecil yang masih merusak.

Link skill

https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Hardening/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Hardening/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTes penguraian tanggal kami lolos, tetapi saya rasa kami melewatkan kasus tepi. Bisakah Anda memperkuatnya dengan property test?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill ini menyatakan klaim umum di balik tes contoh Anda dan menjalankannya terhadap banyak input yang dihasilkan. Jika ada yang gagal, skill ini memperkecil kegagalan menjadi input terkecil yang masih merusak, lalu bug atau propertinya diperbaiki.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Hardening Skill

Hardening sharpens tests that already exist without adding new functionality: it turns the universal claim behind a set of example tests into a fast-check property, runs it across generated inputs, and shrinks any failure to the minimal counterexample.

One intent ships. Mutation testing, complexity scoring, duplication scanning, and acceptance-test mutation were once listed here as planned; none is built, and this file no longer advertises them (external review of the v7.40.4 payload, 2026-09-03: a routing table that promises unbuilt intents is the "confidently documented, never existed" class).

Ideal State

  • Every property written states the universal claim behind existing example tests, runs across generated inputs drawn from the function's real input domain, and keeps the examples it sharpens.
  • Every failure ends shrunk to a minimal counterexample with its seed, and ends in either a fixed bug or a corrected property.
  • What hardening lands is recorded where the system reads it: a bun-property row in the ISA's Test Strategy, and a C/R/L Learning entry when a counterexample taught something.
  • Functions that cannot carry a universal claim (impure, or no candidate shape) are left to example tests rather than forced into a property.

Intent Routing

Intent Trigger File
PropertyTest property test, property based testing, PBT, fast-check, universal quantified claim, shrink counterexample β€” pure functions, parsers, serializers, data transforms, invariants Intents/PropertyTest.md

Integration Points

  • Testing Doctrine Rule #12 β€” names fast-check as the property-testing primitive (LIFEOS/DOCUMENTATION/Testing/TestingDoctrine.md).
  • ISA format β€” the bun-property ISC type with property | generator | runs columns (LIFEOS/DOCUMENTATION/ISA/ISAFormat.md Β§ ISC Type Vocabulary). A bun-property row is a first-class assert: it counts toward every-ISC-an-assert coverage (H8) and bunker test runs it like any deterministic row.
  • Algorithm β€” hardening is elected during verification when a run's criteria warrant property depth; spend is discovered from the work.
  • System prompt β€” Verification Is the Mechanism section at top (LIFEOS/LIFEOS_SYSTEM_PROMPT.md).

    The Bunker CLI is maintainer-private and not in the public release; run code rows with bun test ./<path> and suite rows with bun skills/Assay/Tools/EvalRunner.ts.

Gotchas

No skill-wide gotchas; the fast-check ones live in Intents/PropertyTest.md Β§ Gotchas.

Examples

  • "Property-test the slug parser" β†’ PropertyTest β†’ round-trip and idempotence properties in a .property.test.ts file at 1000 runs, a bun-property row in the ISA, and any failure shrunk with its seed pinned.
  • "What bugs are my example tests missing?" β†’ PropertyTest β†’ the pure functions (parsers, serializers, transforms) that have only example coverage, listed as property-test candidates.
Pertanyaan umum

Apakah menggantikan tes contoh saya?

Tidak. Skill ini mempertahankan contoh yang dipertajam dan menambahkan property test di sampingnya.

Fungsi mana yang bisa diuji dengan cara ini?

Fungsi dengan aturan umum yang jelas. Fungsi impure atau yang tidak memiliki bentuk input yang jelas dibiarkan untuk tes contoh.

Alat apa yang digunakannya?

Skill ini menggunakan fast-check, pustaka pengujian berbasis properti.

Detail

Deskripsi asli dari pembuat

Hardens LifeOS tests via property-based testing with fast-check. USE WHEN harden, hardening, property test, property based testing, PBT, fast-check, strengthen tests, find bugs example tests miss, universal quantified claim, shrink counterexample, what bugs am I missing, test the tests. NOT FOR new feature tests (bun test directly), grading agent output (Assay), UI verification (Interceptor), finding security vulnerabilities, or building new functionality.

repo: danielmiessler/LifeOS

Popularitas

Bintang GitHub
20k
Peringkat
#10430
Lisensi
MIT
Diperbarui
28/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa