Run 4: API Tests
Update and extend Bruno API tests in the api-test repository to validate all print endpoint changes from Runs 1-3. Tests run against a deployed environment (local K8s for development, dev for final validation).
Specification: Phase 4 Specification Requirements: Phase 4 Requirements Verification: Phase 4 Verification
Entry Criteria
Section titled “Entry Criteria”| # | Criterion | Verification Command | Expected Output |
|---|---|---|---|
| 1 | Run 3 exit gate passes | bash .../run-3-diagnostics/validate-exit.sh | ALL CHECKS PASSED |
| 2 | Operations deployed to local K8s | kubectl get pods -n operations | grep Running | Pod running |
| 3 | api-test worktree exists and builds | cd .../api-test && npm run build | Exit 0 |
| 4 | api-test on correct branch | git -C .../api-test branch --show-current | jmpicnic/multi-pdf-print-and-bugs |
Entry criterion #2 requires deploying to local K8s, which uses op run --env-file 1Password.env -- ./gradlew helmInstallToLocal. This deployment and any subsequent deployment to dev are gated on explicit user prompt.
Artifact Specifications
Section titled “Artifact Specifications”| Artifact | Path | Format | Description |
|---|---|---|---|
| Updated PrintLabels.bru | api-test/collections/item/bearer-auth/Printing/PrintLabels.bru | Bruno | Composite response assertions, enabled |
| Updated PrintBreadcrumb.bru | api-test/collections/item/bearer-auth/Printing/PrintBreadcrumb.bru | Bruno | Composite response assertions, enabled |
| Updated PrintOneCard.bru | api-test/collections/kanban/Print-Cards/PrintOneCard.bru | Bruno | Composite response assertions, enabled |
| Updated PrintMultpleCards.bru | api-test/collections/kanban/Print-Cards/PrintMultpleCards.bru | Bruno | Composite response assertions, enabled |
| New mixed-size tests | api-test/collections/item/bearer-auth/Printing/PrintLabels*.bru | Bruno | Multi-template, batch split, over-limit tests |
| New unmark test | api-test/collections/kanban/Print-Cards/UnmarkPrinted.bru | Bruno | Unmark-as-printed sequence test |
| New diagnostic tests | api-test/collections/item/bearer-auth/Printing/PrintLabels*.bru | Bruno | debug, dry-run, test-mode tests |
| New notes mapping tests | api-test/collections/*/ | Bruno | Notes field validation using debug payload |
| CHANGELOG entry | api-test/CHANGELOG.md | Markdown | Version entry |
Task List
Section titled “Task List”| # | Task | Persona | Depends On | Status | Acceptance Criteria |
|---|---|---|---|---|---|
| 4.1 | Update existing print tests for composite response | acceptance-test-engineer | — | Pending | 4 existing tests enabled, assertions updated. T-P4-001 through T-P4-004. |
| 4.2 | Add multi-template bulk print tests | acceptance-test-engineer | 4.1 | Pending | Mixed-size label + card tests. T-P4-005, T-P4-006. |
| 4.3 | Add batch limiting tests | acceptance-test-engineer | 4.1 | Pending | Over-limit rejection + sub-batch split. T-P4-007, T-P4-008. |
| 4.4 | Add unmark-as-printed test | acceptance-test-engineer | 4.1 | Pending | Print → unmark → verify NOT_PRINTED. T-P4-009. |
| 4.5 | Add diagnostic parameter tests | acceptance-test-engineer | 4.1 | Pending | debug, dry-run, live-print. T-P4-010 through T-P4-012. |
| 4.6 | Add notes mapping tests | acceptance-test-engineer | 4.5 (uses debug) | Pending | Card null notes → empty. Label → Item.notes. T-P4-013, T-P4-014. |
Internal Dependency Graph
Section titled “Internal Dependency Graph”4.1 (update existing) ──┬──→ 4.2 (multi-template) ├──→ 4.3 (batch limiting) ├──→ 4.4 (unmark) └──→ 4.5 (diagnostics) ──→ 4.6 (notes mapping)Task 4.1 first (establishes composite response pattern). Tasks 4.2, 4.3, 4.4, 4.5 can run in parallel after 4.1. Task 4.6 depends on 4.5 (uses debug=true to inspect payload).
Single acceptance-test-engineer agent — all work in one repository.
Exit Criteria
Section titled “Exit Criteria”| # | Criterion | Verification Command | Expected Output |
|---|---|---|---|
| 1 | api-test builds | cd .../api-test && npm run build | Exit 0 |
| 2 | All printing tests pass against local | cd .../api-test && npm run test:local 2>&1 | grep -i print | Tests pass |
| 3 | CHANGELOG updated | head -10 .../api-test/CHANGELOG.md | Contains version entry |
| 4 | api-test worktree clean | git -C .../api-test status --short | Clean |
Running tests against dev environment and creating PRs are gated on explicit user prompt.
Agent Prompt Templates
Section titled “Agent Prompt Templates”Acceptance Test Engineer — ate-api-tests
Section titled “Acceptance Test Engineer — ate-api-tests”You are implementing Bruno API tests for the print endpoints in the api-test repository at /Users/jmp/code/arda/projects/multi-pdf-print-and-bugs-worktrees/api-test.
Read the specification at .../../phase-4-api-tests/specification.md and implement Tasks 4.1 through 4.6. Use mode: "bypassPermissions".
Key points:
- All print tests use
live-print=falseto avoid Documint quota - Diagnostic tests (debug, dry-run) verify response shape, not PDF content
- Notes mapping tests use
debug=trueordry-run=trueto inspect the payload - Test data prerequisite: items with different sizes, cards with various print statuses
- Run tests with
npm run test:local
Handoff
Section titled “Handoff”Artifacts Consumed (from previous runs)
Section titled “Artifacts Consumed (from previous runs)”| Artifact | Source Run | Path |
|---|---|---|
| Composite response shape | Run 2 | API contract (no file dependency) |
| Unmark endpoint | Run 1 | API contract |
| Diagnostic parameters | Run 3 | API contract |
| debugPayload field | Run 3 | API contract |
Artifacts Produced (for subsequent runs)
Section titled “Artifacts Produced (for subsequent runs)”None — this is the final run.
Copyright: (c) Arda Systems 2025-2026, All rights reserved
Copyright: © Arda Systems 2025-2026, All rights reserved