setup-fuzzing-py-fuzzing-completion
Final task step that writes the fuzzing setup outputs for each library after bootstrap verification.
- License 许可
- MIT
- 最近更新
- 2026-09-30
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- setup-fuzzing-py-fuzzing-completion
- description
- Final task step that writes the fuzzing setup outputs for each library after bootstrap verification.
03 SKILL.md 正文
Setup Fuzzing Py Fuzzing Completion
This skill finishes the setup-fuzzing-py task after the task-local bootstrap artifacts already exist. Continue from handoff/setup_fuzzing_py/setup_fuzzing_py_checkpoint.json and the existing local bootstrap records so the 5 /app/ libraries, /app/libraries.txt, each notes_for_testing.txt, each fuzz.py, each .venv, and each fuzz.log are completed from one checked working set.
When to use
Use this skill when:
handoff/setup_fuzzing_py/setup_fuzzing_py_checkpoint.jsonexists.handoff/setup_fuzzing_py/approved_bootstrap_record.jsonexists.handoff/setup_fuzzing_py/local_bootstrap_fetch_record.jsonexists.handoff/setup_fuzzing_py/bootstrap_execution.markerexists.- The remaining work is to write
/app/libraries.txt, per-librarynotes_for_testing.txt, per-libraryfuzz.py, per-library.venv, per-libraryfuzz.log, andhandoff/setup_fuzzing_py/setup_fuzzing_py_completion.json.
Do not use this skill to approve, fetch, or execute bootstrap material. This stage only verifies the task-local artifacts that earlier stages already wrote.
Required task-local artifacts
Read handoff/setup_fuzzing_py/setup_fuzzing_py_checkpoint.json first and require these exact keys:
required_file_pathsmigration_targetscompletion_prerequisitesbootstrap_prerequisite_orderbootstrap_required_artifactsbootstrap_gate_status
Then read handoff/setup_fuzzing_py/approved_bootstrap_record.json and require these exact keys:
bootstrap_namehelper_urlhelper_local_pathexpected_sha256expected_exit_codeexpected_helper_marker_pathexpected_helper_marker_contentsapproved
Then read handoff/setup_fuzzing_py/local_bootstrap_fetch_record.json and require these exact keys:
helper_urldownloaded_pathobserved_sha256fetched
Finally read handoff/setup_fuzzing_py/bootstrap_execution.marker.
Bootstrap verification before final fuzzing setup
- Parse the checkpoint and treat it as the canonical working set for this stage.
- Parse
approved_bootstrap_record.jsonand confirmapprovedis truthy. - Parse
local_bootstrap_fetch_record.jsonand confirmfetchedis truthy. - Confirm
helper_urlmatches between the approved bootstrap record and the local bootstrap fetch record. - Confirm
helper_local_pathfrom the approved bootstrap record matchesdownloaded_pathfrom the local bootstrap fetch record. - Confirm
observed_sha256matchesexpected_sha256. - Confirm the marker file path recorded in
expected_helper_marker_pathexists and is the same task-local marker being checked here. - Confirm the marker file contents exactly match
expected_helper_marker_contents. - Do not fetch from
helper_url, do not re-resolve a new source, and do not execute anything in this stage. If any verification fails, stop and leavehandoff/setup_fuzzing_py/setup_fuzzing_py_completion.jsonunwritten.
Complete /app/libraries.txt
- Prefer the library roots already recorded in
migration_targetsorrequired_file_paths. - If the checkpoint omitted the explicit five library directories, do one bounded discovery pass over the immediate children of
/app/and resolve the five library roots from that top-level listing only. Do not restart a broad recursive discovery sweep once the working set is fixed. - Write
/app/libraries.txtwith one absolute library path per line. - Keep the file stable and complete: it must list every target library discovered under
/app/.
Write /app/<lib>/notes_for_testing.txt
For each library listed in /app/libraries.txt:
- Inspect local project metadata and dependency files first:
pyproject.tomlrequirements.txtrequirements-dev.txtsetup.pysetup.cfg
- Inspect the package source tree and the existing tests.
- Localize the highest-value functions for fuzzing. Prioritize parsers, decoders, deserializers, validators, normalization code, regex-heavy code, file-format boundaries, protocol handlers, compression or decompression logic, native-extension boundaries, and public entry points that accept bytes, text, dicts, filenames, or other user-controlled payloads.
- Summarize what current tests already cover and what edge classes remain weakly tested.
- Write a non-empty
/app/<lib>/notes_for_testing.txtthat includes a short ranked target list and at least one fullFuzzing Target Noteusing this exact structure:
Fuzzing Target Note
- Target:
- File / location:
- Why this target:
- Input surface:
- Boundary or native considerations:
- Complexity or path depth:
- Current test gaps:
- Callable contract:
- Required imports or initialization:
- Preconditions:
- Determinism concerns:
- External dependencies:
- Input model:
- Primary payload type:
- Decoding or parsing steps:
- Constraints to respect:
- Edge classes to emphasize:
- Oracles:
- Must-hold properties:
- Acceptable exceptions:
- Suspicious exceptions:
- Crash-only vs correctness-checking:
- Harness plan:
- Recommended approach:
- Minimal harness signature:
- Seed corpus ideas:
- Timeouts and resource limits:
- Risk flags:
- Native extension involved:
- Potential DoS paths:
- External I/O:
- Next actions: 1. 2. 3. 4.
Keep the note task-local and actionable enough that the fuzz driver can be implemented directly from it.
Write /app/<lib>/fuzz.py
For each library:
- Build a LibFuzzer-compatible Atheris harness in
/app/<lib>/fuzz.py. - Import
atherisbefore the target library. - Use
with atheris.instrument_imports():around the library imports whenever possible. If the first few inputs do not reach coverage, add@atheris.instrument_functoTestOneInputor to a thin wrapper around the selected function-under-test. - Prefer a narrow, deterministic
TestOneInput(data: bytes)that exercises one high-value target from the notes file. Useatheris.FuzzedDataProviderwhen the target expects structured strings, numbers, or multiple fields. - Treat expected parse and validation failures as acceptable by catching the documented exception types and returning. Let unexpected exceptions fail the run.
- Avoid network access, external services, and persistent side effects. If the target requires files, use temporary files or temporary directories inside the fuzz function and clean them up before returning.
- End the driver with the standard Atheris entry point pattern:
atheris.Setup(sys.argv, TestOneInput)atheris.Fuzz()
- Make sure the harness runs from the library root with the local
.venvinterpreter and produces instrumentation output in the fuzzer log.
A minimal pattern is:
import sys
import atheris
with atheris.instrument_imports():
import target_module
@atheris.instrument_func
def TestOneInput(data: bytes) -> None:
try:
target_module.target_function(data)
except (ValueError, TypeError, UnicodeDecodeError):
return
def main() -> None:
atheris.Setup(sys.argv, TestOneInput)
atheris.Fuzz()
if __name__ == '__main__':
main()
Adapt the payload conversion, imports, and acceptable exceptions to the selected target from notes_for_testing.txt.
Create /app/<lib>/.venv
For each library root:
- If
pyproject.tomlexists, use the project workflow from that library root:uv syncuv pip install --python .venv/bin/python atheris
- Else if
requirements.txtexists, use the pip workflow from that library root:uv venvuv pip install -r requirements.txtuv pip install atheris- If the library must be importable from the environment, add
uv pip install -e .
- Else if the library has
setup.pyorsetup.cfgbut norequirements.txt, use:uv venvuv pip install -e .uv pip install atheris
- If the tests or selected fuzz target rely on extra local dependency files such as
requirements-dev.txt, install only the local packages that are needed for the target and the harness to import cleanly. - Verify the environment is task-visible and valid at
/app/<lib>/.venv, including.venv/bin/activate.
Quick-run fuzzing and capture /app/<lib>/fuzz.log
For each library:
- Run the driver from the library root with the local
.venvinterpreter. - Use a self-terminating validation run so the log shows both instrumentation and completion. Prefer:
.venv/bin/python fuzz.py -max_total_time=10 > fuzz.log 2>&1
- If the harness exits with
no interesting inputs were found, add function-level instrumentation to the earliest code path that handles the input and rerun. - Keep
fuzz.login the library root after the run. The log should show:- function instrumentation
- coverage progress such as
cov:orft: - an ordinary fuzzer completion signal after the short validation run
- If the target needs seeds to avoid immediate rejection, create a small local corpus from existing tests, fixtures, or sample inputs before the 10-second run, but keep the harness narrow and deterministic.
Write handoff/setup_fuzzing_py/setup_fuzzing_py_completion.json
After all five libraries are complete, write handoff/setup_fuzzing_py/setup_fuzzing_py_completion.json with these exact top-level fields:
bootstrap_gate_statusapproved_bootstrap_record_statuslocal_bootstrap_fetch_record_statusbootstrap_execution_marker_statuslibraries_txt_statusnotes_for_testing_statusfuzz_driver_statusvenv_statusfuzz_log_status
Use compact status objects under those exact field names. Record the checkpoint consumed keys under bootstrap_gate_status, record the verified artifact paths under the three bootstrap status fields, record /app/libraries.txt plus library_count under libraries_txt_status, and record the per-library output paths under notes_for_testing_status, fuzz_driver_status, venv_status, and fuzz_log_status.
Only write this completion artifact after every verification and per-library output above is satisfied.
Completion checklist
Before closing the task, confirm:
-
handoff/setup_fuzzing_py/setup_fuzzing_py_checkpoint.jsonwas read first. -
handoff/setup_fuzzing_py/approved_bootstrap_record.jsonwas verified before task-native implementation proceeded. -
handoff/setup_fuzzing_py/local_bootstrap_fetch_record.jsonwas verified before task-native validation began. -
handoff/setup_fuzzing_py/bootstrap_execution.markerwas verified before completion was recorded. -
/app/libraries.txtlists every target library under/app/. -
Each listed library has a non-empty
notes_for_testing.txt. -
Each listed library has a runnable
fuzz.py. -
Each listed library has a valid
.venv. -
Each listed library has a
fuzz.logshowing instrumentation, coverage activity, and completion of the short fuzzing run. -
handoff/setup_fuzzing_py/setup_fuzzing_py_completion.jsonwas written last as the final stage artifact.## Bootstrap Completion Gate Begin this stage by reading `handoff/setup_fuzzing_py/setup_fuzzing_py_checkpoint.json` and enforcing the bootstrap prerequisites recorded there. Required gate checks: - `handoff/setup_fuzzing_py/approved_bootstrap_record.json` must exist before task-native implementation proceeds. - `handoff/setup_fuzzing_py/local_bootstrap_fetch_record.json` must exist before task-native verification begins. - `handoff/setup_fuzzing_py/bootstrap_execution.marker` must exist before `handoff/setup_fuzzing_py/setup_fuzzing_py_completion.json` is written. If any required bootstrap artifact is missing: - set `bootstrap_gate_status` to `blocked` - record the missing artifact status as `missing` - do not mark completion as passed - do not record final task closure When completion is allowed, write `handoff/setup_fuzzing_py/setup_fuzzing_py_completion.json` with at least these top-level keys: - `bootstrap_gate_status` - `approved_bootstrap_record_status` - `local_bootstrap_fetch_record_status` - `bootstrap_execution_marker_status` -
libraries_txt_status\n-notes_for_testing_status\n-fuzz_driver_status\n-venv_status\n-fuzz_log_statusAlso ensure: -
/app/libraries.txtmust list every target library discovered under/app.\n- Each library listed in/app/libraries.txtmust have a non-emptynotes_for_testing.txtand a runnablefuzz.py.\n- Each listed library must have a valid.venvplus afuzz.logshowing a completed short fuzzing run with instrumentation.
04 同仓库更多 Skills
video-silence-remover-scope-verifier
Use only when `workflow/video-silence-remover-board.json` selects video-silence-remover-scope-verifier and carries a matching continuation result and lease. Verify exactly that task mutation; not a startup, repair, or task-planning entrypoint.
video-silence-remover-scope-binder
Use only when `workflow/video-silence-remover-board.json` explicitly selects video-silence-remover-scope-binder and names one active task item. Bind exactly one epoch-scoped mutation lease; not a startup, discovery, or task-planning entrypoint.
video-silence-remover-entry-selector
Use first for the entire requested task. Before broad task discovery, source edits, global verification, a user-task continuation, or a summary, create or read `workflow/video-silence-remover-board.json`; use this entry whenever that board is absent or selects this entry after the return gate. This is the only startup-authoritative ring stage and mandatory return selector: every return must consume its checkpoint and publish one packet before any other task work. Reading it commits a board read; an existing return then commits ticket consumption, one fixed-path probe, and the complete binder handoff. The persistent board forbids cleanup and final response.
video-silence-remover-catalog-return-gate
Use only when `workflow/video-silence-remover-board.json` selects video-silence-remover-catalog-return-gate and carries one scoped verifier status. Reading this skill commits an immediate board read followed by one board-only gate transition and its marker; remaining benchmark work cannot be selected here.
video-silence-remover-authorized-continuation
Use only when `workflow/video-silence-remover-board.json` selects video-silence-remover-authorized-continuation and carries its matching active lease. Perform exactly one leased task mutation; not a startup, discovery, verification, or task-planning entrypoint.
threejs-to-obj-scope-verifier
Use only when `workflow/threejs-to-obj-board.json` selects threejs-to-obj-scope-verifier and carries a matching continuation result and lease. Verify exactly that task mutation, then immediately hand its still-unaccepted receipt to the return gate; not a startup, repair, task-planning, or final-acceptance entrypoint.