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
The one failing run in the monitored window (29386746375, 2026-07-15 03:31) failed on the
final git push to the rolling chore/readme-refresh branch of .github-private with a --force-with-leasestale-info rejection: the branch moved/was deleted out from under the
run (auto-merge of the previous refresh PR) during the ~5 min Claude generation window, staling
the lease taken at clone time. That run used the pre-retry single-push code β main already
carries a 3-attempt fetch --prune + retry loop, and its error text (... after 3 attempts / branch state) differs from the failing run's, confirming the failing run predates the fix.
I verified locally (git 2.54, same as CI) that the current retry loop recovers from both
the "branch moved" and "branch deleted" stale-info races (retry push exits 0 in both).
Scope
The reliability fix is already in main but has no regression test β the existing bats
only covers pure string helpers. Extract the push-retry into a testable function and add a
regression guard so the single-attempt bug cannot silently return.
Implementation Checklist
scripts/aw-readme-refresh.sh: extract the inline push-retry loop into push_branch_with_retry() (behavior-preserving); make attempts/sleep env-configurable
(PUSH_RETRY_ATTEMPTS, PUSH_RETRY_SLEEP_SEC) so tests run fast; call it from process_repo
.github/workflows/lint.yml: register the new bats file in the bats job list
Tests to Write
tests/test_readme_refresh_push.bats: against a local bare remote β
- clean first push succeeds
- stale-info race (branch MOVED mid-run) β recovers on retry
- stale-info race (branch DELETED mid-run) β recovers on retry
- persistent unreachable remote β returns non-zero after N attempts
Test Command
scripts/run-bats.sh tests/test_readme_refresh_push.bats tests/test_readme_refresh_helpers.bats and bash .dev-lead/scripts/dev-lead-lint.sh
The single failure in the monitored window β run 29386746375 β died on the final git push of the rolling chore/readme-refresh branch on .github-private with a --force-with-lease"stale info" rejection. The branch moved/was deleted out from under the run (auto-merge of the prior refresh PR) during the ~5 min Claude generation window, staling the lease taken at clone time.
That run used the pre-retry single-push code; main already carries a 3-attempt fetch --prune + retry loop (error text differs: ... after 3 attempts / branch state), so the reported failure is already fixed in main. I confirmed locally on git 2.54 (same as CI) that the current retry recovers from both the branch-MOVED and branch-DELETED stale-info races.
Gap closed here: the reliability fix had no regression test β the existing bats covered only pure string helpers. A future refactor could silently reintroduce the single-attempt bug. This change extracts the push-retry into a named, testable function and adds a regression guard.
Plan Execution
Extracted the inline push-retry loop into push_branch_with_retry() (behavior-preserving; PUSH_RETRY_ATTEMPTS/PUSH_RETRY_SLEEP_SEC env-overridable for fast tests)
1..22
ok 1 push_branch_with_retry: clean first push succeeds
ok 2 push_branch_with_retry: recovers from stale lease when branch MOVED mid-run
ok 3 push_branch_with_retry: recovers from stale lease when branch DELETED mid-run
ok 4 push_branch_with_retry: returns non-zero after exhausting attempts on a persistent failure
ok 5 extract_readme: captures body between markers
ok 6 extract_readme: returns empty when markers are absent
ok 7 extract_readme: ignores reasoning preamble and trailing commentary
ok 8 extract_readme: markers with trailing whitespace are recognised
ok 9 overlong_lines: returns empty when all lines fit within maxlen
ok 10 overlong_lines: reports the line number of an overlong prose line
ok 11 overlong_lines: reports multiple overlong line numbers as comma list
ok 12 overlong_lines: skips table rows (lines starting with |)
ok 13 overlong_lines: skips content inside fenced code blocks
ok 14 overlong_lines: counts prose lines outside code fence after fence closes
ok 15 valid_content: rejects empty content
ok 16 valid_content: rejects the literal string SKIP
ok 17 valid_content: accepts non-empty content for private-readme type (no H1 required)
ok 18 valid_content: rejects org-profile-public with no top-level heading
ok 19 valid_content: accepts org-profile-public with correct H1 first line
ok 20 valid_content: rejects github-repo-readme missing top-level heading
ok 21 valid_content: accepts github-repo-readme with H1 first line
ok 22 valid_content: accepts org-profile-member with any non-empty content
Files Changed
scripts/aw-readme-refresh.sh: extracted push_branch_with_retry(); added PUSH_RETRY_ATTEMPTS/PUSH_RETRY_SLEEP_SEC tunables; process_repo now calls the function
.github/workflows/lint.yml: registered the new bats file in the bats job
Notes
Behavior-preserving apart from one strict improvement: no pointless sleep after the final (failed) attempt. The workflow file readme-refresh.yml itself was not modified (documented repo-specific workflow per AGENTS.md). No test was skipped or weakened.
Activity
don-petry commentedon Jul 15, 2026
Dev-Lead Implementation Plan
Issue: #1265 β [Fleet Monitor] petry-projects/.github-private β .github/workflows/readme-refresh.yml
Root cause
The one failing run in the monitored window (
29386746375, 2026-07-15 03:31) failed on thefinal
git pushto the rollingchore/readme-refreshbranch of.github-privatewith a--force-with-leasestale-info rejection: the branch moved/was deleted out from under therun (auto-merge of the previous refresh PR) during the ~5 min Claude generation window, staling
the lease taken at clone time. That run used the pre-retry single-push code β
mainalreadycarries a 3-attempt
fetch --prune+ retry loop, and its error text (... after 3 attempts / branch state) differs from the failing run's, confirming the failing run predates the fix.I verified locally (git 2.54, same as CI) that the current retry loop recovers from both
the "branch moved" and "branch deleted" stale-info races (retry push exits 0 in both).
Scope
The reliability fix is already in
mainbut has no regression test β the existing batsonly covers pure string helpers. Extract the push-retry into a testable function and add a
regression guard so the single-attempt bug cannot silently return.
Implementation Checklist
scripts/aw-readme-refresh.sh: extract the inline push-retry loop intopush_branch_with_retry()(behavior-preserving); make attempts/sleep env-configurable(
PUSH_RETRY_ATTEMPTS,PUSH_RETRY_SLEEP_SEC) so tests run fast; call it fromprocess_repo.github/workflows/lint.yml: register the new bats file in thebatsjob listTests to Write
tests/test_readme_refresh_push.bats: against a local bare remote β- clean first push succeeds
- stale-info race (branch MOVED mid-run) β recovers on retry
- stale-info race (branch DELETED mid-run) β recovers on retry
- persistent unreachable remote β returns non-zero after N attempts
Test Command
scripts/run-bats.sh tests/test_readme_refresh_push.bats tests/test_readme_refresh_helpers.batsandbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jul 15, 2026
Dev-Lead: Implementation Complete
Root cause (diagnosed from the failing run)
The single failure in the monitored window β run
29386746375β died on the finalgit pushof the rollingchore/readme-refreshbranch on.github-privatewith a--force-with-lease"stale info" rejection. The branch moved/was deleted out from under the run (auto-merge of the prior refresh PR) during the ~5 min Claude generation window, staling the lease taken at clone time.That run used the pre-retry single-push code;
mainalready carries a 3-attemptfetch --prune+ retry loop (error text differs:... after 3 attempts / branch state), so the reported failure is already fixed inmain. I confirmed locally on git 2.54 (same as CI) that the current retry recovers from both the branch-MOVED and branch-DELETED stale-info races.Gap closed here: the reliability fix had no regression test β the existing bats covered only pure string helpers. A future refactor could silently reintroduce the single-attempt bug. This change extracts the push-retry into a named, testable function and adds a regression guard.
Plan Execution
push_branch_with_retry()(behavior-preserving;PUSH_RETRY_ATTEMPTS/PUSH_RETRY_SLEEP_SECenv-overridable for fast tests)process_repoto call ittests/test_readme_refresh_push.bats(git-backed regression tests)lint.yml.dev-lead/scripts/dev-lead-lint.shpasses; lint.yml YAML validatesTest Results
Files Changed
scripts/aw-readme-refresh.sh: extractedpush_branch_with_retry(); addedPUSH_RETRY_ATTEMPTS/PUSH_RETRY_SLEEP_SECtunables;process_reponow calls the functiontests/test_readme_refresh_push.bats: new β clean-push, branch-MOVED recovery, branch-DELETED recovery, persistent-failure returns non-zero.github/workflows/lint.yml: registered the new bats file in thebatsjobNotes
Behavior-preserving apart from one strict improvement: no pointless
sleepafter the final (failed) attempt. The workflow filereadme-refresh.ymlitself was not modified (documented repo-specific workflow per AGENTS.md). No test was skipped or weakened.feat: implement issue #1265 β [Fleet Monitor] petry-projects/.github-β¦