4.0 KiB
4.0 KiB
PR-31 Pack Wizard Validation Snapshot Gate
Domain Owner: docs/packer
Cross-Domain Impact: docs/studio
Briefing
The Pack Wizard validation phase is not a generic workspace scan.
It is a pack-set-specific gate over the current registered + included in build snapshot state.
The accepted decision closes the first-wave semantics:
- validation is read-only and snapshot-backed;
- validation looks only at the active pack set;
- only
blockingdiagnostics fail validation; - the primary payload is the per-asset blocking-diagnostics list.
This PR implements that gate in prometeu-packer-v1.
Reference decision:
Objective
Implement snapshot-backed pack validation that returns per-asset blocking diagnostics for the active pack set and decides whether packing may proceed.
Dependencies
./PR-29-pack-wizard-contract-adjustments-for-summary-and-validation.md./PR-30-pack-wizard-summary-snapshot-query.md./PR-15-snapshot-backed-asset-query-services.md- cross-domain reference:
../../studio/pull-requests/PR-11-pack-wizard-shell-and-packer-contract-consumption.md
Scope
- implement
validatePackWorkspace(...)inprometeu-packer-v1 - evaluate only the current
registered + included in buildset from the runtime snapshot - collect only
blockingdiagnostics for the first-wave validation payload - return per-asset validation entries with:
- asset id
- asset name
- asset path
lastModified- blocking diagnostics
- make validation green when no blocking diagnostics are returned
- make validation red when any blocking diagnostics are returned
- keep aggregate validation data secondary to the per-asset list
Non-Goals
- no pack execution in this PR
- no non-blocking diagnostics in the first-wave validation payload
- no packer-owned ordering contract for the returned validation list
- no deep-sync orchestration in this PR beyond using the current snapshot boundary
Execution Method
- Resolve the current runtime snapshot for the requested project.
- Filter it to the active pack set:
registered + included in build. - Gather diagnostics relevant to each asset in that set.
- Keep only diagnostics marked
blockingfor the first-wave validation response. - Map each asset with blockers into the public per-asset validation DTO.
- Allow
lastModified = 0temporarily where the real value is not yet available. - Return validation as green when the per-asset blocker list is empty and red otherwise.
Acceptance Criteria
validatePackWorkspace(...)evaluates only the active pack set- only blocking diagnostics appear in the first-wave validation payload
- validation succeeds when no blocking diagnostics are present
- validation fails when any blocking diagnostics are present
- per-asset validation entries expose the fields required by the accepted decision
- Studio can stop before
Packingusing packer-owned validation alone
Validation
- packer unit tests for pack-set filtering during validation
- packer unit tests proving non-blocking diagnostics do not fail the first-wave validation
- packer unit tests proving blocking diagnostics do fail validation
- DTO-mapping tests for per-asset validation entries
- Studio smoke validation proving the wizard blocks on returned blockers
Affected Artifacts
prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/services/**prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/models/**prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/services/**prometeu-studio/**validation consumer surfaces if compile adaptation is needed