Skip to content

[Calls] Replay saved concrete input environments - #617

Open
CaelmBleidd wants to merge 2 commits into
caelmbleidd/calls-concrete-environment-candidatesfrom
caelmbleidd/calls-saved-input-replay
Open

CaelmBleidd wants to merge 2 commits into
caelmbleidd/calls-concrete-environment-candidatesfrom
caelmbleidd/calls-saved-input-replay

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Class probes save concrete input journals, but consuming a saved state still requires a hand-written native wrapper. Add class-replay-input to select one journal state, verify the producing manifest and frozen source/journal hashes, restore its original receiver, arguments and environment, and invoke the original callable through the existing supervised class replayer.

A private AST-checked source overlay supplies exact source-qualified prototypes, static data setters and mutable top-level module setters. Partial environments, inaccessible bindings, unsupported class state and unresolved runtime module boundaries produce explicit unsupported outcomes. Saved-input replay preserves initializer diagnostics; existing lifecycle callers retain their checked-closure default. An unavailable callable is a harness failure before invocation.

The result records actual native completion and return representability separately from the immutable symbolic candidate. Prefix reachability and native class coverage remain a later validation stage, so nativeReplayValidated and nativeCoverageAvailable stay false.

This is a child of #568, based on its verified head 835748c620fb5f4691f7a5432c49995444ed1770.

Validation:

  • Four focused Kotlin/native tests pass with zero failures, errors or skips. Actual saved stopped inputs restore an aliased instance plus static state and return 373; a saved module environment returns 108. Setter controls return 0 and 96, partial environments are rejected, and missing callables remain harness failures.
  • Four focused AST adapter tests pass, including a module binding named value that must not be shadowed by the generated setter. The new tests are included in the standard adapter test command.
  • Calls main/test and fast-check main detekt pass with ignoreFailures=false, without autocorrection; all three SARIF reports have zero findings.

Review the AST eligibility rules, then saved-state identity/restoration and the source/native regression fixtures. Full suites are left to CI.

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.

1 participant