Skip to content

fix: repair queue automation — filing gate, push retry, silent failures #75

Description

@Jammy2211

Overview

The dashboard's per-paper queue buttons file issues that are never acted on: #69, #71 and #72 have sat open since 2026-08-28, all three picked up by automation and all three runs failed. Three distinct faults: queue_filing.yml's gate has been environmentally broken since 2026-08-24 (missing PyAutoBrain sibling checkout), queue_actions.yml's push retry discards the commit on a rebase conflict, and queue_actions.yml never reports its own failures, so the issues look "never swept" rather than "failed".

Mind prompt: PyAutoMind draft/bug/pyautomemory/repair_queue_automation_filing_gate.md (batch 2026-08-31-pm, member memory-queue-filing-gate, --auto; effective autonomy supervised = min(header safe, bug cap)).

Plan

Detailed implementation plan

Affected Repositories

  • pyautomemory (primary, sole)

Branch Survey

Repository Current Branch Dirty?
./pyautomemory main (0d310cd) clean

Suggested branch: feature/memory-queue-filing-gate

Implementation Steps

  1. .github/workflows/queue_filing.yml — after the repo's own actions/checkout@v4 and before setup-python/claude-code-action, add the sibling checkout exactly as validate.yml carries it:
    actions/checkout@v4 with repository: PyAutoLabs/PyAutoBrain, path: PyAutoBrain. Commit dcd1e2c moved the board theme into PyAutoBrain/board/_theme.py and added this step to validate.yml and knowledge_board.yml but not here; every run since 2026-08-24 fails the Gate the filing (validate + tests) step with RuntimeError: the shared board theme (PyAutoBrain/board/_theme.py) is not in reach (30 test_board.py errors — reproduced locally). It must precede the claude-code-action step because Claude's in-prompt step 5 runs the same pytest and is told to fix its own mistakes until green — an environmental failure it cannot fix.

  2. .github/workflows/queue_actions.yml, Apply the action step — factor the label→script mapping so the case sets action and cmd (e.g. cmd="scripts/inbox_actions.py add"), run status=$(python $cmd --body-file /tmp/issue_body.txt) once after the case, and emit cmd as a step output alongside action/status/changed.

  3. queue_actions.yml, Commit + push step — replace the git pull --rebase || exit 1 retry with a rebuild retry: on push rejection, git fetch origin main && git reset --hard origin/main, re-run python $CMD --body-file /tmp/issue_body.txt (the scripts are idempotent: already-there/already-gone/already-done statuses), exit 0 if the tree is clean (a sibling already landed the change), else re-commit and retry — 3 attempts. On queue add: A Population Study for Searching Supermassive Binary Black Holes in Active Galactic Nuclei: Continuum Spectral Features and Periodic Variabilities #69 (run 33180301104) the old shape hit a content conflict in arxiv-interests.md against a sibling queue commit and || exit 1 discarded the commit entirely.

  4. queue_actions.yml — append a Report failure on the issue step with if: failure() mirroring queue_filing.yml's, linking the run URL, so the issue is never silently abandoned (Close or report on the issue is implicitly if: success() and stays that way).

  5. Note on the concurrency: queue-actions group (prompt's open question): the group serialises at most one running + one pending run; runs enqueued nearly simultaneously can race the group check, and a third arrival cancels the pending one. The fix does not rely on serialisation — the retry is conflict-proof regardless, which is the prompt's requirement.

Key Files

  • .github/workflows/queue_filing.yml — filing workflow (fix 1)
  • .github/workflows/queue_actions.yml — mechanical queue actions (fixes 2–4)
  • .github/workflows/validate.yml — the reference sibling-checkout step (unchanged)

Testing

Original Prompt

Click to expand starting prompt

Repair the PyAutoMemory queue automation: filing gate, push retry, silent failures

Type: bug
Target: PyAutoMemory
Repos:

The dashboard's per-paper buttons file issues that are never acted on. Three
(#69, #71, #72) have sat open since 2026-08-28. All three were picked up — all
three workflow runs failed. Three distinct faults, each confirmed from the runs.

1. queue_filing.yml has been hard-broken since 2026-08-24

The Gate the filing (validate + tests) step runs python -m pytest tests/ -q
but never checks PyAutoBrain out beside the repo. Commit dcd1e2c ("The Memory
board joins the family look") moved the board theme into
PyAutoBrain/board/_theme.py and added the sibling checkout to validate.yml
and knowledge_board.yml — but not to queue_filing.yml. Every run since then
fails with 30 tests/test_board.py errors:

RuntimeError: the shared board theme (PyAutoBrain/board/_theme.py) is not in
reach — check PyAutoBrain out beside this repo or set PYAUTO_BRAIN

Runs 33201706952 (#71) and 33202478094 (#72) both died there after Claude had
already correctly filed the BibTeX entry and the wiki sources stub, so the
filing work is thrown away on every attempt. make validate passes; only the
pytest half of the gate fails. The last filing that ever worked was #50/PR#53 on
2026-08-21, three days before the regression.

Fix: add the actions/checkout@v4 PyAutoBrain step (repository: PyAutoLabs/PyAutoBrain, path: PyAutoBrain) before the gate, matching
validate.yml. Claude's own in-prompt step 5 tells it to run the same pytest and
"fix your own filing mistakes until both are green" — an environmental failure it
cannot fix, so the checkout must land before the claude-code-action step, not
just before the gate.

2. queue_actions.yml push retry cannot survive a conflicting concurrent commit

for attempt in 1 2 3; do
  if git push; then exit 0; fi
  git pull --rebase origin main || exit 1
done

On #69 (interests-add, run 33180301104) the push was rejected, the rebase hit a
content conflict in arxiv-interests.md against a sibling queue action, and the
|| exit 1 discarded the commit entirely. Rebasing a stale commit is the wrong
shape here: the retry should fetch, reset --hard origin/main, re-run the action
script and re-commit. That is naturally idempotent given the
already-there / already-gone / already-done statuses the scripts already
return. Worth checking why the concurrency: queue-actions group did not
serialise the two runs (#68's job committed at 14:28:15 while #69's checkout
still pointed at 3c00470) — but the retry must be conflict-proof regardless.

3. queue_actions.yml never reports its own failures

Close or report on the issue is implicitly if: success(), so when the push
step dies the issue gets no comment at all. #69 has sat open and completely
silent — which is why the whole thing reads as "never swept up" rather than
"failed". queue_filing.yml already carries an if: failure() comment step;
queue_actions.yml needs the same.

Close-out

Re-drive the three stuck issues (#69, #71, #72) by re-applying their labels, and
confirm each lands: #71/#72 open a filing PR, #69 moves its paper into the
reading queue and closes.

Witness: after the fix, re-applying queue-intake to #71 produces a green
queue_filing.yml run that opens a filing PR — gh run list --workflow queue_filing.yml shows success, where every run since 2026-08-24 shows
failure.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions