Skip to content

[TS PBT] Honor caller cutoff in campaign-file - #615

Open
CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-campaign-file-publicationfrom
caelmbleidd/pbt-campaign-external-deadline
Open

CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-campaign-file-publicationfrom
caelmbleidd/pbt-campaign-external-deadline

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

A caller currently grants campaign-file a relative timeout that starts again after JVM startup and request decoding. The campaign can therefore consume time reserved for returning its artifact, and the caller may kill it before publication.

Add optional externalDeadlineEpochMillis and nonnegative publicationReserveMillis fields to the file request. The runner converts the epoch cutoff once into the existing monotonic deadline, subtracts the publication reserve inside that cutoff, and caps execution by the original request timeout. The original configuration, PBT allocation and property remain intact. An already exhausted cutoff returns DEADLINE at PREPARATION without source capture or engine startup. Existing callers keep their current public API and timer behavior.

The change also avoids creating a new positive PBT timer when the shared deadline has already expired. The file-before-stdout publication and stdout fallback from #614 are retained.

Depends on #614 (4c37ea13cd8d888e35db79a90a2c85c96315d63f). CLI part of #613; the experiment caller will pass its existing absolute cutoff and an explicit 1000 ms publication reserve in a separate PR. This does not complete #613 by itself.

Validation: 21 focused CLI/campaign tests passed, including expired cutoff with unchanged controls, extreme epoch/reserve arithmetic, original-timeout cap, shortened PBT allocation, and both publication regressions. Both new CLI regressions failed on #614 before implementation. Strict Detekt main/test reports contain zero findings; git diff --check passed.

Combined functional validation used a new isolated assembly with the caller fix from #616 and the existing experiment functionality: 28 Kotlin checks and 27 Python checks passed. One declared 30-second SinglyLinkedList wide / seed 16061113 / SYMBOLIC_ONLY fixture included a 2-second launcher delay inside the same cutoff. It saved an 83,851-byte DEADLINE / CONFIRMATION artifact before the outer cutoff, with no outer kill; accountable elapsed time was 20,790 ms. The original 18,745 ms configuration was retained and runner elapsed time was 15,199 ms. Incomplete native replay remained explicit (66 pending inputs and one timed-out receipt); coverage and primary credit were not awarded. This functional fixture is not comparative evidence, and the frozen scientific campaign was preserved.

The publication reserve is explicit policy, not a hard real-time guarantee for encoding or filesystem writes. Existing synchronous IR loading, source capture and cleanup remain cooperative; local child-deadline snapshots are unchanged. No comparative experiment or frozen evidence was rerun or edited.

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