prometeu-studio/docs/packer/pull-requests/PR-04-workspace-scan-list-assets-and-studio-read-adapter.md
2026-03-24 13:42:41 +00:00

62 lines
2.7 KiB
Markdown

# PR-04 Workspace Scan, List Assets, and Studio Read Adapter
Domain Owner: `docs/packer`
## Briefing
Implement the read-side operational surface that turns a filesystem workspace into a packer-owned asset snapshot.
This PR is the first explicit Studio integration step: Studio stops reading the workspace directly and starts consuming a packer response model through an adapter.
## Objective
Deliver `list_assets`, wire `get_asset_details` over real workspace scanning, and create the read adapter that maps packer responses to Studio workspace models.
## Dependencies
- [`./PR-03-asset-declaration-parsing-validation-and-details-contract.md`](./PR-03-asset-declaration-parsing-validation-and-details-contract.md)
- [`../specs/2. Workspace, Registry, and Asset Identity Specification.md`](../specs/2.%20Workspace,%20Registry,%20and%20Asset%20Identity%20Specification.md)
- [`../specs/5. Diagnostics, Operations, and Studio Integration Specification.md`](../specs/5.%20Diagnostics,%20Operations,%20and%20Studio%20Integration%20Specification.md)
- cross-domain reference: [`../../studio/specs/4. Assets Workspace Specification.md`](../../studio/specs/4.%20Assets%20Workspace%20Specification.md)
## Scope
- implement workspace scanning for managed assets and orphan anchors
- implement `list_assets`
- finish real `get_asset_details` on top of packer services
- distinguish managed-world structural issues from workspace hygiene findings in read responses
- create the Studio read adapter from packer responses to the existing Studio asset workspace models
- replace filesystem-specific read code in Studio with the adapter-backed path
## Non-Goals
- no sensitive mutation apply flows yet
- no build pipeline yet
- no event lane yet
## Execution Method
1. Scan `assets/` for anchored roots and reconcile against the registry.
2. Produce a structured snapshot for list/details services.
3. Implement a Studio adapter that maps packer DTOs into the Studio read model without embedding packer logic in JavaFX.
4. Verify that Studio read behavior remains equivalent while packer becomes the source of truth.
## Acceptance Criteria
- `list_assets` returns managed and orphan assets coherently
- Studio navigator and details surfaces can run on packer-backed read responses
- registry authority remains visible in the mapped Studio state
- invalid declarations and missing roots surface through structured diagnostics
## Validation
- packer tests for scan reconciliation and orphan detection
- adapter tests for mapping list/details responses into Studio models
- Studio smoke validation using the packer-backed read path
## Affected Artifacts
- `prometeu-packer/**`
- `prometeu-studio/**` read adapters and service wiring
- test fixtures shared across packer and Studio integration tests