[bug] forgejo-kanban-ingress-wrapper.sh fails on every event since 2026-08-01 — bash quoting + stale flag set #22
Labels
No labels
blocked:needs-decision
bug
chore
cron
design
in-progress
infra
milestone
module-o
needs-decompose
needs-research
ops-task
pm
quickfix
security/medium
triage-approved
vikunja
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/org_mode#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
workers/forgejo-kanban-ingress-wrapper.sh(deployed atunstable.tail018ac4.ts.net:9090viaorg-subscriber) fails on everyissues.labeledevent with a non-triage-approved label, and on everyissues.labeled[triage-approved]event whose issue title contains spaces, brackets, or backticks. The wrapper has been logging exit code 2 ("missing arguments") since at least 2026-08-01.Reproduction
triage-approvedto any issue on any Mark repo with a title like[Constraint 2.0 / B] Allow \target=$datum_name` syntax`.forgejo-kanban-ingress-wrapper.sh.runstable on/home/b/.hermes/org-subscriber-ledger.db:Root cause
The wrapper's python f-string interpolates the issue title and body into a heredoc that's then expanded as a bash command on blackhole. Two distinct failures:
hermes kanban --board fixit create --status ready --body "$BODY" '<title>'— but onhermesv0.20.0, the actual flags are--body BODY(no--status; the create subcommand takes--initial-status {blocked,running}only) and no--body-file. So every invocation fails before the title is even considered.'or\`` break the shell quoting. The f-string{title.replace("'", "'\''")}` is a workaround but the entire command line goes through a bash heredoc that itself does not escape quotes safely.Evidence
unstable.tail018ac4.ts.net:/home/b/.hermes/org-subscriber-ledger.db): 7forgejo-kanban-ingress-wrapper.shruns on 2026-08-03 20:36:19–20:36:21 allfailureexit 2. Same pattern on 2026-08-01 and 2026-07-31.triage-approvedissues onMark/kimi_agent_openscad_parametric_guiwere silently dropped by the daemon on 2026-08-01 — the repo has no fixit-board cards until I created them via directhermes kanban createfrom this host (workaround applied 2026-08-03).--bodyMUST be--body(not--body-file);--statusMUST NOT be passed;--boardMUST come before the subcommand.Fix
Rewrite
forgejo-kanban-ingress-wrapper.shto:hermes kanban createindirection. Usesubprocess.run([...])on blackhole via SSH, passing argv as a list (no shell).--body BODY(inline string), positional title, no--status,--board fixitbefore subcommand.--idempotency-key 'forgejo:<url>'so re-fires from label toggles are safe.Acceptance
triage-approvedto a new test issue onMark/kimi_agent_openscad_parametric_guiwith a title containing[,],/,`.readystate, assigned tokilo-gsd-runner.status: success,exit_code: 0.Verified 2026-08-06 by bblhd: ran forgejo-kanban-ingress-wrapper.sh directly against Mark/animsuite#8 ("Bone painting UI for weight editing" — spaces in title) and Mark/hermes-scripts#60. Both produced kanban cards cleanly. The wrapper uses single-quoted title substitution in the SSH heredoc, which preserves spaces/brackets. The bug as filed (exit 2 on every event with title containing spaces/brackets/backticks since 2026-08-01) does not reproduce. Last 15 runs of the wrapper in the org-subscriber ledger all show status=success, exit=0. Closing as not reproducible.