Skip to content

[TS PBT] Record scoped campaign metadata and observed Node versions - #548

Open
CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-campaign-clifrom
caelmbleidd/pbt-campaign-metadata
Open

CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-campaign-clifrom
caelmbleidd/pbt-campaign-metadata

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Record optional campaign metadata before engine work: the canonical source root, requested Node command, SHA-256 snapshots of the direct predicate/precondition modules, and the explicitly supplied concrete-runtime tsconfig file. Capture consumes the campaign's existing deadline. Concrete results now carry an optional runtimeVersion from the process that actually ran the property; the adapter captures it before loading property code, and no additional Node version probe is introduced.

The source scope is explicitly PROPERTY_ENTRY_MODULES. Imported dependencies, extended or automatically discovered tsconfig settings, effective machine options, build identity and the full environment remain unrecorded. Metadata is a pre-run snapshot: later candidates may carry a different source revision after PBT changes a file. This change does not impose one immutable source revision across a campaign. The later candidate source capture and native freshness validation are retained; the initial metadata never substitutes for either check.

Artifacts without metadata or runtimeVersion remain readable with unknown values. The existing CLI still executes one campaign and writes the same completed snapshot to stdout and the requested file. Findings remain available when later work cannot complete.

Stacked on #545 (caelmbleidd/pbt-campaign-cli). Refs #354; this is a limited metadata addition, not a complete reproducibility contract or completion of the campaign issue.

Validation:

  • 47 focused Kotlin tests across campaign metadata, campaign runner/artifact, campaign CLI and legacy CLI on Java 11 / Node 22, including both source-revision scenarios, old-artifact reading, real native confirmation, deadline outcomes and stdout/file equality.
  • All 186 Node adapter tests passed, including the actual response version after property code changes process.version.
  • installDist passed; all three installed CLI modes ran in separate Java processes with matching stdout/file artifacts and the expected presence or absence of a concrete runtime version.
  • Strict Detekt passed for usvm-ts-pbt:detektMain and usvm-ts-fast-check:detektMain/detektTest with ignoreFailures=false.

These are local checks; GitHub CI is checked separately.

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