2.2 KiB
2.2 KiB
PR-02 Workspace Init, Registry, and Identity Foundation
Domain Owner: docs/packer
Briefing
Implement the packer-owned workspace control model and registry authority in prometeu-packer.
This PR turns the identity and workspace rules into executable code.
Objective
Deliver init_workspace, registry load/store, identity allocation, and asset-root resolution as the stable foundation for all later packer operations.
Dependencies
./PR-01-packer-project-bootstrap-and-module-boundaries.md../specs/1. Domain and Artifact Boundary Specification.md../specs/2. Workspace, Registry, and Asset Identity Specification.md
Scope
- implement
init_workspace - create and validate
assets/.prometeu/index.json - implement monotonic
asset_idallocation and persisted allocator state - model
asset_uuidallocation and persistence - implement root resolution utilities used by future read/write operations
- define structural registry errors and missing-root behavior
Non-Goals
- no
asset.jsonsemantic validation beyond what registry ownership requires - no Studio adapter yet
- no build artifacts yet
Execution Method
- Implement packer-owned registry models and codecs.
- Add workspace bootstrap behavior for missing control directories.
- Enforce identity invariants around
asset_id,asset_uuid, and root uniqueness. - Expose internal services for lookup by
asset_id,asset_uuid, and root path.
Acceptance Criteria
- workspace initialization creates the minimum control structure deterministically
- registry state round-trips without losing allocator data
- duplicate or ambiguous identity-bearing entries fail clearly
- relocation can later update root location without changing identity fields
Validation
- unit tests for registry round-trip and allocator monotonicity
- unit tests for duplicate-root and malformed-registry failures
- workspace-init fixture test
Affected Artifacts
prometeu-packer/**assets/.prometeu/index.jsoncontract implementation- packer fixture workspaces