Skip to content

T-REME-sdlc-p2-tests

State: closed/done · Impact: medium · Complexity: medium

T-A7PL, T-AD81 and T-XRFD each land their own module-level unit tests as part of their implementation. This task is the closing pass: verify the four cross-cutting behaviors the plan calls out explicitly as Phase 2 verification criteria actually exist and pass together, fill any gap left by the three implementation tasks, and confirm the whole phase’s test suite is green under local CI (quality run --trust and just ci).

LocationRole today
solutions/ontological/lib/config/workflows.test.tsworkflow resolution tests (from T-A7PL)
solutions/ontological/lib/services/session/launch.test.tsheadless session-record test (from T-AD81)
solutions/ontological/lib/services/orchestrator/ticks/*.test.tsdry-run planning + verdict-mapping tests (from T-XRFD)
  • The four Phase-2 verification criteria from docs/planning/notes/N-S4AJ-sdlc-0-8-plan.md (“Phase 2” bullet under Verification) each have a passing, clearly-named test:
    1. workflow resolution: default, override, append, prepend (T-A7PL).
    2. verdict → workflow mapping (T-XRFD’s prs/merges ticks): each of CLEAN, BEHIND, NEEDS-RESPONSE, CONFLICTS, CI-FAILED, MERGED, CLOSED, ERROR maps to the correct action (including “no action” for CLEAN/BEHIND/CLOSED/ERROR where that’s correct).
    3. each loop’s --dry-run planning against fixture PRs, roadmap and tasks (T-XRFD).
    4. a lease double-dispatch test (T-XRFD) and a session-record test with a fake engine binary (T-AD81).
  • bun solutions/ontological/cli/sdlc.ts quality run --config sdlc.yaml --trust and just ci both pass in the worktree.
  • Any gap found in the above (e.g. a verdict left untested, a fixture missing) is filled here rather than reopening the upstream task.
  1. Enumerate the tests T-A7PL, T-AD81 and T-XRFD actually shipped; diff against the four verification criteria above.
  2. Write fixtures under a shared test-fixtures location (follow existing conventions — check lib/services/pr/ and lib/services/task/ test directories for the repo’s fixture pattern before inventing a new one) for: PR verdict fixtures covering all eight enum values, a roadmap fixture with milestones/tasks in a defined order, and task fixtures at various readiness/status states.
  3. Fill any gap test directly; do not duplicate a test that already exists.
  4. Run quality run --trust and just ci; fix any failures surfaced only at the whole-suite level (cross-module interactions, shared fixture collisions).
  5. Record final pass/fail output in the phase run log (.sdlc/runs/p2.md) for the phase-gate review report.
AreaNote
solutions/ontological/lib/services/orchestrator/fixtures/shared PR/roadmap/task fixtures for dry-run + verdict-mapping tests
solutions/ontological/lib/services/orchestrator/ticks/prs.verdict-mapping.test.tsone test per verdict enum value
solutions/ontological/lib/services/lease/*.double-dispatch.test.tstwo concurrent acquirers, one winner
.sdlc/runs/p2.mdrecord local CI results
  • AC-1: a single test run (bun test or the project’s test runner) covering lib/config/workflows.test.ts, lib/services/session/launch.test.ts, and lib/services/orchestrator/**/*.test.ts is green.
  • AC-2: every one of the eight pr classify verdict values has an explicit assertion of the action (or explicit no-action) it produces in the prs and merges ticks.
  • AC-3: bun solutions/ontological/cli/sdlc.ts quality run --config sdlc.yaml --trust exits 0 in the worktree.
  • AC-4: just ci exits 0 in the worktree.
  • AC-5: the lease double-dispatch test fails (red) if the lease-acquire call is removed from the work tick’s dispatch path — i.e. it actually exercises the race, not just a mock.
  • Writing the module implementations under test — that’s T-A7PL, T-AD81, T-XRFD.
  • Live/E2E tests against real GitHub — explicitly excluded from Phase 2 per the brief (“Don’t start the loops live against GitHub”).
  • The judge/adversarial-review pass itself — that’s the phase gate, not this task.
  • [T-A7PL-sdlc-p2-workflows](/planning/tasks/sdlc-p2-workflows/), [T-AD81-sdlc-p2-session-launch](/planning/tasks/sdlc-p2-session-launch/), [T-XRFD-sdlc-p2-orchestrate-loops](/planning/tasks/sdlc-p2-orchestrate-loops/) — this task closes the loop after all three land their own module tests.

Phase 2 of docs/planning/notes/N-S4AJ-sdlc-0-8-plan.md (“Tests” bullet) and the Phase 2 verification criteria in the same document’s “Verification” section.

T-A7PL-sdlc-p2-workflows, T-AD81-sdlc-p2-session-launch, T-XRFD-sdlc-p2-orchestrate-loops


← Back to Tasks