# Test Plan

Generated by `/autoplan` on 2026-06-27  
Branch: unknown  
Repo: `/root` docs workspace  
Task: IF-3850, updated under IF-3854

## Affected Pages/Routes

- `5002-if-rook-harness-structurizr-c4-workspace-2026-06-27.dsl` — validate the destination architecture model after every roadmap edit.
- `5003-if-blackboard-rook-governance-saas-autoplan-roadmap-2026-06-27.md` — review as the goal roadmap source for phase order, claim boundaries, and required gates.
- `5007-if-blackboard-governance-saas-rationalized-architecture-2026-06-27.md` — review as the buyer-readable product architecture source: Blackboard ensemble, event truth, Proof Desk, Proof Packet v1, claim boundaries, signed/hash-bound integrity, and no-customer-SSH boundary.
- `docs/data/if-blackboard-rook-transport-inventory.v1.json` — validate as the R0 transport inventory/freeze artifact.
- `scripts/if_governance_transport_inventory_validate.py` — compile and run as the R0 fail-closed validator.
- `5004-if-blackboard-rook-r0-transport-inventory-and-r1-contract-2026-06-27.md` — review as the R0/R1 boundary and product transport contract.
- `5005-if-blackboard-scale-search-append-only-database-2026-06-27.md` — review as the scale/search and append-only database architecture decision.
- `5006-if-blackboard-rook-saas-auth-integration-2026-06-27.md` — review as the SaaS auth contract covering `api.infrafabric.io`, registered Google OAuth redirects, service accounts, `if-cli`, SDK, managed MCP, and no-customer-SSH boundaries.
- Martin laptop Downloads copies — verify copied hashes match `/root/docs` before handoff.

## Key Interactions To Verify

- Structurizr validates the DSL without warnings or missing relationships.
- The DSL workspace title and target views center Blackboard Governance SaaS, with Rook shown only as a current/reference harness path.
- The DSL includes `Blackboard Governance Ensemble`, `Event Signature / Integrity Service`, and `Claim Boundary Engine`.
- The roadmap and rationalized architecture present Blackboard as one holistic product ensemble, not a buyer-facing collection of Context, Switchboard, Bus, CLI, bridge, and host modules.
- The DSL includes an `AutoplanRoadmapGoal` view and an `AutoplanRoadmapExecutionFlow` dynamic view.
- The DSL includes `RationalizedBuyerRuntime` and `EventTruthToProofPacketV1Flow` for the simplified buyer-readable runtime.
- Roadmap phases R0, R0.5, R1, R2, R2.5, R3, R4, R5, and R6 are connected to target services and to the buyer outcome.
- The DSL includes `EliteRuntimeHardening`, `EliteRuntimeWriteToProofFlow`, and `TargetProductionDeployment`.
- The roadmap states Blackboard core request/response and WebSocket live plane as separate product contracts.
- The roadmap and DSL both identify provenance, transport attestation, proof packets, trace receipts, conformance tests, and secure SaaS controls as goal gates.
- The R0 inventory validator passes with product, operator-only, legacy, and experimental classifications represented.
- Product-classified R0 records do not use SSH, reverse SSH, VS Code Remote SSH, Cloudflare tunnel, or maintenance bridge transports.
- Operator-only R0 records explicitly forbid customer traffic and cannot be mistaken for SaaS onboarding paths.
- `if-cli -h`, `if-cli mcp -h`, `if-cli transport -h`, `if-cli rook -h`, `/root/scripts/ifproxy -h`, and `/root/scripts/ifproxy mcp -h` show current namespaces and compatibility boundaries.
- Product module MCP records use dot namespaces: `if.blackboard`, `if.context`, and `if.switchboard`.
- `if-cli rook -h`, `if-cli rook status --json`, `if-cli rook arrival capabilities --path-only`, and `if-cli rook blocker --dry-run` smoke successfully.
- SSH-family records explicitly forbid external customer usage; customer/BYO examples must use API/MCP/SDK paths without SSH.
- The DSL includes the `ScaleSearchAppendOnlyStore` view and `ScaleSearchProjectionFlow` dynamic flow.
- The roadmap states PostgreSQL append-only events are authoritative, current-state tables are projections, and Meilisearch is a rebuildable search index only.
- The scale plan includes queue/backpressure, retry, dead-letter handling, and projection/index lag metrics for thousands of users.
- The auth contract distinguishes Google OAuth redirect registration from implemented callback routing and full OAuth round-trip proof.
- `api.infrafabric.io/user/oauth2/Google/callback` is recorded as a registered Google redirect URI, with backend/gateway callback handling still treated as a verification gate.
- The DSL includes `api.infrafabric.io / Google OAuth Foothold`, `Auth Broker / Token Service`, and `SaaSAuthAndMCPOnboardingFlow`.
- Managed MCP authorization rejects missing, expired, wrong-audience, wrong-tenant, and insufficient-scope tokens before any Blackboard/Context/Switchboard tool runs.
- Customer-facing search never exposes direct Meilisearch credentials and always hydrates authorized records from PostgreSQL authority before proof/export claims.
- R0.5 requires a real runtime baseline before hosted proof desk claims: Blackboard API Service, PostgreSQL RLS append-only event store, concrete auth broker, projection worker/outbox, Meilisearch projection, circuit breakers, degradation policy, and SLOs.
- R2.5 requires load, isolation, and chaos gates before proof packet and hosted proof desk work: 10K synthetic events, cross-tenant API/DB/search/object-store probes, projection worker kill/rebuild, and drift detection.
- Proof packets are modeled as first-class deterministic database records with coherence verifier, redaction engine, confidence classifier, object-store publication, access logging, and if.trace receipt.
- Important task events, updates, checkpoints, evidence attachments, access decisions, redactions, and proof packet exports are signed or hash-bound according to tenant policy before governance-grade claims.
- Claim Boundary Engine blocks unsupported correctness claims and labels verified, claimed, inferred, stale, missing, blocked, redacted, and not-claimed statements.
- R4 is framed as Blackboard Design-Partner Proof Desk, with hosted Rook only as the reference harness option.
- Observability is concrete: SLO definitions, audit log warehouse, incident replay capability, and drift detector.
- The target production deployment separates edge, auth, application, live event, data, search, worker, object storage, observability, and receipt planes.
- Circuit breaker, data lifecycle, API versioning, and graceful degradation contracts are represented as target containers and wired into services.

