Skip to content

Make the cancelled <Git.Push /> authentication test reliable under load #950

Open

Description

@taras

A <Git.Push /> that is cancelled while it is waiting for its destination's
credentials must contact the remote with nothing. P21: cancelling a pending authentication releases it, and keeps the request in
packages/git/tests/retained-repository-push.test.ts is where that is read
back: it holds the publication's credential session open, halts the entry,
releases the hold, and then asserts that no push subcommand ran and that the
destination branch does not exist.

Under CI load that test has observed a push.

What happened

test-deno (3/15) of CI run
39173519621
(ubuntu, Deno, pull request #949, head
cf0678bf23764ebc2dfb41701026bae620416d8e), shard command
deno test --allow-all --frozen packages/git/tests/retained-repository-push.test.ts:

one entry's publication ... P21: cancelling a pending authentication releases it, and keeps the request
error: Error: expect(received).toEqual(expected) // deep equality

- Expected  - 1
+ Received  + 3

- Array []
+ Array [
+   "push",
+ ]
    expect(subcommands(counted).filter((name) => name === "push")).toEqual([]);
    at packages/git/tests/retained-repository-push.test.ts:1943:68

FAILED | 0 passed (22 steps) | 1 failed (1 step) (19s)

The complete job log is preserved at
control/.development/stack/934/delivery-cf0678bf-20261018/ci-first-failure-test-deno3o15-job117811358755.log,
captured before anything was re-run.

Why this is intermittent rather than a regression

  • main's own CI for 726275be8ad4ed40ea121aae5d1f527281e61a53 — the exact
    base the failing branch merged — is green
    (run 39146447741).
  • The failing branch changes nothing under packages/git.
  • The same test passed with no fix in a complete local Deno corpus run on a
    tree whose packages/git bytes are identical to the failing head:
    deno task test, macOS, ok | 1504 passed (8936 steps) | 0 failed (61m19s),
    with P21 ... ok (2s). That tree differs from the failing head only in seven
    test files outside packages/git.

No CI re-run of the identical head has been taken, so the two observations are
one CI failure and one local pass rather than two CI runs.

Where to look

The row coordinates cancellation and release by spawn ordering: it spawns
task.halt(), then resolves the resolver the held credential session is
waiting on. Nothing observes that the halt has reached the held operation
before the release happens, so if the release wins, the session can be provided
and the attempt can proceed into git push before cancellation arrives. That
reading is consistent with the observed output and is not yet confirmed; the
fix should make the row wait for the state it means rather than for an
ordering.

Acceptance

  • The row proves the same contract — a cancelled pending authentication
    contacts the remote with nothing and leaves its request acknowledged — without
    depending on which of the halt and the release is scheduled first.
  • A green re-run does not close this issue. Close it when the cause is fixed and
    the regression evidence is recorded.

Activity

  1. added
    flakeIntermittent or timing-sensitive failure that can pass without a code change
    on Oct 19, 2026
  2. added a commit that references this issue on Oct 19, 2026
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

    flakeIntermittent or timing-sensitive failure that can pass without a code change

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions