Skip to content

Extract class FuzzSpec#65

Merged
tothtamas28 merged 10 commits intomasterfrom
contract-metadata-format
May 6, 2026
Merged

Extract class FuzzSpec#65
tothtamas28 merged 10 commits intomasterfrom
contract-metadata-format

Conversation

@tothtamas28
Copy link
Copy Markdown
Contributor

@tothtamas28 tothtamas28 commented May 4, 2026

Refactors the contract fuzzing pipeline around two new named tuple types, Signature and FuzzSpec.

Signature (in contract.py)

Replaces direct use of Method objects throughout the fuzzing pipeline. A Signature captures only the information needed to fuzz a method (its contract name, function name, and argument types) and owns the logic that was previously spread across free functions:

  • get_arg_types becomes the private Signature._extract_arg_types
  • argument_strategy becomes Signature.argument_strategy()
  • A new qualified_name property replaces repeated f'{...contract_name}.{...name}' formatting

FuzzSpec (in skribe.py)

Groups the KORE template pattern and the tuple of Signatures produced from a contract into a single value. A new create_spec method on Skribe produces it, and create_template_pattern is extracted as a helper. The dict property on FuzzSpec serializes the data structure.

Other cleanup

  • KORE template setup is pulled out of run_test into create_template_pattern, so run_test now takes a ready Pattern instead of a KAST config + substitution pair
  • Imports are converted to relative throughout
  • src/tests/ is excluded from the source distribution

@tothtamas28 tothtamas28 self-assigned this May 4, 2026
@tothtamas28 tothtamas28 force-pushed the contract-metadata-format branch from c0ebaeb to e4fddb3 Compare May 4, 2026 15:09
@tothtamas28 tothtamas28 force-pushed the contract-metadata-format branch 2 times, most recently from 83bcad4 to f1d6027 Compare May 4, 2026 15:20
@tothtamas28 tothtamas28 marked this pull request as ready for review May 4, 2026 16:01
@tothtamas28 tothtamas28 force-pushed the contract-metadata-format branch 2 times, most recently from 19e6f11 to eb3dd51 Compare May 5, 2026 09:45
@tothtamas28 tothtamas28 changed the title Extract class SkribeMetadata Extract class FuzzSpec May 5, 2026
@tothtamas28 tothtamas28 force-pushed the contract-metadata-format branch from 44f3bb1 to 7e3523b Compare May 5, 2026 12:35
Comment thread src/skribe/skribe.py Outdated
Copy link
Copy Markdown
Member

@bbyalcinkaya bbyalcinkaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@tothtamas28 tothtamas28 force-pushed the contract-metadata-format branch from 70f964f to e2a1fc1 Compare May 6, 2026 09:51
@tothtamas28 tothtamas28 force-pushed the contract-metadata-format branch from e2a1fc1 to 2b588b8 Compare May 6, 2026 10:09
@tothtamas28 tothtamas28 merged commit 1cfa6de into master May 6, 2026
5 checks passed
@tothtamas28 tothtamas28 deleted the contract-metadata-format branch May 6, 2026 11:22
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.

3 participants