v1.0 RC Test Plan
Plystra v1.0 RC Test Plan
Section titled “Plystra v1.0 RC Test Plan”Document Status
Section titled “Document Status”| Field | Value |
|---|---|
| Product | Plystra |
| Version | v0.0.1 |
| Document Type | Release Candidate test plan |
| Scope | Stable Self-Hosted Core |
| Status | RC execution plan |
1. Purpose
Section titled “1. Purpose”This document defines the test plan for Plystra v1.0 Release Candidate.
The purpose is to validate that the v1.0 Core can be installed, migrated, run, tested, and used from a clean environment.
The test plan focuses on:
clean clone usabilityDocker self-hosted baselinemigration correctnessEnt drift correctnessauthorization correctnessaudit correctnessResource Registry correctnessCore CRUD API correctnessOpenAPI correctnessrequest ID canonical enveloperelease documentation correctnessBearer user session protection for sensitive APIsdisabled-by-default data and metrics surfacesThis test plan should be executed before tagging:
v0.0.1It should be executed again before final:
v1.0.02. Test Environment Matrix
Section titled “2. Test Environment Matrix”Run tests against at least the following environments.
2.1 Local Development Environment
Section titled “2.1 Local Development Environment”| Component | Requirement |
|---|---|
| OS | macOS or Linux |
| Go | Project-supported version |
| Docker | Installed |
| Docker Compose | Installed |
| PostgreSQL | Via Docker Compose |
| Network | Localhost |
2.2 Clean Linux Environment
Section titled “2.2 Clean Linux Environment”| Component | Requirement |
|---|---|
| OS | Ubuntu LTS recommended |
| Go | Project-supported version |
| Docker | Installed |
| Docker Compose | Installed |
| PostgreSQL | Via Docker Compose |
| State | Clean clone, no local cache assumption |
2.3 CI Environment
Section titled “2.3 CI Environment”| Component | Requirement |
|---|---|
| Go tests | Required |
| PostgreSQL integration tests | Required |
| Migration apply tests | Required |
| Ent check | Required |
| OpenAPI check | Recommended |
| Smoke tests | Recommended |
3. Required Test Data
Section titled “3. Required Test Data”The RC must include Finance Reviewer demo data.
user_aliceuser_bobspace_acmeGroups
Section titled “Groups”financefinance.apacfinance.emealegallegal.emeaMembers
Section titled “Members”member_finance_reviewermember_invoice_creatorUserMembers
Section titled “UserMembers”um_alice_finance_reviewer active delegateum_bob_finance_reviewer active loginum_alice_finance_reviewer_revoked revoked delegatefinance_approverPermission
Section titled “Permission”invoice:approve:group_treeResources
Section titled “Resources”invoice_001 under finance.apacinvoice_002 under legal.emea4. Test Execution Overview
Section titled “4. Test Execution Overview”Execute the RC test plan in this order:
1. Clean clone test2. Environment configuration test3. Docker Compose startup test4. Migration test5. Ent drift test6. Doctor test7. Unit test suite8. PostgreSQL integration test suite9. Health endpoint smoke test10. Authz smoke test11. Resource Registry smoke test12. Core CRUD smoke test13. AuditLog smoke test14. OpenAPI verification15. request ID canonical envelope verification16. Production safety verification17. Documentation verification18. RC sign-off5. Clean Clone Test
Section titled “5. Clean Clone Test”Objective
Section titled “Objective”Prove that a developer can start from a clean clone and follow README instructions.
git clone https://github.com/plystra/plystra.gitcd plystracp .env.example .envThen follow the README exactly.
Expected Results
Section titled “Expected Results”- Repository clones successfully.
.env.exampleis present.- README instructions are accurate.
- No undocumented secrets are required.
- No local maintainer-only files are required.
Failure Conditions
Section titled “Failure Conditions”- README references missing commands.
- README references missing files.
- Startup requires undocumented environment variables.
- Demo requires local state not included in repository.
6. Docker Compose Startup Test
Section titled “6. Docker Compose Startup Test”Objective
Section titled “Objective”Prove the self-hosted baseline works.
docker compose down -vdocker compose up -ddocker compose psdocker compose logs --tail=100Expected Results
Section titled “Expected Results”- PostgreSQL starts.
- Plystra Core starts if compose includes the service.
- Containers remain running.
- Logs do not contain fatal startup errors.
- Database settings match
.env.example.
Additional Checks
Section titled “Additional Checks”docker compose restartdocker compose psExpected:
- Restart works.
- Data volume remains intact.
- Core reconnects to PostgreSQL.
7. Migration Test
Section titled “7. Migration Test”Objective
Section titled “Objective”Prove migrations apply cleanly.
Empty Database Steps
Section titled “Empty Database Steps”docker compose down -vdocker compose up -d postgresplystractl migrate upplystractl migrate verifyExpected Results
Section titled “Expected Results”- All migrations apply.
- Migration status is recorded.
- Migration verification passes.
- Schema is ready for Core.
Upgrade Database Steps
Section titled “Upgrade Database Steps”If previous release schema is available:
# Restore or initialize previous release schemaplystractl migrate upplystractl migrate verifyExpected:
- Existing schema upgrades successfully.
- No destructive migration runs without explicit approval.
- Core starts after upgrade.
Failure Conditions
Section titled “Failure Conditions”- Migration applies only on the maintainer’s database.
- Migration fails on empty DB.
- Migration fails from previous release.
- Migration verification reports drift.
8. Ent Drift Test
Section titled “8. Ent Drift Test”Objective
Section titled “Objective”Prove Ent schema, generated code, and migrations are synchronized.
plystractl ent checkIf project uses codegen check:
go generate ./entgit diff --exit-codeExpected Results
Section titled “Expected Results”- Ent drift is zero.
- Generated code is up to date.
- Migrations match Ent schema.
Failure Conditions
Section titled “Failure Conditions”- Generated code changes after
go generate. - Migration diff appears after schema check.
plystractl ent checkreports drift.
9. Doctor Test
Section titled “9. Doctor Test”Objective
Section titled “Objective”Prove operational diagnostics work.
plystractl doctorExpected Results
Section titled “Expected Results”Doctor reports:
configuration statusdatabase connectivitymigration statusschema readinessenvironment modeservice readinessFailure Conditions
Section titled “Failure Conditions”- Doctor passes when database is unreachable.
- Doctor passes with invalid schema.
- Doctor output lacks actionable error messages.
10. Unit Test Suite
Section titled “10. Unit Test Suite”Objective
Section titled “Objective”Prove core logic correctness.
go test ./...Required Coverage Areas
Section titled “Required Coverage Areas”scope resolverdeny code mappingtrace buildersame-space validationUserMember status validationUserMember expiration validationgroup_tree path matchingunion semanticsAuditLog snapshot builderrequest envelope formattingExpected Results
Section titled “Expected Results”- All unit tests pass.
- No flaky tests.
- No tests require external services unless marked integration.
11. PostgreSQL Integration Test Suite
Section titled “11. PostgreSQL Integration Test Suite”Objective
Section titled “Objective”Prove Core works with real PostgreSQL.
PLYSTRA_DATABASE_URL=postgres://... go test ./...or project-specific integration command.
Required Coverage Areas
Section titled “Required Coverage Areas”migrationsEnt storeLoadAuthorizationContextauthz/check against databaseauthz/explain against databaseAuditLog writesResource Registry registrationCRUD APIssame-space constraintsrevoked UserMemberexpired UserMemberExpected Results
Section titled “Expected Results”- Tests pass against PostgreSQL.
- Tests do not depend on local leftover state.
- Tests clean up after themselves or use isolated DB.
12. Health Endpoint Smoke Test
Section titled “12. Health Endpoint Smoke Test”Objective
Section titled “Objective”Prove operational endpoints work.
curl -s http://localhost:8080/api/v1/healthcurl -s http://localhost:8080/api/v1/readycurl -s http://localhost:8080/api/v1/versionCanonical operational routes:
curl -s http://localhost:8080/api/v1/healthcurl -s http://localhost:8080/api/v1/readycurl -s http://localhost:8080/api/v1/versionExpected Results
Section titled “Expected Results”/healthreturns service health./readychecks database and migration readiness./versionreturns version and schema information.- Legacy paths remain compatible if promised.
13. Authorization Smoke Test
Section titled “13. Authorization Smoke Test”Objective
Section titled “Objective”Prove authz/check and authz/explain work.
Required Cases
Section titled “Required Cases”Case 1: Allow Finance/APAC
Section titled “Case 1: Allow Finance/APAC”Expected:
decision = allowdeny_code = nullCase 2: Deny Legal/EMEA
Section titled “Case 2: Deny Legal/EMEA”Expected:
decision = denydeny_code = SCOPE_OUT_OF_BOUNDSCase 3: Bob Shared Member Allow
Section titled “Case 3: Bob Shared Member Allow”Expected:
decision = allowactor_user_id = user_bobactor_member_id = member_finance_reviewerCase 4: Revoked UserMember Deny
Section titled “Case 4: Revoked UserMember Deny”Expected:
decision = denydeny_code = USER_MEMBER_REVOKEDExplain Trace Checks
Section titled “Explain Trace Checks”For each case, verify:
trace_version existsactor snapshot existsspace snapshot existstarget resource snapshot existsmatched_candidates existsscope_check existsreason existsaudit context exists if audit is written14. Resource Registry Smoke Test
Section titled “14. Resource Registry Smoke Test”Objective
Section titled “Objective”Prove newly registered Resources can enter the authorization chain.
- Register a new Resource type or Resource record.
- Attach it to a Space.
- Attach it to a Group if scope requires it.
- Attach owner Member if self scope requires it.
- Create or reuse Permission.
- Create RolePermission.
- Create MemberRole.
- Call
authz/check.
Expected Results
Section titled “Expected Results”- Resource is created.
- Resource is queryable.
- Resource passes same-space validation.
- Resource can be used by
authz/check. - Resource can be used by
authz/explain. - Resource operations are auditable.
15. Core CRUD Smoke Test
Section titled “15. Core CRUD Smoke Test”Objective
Section titled “Objective”Prove all major Core APIs work.
Entities
Section titled “Entities”Run create/read/list/update/status workflow for:
UsersSpacesGroupsMembersUserMembersRolesPermissionsMemberRolesRolePermissionsResourcesRun read/list/filter workflow for:
AuditLogsRequired Workflow Verifications
Section titled “Required Workflow Verifications”- disable
- restore
- revoke
- archive
- validation error
- same-space rejection
- not found
- request ID in response
Expected Results
Section titled “Expected Results”- All major CRUD APIs return expected status codes.
- All validation errors use standard envelope.
- AuditLog does not expose update/delete.
- Generated Ent internals are not leaked.
16. AuditLog Smoke Test
Section titled “16. AuditLog Smoke Test”Objective
Section titled “Objective”Prove AuditLog correctness.
- Run allow authz check.
- Run deny authz check.
- Query AuditLogs by decision.
- Query AuditLogs by deny code.
- Query AuditLogs by actor.
- Query AuditLogs by resource.
- Query AuditLogs by request ID.
- Inspect trace snapshot.
Expected Results
Section titled “Expected Results”- Allow decision is logged.
- Deny decision is logged.
- Trace contains snapshots, not only IDs.
- Trace includes matched candidates.
- Trace includes deny code for deny decisions.
- AuditLog update is unavailable or rejected.
- AuditLog delete is unavailable or rejected.
17. OpenAPI Verification
Section titled “17. OpenAPI Verification”Objective
Section titled “Objective”Prove API docs match implementation.
Required
Section titled “Required”- All routes implemented in v1.0 are documented.
- All documented routes exist.
- Request schemas match accepted payloads.
- Response schemas match actual responses.
- Error envelope is documented.
- Canonical top-level
request_idbehavior is documented. - Deny codes are documented or referenced.
- Authz trace schema is documented.
Optional Automated Checks
Section titled “Optional Automated Checks”- Generate client from OpenAPI.
- Run basic generated client smoke test.
- Compare route registry against OpenAPI paths.
18. Request ID Verification
Section titled “18. Request ID Verification”Objective
Section titled “Objective”Prove every API response carries one canonical top-level request ID.
Required
Section titled “Required”Responses should include:
{ "request_id": "req_..."}Checks
Section titled “Checks”- Top-level
request_idexists. meta.request_idis not returned.- OpenAPI documents the top-level field only.
- Structured logs and AuditLog records can be correlated through the same request ID.
19. Production Safety Verification
Section titled “19. Production Safety Verification”Objective
Section titled “Objective”Prove production mode blocks unsafe Ent auto apply behavior.
Run production mode command that would apply Ent schema automatically.
Expected Result
Section titled “Expected Result”- Command is rejected.
- Error message explains why.
- Error message directs user to versioned migrations.
- Documentation explains the behavior.
Acceptance Rule
Section titled “Acceptance Rule”Production must not silently mutate schema through Ent auto migration.
20. Documentation Verification
Section titled “20. Documentation Verification”Objective
Section titled “Objective”Prove users can operate v1.0 from public docs.
Required Docs To Check
Section titled “Required Docs To Check”READMEQuickstartv1.0 readiness checklistv1.0 RC test planv1.0 release notesrequest ID canonical envelopemigration and upgrade guideOpenAPI v1.0Ent integration guidelineChecks
Section titled “Checks”- Commands are accurate.
- File paths are accurate.
- Environment variables are accurate.
- Non-goals are clear.
- Optional components are clearly marked optional.
- v1.0 blocking scope is clear.
- Production migration behavior is documented.
- request ID canonical envelope is documented.
21. RC Sign-off Template
Section titled “21. RC Sign-off Template”Before tagging, fill this out.
| Area | Result | Notes |
|---|---|---|
| Clean clone | ||
| Docker Compose | ||
| Migration empty DB | ||
| Migration upgrade DB | ||
| Ent drift | ||
| Doctor | ||
| Unit tests | ||
| PostgreSQL integration tests | ||
| Health endpoints | ||
| Authz check/explain | ||
| Resource Registry | ||
| CRUD smoke tests | ||
| AuditLog | ||
| OpenAPI | ||
| request ID canonical envelope | ||
| Production safety | ||
| Docs |
22. Final RC Decision
Section titled “22. Final RC Decision”Tag v0.0.1 only if:
all blocking tests passall release docs are committedOpenAPI matches implementationno known migration blocker existsno known authz correctness blocker existsno known AuditLog correctness blocker existsno known clean install blocker existsIf any blocker remains, do not tag RC.