Fix software-garden PR ticket metadata
Summary
- carry Cloud's normalized
identifierandurlfields into generated software-factory issue types - derive a whitespace-normalized, Unicode-safe bounded PR title from the ticket title
- append one deterministic provider reference (
Fixes #<number>for GitHub), then fail closed on bad final metadata before push or PR/MR creation - require local GitHub kits to collect the real issue number while keeping Markdown and non-GitHub runs number-free
- cover generated source, hosted/local opening paths, body deduplication, and refusal cases
Verification
cd web && ./node_modules/.bin/tsc --noEmit— passedcd web && ./node_modules/.bin/vitest run -t '^(?!.*runs the resolved default end to end).*$' --reporter=dot— 20 files passed; 211 tests passed, 1 intentionally skippedcd web && ./node_modules/.bin/vitest run lib/test/flow-local.test.ts --reporter=dot— 38 tests passed
One pre-existing shell-suite case was run separately and remains an environment baseline failure: FLOW_CHECK_RUN_COMMAND > runs the resolved default end to end, and still fails a failing suite performs temporary package installs and took about 81 seconds while retaining a fixed 5-second Vitest timeout. It reproduces alone and does not exercise this change.
No Cloud repository change is needed: the generated contract now exposes the already-normalized metadata described by FlowIssue.
[!NOTE]
Medium Risk
Changes the publish gate (title, GitHub linking, push/PR ordering) for all generated software-factory workflows; behavior is heavily tested but mistakes could block PR creation or mis-link issues.
Overview
Software factory flows now derive pull request titles from the ticket (whitespace-normalized, capped at 240 Unicode code points) instead of the generic "Software factory change", and stop before any agent work when the title is empty/placeholder or a GitHub ticket lacks a normalized #<number> identifier.
Generated flows add identifier and url on Issue, build a deterministic closing line (Fixes #… on GitHub, Closes #… on GitLab when applicable, otherwise Ticket: …), append it once to .relayflow/pr-body.md, then run a fail-closed shell validation immediately before push/gh pr create. Invalid metadata ends the run with needs_human without opening a PR (push is deferred until validation passes on the happy path).
Local GitHub kits prefill issue.identifier as empty, extend relay-preflight to require #<number> (prompt on a TTY, hard fail otherwise), and only prompt for title/body when the placeholder body is still present.
Reviewed by Cursor Bugbot for commit 0e7ccbfb7433885eab6f3d53b0f6471e425cdb2c. Bugbot is set up for automated code reviews on this repo. Configure here.