/paperpush:paperpush-portal-debugfrom paperpush
Debug stalled paperpush submit runs by driving a live browser past failing portal steps, logging required Playwright runner changes, and adding regression tests. Never sends the submission.
Ships in paperpush. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
paperpush submitA stall almost always means the portal and the runner
(paperpush/venues/<portal>/<slug>.py) disagree: a renamed button, a new
question, a slow upload, a moved iframe. Your job has two parts: get the live
run through to the review page, and record each change the script needs
so the next run does not stall at the same step.
Read DEVELOPMENT.md ("Debugging", "Recovering a run that gets stuck") and
the recovery part of AGENTS.md first.
javascript_tool, or any other route to get around the
recovery guardrails.login() bug:
after you fix it, have the user sign in again through the paperpush-login
skill (a sign-in page in their browser), or by running paperpush login <slug> in a separate terminal (not with ! in this session: that gets no
keyboard input, so the password prompt fails).python -c "import paperpush, os; print(os.path.dirname(paperpush.__file__))". Edit runner code only when that
path is inside this git checkout (an editable install). For a pip install,
fix only the live page, and hand the changes to the user as a recovery
report.Handed a run that is already paused (from paperpush-submit, with a
pid): do not start a new one. Call submit_status(pid) to read
recovery.paused and go straight to step 2. Once submit_status reports
state ready_for_review, stop polling and leave it to the author: they
review and send it themselves (the process keeps running to hold the browser
open until submit_close).
Find the .sub, the venue, and where the run stopped (the user's output, or
the last step(...) label in the runner). Read the runner around that step
before you open anything.
With the paperpush MCP tools (preferred): run
submit(subfile=<abs>, recover=True), then poll submit_status(pid) until
recovery.paused appears. It reports the step, the failed action, the
error, and any earlier_fix.
From the shell:
paperpush submit <abs .sub> --recover agent --recover-dir <scratch>/recover --cdp-port 0
Or use --recover by-hand so the user can fix the page in the terminal, or
--debug to step through in the Playwright Inspector. Start one run at a
time, and resume it rather than restarting from the beginning.
submit_page(pid): get the accessibility snapshot and a screenshot. Read
both, and compare the controls you see with what the runner's selector
expected.submit_act(pid, action, target, value): do the smallest action that
leaves the page as the failed step should have left it. Target controls by
role and name where you can ({"role": "button", "name": "Next"}).submit_resume(pid, "resolved" | "retry", note). In note, give the old
selector or behavior, the new one, and what you did. The note goes into
recoveries.jsonl and is how the fix gets into the runner.Repeat for each pause until submit_status reports state
ready_for_review (the wizard reached the review page). For a
long-running fix (a PDF build, a slow upload), use bounded waits, tell the user
what you are waiting for, and stop after the wait limit instead of
retrying forever. If MCP is not available, attach to the CDP endpoint with
playwright-cli attach --cdp=<url> (or Playwright connect_over_cdp) only to
look and to do the same small actions; the boundary above still holds.
While you work, keep <scratch>/runner_changes.md up to date, one entry per
fix:
## <step label>: <one-line symptom>
- runner: paperpush/venues/<portal>/<slug>.py:<line> (<function / constant>)
- failed: <action + selector the script used> -> <error>
- live page: <what the control is now: role, name, frame, timing>
- live fix: <submit_act calls that worked>
- script change: <exact replacement code, e.g. NEXT_BUTTON = "Continue">
- test: <regression test that pins it, or "none: why">
This log is required even when you cannot edit the code. It is what you hand over.
with unrecovered():. Keep each upload click and
its file chooser in one page.attempt(...).tests/test_<slug>.py, on a Mock page as in
tests/test_nature_machine_intelligence.py. If a new portal question
needs a value, add the field through a venue file (paperpush add-venue --template --from <slug>), and add it to the sample in
tests/sample_subfiles.json.pytest tests/test_<slug>.py tests/test_recovery_coverage.py tests/test_venue_interface.py -q, then rerun the live path once to the
review page without recovery (paperpush submit <sub> or
pytest tests/test_submit.py --run-portal -s --venue <slug>). The fix is
verified only if this run gets through without a pause.On a pip install, skip this step. Once the author is done, call
recovery_report(pid) (CLI: paperpush recovery-report <recover dir>), show
them the redacted draft and the change log, and give them the issue_url so
they can file it themselves.
When the author says they are finished with the browser, call
submit_close(pid). Then report briefly:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub pachterlab/paperpush --plugin paperpush12 skills in this plugin
/paperpush-add-venueGive a venue full `paperpush submit` support: a Venue class with Playwright login() and submit() methods, the portal's submission fields in submission_forms.json, a sample .sub with ground-truth documents plus unit tests, and a live run through the portal that stops before the final submit. For a venue that already has a runner, run its existing tests (offline and live), fix what breaks, and write any tests that are missing. Triggers: "add <venue> to paperpush", "support submitting to <journal>", "write the runner for <venue>", "fix <venue>'s submit", "<venue>'s tests are failing"./paperpush-add-venue-validateRead a venue's author-guidelines and submission-instructions pages and record them in paperpush: the manuscript rules in manuscript_requirements.json and the basic submission fields in submission_forms.json, through a venue file and `paperpush add-venue`. Given a venue paperpush already has, re-read its guideline pages and update what changed. The guidelines can come from the venue's web pages (fetched with Playwright) or from guideline files the user provides (.txt, .md, .html, .pdf, .docx). No submit runner is written (that is paperpush-add-venue). A temporary mode writes the entry to a draft data directory instead (no clone needed), for validating against a venue paperpush does not support yet. Ends by suggesting a pull request for a new venue. Triggers: "add <venue>'s guidelines to paperpush", "make <venue> validate-only in paperpush", "re-check <venue>'s author guidelines", "update <venue>'s word limits", "fill in this venue file", "add <venue> to paperpush from these guideline files"./paperpush-autofillFill a paperpush .sub submission file from a directory of manuscript files. Reads the manuscript, title page, figures, and supplements, extracts the submission fields, and writes them into the .sub via the deterministic autofill core. Use when the user wants to auto-populate a venue submission from their files. Also updates an already-filled .sub after the manuscript changes, reusing the paths it records and keeping hand edits. Triggers: "autofill my sub", "fill the biorxiv sub from this folder", "populate my submission from this manuscript directory", "update my sub, the manuscript changed", "re-autofill", "refresh the sub from the new draft"./paperpush-fixFix what `paperpush validate` flags in a .sub's files, then validate again, for up to three rounds, until only the issues the author has to decide or fix remain. Backs up every file first, finds the editable source behind each file (the .tex or .docx behind a PDF), makes the mechanical fixes and the small trims (an abstract a few words over its limit), rebuilds the PDF, applies arxiv_latex_cleaner to LaTeX source after reviewing its output, and reports separately what it fixed, what needs the author's decision (a manuscript thousands of words over its limit), and what it cannot fix. Never ticks a confirmation or invents content. Triggers: "fix the validate errors", "fix what validate found", "make my sub pass validation", "clean up the validation warnings", "clean my LaTeX source", "paperpush-fix"./paperpush-loginSign the author in to a venue's submission system so paperpush can submit for them, without the password ever passing through the chat: starts `paperpush login <venue> --browser`, which opens a one-time sign-in page on this computer where the author types their credentials, checks them against the venue, and stores them in the OS keyring. Also reports, re-checks, or removes a stored login. Called by paperpush-submit and paperpush-prepare-submission when a login is missing. Triggers: "log me in to <venue>", "store my <venue> login", "sign in to <venue> for paperpush", "am I logged in to <venue>", "check my <venue> login still works", "log me out of <venue>", "switch my <venue> account", "paperpush-login"./paperpush-pick-venueSuggest where to submit a manuscript. Reads the manuscript yourself to choose its subjects, runs `paperpush pick-venue` (journals and conferences that publish similar work, from OpenAlex, with conference ranks, deadlines, and archival status, plus a ranking of the venues paperpush supports), then checks each candidate against the author's constraints (open access, APC budget, preprint policy, venues already tried) and, for supported venues, against the venue's manuscript rules (word, figure, and reference limits, article types). Reports a short list with the reasons for each, the citation metrics labelled for what they are, and which venues paperpush can submit to, then hands the chosen venue to paperpush-prepare-submission. Triggers: "where should I submit this paper", "pick a journal for my manuscript", "suggest venues for /path/to/paper", "which journals fit this manuscript", "which conference should I submit to", "paperpush-pick-venue".Other plugins' skills for the same job