3.6 KiB
3.6 KiB
PR-30 Pack Wizard Summary Snapshot Query
Domain Owner: docs/packer
Cross-Domain Impact: docs/studio
Briefing
With the public contracts aligned, the next step is to actually produce the pack-wizard summary from the packer runtime snapshot.
This is intentionally narrower than full pack execution. The goal is to expose a fast preflight summary of the active pack set so the Studio wizard can open on packer-owned state instead of local UI heuristics.
Reference decision:
Objective
Implement snapshot-backed summary for the pack wizard over the current registered + included in build set.
Dependencies
./PR-29-pack-wizard-contract-adjustments-for-summary-and-validation.md./PR-15-snapshot-backed-asset-query-services.md./PR-21-point-in-memory-snapshot-updates-after-write-commit.md- cross-domain reference:
../../studio/pull-requests/PR-11-pack-wizard-shell-and-packer-contract-consumption.md
Scope
- implement
getPackWorkspaceSummary(...)inprometeu-packer-v1 - resolve the active pack set from the runtime snapshot:
registered + included in build - produce the aggregate included asset count
- produce the per-asset summary list with:
- asset id
- asset name
- asset family
- min artifact count
- max artifact count
lastModified
- allow
lastModified = 0in the first wave where the real value is not yet available - keep the query fast and snapshot-backed
Non-Goals
- no validation logic in this PR
- no pack execution logic in this PR
- no emitted-artifact preview in summary
- no inclusion of unregistered or excluded assets as explicit summary items
Execution Method
- Resolve the active runtime snapshot for the requested project.
- Filter the snapshot to the active pack set: registered assets included in build.
- Derive one aggregate count from that filtered set.
- Map each included asset into the public per-asset summary DTO.
- Populate
minArtifactCountandmaxArtifactCountfrom the best currently available packer-owned summary facts. - Populate
lastModifiedfrom packer-owned runtime or filesystem facts when available, otherwise0. - Return the summary result without performing deep validation or artifact planning.
Acceptance Criteria
getPackWorkspaceSummary(...)returns successfully from snapshot-backed state- the returned set contains only
registered + included in buildassets - the aggregate count matches the per-asset list size
- per-asset summary entries expose the fields required by the accepted decision
- the operation behaves as a fast read query rather than a deep recomputation path
Validation
- packer unit tests for pack-set filtering
- packer unit tests for summary DTO mapping
- regression tests proving excluded and unregistered assets do not appear as summary items
- Studio smoke validation proving the wizard summary can render from packer-owned data
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/**wizard summary consumer surfaces if compile adaptation is needed