Skip to content

[TS PBT] Generate native integer neighborhoods from returned inputs - #547

Closed
CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-domain-relation-filterfrom
caelmbleidd/pbt-returned-numeric-generation
Closed

CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-domain-relation-filterfrom
caelmbleidd/pbt-returned-numeric-generation

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Withdrawn on 2026-10-16

Returned-input random generation is not used by the agreed one-PBT-then-USVM execution model. Do not merge this optional protocol/configuration/lineage extension into the product. Existing generation, replay and shrinking remain unchanged.

The project owner changed scope; the authoritative plan is #345. This PR is closed without merging and does not establish completed delivery of the former task. Keep the historical experimental snapshots reproducible.


Returned inputs previously had no path into fresh PBT generation. Add an optional returnedInputGeneration configuration that mixes native fast-check integer neighborhoods around caller-selected seeds with the unchanged original arbitrary. The original branch keeps half the selection probability; ordinary domains, admission and the complete original oracle remain in force.

Branch-owned lineage records seed ID, source run and source invocation for generated descendants, including values different from the seed. Native fast-check clone reads, shrinking and replay retain the attribution. Ordinary samples that happen to equal a returned seed remain ordinary samples, while returned-origin evidence cannot increase independent random support in scalar inference.

Supported boundary: 1–8 independent IntegerDomain inputs, 1–8 in-support seeds and radius 1..1024, with bounded observation capture required for lineage. Binary64 NumberDomain, non-integer inputs and joint generators are explicitly unsupported. Seed provenance is caller-owned metadata and does not itself certify #353 confirmation. The repeated campaign/session consumer remains separate; this does not complete #355.

Validation on JDK 11 / Node 22: 103 FastCheck Kotlin tests, 27 PBT inference tests, all 205 Node adapter tests, strict PBT Detekt main/test and clean diff checks. The functional fixture first verifies an admitted passing input through the original native oracle, then compares a fresh returned-input run with a no-return control and verifies distinct admitted descendants, rejection, native shrinking and replay. These tests establish capability, not comparative performance.

Depends on #544; this PR targets caelmbleidd/pbt-domain-relation-filter and contains only the returned-integer capability.

assertTrue(feedback.all { it.returnedInput?.seedId == returned.id })
assertTrue(feedback.all { it.returnedInput?.sourceInvocationId == invocation.invocationId })
assertTrue(descendants.all { it.input.value != JsConcreteValue.Array(inputs) })
assertTrue(artifact.invocations.all { sample ->
assertTrue(artifact.invocations.all { sample ->
val values = (sample.input.value as JsConcreteValue.Array).elements
values.zip(property.inputs).all { (value, input) -> value in input.domain }
})
val values = (sample.input.value as JsConcreteValue.Array).elements
values.zip(property.inputs).all { (value, input) -> value in input.domain }
})
assertTrue(feedback.all { sample ->
val values = (sample.input.value as JsConcreteValue.Array).elements
.map { (it as JsConcreteValue.Number).toDouble() }
values[0] in 498.0..502.0 && values[1] in 898.0..902.0
})
property(),
returnedConfiguration.copy(
returnedInputGeneration = ReturnedInputGeneration(
seeds = listOf(returned.copy(inputs = listOf(JsConcreteValue.number(-1.0), inputs[1])))),
property(),
returnedConfiguration.copy(
returnedInputGeneration = ReturnedInputGeneration(
seeds = listOf(returned.copy(inputs = listOf(JsConcreteValue.number(-1.0), inputs[1])))),
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