> 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-session05-campaign-dag-recovery/validation.md).

# Validation Report

**Session ID**: `phase20-session05-campaign-dag-recovery` **Package**: null (cross-cutting) **Validated**: 2026-06-28 **Result**: PASS

## Validation Summary

| Check                     | Status | Notes                                                                                                 |
| ------------------------- | ------ | ----------------------------------------------------------------------------------------------------- |
| Code Review               | PASS   | `code-review.md` exists, scope is all uncommitted changes, `Result: RESOLVED`                         |
| Tasks Complete            | PASS   | 24/24 tasks complete                                                                                  |
| Files Exist               | PASS   | 19/19 declared deliverables exist and are non-empty                                                   |
| ASCII Encoding            | PASS   | Declared deliverables and all changed/untracked files scan clean; no CRLF findings                    |
| Tests Passing             | PASS   | Focused Vitest 125/125 passed; Playwright 8/8 passed; full Vitest 3030 passed, 1 skipped              |
| Database/Schema Alignment | N/A    | No DB-layer, persistence schema, migration, SQL, ORM, seed, or schema artifact changes                |
| Quality Gates             | PASS   | format, lint, typecheck, full test, and `git diff --check` passed                                     |
| Conventions               | PASS   | Node 26.2.0 path used; npm workspaces, Biome, TypeScript, Vitest, and Playwright conventions followed |
| Security & GDPR           | PASS   | Security PASS; GDPR N/A; see `security-compliance.md`                                                 |
| Behavioral Quality        | PASS   | BQC spot-check found no trust boundary, cleanup, mutation, failure-path, or contract violations       |
| UI Product Surface        | PASS   | Component and Playwright checks show product-facing DAG labels and no debug/raw payload diagnostics   |

