> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase20-session04-campaign-executable-dispatch/validation.md).

# Validation Report

**Session ID**: `phase20-session04-campaign-executable-dispatch` **Package**: cross-package (`packages/protocol`, `apps/server`, `apps/web`) **Validated**: 2026-06-28 **Result**: PASS

## Validation Summary

| Check                     | Status | Notes                                                                                                                     |
| ------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| Code Review               | PASS   | `code-review.md` has `Result: RESOLVED` and scope covers all uncommitted changes.                                         |
| Tasks Complete            | PASS   | 25/25 tasks complete.                                                                                                     |
| Files Exist               | PASS   | 23/23 spec deliverables plus 2 supporting implementation files exist and are non-empty.                                   |
| ASCII Encoding            | PASS   | All changed and untracked text files are ASCII-compatible and LF-only.                                                    |
| Tests Passing             | PASS   | Full Vitest: 3022 passed, 1 skipped, 0 failed; focused Vitest: 136 passed; Playwright: 6 passed.                          |
| Database/Schema Alignment | N/A    | No DB-layer, migration, schema, ORM, seed, or SQL artifacts changed.                                                      |
| Quality Gates             | PASS   | Format, lint, workspace typecheck, full tests, focused tests, Playwright, and `git diff --check` pass.                    |
| Conventions               | PASS   | Spot-check against `.spec_system/CONVENTIONS.md`; no obvious violations.                                                  |
| Security & GDPR           | PASS   | Security PASS; GDPR N/A because no new personal data handling.                                                            |
| Behavioral Quality        | PASS   | Trust boundary, mutation safety, failure path, contract alignment, and UI product-surface checks passed.                  |
| UI Product Surface        | PASS   | Campaign UI renders product evidence labels and safe ids only; no debug/status diagnostics found in the affected surface. |

**Overall**: PASS

## Evidence Ledger

