Repository navigation
fix: repair queue automation — filing gate, push retry, silent failures #75
Description
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
- Add the PyAutoBrain sibling checkout to
queue_filing.yml— before theclaude-code-actionstep, matchingvalidate.yml— so both the gate's pytest and Claude's own in-prompt gate (step 5) can import the shared board theme instead of dying with 30tests/test_board.pyerrors. - Make
queue_actions.yml's push retry conflict-proof: on a rejected push, fetch and hard-reset to the movedorigin/main, re-run the (idempotent) action script, re-commit and push again — instead of rebasing a stale commit and discarding it on conflict. - Add an
if: failure()report step toqueue_actions.yml(same shape asqueue_filing.yml's) so a failed run comments on the issue instead of leaving it silently open. - Close-out (post-merge, human-gated): re-apply the labels on queue add: A Population Study for Searching Supermassive Binary Black Holes in Active Galactic Nuclei: Continuum Spectral Features and Periodic Variabilities #69, queue intake: Strong Lensing Cosmology with Population-level Calibrated Neural Ratio Estimation #71, queue intake: Mapping the Information Geometry of an Unresolved Dark Matter Population using a Differentiable Strong Lensing Simulator #72 and confirm each lands — the prompt's Witness is a green
queue_filing.ymlrun on queue intake: Strong Lensing Cosmology with Population-level Calibrated Neural Ratio Estimation #71 that opens a filing PR.
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
-
.github/workflows/queue_filing.yml— after the repo's ownactions/checkout@v4and beforesetup-python/claude-code-action, add the sibling checkout exactly asvalidate.ymlcarries it:
actions/checkout@v4withrepository: PyAutoLabs/PyAutoBrain,path: PyAutoBrain. Commit dcd1e2c moved the board theme intoPyAutoBrain/board/_theme.pyand added this step tovalidate.ymlandknowledge_board.ymlbut not here; every run since 2026-08-24 fails theGate the filing (validate + tests)step withRuntimeError: 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. -
.github/workflows/queue_actions.yml,Apply the actionstep — factor the label→script mapping so the case setsactionandcmd(e.g.cmd="scripts/inbox_actions.py add"), runstatus=$(python $cmd --body-file /tmp/issue_body.txt)once after the case, and emitcmdas a step output alongsideaction/status/changed. -
queue_actions.yml,Commit + pushstep — replace thegit pull --rebase || exit 1retry with a rebuild retry: on push rejection,git fetch origin main && git reset --hard origin/main, re-runpython $CMD --body-file /tmp/issue_body.txt(the scripts are idempotent:already-there/already-gone/already-donestatuses), 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 inarxiv-interests.mdagainst a sibling queue commit and|| exit 1discarded the commit entirely. -
queue_actions.yml— append aReport failure on the issuestep withif: failure()mirroringqueue_filing.yml's, linking the run URL, so the issue is never silently abandoned (Close or report on the issueis implicitlyif: success()and stays that way). -
Note on the
concurrency: queue-actionsgroup (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
make validate+python -m pytest tests/ -qgreen locally (169 passed with the Brain in reach; without it, the 30test_board.pyfailures reproduce the broken CI gate).- YAML-parse both workflow files.
- Witness (post-merge): re-apply
queue-intaketo queue intake: Strong Lensing Cosmology with Population-level Calibrated Neural Ratio Estimation #71 →queue_filing.ymlrun showssuccessand opens a filing PR, where every run since 2026-08-24 showsfailure. Then re-drive queue intake: Mapping the Information Geometry of an Unresolved Dark Matter Population using a Differentiable Strong Lensing Simulator #72 (filing PR) and queue add: A Population Study for Searching Supermassive Binary Black Holes in Active Galactic Nuclei: Continuum Spectral Features and Periodic Variabilities #69 (paper moved to the reading queue, issue closed).
Original Prompt
Click to expand starting prompt
Repair the PyAutoMemory queue automation: filing gate, push retry, silent failures
Type: bug
Target: PyAutoMemory
Repos:
- PyAutoMemory
Difficulty: medium
Autonomy: safe
Priority: normal
Status: formalised
Consequence: notify
Witness: after the fix, re-applyingqueue-intaketo queue intake: Strong Lensing Cosmology with Population-level Calibrated Neural Ratio Estimation #71 produces a greenqueue_filing.ymlrun that opens a filing PR —gh run list --workflow queue_filing.ymlshowssuccess, where every run since 2026-08-24 showsfailure.
Review-minutes: 0
Unattended: ready
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