**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-session05-campaign-dag-recovery`; monorepo true; package null; session dir exists.                         |
| Package context           | `rg -n '^\*\*Package\*\*:' .spec_system/specs/phase20-session05-campaign-dag-recovery/spec.md`                                                                                                                                                                                                                                                                                                                                                   | PASS                                                                                           | `Package: null`, so the session is cross-cutting across protocol, server, and web.                                                     |
| Code review               | \`rg -n '^\*\*Result\*\*:                                                                                                                                                                                                                                                                                                                                                                                                                        | ^\*\*Scope\*\*:' .spec\_system/specs/phase20-session05-campaign-dag-recovery/code-review\.md\` | PASS                                                                                                                                   |
| Task completion           | `grep -Ec '^- \[[ x]\] T[0-9]+' .../tasks.md && grep -Ec '^- \[x\] T[0-9]+' .../tasks.md`                                                                                                                                                                                                                                                                                                                                                        | PASS                                                                                           | 24 total tasks and 24 completed tasks; no incomplete task lines printed.                                                               |
| Deliverables              | `while read f; do test -s "$f"; done` over declared deliverables                                                                                                                                                                                                                                                                                                                                                                                 | PASS                                                                                           | 19/19 declared deliverables printed `PASS`.                                                                                            |
| ASCII/LF                  | `file ...`; `LC_ALL=C grep -n '[^[:print:][:space:]]' ...`; `grep -l $'\r' ...`                                                                                                                                                                                                                                                                                                                                                                  | PASS                                                                                           | All declared deliverables are ASCII text/source; no non-ASCII or CRLF output.                                                          |
| All changed file ASCII/LF | \`{ git diff --name-only --diff-filter=ACM HEAD; git ls-files --others --exclude-standard; }                                                                                                                                                                                                                                                                                                                                                     | sort -u                                                                                        | ... grep ...\`                                                                                                                         |
| Whitespace                | `git diff --check`                                                                                                                                                                                                                                                                                                                                                                                                                               | PASS                                                                                           | Command exited 0 with no output.                                                                                                       |
| Focused tests             | `PATH="$HOME/.nvm/versions/node/v26.2.0/bin:$PATH" npx vitest run packages/protocol/tests/orchestrationCommandCenter.test.ts apps/server/tests/planCampaignDagRecovery.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                                                                                           | 8 test files passed; 125 tests passed.                                                                                                 |
| Playwright                | `PATH="$HOME/.nvm/versions/node/v26.2.0/bin:$PATH" npx playwright test tests/e2e/orchestration-command-center.e2e.ts --project=app-desktop --project=app-mobile`                                                                                                                                                                                                                                                                                 | PASS                                                                                           | 8 tests passed across desktop and mobile projects.                                                                                     |
| Format                    | `PATH="$HOME/.nvm/versions/node/v26.2.0/bin:$PATH" npm run format:check`                                                                                                                                                                                                                                                                                                                                                                         | PASS                                                                                           | 759 files checked; no fixes applied.                                                                                                   |
| Lint                      | `PATH="$HOME/.nvm/versions/node/v26.2.0/bin:$PATH" npm run lint`                                                                                                                                                                                                                                                                                                                                                                                 | PASS                                                                                           | 761 files checked; no fixes applied.                                                                                                   |
| Typecheck                 | `PATH="$HOME/.nvm/versions/node/v26.2.0/bin:$PATH" npm run typecheck --workspaces --if-present`                                                                                                                                                                                                                                                                                                                                                  | PASS                                                                                           | adapters, server, warroom, web, protocol, and public-website typechecks completed.                                                     |
| Full tests                | `PATH="$HOME/.nvm/versions/node/v26.2.0/bin:$PATH" npm test`                                                                                                                                                                                                                                                                                                                                                                                     | PASS                                                                                           | 266 test files passed, 1 skipped; 3030 tests passed, 1 skipped.                                                                        |
| Database/schema           | \`rg -n 'database                                                                                                                                                                                                                                                                                                                                                                                                                                | migration                                                                                      | schema                                                                                                                                 |
| Dependency audit          | `git diff --name-only HEAD -- package.json package-lock.json 'apps/*/package.json' 'packages/*/package.json'`; `npm audit --audit-level=high --omit=dev`                                                                                                                                                                                                                                                                                         | PASS                                                                                           | No package files changed; audit found 0 vulnerabilities.                                                                               |
| Success criteria          | Spec inspection plus focused/full test commands                                                                                                                                                                                                                                                                                                                                                                                                  | PASS                                                                                           | Functional, testing, non-functional, and quality criteria are covered by the passing focused, Playwright, quality, and privacy checks. |
| Conventions               | `.spec_system/CONVENTIONS.md` inspection plus format/lint/typecheck/test commands                                                                                                                                                                                                                                                                                                                                                                | PASS                                                                                           | Monorepo npm workspace commands and Node 26.2.0 path match conventions.                                                                |
| Security/GDPR             | `security-compliance.md` plus raw-field grep and audit commands                                                                                                                                                                                                                                                                                                                                                                                  | PASS                                                                                           | No security findings; GDPR N/A because no personal data handling was introduced.                                                       |
| Behavioral quality        | Targeted inspection of `planCampaignManager.ts`, `commandCenter.ts`, `orchestrationApi.ts`, `commandCenterUi.ts`, and `CampaignWorkbench.tsx`                                                                                                                                                                                                                                                                                                    | PASS                                                                                           | Mutation lock/idempotency, schema guards, failure buckets, redaction helpers, and accessible product UI are present.                   |
| UI product surface        | `CommandCenterPanes.test.tsx`, `OrchestrationPanel.test.tsx`, and Playwright inspections                                                                                                                                                                                                                                                                                                                                                         | PASS                                                                                           | Product labels (`Dependencies complete`, `Needs ...`, `Retryable`, follow-up toasts) are visible; raw/debug terms are asserted absent. |

## 1. Code Review Gate

### Status: PASS

**Report**: `code-review.md` **Result**: RESOLVED **Issues**: None unresolved. The report records 0 critical, 1 high, 1 medium, and 1 low finding, all fixed before validation.

## 2. Task Completion

### Status: PASS

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

## 3. Deliverables Verification

### Status: PASS

| File                                                           | Found | Status |
| -------------------------------------------------------------- | ----- | ------ |
| `apps/server/tests/planCampaignDagRecovery.test.ts`            | Yes   | PASS   |
| `packages/protocol/src/orchestrationCommandCenter.ts`          | Yes   | PASS   |
| `packages/protocol/tests/orchestrationCommandCenter.test.ts`   | Yes   | PASS   |
| `apps/server/src/managers/planCampaignManager.ts`              | Yes   | PASS   |
| `apps/server/src/routes/commandCenter.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/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                        | Encoding                 | Line Endings  | Status |
| --------------------------- | ------------------------ | ------------- | ------ |
| Declared deliverables       | ASCII text/source        | LF            | PASS   |
| All changed/untracked files | No non-ASCII bytes found | No CRLF found | PASS   |

