Skip to content

[TS PBT] Save campaign artifacts before stdout publication - #614

Open
CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-public-experimentfrom
caelmbleidd/pbt-campaign-file-publication
Open

CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-public-experimentfrom
caelmbleidd/pbt-campaign-file-publication

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

campaign-file could lose a completed, serialized result when stdout failed or the outer deadline interrupted its output: the destination file was written afterward. Save the existing encoded JSON before appending it to stdout, so an output failure leaves a readable artifact. A finally block preserves stdout fallback when the file write fails. The command retains identical file/stdout JSON and encodes it once.

Closes #612. Based on #581 (028d5b0c116502525cdb2329f24bde665807922f); only the command and its focused test change. The caller/JVM deadline-origin gap remains tracked in #613. This change does not explain or resolve every zero-stdout missing-artifact run, and a killed process remains incomplete for primary experimental credit.

Validation:

  • The new failing-output regression fails on the unchanged parent with NoSuchFileException.
  • All 4 CampaignFileCliTest tests pass after the change. A failing sink reads the saved artifact before its first stdout write, then throws IOException; the command reports the output error and retains the artifact. A separate file-write failure preserves the complete stdout artifact and the original error.
  • Strict :usvm-ts-fast-check:detektMain / detektTest and git diff --check pass.

The frozen experimental assembly and measurement artifacts were not changed. No scientific pilot was rerun.

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