Skip to content

CI: Competency#929

Draft
itssaharsh wants to merge 1 commit into
SeedSigner:devfrom
itssaharsh:competency/psbt-hypothesis-invariant
Draft

CI: Competency#929
itssaharsh wants to merge 1 commit into
SeedSigner:devfrom
itssaharsh:competency/psbt-hypothesis-invariant

Conversation

@itssaharsh
Copy link
Copy Markdown

@itssaharsh itssaharsh commented Apr 25, 2026

Description

Problem or Issue being addressed

This PR completes the competency test requirement for property-based testing on PSBTParser.

Current tests validate parser behavior with hand-crafted fixtures, but the accounting invariant was not exercised under a property-style repeated replay harness.

Solution

I added one focused Hypothesis test that replays the four existing known-good single-sig PSBT fixtures for 100 generated examples and validates the core invariant:

input_amount = spend_amount + change_amount + fee_amount

I also added Hypothesis to test dependencies.

Changed files:

  • tests/requirements.txt
  • tests/test_psbt_parser.py

Competency Evidence

Additional Information

Scope is intentionally minimal and mergeable for the competency test only.

Not included in this PR:

  • full PSBT generation strategies beyond fixture replay
  • QR classification property suite
  • coverage threshold workflow enforcement
  • benchmark harness additions

Screenshots

N/A. No UI changes.


This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Documentation
  • Other

Checklist

I ran pytest locally

  • All tests passed before submitting the PR
  • I couldn't run the tests
  • N/A

I included screenshots of any new or modified screens

Should be part of the PR description above.

  • Yes
  • No
  • N/A

I added or updated tests

Any new or altered functionality should be covered in a unit test. Any new or updated sequences require FlowTests.

  • Yes
  • No, I’m a fool
  • N/A

I tested this PR hands-on on the following platform(s):


I have reviewed these notes:

  • I understand

If you want, I can also give you a second version optimized for stricter maintainers with an even shorter summary and stronger risk language.You've used 67% of your session rate limit. Your session rate limit will reset on April 25 at 2:24 PM. Learn More

@kdmukai
Copy link
Copy Markdown
Contributor

kdmukai commented May 3, 2026

NACK.

See: #931


Also note the copy-paste miss from your AI in the PR description.

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