Skip to content

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

Open

Description

@CaelmBleidd

campaign-file encodes the completed campaign, writes the entire JSON to stdout, and only then saves the requested artifact file. A slow, failed or interrupted stdout operation can therefore discard a result that the runner has already produced and serialized.

The order is present in the minimal public parent #581 (028d5b0c116502525cdb2329f24bde665807922f), in CampaignFileRequest.kt:57-59.

Observed in the frozen local class pilot: multi-algorithms-singly-list-wide / 16061113 / SYMBOLIC_ONLY retained exactly 65536 bytes of campaign JSON on stdout, but no campaign.json. The prefix includes stop=DEADLINE, stoppedAt=CONFIRMATION, elapsedMillis=19611, and Native verification deadline reached; 99 inputs remain unchecked. The outer process guard then returned exit -9. The runner and JSON encoding had completed; stdout publication preceded the missing file write. The retained stdout SHA-256 is c60098bca32dc8ed3bc91816afd5213d5e0a8bab3fa27e7b150da76cc67eed46.

Acceptance:

  • Save the requested destination before the first stdout append.
  • Keep one JSON encoding and the existing identical stdout/file JSON contract.
  • Preserve complete stdout fallback and the original I/O error when the file write itself fails.
  • A meaningful regression uses an output sink that checks that a readable artifact already exists on its first append, then fails with an I/O error. The failure must leave the artifact intact.
  • Do not rerun the property or add a writer/protocol framework.

This is a narrow result-publication fix under #354. It does not resolve the separate caller/JVM deadline-origin mismatch (#613) or establish the internal cause of other zero-stdout missing-artifact runs. A killed process remains incomplete for primary experimental credit even if its artifact can be retained.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions