T-KECI-cross-repo-task-pr-fixture-tests
Status: planning/backlog · Impact: medium · Complexity: medium
Auto-generated from a /sdlc:task-work post-mortem. Review and promote to open/ready before
picking up.
/sdlc:spawn-task-pr (introduced by T-KD48-post-mortem-routes-cross-repo-tasks) ships with a
deterministic-marker output contract but no end-to-end test. The original task’s AC-3 (“a
post-mortem in a downstream consumer routes plugin-gap follow-ups to a PR against the sdlc plugin’s
repo”) deferred to a user spot-check because there’s no fixture consumer repo. Adding one would let
AC-3 graduate from deferred-user to auto for future regressions.
apps/sdlc/skills/spawn-task-pr/ has SKILL.md but no tests/ subdirectory. Other skills (e.g.
task-ensure-ready, entities-audit, task-close-out) carry Bun .test.ts suites under tests/
that exercise their contracts under fixture inputs. The skill-prose linter (gate skill-prose)
pins the output markers, but nothing exercises the full flow (resolve target → create worktree →
scaffold task → push → gh pr create).
Proposed
Section titled “Proposed”An apps/sdlc/skills/spawn-task-pr/tests/ directory carrying (a) a fixture target repo (committed
as a tarball or generated by a setup script) and (b) a Bun .test.ts suite that drives the skill
against the fixture and asserts the SPAWN-TASK-PR-DONE (with action=created|appended) /
SPAWN-TASK-PR-EXISTING / SPAWN-TASK-PR-REHEARSED / ERROR markers in their expected
scenarios. Fixture must not require live GitHub — the PR-creation step can be exercised via
--no-push (SPAWN-TASK-PR-REHEARSED marker) and via a mock for gh pr create.
Approach
Section titled “Approach”- Generate or commit a minimal fixture target repo (one with
docs/planning/tasks/already present). - Author
apps/sdlc/skills/spawn-task-pr/tests/spawn_task_pr.test.tsmodeled onapps/sdlc/skills/entities-audit/tests/run_evals.test.ts(per-case fixture dirs, expected exit code plus required output substrings). Cover at minimum: REHEARSED (happy path with--no-push), ERROR-missing-target, ERROR-dirty-target. - No
sdlc.yamlchange: the existingbun test apps/sdlcquality check auto-discovers the new suite.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/sdlc/skills/spawn-task-pr/tests/spawn_task_pr.test.ts | new | Bun eval suite |
apps/sdlc/skills/spawn-task-pr/tests/fixtures/ | new | fixture target repo |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
bun test apps/sdlc/skills/spawn-task-prexits 0 against the committed fixture. - AC-2: The suite covers at least the REHEARSED success path and the ERROR-dirty-target failure path without requiring live GitHub.
- AC-3: A fresh
/sdlc:task-workquality-check pass (bun test apps/sdlc) discovers and runs the new suite with nosdlc.yamlchange.
Out of scope
Section titled “Out of scope”- Live-GitHub fixtures (creating real throwaway PRs against a test repo). The point is to be runnable without network or auth.
- Migrating other skills’ tests to share fixtures.
Dependencies
Section titled “Dependencies”- T-KD48-post-mortem-routes-cross-repo-tasks — the skill under test ships there.
Discovery context
Section titled “Discovery context”Spawned by /sdlc:task-work post-mortem of T-KD48-post-mortem-routes-cross-repo-tasks on 2026-05-21.