- Implemented comprehensive unit tests for VexCandidateEmitter to validate candidate emission logic based on various scenarios including absent and present APIs, confidence thresholds, and rate limiting. - Added integration tests for SmartDiff PostgreSQL repositories, covering snapshot storage and retrieval, candidate storage, and material risk change handling. - Ensured tests validate correct behavior for storing, retrieving, and querying snapshots and candidates, including edge cases and expected outcomes.
2.8 KiB
2.8 KiB
Policy Registry Guild Charter
Mission
Stand up and operate the Policy Registry service defined in Epic 4. We own workspace storage, version immutability, simulation orchestration metadata, attestations, and RBAC enforcement for the policy lifecycle.
Scope
- Service source under
src/Policy/StellaOps.Policy.Registry(REST API, workers, storage schemas). - PostgreSQL models, migrations, and object storage bindings for policy workspaces, versions, reviews, promotions, simulations.
- Integration with Policy Engine, Scheduler, Authority, Web Gateway, Telemetry.
- Attestation signing pipeline, evidence bundle management, and retention policies.
Principles
- Immutability first – Published versions are append-only; derive new versions rather than mutate.
- Determinism – Compilation/simulation requests must produce reproducible artifacts and checksums.
- Tenant isolation – Enforce scoping at every storage layer (PostgreSQL schemas/RLS, buckets, queues).
- AOC alignment – Registry stores metadata; it never mutates raw SBOM/advisory/VEX facts.
- Auditable – Every transition emits structured events with actor, scope, digest, attestation IDs.
Collaboration
- Keep
src/Policy/StellaOps.Policy.Registry/TASKS.md,/docs/implplan/SPRINT_*.mdsynchronized. - Coordinate API contracts with Policy Engine (
src/Policy/StellaOps.Policy.Engine), Web Gateway (src/Web/StellaOps.Web), Console (/console), CLI (src/Cli/StellaOps.Cli), and Docs. - Publish or update OpenAPI specs under
src/Policy/StellaOps.Policy.Registry/openapi/and hand them to client teams.
Tooling
- .NET 10 preview (minimal API + background workers).
- PostgreSQL with per-tenant schemas/RLS, S3-compatible object storage for bundles.
- Background queue (Scheduler job queue or NATS) for batch simulations.
- Signing via Authority-issued OIDC tokens + cosign integration.
Definition of Done
- Code merged with unit/integration tests, linting, deterministic checks.
- Telemetry (metrics/logs/traces) wired with tenant context.
- Docs/reference updated; OpenAPI regenerated.
- Feature flags + configuration defaults documented.
Required Reading
docs/modules/policy/architecture.mddocs/modules/platform/architecture-overview.md
Working Agreement
-
- Update task status to
DOING/DONEin both correspoding sprint file/docs/implplan/SPRINT_*.mdand the localTASKS.mdwhen you start or finish work.
- Update task status to
-
- Review this charter and the Required Reading documents before coding; confirm prerequisites are met.
-
- Keep changes deterministic (stable ordering, timestamps, hashes) and align with offline/air-gap expectations.
-
- Coordinate doc updates, tests, and cross-guild communication whenever contracts or workflows change.
-
- Revert to
TODOif you pause the task without shipping changes; leave notes in commit/PR descriptions for context.
- Revert to