Skip to content

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).

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.

  1. Generate or commit a minimal fixture target repo (one with docs/planning/tasks/ already present).
  2. Author apps/sdlc/skills/spawn-task-pr/tests/spawn_task_pr.test.ts modeled on apps/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.
  3. No sdlc.yaml change: the existing bun test apps/sdlc quality check auto-discovers the new suite.
LocationKindChange
apps/sdlc/skills/spawn-task-pr/tests/spawn_task_pr.test.tsnewBun eval suite
apps/sdlc/skills/spawn-task-pr/tests/fixtures/newfixture target repo
  • AC-1: bun test apps/sdlc/skills/spawn-task-pr exits 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-work quality-check pass (bun test apps/sdlc) discovers and runs the new suite with no sdlc.yaml change.
  • 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.

Spawned by /sdlc:task-work post-mortem of T-KD48-post-mortem-routes-cross-repo-tasks on 2026-05-21.


← Back to Tasks