| Check              | Command or Inspection                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Result                                                                                                                        | Evidence / Blocker                                                                                                                              |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Project state      | `if [ -d ".spec_system/scripts" ]; then bash .spec_system/scripts/analyze-project.sh --json; else bash /home/aiwithapex/.codex/plugins/cache/apex-spec-system/apex-spec/2.1.3-codex/skills/apex-spec/scripts/analyze-project.sh --json; fi`                                                                                                                                                                                                                                                               | PASS                                                                                                                          | Current session is `phase20-session04-campaign-executable-dispatch`; session dir exists; monorepo true; package resolved as cross-package/null. |
| Code review        | \`rg -n '^\*\*Result\*\*: RESOLVED                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | ^\*\*Scope\*\*: All uncommitted changes' .spec\_system/specs/phase20-session04-campaign-executable-dispatch/code-review\.md\` | PASS                                                                                                                                            |
| Task completion    | `awk 'BEGIN{total=0;done=0;open=0} /^- \[[ x]\] T[0-9][0-9][0-9] /{total++; if ($0 ~ /^- \[x\]/) done++; else open++; print} END{printf("TASK_TOTAL=%d\nTASK_DONE=%d\nTASK_OPEN=%d\n", total, done, open); if (open>0) exit 1}' .spec_system/specs/phase20-session04-campaign-executable-dispatch/tasks.md`                                                                                                                                                                                               | PASS                                                                                                                          | `TASK_TOTAL=25`, `TASK_DONE=25`, `TASK_OPEN=0`.                                                                                                 |
| Deliverables       | `for f in [23 spec deliverables plus packages/protocol/src/rest.ts and apps/web/src/components/orchestration/CommandCenterPanes.tsx]; do if [ -s "$f" ]; then printf 'FOUND_NONEMPTY %s\n' "$f"; else printf 'MISSING_OR_EMPTY %s\n' "$f"; exit 1; fi; done`                                                                                                                                                                                                                                              | PASS                                                                                                                          | 25/25 reviewed files reported `FOUND_NONEMPTY`.                                                                                                 |
| ASCII/LF           | \`status=0; { git diff --name-only --diff-filter=ACM HEAD; git ls-files --others --exclude-standard; }                                                                                                                                                                                                                                                                                                                                                                                                    | sort -u                                                                                                                       | while IFS= read -r f; do \[ -f "$f" ]                                                                                                           |
| Format             | `. "$HOME/.nvm/nvm.sh" && nvm use 26.2.0 >/dev/null && npm run format:check`                                                                                                                                                                                                                                                                                                                                                                                                                              | PASS                                                                                                                          | Biome checked 758 files; no fixes applied.                                                                                                      |
| Lint               | `. "$HOME/.nvm/nvm.sh" && nvm use 26.2.0 >/dev/null && npm run lint`                                                                                                                                                                                                                                                                                                                                                                                                                                      | PASS                                                                                                                          | Biome checked 760 files; no fixes applied.                                                                                                      |
| Typecheck          | `. "$HOME/.nvm/nvm.sh" && nvm use 26.2.0 >/dev/null && npm run typecheck --workspaces --if-present`                                                                                                                                                                                                                                                                                                                                                                                                       | PASS                                                                                                                          | Adapters, server, warroom, web, protocol, and public website typechecks completed with exit code 0.                                             |
| Full tests         | `. "$HOME/.nvm/nvm.sh" && nvm use 26.2.0 >/dev/null && npm test`                                                                                                                                                                                                                                                                                                                                                                                                                                          | PASS                                                                                                                          | Vitest reported 265 files passed, 1 skipped; 3022 tests passed, 1 skipped, 0 failed.                                                            |
| Focused tests      | `. "$HOME/.nvm/nvm.sh" && nvm use 26.2.0 >/dev/null && npx vitest run packages/protocol/tests/orchestrationCommandCenter.test.ts packages/protocol/tests/orchestration.test.ts apps/server/tests/planCampaignExecutableDispatch.test.ts apps/server/tests/planCampaignManager.test.ts apps/server/tests/commandCenterRoutes.test.ts apps/web/tests/commandCenterUi.test.ts apps/web/tests/CommandCenterPanes.test.tsx apps/web/tests/orchestrationApi.test.ts apps/web/tests/OrchestrationPanel.test.tsx` | PASS                                                                                                                          | Vitest reported 9 files passed and 136 tests passed.                                                                                            |
| Playwright         | `. "$HOME/.nvm/nvm.sh" && nvm use 26.2.0 >/dev/null && npx playwright test tests/e2e/orchestration-command-center.e2e.ts --project=app-desktop --project=app-mobile`                                                                                                                                                                                                                                                                                                                                      | PASS                                                                                                                          | Playwright reported 6 tests passed across `app-desktop` and `app-mobile`.                                                                       |
| Whitespace         | `git diff --check`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | PASS                                                                                                                          | Command exited 0 with no output.                                                                                                                |
| Database/schema    | \`git diff --name-only HEAD                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | rg -n '(^                                                                                                                     | /)(migrations?                                                                                                                                  |
| Dependencies       | \`git diff --name-only HEAD                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | rg -n '(^                                                                                                                     | /)package(-lock)?.json$                                                                                                                         |
| Success criteria   | `spec.md` success criteria inspection plus focused/full test and Playwright commands above                                                                                                                                                                                                                                                                                                                                                                                                                | PASS                                                                                                                          | Functional, testing, non-functional, and quality-gate criteria are covered and passing.                                                         |
| Conventions        | `.spec_system/CONVENTIONS.md` inspection plus format/lint/typecheck/test commands                                                                                                                                                                                                                                                                                                                                                                                                                         | PASS                                                                                                                          | npm workspaces, Biome, TypeScript, Vitest, Playwright, and root validation command expectations were followed.                                  |
| Security/GDPR      | `security-compliance.md` plus `rg` pattern scans for shell/eval, secrets, raw payload fields, package changes, and personal-data terms                                                                                                                                                                                                                                                                                                                                                                    | PASS                                                                                                                          | No findings; GDPR N/A.                                                                                                                          |
| Behavioral quality | Targeted inspections: `sed -n '350,535p' apps/server/src/managers/planCampaignManager.ts`; `sed -n '640,730p' apps/server/src/managers/planCampaignManager.ts`; `sed -n '1420,1565p' apps/server/src/lib/commandCenterValidation.ts`; `sed -n '4050,4270p' apps/web/src/lib/orchestrationApi.ts`; `sed -n '360,425p' apps/web/src/components/orchestration/CampaignWorkbench.tsx`                                                                                                                         | PASS                                                                                                                          | Schema parsing, private payload storage, async mutation locks, idempotency, safe response guards, and safe evidence UI are present.             |
| UI product surface | `npx playwright test ... --project=app-desktop --project=app-mobile`; \`rg -n "debug                                                                                                                                                                                                                                                                                                                                                                                                                      | telemetry                                                                                                                     | seed                                                                                                                                            |

## 1. Code Review Gate

### Status: PASS

**Report**: `code-review.md` **Result**: RESOLVED **Issues**: None unresolved. One medium stale execution evidence issue was fixed during `creview`.

## 2. Task Completion

### Status: PASS

**Tasks**: 25/25 complete **Incomplete tasks**: None

## 3. Deliverables Verification

### Status: PASS

| File                                                           | Found | Status |
| -------------------------------------------------------------- | ----- | ------ |
| `apps/server/tests/planCampaignExecutableDispatch.test.ts`     | Yes   | PASS   |
| `packages/protocol/src/orchestrationCommandCenter.ts`          | Yes   | PASS   |
| `packages/protocol/src/taskQueue.ts`                           | Yes   | PASS   |
| `packages/protocol/src/rest.ts`                                | Yes   | PASS   |
| `packages/protocol/tests/orchestrationCommandCenter.test.ts`   | Yes   | PASS   |
| `packages/protocol/tests/orchestration.test.ts`                | Yes   | PASS   |
| `apps/server/src/lib/commandCenterValidation.ts`               | Yes   | PASS   |
| `apps/server/src/managers/planCampaignManager.ts`              | Yes   | PASS   |
| `apps/server/src/routes/commandCenter.ts`                      | Yes   | PASS   |
| `apps/server/src/server.ts`                                    | Yes   | PASS   |
| `apps/server/tests/planCampaignManager.test.ts`                | Yes   | PASS   |
| `apps/server/tests/commandCenterRoutes.test.ts`                | Yes   | PASS   |
| `apps/web/src/lib/orchestrationApi.ts`                         | Yes   | PASS   |
| `apps/web/src/lib/commandCenterUi.ts`                          | Yes   | PASS   |
| `apps/web/src/components/orchestration/CampaignWorkbench.tsx`  | Yes   | PASS   |
| `apps/web/src/components/orchestration/CommandCenterPanes.tsx` | Yes   | PASS   |
| `apps/web/src/components/orchestration/OrchestrationShell.tsx` | Yes   | PASS   |
| `apps/web/tests/commandCenterUi.test.ts`                       | Yes   | PASS   |
| `apps/web/tests/CommandCenterPanes.test.tsx`                   | Yes   | PASS   |
| `apps/web/tests/orchestrationApi.test.ts`                      | Yes   | PASS   |
| `apps/web/tests/OrchestrationPanel.test.tsx`                   | Yes   | PASS   |
| `tests/e2e/orchestration-command-center.e2e.ts`                | Yes   | PASS   |
| `apps/server/README_server.md`                                 | Yes   | PASS   |
| `apps/web/README_web.md`                                       | Yes   | PASS   |
| `docs/api/README_api.md`                                       | Yes   | PASS   |

**Missing deliverables**: None

## 4. ASCII Encoding Check

### Status: PASS

| File Set                                                                                                                                             | Encoding                          | Line Endings | Status |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------------ | ------ |
| Changed tracked files and untracked session files from `git diff --name-only --diff-filter=ACM HEAD` plus `git ls-files --others --exclude-standard` | ASCII-compatible text/source/JSON | LF           | PASS   |

**Encoding issues**: None

## 5. Test Results

### Status: PASS

| Metric                  | Value                                  |
| ----------------------- | -------------------------------------- |
| Full Vitest Total Tests | 3023                                   |
| Full Vitest Passed      | 3022                                   |
| Full Vitest Failed      | 0                                      |
| Full Vitest Skipped     | 1                                      |
| Focused Vitest          | 136 passed, 0 failed                   |
| Playwright              | 6 passed, 0 failed                     |
| Coverage                | Not measured by validation command set |

**Failed tests**: None

## 6. Database/Schema Alignment

### Status: N/A

*N/A because the session introduced no DB-layer changes.*

**Evidence**: `git diff --name-only HEAD | rg -n '(^|/)(migrations?|schema|prisma|drizzle|sequelize|typeorm|database|db)(/|\.|$)|\.sql$'` returned no matches. No migration, schema, ORM metadata, seed, SQL, or persisted database artifact changed.

**Issues found**: None

## 7. Success Criteria

From spec.md:

**Functional requirements**:

* Campaign task create/refine accepts optional terminal or Git executable payloads: PASS - server validation parses `executable` with `parseTaskQueueExecutablePayload`; web API request serialization is covered by `apps/web/tests/orchestrationApi.test.ts`.
* Campaign approve -> dispatch -> executable task run -> execution run -> task completed is proven: PASS - focused server tests, route tests, full Vitest, and Playwright command-center e2e passed.
* Tasks without executable payloads are not reported as dispatched or executed: PASS - `planningOnlyTaskIds` path and server/web tests cover planning-only behavior.
* Partial failure does not falsely mark the whole campaign completed: PASS - manager state derivation and tests cover failed/unavailable outcomes.
* Campaign task, queue row, and execution run link to the same safe execution evidence: PASS - protocol/server/web tests and Playwright evidence-link flows passed.

**Testing requirements**:

* Protocol parser and type tests: PASS - focused Vitest includes both protocol suites.
* Server manager and route tests: PASS - focused Vitest includes acceptance, manager, and route suites.
* Web unit/component tests: PASS - focused Vitest includes UI helper, API, pane, and panel suites.
* Playwright desktop/mobile tests: PASS - 6 tests passed across `app-desktop` and `app-mobile`.

**Quality gates**:

* All files ASCII-encoded: PASS - ASCII/LF scan passed.
* Unix LF line endings: PASS - CRLF scan found no matches.
* Code follows project conventions: PASS - Biome, TypeScript, Vitest, Playwright, and conventions spot-check passed.
* Primary user-facing surfaces contain product-facing copy only: PASS - code inspection and Playwright passed.
* Focused protocol, server, web, Playwright, and `git diff --check` commands pass: PASS.

## 8. Conventions Compliance

### Status: PASS

*Checked because `.spec_system/CONVENTIONS.md` exists.*

**Categories spot-checked**: naming, file structure, error handling, comments, testing, and database conventions when relevant.

**Convention violations**: None.

Evidence: `.spec_system/CONVENTIONS.md` requires npm workspaces, Biome, TypeScript typechecks, Vitest, root validation commands, and no configured database. Commands `npm run format:check`, `npm run lint`, `npm run typecheck --workspaces --if-present`, `npm test`, focused Vitest, Playwright, and DB artifact scan all passed or were N/A as appropriate.

## 9. Security & GDPR Compliance

### Status: PASS

**Full report**: See `security-compliance.md` in this session directory.

#### Summary

| Area     | Status | Findings |
| -------- | ------ | -------- |
| Security | PASS   | 0 issues |
| GDPR     | N/A    | 0 issues |

**Critical violations**: None

## 10. Behavioral Quality Spot-Check

### Status: PASS

*Applied because the session produced application code.*

**Checklist applied**: Yes **Files spot-checked**:

* `apps/server/src/managers/planCampaignManager.ts`
* `apps/server/src/lib/commandCenterValidation.ts`
* `apps/server/src/routes/commandCenter.ts`
* `apps/web/src/lib/orchestrationApi.ts`
* `apps/web/src/components/orchestration/CampaignWorkbench.tsx`

**Categories spot-checked**: trust boundaries, resource cleanup, mutation safety, failure paths, and contract alignment.

**Violations found**: None

**Fixes applied during validation**: None

## 11. UI Product-Surface Spot-Check

### Status: PASS

*Applied because the session changed user-facing UI.*

**Surfaces inspected**: Campaign workbench rows and dispatch outcomes by code inspection and `npx playwright test tests/e2e/orchestration-command-center.e2e.ts --project=app-desktop --project=app-mobile`.

**Diagnostics found in primary UI**: None in the affected campaign workbench surface. The diagnostics string scan found e2e fixture seed strings and existing product-scoped runtime/handoff copy outside the new campaign row surface.

**Allowed debug/admin surfaces**: None needed for this session.

**Fixes applied during validation**: None

## Validation Result

### PASS

Session `phase20-session04-campaign-executable-dispatch` satisfies the code review gate, task completion, deliverables, ASCII/LF, tests, quality gates, conventions, security/GDPR, BQC, and UI product-surface checks.

### Unresolved Failures And Blockers

None

## Next Steps

Next command: `updateprd`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase20-session04-campaign-executable-dispatch/validation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
