scrum4me-mcp/__tests__
Janpeter Visser 3ce2c044c4
feat(mcp): set_pbi_pr + mark_pbi_pr_merged tools voor PBI-PR-gating (#18)
* feat(ST-mhj9f2la): add set_pbi_pr MCP tool

- Add pr_url and pr_merged_at fields to Pbi model in schema
- Implement set_pbi_pr tool: writes pr_url, clears pr_merged_at (idempotent)
- AuthZ via requireWriteAccess + userCanAccessProduct through pbi.product_id
- 10 tests: happy path, not-found, no-access, demo-denied, schema validation
- Update README tools table and bump version to 0.2.0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(ST-mhj9f2la): add mark_pbi_pr_merged MCP tool

- Implement mark_pbi_pr_merged: sets pr_merged_at = now() on a PBI
- Requires pr_url to be set; returns error if not (geen gekoppelde PR)
- Idempotent: re-calling overwrites the timestamp
- AuthZ via requireWriteAccess + userCanAccessProduct through pbi.product_id
- 6 tests: happy path, no-pr_url, idempotent, no-access, not-found, demo-denied
- Update README tools table with mark_pbi_pr_merged entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(ST-mhj9f2la): expand README with set_pbi_pr + mark_pbi_pr_merged docs

Add full signature/input/output/error documentation sections for both
new tools, following the verify_task_against_plan pattern.
Version already bumped to 0.2.0 in earlier commit.
Tag + MCP_GIT_REF pin in scrum4me-docker to be done by maintainer after merge.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 16:25:53 +02:00
..
git feat(routing): cross-repo task routing + orphan-branch cleanup (#17) 2026-05-02 18:07:57 +02:00
verify feat: classifyDiffAgainstPlan — pure diff vs plan classifier (VerifyResult) 2026-05-01 12:55:47 +02:00
cleanup-my-worktrees.test.ts feat(M13): cleanup_my_worktrees tool — scan + remove stale worktrees for terminal-status jobs 2026-05-01 13:22:47 +02:00
get-claude-context-filter.test.ts test: add unit tests for tasks-status-update helper and get-claude-context filter 2026-04-30 18:22:55 +02:00
mark-pbi-pr-merged.test.ts feat(mcp): set_pbi_pr + mark_pbi_pr_merged tools voor PBI-PR-gating (#18) 2026-05-03 16:25:53 +02:00
set-pbi-pr.test.ts feat(mcp): set_pbi_pr + mark_pbi_pr_merged tools voor PBI-PR-gating (#18) 2026-05-03 16:25:53 +02:00
tasks-status-update.test.ts test: add unit tests for tasks-status-update helper and get-claude-context filter 2026-04-30 18:22:55 +02:00
update-job-status-auto-pr.test.ts feat: branch-per-story + worktree-defer + verify EMPTY edge-cases (#12) 2026-05-01 17:04:54 +02:00
update-job-status-gate.test.ts feat(gate): verify_required levels — ALIGNED/ALIGNED_OR_PARTIAL/ANY (#16) 2026-05-02 17:55:06 +02:00
update-job-status-next-action.test.ts feat: worker presence layer + batch-loop docs (#7) 2026-05-01 16:39:26 +02:00
update-job-status-push.test.ts feat: integrate push into update_job_status DONE transition 2026-05-01 12:00:30 +02:00
update-job-status-worktree.test.ts feat: branch-per-story + worktree-defer + verify EMPTY edge-cases (#12) 2026-05-01 17:04:54 +02:00
verify-plan.test.ts test+docs: verify-plan tests and README for verify_task_against_plan 2026-04-30 19:36:43 +02:00
verify-task-against-plan.test.ts feat: verify_task_against_plan calls classifyDiffAgainstPlan + saves verify_result to DB 2026-05-01 12:59:17 +02:00
wait-for-job-snapshot.test.ts feat(M13): retry-tracking — stale CLAIMED jobs → QUEUED (retry_count++) or FAILED (≥2 retries) 2026-05-01 13:18:59 +02:00
wait-for-job-worktree.test.ts feat: branch-per-story + worktree-defer + verify EMPTY edge-cases (#12) 2026-05-01 17:04:54 +02:00