Repository navigation
test(worker): harden the convergence deadline tests and split the revision file - #2298
Merged
Merged
Conversation
…ision file The two convergence deadline tests from #2281 and #2283 ran a real 10 s deadline, so a runner stall before the first pass could fail them (the finding 1171 pattern), and the #2281 test replaced Date.now by hand. - The database-clock deadline test now uses one fresh deployment for the controller-ahead case and one admitted two minutes ago (workAge) for the behind case, against a 60 s deadline: neither depends on when the first pass runs. Date.now is replaced through context.mock, which restores it when the test ends. - The outage-at-deadline test needs real passes before its deadline, so the deadline is 30 s and each failure is asserted at or past it by the database clock. - Move the credential-source withdrawal and source grant/readiness cases (34 tests, unchanged) into postgres-worker-agent-revision-credential- sources.test.mjs and register it in PostgreSQL Application. - The SIGTERM termination test records each phase's stop time against its budget as a runtime-sigterm measurement in the lane result. - A file cleanup that fails after the step's shell is gone (GitHub cancels a step by killing its shell, orphaning the runner) is reported as cleanup-cancelled instead of cleanup-failed.
… changes - Give the controller-ahead first pass 45 s (the deadline less 15 s), not the default 10 s, so a stalled runner cannot fail it there. - The lane check fails any file cleanup that did not pass, not a fixed list of statuses. - Bound the new runner test's spawnSync at 30 s.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 08:49 — with
GitHub Actions
Error
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 08:49 — with
GitHub Actions
Error
… bash -c Code scanning flagged the bash -c wrapper as a shell command built from paths. A node parent that waits for the runner stands in for the step's shell just as well, and no shell parses the arguments. The test still fails with the parent check forced off.
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: test(worker): harden the convergence deadline tests and split the revision file This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 08:58 — with
GitHub Actions
Failure
freeqaz
had a problem deploying
to
integration-qa-pr
October 13, 2026 08:58 — with
GitHub Actions
Failure
This was referenced Oct 13, 2026
This was referenced Oct 17, 2026
This branch had an error being deployed
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.
Problem
A flake sweep of today's CI (no real flakes) found four preventive items:
Date.nowby hand.postgres-worker-agent-revision.test.mjsgrew from 101 to 129 s (worst 153 s) as fix(occ): judge deployment claim liveness by the database clock #2275, fix(worker): judge the convergence deadline by the database clock #2281 and fix(worker): retire an oauth bootstrap last seen running when the deadline pass hits an outage #2283 added cases.cleanup-failedwhen a newer push had cancelled the job. GitHub cancels a step by signalling and then killing its shell, never the runner. The runner then finishes as an orphan and races the job'salways()Cleanup lane step. In run 38349577861 the result file ended 3 s after the step was marked cancelled.Change
workAge) must fail on its first pass withCONVERGENCE_DEADLINE_EXCEEDEDand retire its bootstrap.Date.nowis replaced throughcontext.mock, which restores it when the test ends, even on failure.postgres-worker-agent-revision-credential-sources.test.mjs, together with their helpers. The new file is registered in PostgreSQL Application'sparallelFilesandexpectedTests.runtime-sigtermmeasurement for each wrapper and phase: stopped, elapsed time and budget.measurementsin the lane result.cancelledwith issuecleanup-cancelled, notcleanup-failed. The lane still fails, and aggregation treats a cancelled cleanup as failed.Verification
node --testonci-runner.test.mjspasses locally for:runtime-sigtermsample and three rejected ones;status: 'failed'instead ofcancelled).eslintandprettier --checkpass on the touched files.controller-worker.mdstays at 2,493 words, after a two-word trim in its neighbouring bullet; the other two are far below the limit.Date.now() - createdAt. The fresh deployment's first pass under +5 min would then read 300 s, past 60 s, and fail at once, so the "young and pending" assertion fails. The pre-aged deployment under -5 min would read 120 - 300 < 0 s and never fail within the wait.cleanupRows(running)stays empty and the test fails.-credential-sources64 s. The lane is still bounded by teardown at 142 s.runtime-sigtermmeasurements. The slowest stop was 966 ms against 15 s.nodeparent instead ofbash -c, after code scanning flagged the shell command. CI Required is green on this head.Risks
withCredentialGatewayout of the revision file. Open PR Support OpenAI-compatible Codex model endpoints #913 adds one line to that helper, so it now conflicts in that file. To resolve, addvalidateSourceConfig() {},to the helper's new location.