**Encoding issues**: None

## 5. Test Results

### Status: PASS

| Metric                    | Value                          |
| ------------------------- | ------------------------------ |
| Focused Vitest            | 125 passed / 125               |
| Playwright command-center | 8 passed / 8                   |
| Full Vitest               | 3030 passed, 1 skipped / 3031  |
| Coverage                  | Not produced by these commands |

**Failed tests**: None

## 6. Database/Schema Alignment

### Status: N/A

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

**Evidence**: Spec lists new database, persistence, schema, and migration work as out of scope. The DB/schema grep found only documentation or generic schema validation language, with no migration, SQL, ORM, seed, or persisted data shape changes in implementation files.

**Issues found**: None

## 7. Success Criteria

From spec.md:

**Functional requirements**:

* PASS - Task B cannot dispatch before task A completes; covered by `planCampaignDagRecovery.test.ts` and focused Vitest.
* PASS - Failed/unavailable executable tasks block dependents and prevent false completion; covered by manager, route, web, and e2e tests.
* PASS - Retry resets only failed/unavailable executable tasks; covered by server DAG recovery tests and route tests.
* PASS - Previous queue rows and execution runs remain inspectable after retry; covered by server DAG recovery tests.
* PASS - Campaign, task, readiness, queue, and execution links mirror DAG outcomes; covered by protocol/server/web tests and Playwright.

**Testing requirements**:

* PASS - Protocol tests cover dependency fields, unavailable readiness, compact events, and raw-field rejection.
* PASS - Server manager and route tests cover success, ordering, cycle/unknown dependencies, failed/unavailable prerequisites, retry filtering, duplicate prevention, and safe events.
* PASS - Web tests cover graph order, blocked labels, retry controls, execution links, response parsing, shell feedback, and privacy-safe rendering.
* PASS - Playwright desktop/mobile tests cover blocked dependency inspection and retry without raw terminal or Git leakage.

**Quality gates**:

* PASS - All files ASCII-encoded.
* PASS - Unix LF line endings.
* PASS - Code follows project conventions.
* PASS - Primary user-facing surfaces contain product-facing copy only.
* PASS - Focused protocol, server, web, Playwright, root quality, and `git diff --check` commands pass.

## 8. Conventions Compliance

### Status: PASS

*`.spec_system/CONVENTIONS.md` exists and was inspected.*

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

**Convention violations**: None. Files remain in the established protocol, server, web, test, e2e, and documentation locations. Commands used Node 26.2.0, npm workspaces, Biome, TypeScript, Vitest, and Playwright as documented.

## 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

*Session produced application code, so BQC applies.*

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

* `apps/server/src/managers/planCampaignManager.ts`
* `apps/server/src/routes/commandCenter.ts`
* `apps/web/src/lib/orchestrationApi.ts`
* `apps/web/src/lib/commandCenterUi.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. Evidence includes campaign mutation locks and idempotency keys in `dispatch`/`retryFailed`, response guards for DAG buckets, broad payload blocked-field checks, explicit blocked/waiting/retryable outcome buckets, and accessible product-facing graph controls.

**Fixes applied during validation**: None

## 11. UI Product-Surface Spot-Check

### Status: PASS

*Session changed user-facing UI.*

**Surfaces inspected**: Campaign workbench component code, orchestration shell toast code, focused component tests, and Playwright command-center desktop and mobile browser paths.

**Diagnostics found in primary UI**: None. Tests assert product copy and safe evidence links while rejecting raw/debug terms such as `diff --git`, `stdout`, `stderr`, `commandText`, `raw payload`, and remote-execution overclaims.

**Allowed debug/admin surfaces**: None added by this session.

**Fixes applied during validation**: None

## Validation Result

### PASS

The session satisfies the workflow gate, task checklist, deliverables, encoding, tests, database/schema N/A justification, success criteria, 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-session05-campaign-dag-recovery/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.