## Edge Cases

- A dynamic relationship is added without a matching model relationship: `structurizr validate` must catch it.
- A roadmap phase claims shipped capability instead of goal/future work: wording must be corrected before publication.
- A copy to Martin laptop succeeds but hash differs: recopy and do not close task.
- A secret-bearing process arg or credential value appears in docs: remove it and record only paths/key ids.
- A new module command is implemented but its `-h` surface is stale: update help text and smoke it before publication.
- A product/customer path mentions SSH: reclassify it as operator-only/break-glass or replace it with API/MCP/SDK transport.
- A buyer-facing roadmap paragraph exposes internal module taxonomy instead of Blackboard ensemble capabilities: rewrite to user-facing capability language and move module names to internal mapping only.
- Important task/update/evidence/access/export actions are not signed or hash-bound by policy: fail governance-grade claim and add Event Signature / Integrity Service tests.
- Claim Boundary Engine can be bypassed by Proof Desk or Proof Packet Service: fail proof/export path until claim-boundary decisions are required and audited.
- A receipt is described as proving semantic correctness: fail claim wording; receipts prove bytes/integrity, not correctness.
- A search result is used as proof without Postgres hydration: fail the path and hydrate from authoritative events/projections.
- A task table allows direct update/delete in product runtime: fail the path and move changes to append-only events plus projections.
- Google OAuth redirect is registered but the API callback route returns `not_found` or does not complete a full round trip: do not claim SaaS auth implemented; wire gateway/backend or update the registered callback.
- A demo bearer token or app-specific OAuth gate is mistaken for tenant-aware SaaS auth: fail the claim and route through the auth broker/RBAC/access-log design.
- A managed MCP call can run with missing/expired/wrong-audience token: fail the gateway and add token validation/introspection tests.
- A token, client secret, or refresh token appears in command lines, docs, proof packets, or logs: rotate/revoke and record only credential refs/key ids.
- R4 hosted proof desk appears before R0.5 and R2.5 gates: fail the roadmap sequence and restore the corrected dependency order.
- Blackboard customer write path still depends on CLI/MCP wrappers instead of a service contract: fail R0.5 and route through Blackboard API Service.
- Projection worker lag can exceed threshold while proof packet assembly continues: fail degradation/circuit breaker policy.
- Event store mutation controls rely only on narrative wording: fail until insert-only roles, RLS, mutation-deny trigger, partitioning, WAL/PITR, logical replication, and hash-chain controls are specified.
- Tenant isolation verifier is absent from CI/scheduled probes: fail R2.5 and block hosted design-partner claims.
- Proof packet can assemble without event hash-chain, projection truth, evidence ref, and redaction-manifest checks: fail R3.
- API versioning, retention/deletion, circuit breaker, or graceful degradation behavior is omitted from the DSL: fail R6 enterprise readiness.

## Critical Paths

- Rationalized architecture source -> roadmap update -> DSL update -> `structurizr validate` -> local hash -> public no-login URL or laptop copy -> hash verification -> blackboard checkpoint/closeout.
- Elite runtime hardening path: R0 inventory -> R0.5 real infrastructure baseline -> R1 transport contract -> R2 provenance/RBAC -> R2.5 load/isolation/chaos gates -> R3 proof packet service -> R4 hosted proof desk.
- Blackboard governance path: Event API -> Event Signature / Integrity Service -> Append-Only Event Store -> Projection/Search -> Proof Desk -> Claim Boundary Engine -> Proof Packet v1 -> Object Store + if.trace + Observability.
- SaaS auth future path: Google redirect inventory -> gateway/backend callback wiring -> auth broker -> tenant/RBAC/access decision -> managed MCP/API token validation -> append-only auth/access events -> proof/export evidence.
- Product implementation future path: R0 transport inventory -> R0.5 runtime substrate -> R1 product transport contract -> R2 provenance -> R2.5 isolation/load tests -> R3 proof packet/trace binding -> R4 hosted proof desk -> R5 BYO harness -> R6 enterprise secure SaaS.
