Skip to content

Fix(forks): Warn on a fork still being created #219

Closed

Description

Problem

In #204's fork_pool.py, finish() waits for each fork it requested against one shared deadline, FORK_WAIT_SECONDS = 60, and a fork that has not appeared by then fails its target and the Prepare forks job. GitHub can take longer than a minute to fork a large repository. The publish job runs only after the author session, which takes minutes to hours, and its require_fork reads the fork again. So a fork that is merely slow turns the forks job red while the publish that depends on it succeeds, and a red job that needs no action trains people to ignore the job.

Required behaviour

  1. A fork that is still absent at the deadline, after a request GitHub accepted, is recorded with the outcome requested; not yet visible and a ::warning, not a failure, and does not make the job exit 1.
  2. Everything else that fails now still fails: a refused request, a rename that fails, a repository of that name that is not the target's fork, and a fork that appears but is not the target's fork.
  3. The publish job's reason for a missing fork (missing_fork) says the fork may still be in creation, when the forks job recorded it so. If that needs the forks job's outcome in the publish job, a job output is fine. Otherwise the reason gains one sentence naming both causes.
  4. FORK_WAIT_SECONDS stays as it is unless the tests show a reason to change it.

Acceptance criteria

  • Tests in tests/test_fork_pool.py: a fork that never appears within the deadline yields a warning row and exit 0; one that appears but is not the target's fork fails as today; a refused request fails as today.
  • uv run python -B -m unittest discover -s tests passes.
  • prek run --files <changed files> and the aislop gate report no findings.

Depends on

#204, which adds scripts/fork_pool.py.

Out of scope

  • Retrying a publish whose fork is missing.

Activity

  1. lf-releng-code-monkey-bot commented on Nov 23, 2026

    @lf-releng-code-monkey-bot
    Contributor

    🐒 An AI agent has proposed a change for this issue: pull request #236 (head 5626de7). The Copilot review of it has findings (1 unresolved review thread; assessment: changes recommended). Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.

  2. lf-releng-code-monkey-bot commented on Nov 23, 2026

    @lf-releng-code-monkey-bot
    Contributor

    🐒 Round 1: an AI agent revised pull request #236 (head d1d0acf). Round 1: fixed Copilot's one finding. is_absent() accepts 410 as well as 404, so a 410 while polling became a requested; not yet visible warning. await_fork in scripts/fork_pool.py now polls only on 404. A 410 fails the target at once, a test covers it next to the 500 case, and docs/DESIGN.md says the same. I amended the fix commit (the tip) and left the tests commit unchanged. No rebase: the PR is mergeable and no maintainer asked for one. Tests pass at both commits, and prek passes over the changed files. No findings are disputed and none remain.. The Copilot review of it has findings (1 unresolved review thread; assessment: changes recommended). Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.

  3. lf-releng-code-monkey-bot commented on Nov 23, 2026

    @lf-releng-code-monkey-bot
    Contributor

    🐒 Round 2: an AI agent revised pull request #236 (head 0b673b0). Round 2: fixed Copilot's one finding. A fork that was only renamed, with no fork request, could time out as requested; not yet visible and exit 0. Pending in scripts/fork_pool.py now records whether a fork request was accepted. finish() fails a rename-only fork that is still absent at the deadline. A regression test covers a successful rename followed by persistent 404s, and docs/DESIGN.md is updated to match. I amended the fix commit (the tip) and left the tests commit unchanged. No rebase: the pull request is mergeable and no maintainer asked for one. The tests (1740, OK), prek over the changed files and gitlint pass. I dispute no findings, and none remain.. The Copilot review of it is clean. An antagonistic review was requested from the review bot.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions