You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(pi): budget Babysit against the run's real deadline
Three fixes that each needed to land a level below where the symptom showed.
Execution deadline. Babysit planned its wait loop against
`getMaxExecutionTimeout()`, which unconditionally returns the enterprise
async ceiling (90 min) with no regard for the run's plan or sync/async mode
— the sync ceiling is 300s on free, 3000s on pro. A synchronously triggered
run was therefore killed mid-loop with the PR already opened, its review
comments already posted, and none of the rounds/stopReason outputs produced.
Rather than thread a numeric deadline through ExecutionContext — five entry
points that would each have to remember it, and nothing to catch the one that
forgot — `createTimeoutAbortController` now records the deadline against the
signal it creates, and `getRemainingExecutionMs(signal)` reads it back. The
number cannot disagree with the timer that enforces it, because both are
established in the one place the timeout exists, and every entry point
already hands the executor that signal. `undefined` means unknown, not
unlimited: Babysit keeps the old ceiling as its fallback for an untimed run.
Job logs. The executor caps a response at 10 MB and throws rather than
truncating, so a verbose CI job produced no diagnostic at all — and GitHub
Actions reports null title/summary on every check run, leaving the agent a
bare URL it has no tool to follow. The tool now sends `Range: bytes=-N` so
the storage host returns only the tail. Since a suffix range is a request and
not a guarantee, a 200 still takes the local slice.
That made the old output dishonest, so the contract changed while the tool is
still new and has one consumer: `totalCharacters` (which a ranged read cannot
know) is replaced by `totalBytes`, sourced from the `Content-Range` total and
null when unreported. A ranged body is trimmed at its first line break, since
the byte window cuts mid-line and can split a multi-byte character.
Generated docs. `github.mdx` was missing the `repo_full_name` the PR reader
now returns, and regenerating deleted the head/base rows instead of adding it:
`scripts/generate-docs.ts` only expands a spread at depth 0 of a const, and
`PR_BRANCH_REF_OUTPUT` spread inline under `properties`. Restructured into a
named properties const in types.ts, next to the shapes it belongs with, which
the generator resolves the same way it already resolves BRANCH_REF_OUTPUT.
Only the github.mdx hunk is committed. The generator is lossy elsewhere —
it drops 126 lines of trigger configuration from jira.mdx — which is
pre-existing drift for whoever owns that surface, not this branch.
0 commit comments