Use the approved plan title as the agent-team apply PR title #74
No reviewers
Labels
No labels
app
bug
ci
compliance
content
dependencies
docs
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
infra
invalid
javascript
needs-triage
python
question
tests
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: adam/orchestrator#74
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/agent-team-conventional-pr-title"
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?
Summary
The agent-team apply pipeline opened draft PRs titled
agent-apply: <task_id> (diff <hash>)with a flat body — neither within Sea Haven PR conventions. That format was deliberate CWE-94 hardening (only sanitized tokens, never model free-text). This threads the approved plan's title through dispatch as an optionalpr_titleworkflow_dispatchinput, sanitized box-side and re-validated in the workflow, so the bot's PRs read conventionally while staying injection-safe. Provenance (task id, diff hash, head) moves to the PR body.Validation
python -m pytest -q→ 1537 passed;ruff check/ruff format --checkclean; workflow YAML parses.workflow_dispatchevent-shape change): no BLOCK. FIX items addressed —grep -Pportability andDispatchInputsinstantiation audit (only one site; optional default covers the rest)./sh-security-review(mandatory — touches.github/workflows/**+ untrusted-input): injection detector found nothing (title is env-indirected, passed as quoted argv togh, never shell-interpolated). 3 low/info logic findings; F1 (C1-range gap) and F3 (wc -mbyte vs char count) fixed by making the workflow re-validation byte-for-byte identical tosanitize_pr_titlevia a singlepython3check.How it stays safe
sanitize_pr_title(box): strip C0/C1/DEL control chars, collapse whitespace, 70-char cap, capitalize. Empty/unsafe →"".agent-apply: <task_id>title if empty/unsafe.pr_titleis consumed only asgh pr create --titleargv data — never shell-interpolated; never in arun:${{ }}expansion.default: ""), so existing dispatchers (e.g. the fixer) keep working with the fallback title.Notes — deploy ordering (important)
This change couples the box dispatcher to the workflow on
main.workflow_dispatchvalidates inputs against the workflow definition on the dispatched ref (main), so the workflow YAML must be onmainBEFORE the box ships the dispatcher that sendspr_title— otherwise every dispatch returns HTTP 422. For this change that means merge this PR first, then/sh-deploy-r720(the exception to the usual deploy-then-merge). Fail-closed (422 = no run), but it would stall dispatch.Closing: agent-team is being decommissioned (superseded by Open SWE). See removal PR.