Skip to content

Add subcommand export-specs#66

Open
tothtamas28 wants to merge 4 commits intomasterfrom
dump-spec-command
Open

Add subcommand export-specs#66
tothtamas28 wants to merge 4 commits intomasterfrom
dump-spec-command

Conversation

@tothtamas28
Copy link
Copy Markdown
Contributor

@tothtamas28 tothtamas28 commented May 5, 2026

Adds a new subcommand export-specs that loads the test contracts, initializes their FuzzSpec objects, and prints them to stdout as a JSON array. This makes it possible to inspect what Skribe would fuzz without actually running tests.

Other changes

  • --directory / -C moved to the top-level parser. Previously this option was duplicated on build and run. It's now defined once on the root parser and available to all subcommands.
  • To share logic between run and export-specs, deploy_and_run was split into two reusable pieces:
    • init_specs(): loads contracts and builds FuzzSpec objects (now also called by export-specs)
    • _run_spec(): executes fuzzing for a given spec
  • The previously public create_spec and create_template_pattern methods were renamed to _create_spec and _create_template_pattern to reflect that they're internal helpers. Contract loading logic was similarly extracted into _load_contracts().

@tothtamas28 tothtamas28 self-assigned this May 5, 2026
@tothtamas28 tothtamas28 force-pushed the dump-spec-command branch from 540a70f to 397f7dd Compare May 5, 2026 12:47
@tothtamas28
Copy link
Copy Markdown
Contributor Author

Specs file for the 9lives contract: specs.json.txt

@tothtamas28 tothtamas28 force-pushed the dump-spec-command branch 3 times, most recently from 77e0864 to b91e054 Compare May 5, 2026 13:28
@tothtamas28 tothtamas28 force-pushed the contract-metadata-format branch 2 times, most recently from e2a1fc1 to 2b588b8 Compare May 6, 2026 10:09
@tothtamas28 tothtamas28 force-pushed the dump-spec-command branch from 2ce09d6 to 843e43e Compare May 6, 2026 11:21
Base automatically changed from contract-metadata-format to master May 6, 2026 11:22
@tothtamas28 tothtamas28 marked this pull request as ready for review May 6, 2026 11:40
@tothtamas28 tothtamas28 force-pushed the dump-spec-command branch from 843e43e to b1a4e49 Compare May 6, 2026 12:08
@tothtamas28 tothtamas28 force-pushed the dump-spec-command branch from 4c3d093 to ff4461e Compare May 6, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants