Repository navigation
v1.91.368.0 fix: gstack-pregate --remote gives the gate its full timeout and shows its last line (GST-431) - #3682
Merged
Conversation
|
😎 This pull request was merged. |
…; heartbeat names its last line (GST-431) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…out detail names its source (review fixes) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
force-pushed
the
gsta195-pregate-remote-progress
branch
from
October 31, 2026 11:32
f7d4270 to
8ae9b13
Compare
4 tasks done
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
gstack-pregate --remotenow gives the remote gate its full timeout. Before, a gate that waited on CI and printed nothing was killed as stalled after 300 s.Before/after as text
Why
CAPY-1 (qm#2837) reported that "
gstack-pregate --remotehits its 300s limit while silently polling CI" (GST-431). Their remote gate waits for a CI run and prints nothing while it waits, so pregate's test-output stall timer killed it at 300 s whatever--timeoutsaid. Now only the timeout bounds the gate, and the 60 s heartbeat shows the gate's last output line.Blast radius
Only
--remotechanges. The lanes runner and guards still pass the stall timeout (lib/pregate/checks/lanes.ts, read). gstack's own gate (scripts/ubicloud/pregate-remote.sh) sizes its VM fromPREGATE_TIMEOUT_Sand keeps its own watchdog, and the remote free tier passed on this tree (script ran).Approvals
Source: gstack-approvals record for gsta195-pregate-remote-progress (display only; not an approval citation).
Summary
Was stacked on #3676 (landed as 088bfc5). Replayed onto main with an unchanged product patch-id (a84724a3) after it landed. Parent issue GST-422. GST-431 (from CAPY-1, qm#2837).
Eng-only plan note (fix lane, no separate gate). Cause: runRemote supervised the gate with the stall timer (default 300 s). Fix: the remote gate gets
stallMs: 0and is bounded by--timeout, elsetimeout_s, else 600 s. Its heartbeat names its last output line, with ANSI escapes and carriage-return redraws cleaned out, and the read is best effort. A timeout names its seconds and source. The negative control: a gate past--timeoutstays uncleared.Behavior changes
--stall-timeout(andstall_timeout_s) no longer applies to the--remotegate. A hung gate now runs to its timeout (--timeout 2700in the crew recipe) instead of dying at 300 s.Test Coverage
New tests were red first: a quiet gate inside its timeout clears; a gate past
--timeoutstays uncleared; the heartbeat names the last line (including a\rredraw with an escape); a log removed mid-run does not crash the supervisor.Tests ran: focused 360
Pre-Landing Review
No blocking findings remain. The outside voice (GPT-6.1 Sol) found that the new log read could throw out of the supervisor's timer if the log disappeared, which would abandon the gate's deadline. That is fixed with a failing-first test. The native adversarial pass found raw escapes in the heartbeat and a timeout detail without its source, both fixed. A fix-check on the touched hunks found only informational items.
REVIEW_LOOP: passes=1 blocking_found=1 deferred=0 noted=3 fixed=4 scope=frozen fix_checks=1 dispatches=3
Gate edits: none detected (test hunks are new tests and one fixture-gate option)
Review notes
timeoutSourceis optional onPregateContext; a hand-built context would print "undefined" in the timeout detail. Production contexts always set it.ESC ] … BEL) are not stripped from the heartbeat line; only the visible text is affected.--timeoutitself has no upper bound on the CLI, so a third-party gate without a watchdog can hold a lane for as long as the timeout says.TODOS
No TODO items completed in this PR.
Documentation
Scope: the committed diff against
aab795ec. The--remotegate is now limited only by its timeout, not the stall timer, and its heartbeat names the gate's last output line. Revieweddocs/pregate.md(config table, supervision, remote gate), thePREGATE_STALLEDentry indocs/troubleshooting.md, thegstack-pregatehelp text, thepregate-remote.shcomment, the changelog fragment, and the top-level docs.Result: current. The branch already updates every affected doc, and they match the code in
lanes.tsandsupervise.ts. A search of the docs found no other text saying the remote gate stalls.Debt: one rewritten line in the troubleshooting entry runs past the usual wrap width. It's cosmetic.
Test plan
bun run typecheck: clean🤖 Generated with Claude Code