{"success":true,"name":"brimind-rail-rescue","description":"A browser rail (Suno, Gemini, any web.mjs service) stopped on a screen it does not know — a new pop-up, a captcha, a field that moved, \"Create\" spinning with no result — or exited 4 \"bloqué … onglet GARDÉ ouvert\". Also when you are Dali and a letter \"rail <service> stuck at …\" arrives. Use it before you give up on the media, before you publish without music, and before you say \"the rail is broken\"","category":"unitary","path":"unitary/brimind-rail-rescue/SKILL.md","file":"SKILL.md","content":"---\nname: brimind-rail-rescue\ndescription: A browser rail (Suno, Gemini, any web.mjs service) stopped on a screen it does not know — a new pop-up, a captcha, a field that moved, \"Create\" spinning with no result — or exited 4 \"bloqué … onglet GARDÉ ouvert\". Also when you are Dali and a letter \"rail <service> stuck at …\" arrives. Use it before you give up on the media, before you publish without music, and before you say \"the rail is broken\".\n---\n> Imported from [PRIVATE_HOST] `~/unitary/agents/skills/brimind-rail-rescue`. Paths are relative to `[PRIVATE_HOST]:[PATH]`; run commands there via `ssh [PRIVATE_HOST] 'cd ~/unitary && ...'`. Owner send rules from skill i7-remote-ops still apply.\n\n\n# Rail rescue: the job is finished, then the rail learns the new screen\n\nOwner, 2026-10-09: \"artisto can ask dali to complete the rail or the process it started,\nif he sees something new he doesn't know, like a popup added to the process. Dali completes\nthe process and fixes/adapts the rail.\"\n\nWhy it exists: early October, Suno put a Cloudflare check behind \"Create\". The rail closed\nits tab right after the click, so 6 runs (06 to 08/10) made no song, and Artisto published\nsilent posts. Today, a screen the rail does not know leaves the tab open, half done, and\nDali finishes the work in that tab.\n\n## First, rule out the dispatcher before blaming a popup\n\n\"X is always stuck\" can mean the per-minute systemd **user timer** that drives the whole\nrail (e.g. `brimind-social-due.timer` for `social/social.mjs`) is disabled or dead, not\nthat a new screen appeared. A disabled timer looks exactly like a stuck rail: nothing\nfires scheduled jobs, and the self-heal logic that resets a crashed \"publishing\"/\"running\"\nstatus back to ready only runs when the timer ticks — so a single stale job can sit for\nhours with its tab open, which is the same symptom. Before reading a screenshot or editing\n`SERVICES.<service>`, check:\n```\nsystemctl --user status <service>-due.timer --no-pager   # Active: inactive (dead) = the real bug\nsystemctl --user is-enabled <service>-due.timer\n```\nIf it is disabled/stopped, `systemctl --user enable --now <service>-due.timer` fixes the\nactual cause; re-check the stuck job a minute later before touching any driver code — it\noften self-heals once the timer ticks again.\n\n## You are the asker (Artisto, or any seat)\n\n1. `web.mjs ask …` exited **4** = parked. The rail has already done three things:\n   - written the ticket (`agents/method/data/rescue/<id>.json`)\n   - written Dali an **urgent** letter\n   - kept the tab open\n   Do not run the rail again on the same service while the ticket is open, because two\n   jobs on the same tab trip over each other.\n2. Did the letter fail? The output says \"lettre à Dali NON écrite\". Then run\n   `node agents/method/rescue.mjs ask <id>`.\n3. Wait for Dali's letter \"your job is finished\". It carries the file paths. Meanwhile,\n   work on the rest of the post (images, caption). Never publish \"without music\"\n   because of a ticket that is still open.\n4. You saw the strange screen yourself, but the rail exited 2 (old path,\n   `--no-rescue`)? Then open the ticket by hand: `rescue.mjs ask` needs a ticket, so\n   write Dali with `agents/mail.mjs send --to developer --urgent`, adding the\n   screenshot and the exact command.\n\n## You are Dali (the letter \"rail <service> stuck at …\")\n\n```\nnode agents/method/rescue.mjs look  <id>                    # screenshot + what blocks + clickable controls\nnode agents/method/rescue.mjs click <id> --text \"Save\"      # or --sel \"<css>\" or --xy 640,400\nnode agents/method/rescue.mjs look  <id>                    # check it went through\nnode agents/method/rescue.mjs finish <id> --fix \"browser-opener/examples/site-ask.js: closes the 'Save to workspace' pop-up\"\n```\n\n- `look` before anything else. Read the screenshot. Never click blind.\n- **Finish the job first**: the asker is waiting for a file, not a report. On Suno, once\n  the pop-up is gone, the parked form is still filled in. Click \"Create\" again if the\n  request never went out. To check, `look` shows whether a new song is in the library.\n- `finish` collects the result (Suno: new songs since the ticket, then MP3 download),\n  closes the tab and writes the asker the file paths. Without `--fix`, it refuses:\n  finishing is half the job.\n- **Then adapt the rail** so the next run passes on its own:\n  - a pop-up to close goes in a `before`/`fill` step of `SERVICES.<service>`\n    (`agents/method/web.mjs`, `{ clickText: [...], optional: true }`)\n  - a request signal goes in `custom.confirm`\n  - a captcha or frame goes in `browser-opener/lib/submit-confirm.js`\n  - a moved field goes in its selector.\n\n  Then run `node --test agents/method/test/rescue.test.mjs agents/method/test/web.test.mjs`\n  and `cd browser-opener && npm test`. Add the screen you met to the \"pièges\" list in\n  the service's skill (`brimind-suno-music` for Suno).\n- Tab gone (`look` says \"the parked tab is gone\")? The ticket's `resume` holds what is\n  needed to replay it (Suno: lyrics, style, takes). Run the rail again by hand, then\n  `rescue.mjs close <id> --why \"…\"` or `finish`.\n- Truly impossible (paid account, the owner must click)? Run\n  `rescue.mjs close <id> --why \"…\"`. It tells the asker. If the owner must act, use the\n  owner ladder (one decision, one command).\n\n## What the rail checks by itself (no ticket)\n\n- **Suno**: after \"Create\" it waits for `POST …/api/generate/` → 2xx and reads the\n  takes' ids from it. A visible captcha gets one click every 12 s. HTTP 4xx = a named\n  refusal (exit 1), not a parked tab.\n- Open tickets: `node agents/method/rescue.mjs list`.\n","linked_files":[],"origin":"brimind","owner_id":null,"source":"router"}