[TS PBT] Register original assertions and bounded joint generator support - #407
Draft
CaelmBleidd wants to merge 2 commits into
Draft
CaelmBleidd wants to merge 2 commits into
CaelmBleidd wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The shared PBT manifest names an original TypeScript predicate and independent input domains, but it has no stable assertion/operand identity or a declared joint generator relationship. This prevents downstream observation from linking facts to a specific user assertion and permits an invalid array/index combination outside a dependent generator's support.
Behavior
PropertyDefinitionandPropertyManifest. Source/build hashes are registrant-supplied; runtime hash verification is not implemented.ArrayArbitrary.spec.tscallback with its originalexpect(filtered).toHaveLength(new Set(filtered).size)assertion. A narrowtoHaveLengthshim preservingAssertionErrorand a boolean completion wrapper adapt the callback to the existing execution contract. The deliberately faulty identity implementation fails; the Set implementation passes. The bounded development support and manual adaptation cost are documented.Verification
Checked at
8b3c3f8dd0cd16cbfa34eb24c273fe66d57ab16d:npm testinusvm-ts-fast-check/fast-check-adapter: 63 passed, including incompatible manifest rejection and assertion shim class/order/throw checks../gradlew :usvm-ts-pbt:test --tests '*UsvmCollectionDomainProjectorTest' :usvm-ts-fast-check:test --tests '*ExamplePropertiesTest' --tests '*RealSuiteRegistrationTest' :usvm-ts-pbt:detekt :usvm-ts-fast-check:detekt --offline: passed, zero Detekt findings../gradlew :usvm-ts-fast-check:test --tests '*ExamplePropertiesTest' :usvm-ts-fast-check:detekt --offline: passed after adding execution of all four existing examples.Limits
This is a bounded registration contract, not a general native fast-check or Vitest importer. Record construction, arbitrary dependent closures/combinators, generator-choice search, value instrumentation and empirical observations remain outside this PR. The declared source/build-input hashes are transported but not verified against the loaded/transpiled runtime. The test fixture hashes the direct TypeScript input bytes and records that scope explicitly. Downstream exact-input shrinking must use the joint arbitrary helper when #353 is integrated.
Closes the reviewable core registration stage of #395. Depends on #387; base should change to
mainafter #387 merges.