Skip to content

Implement FRONT-510 external CLI scene workflows - #2420

Merged
PeramatoG merged 7 commits into
mainfrom
codex/implement-external-cli-scene-workflows
Oct 2, 2026
Merged

PeramatoG merged 7 commits into
mainfrom
codex/implement-external-cli-scene-workflows

Conversation

@PeramatoG

Copy link
Copy Markdown
Owner

Motivation

  • Add a first external, file-backed mutation frontend so perastage-cli can perform deterministic headless scene edits against an explicitly supplied .mvr input and publish only to an explicitly supplied .mvr output.
  • Reuse existing production seams (acquired-package read, shared text command processor, Command services, and canonical MVR exporter) to avoid duplicating MVR/Command logic or introducing GUI dependencies into the CLI path.
  • Make file ownership explicit, prevent accidental in-place mutation, and ensure failure-safe publication so partial/failed runs never overwrite sources or existing outputs unless --overwrite is explicitly requested.

Description

  • CLI: added perastage-cli scene <input.mvr> --output <output.mvr> --command <text> [--command <text> ...] [--overwrite] [--json] with deterministic ordered --command execution and optional JSON envelope output. (new cli/scene_command.{h,cpp} and CLI grammar/help updates).
  • Headless workflow: implemented perastage::external_scene::Execute (new mvr/external_scene_workflow.cpp and header) which acquires an MVR package, reads an isolated scene via mvr::AcquireImportPackage / mvr::ReadAcquiredMvrPackage, executes Console text lines through the shared perastage_command_text_processor, and only on full success serializes a canonical snapshot and publishes it atomically to the requested output path.
  • Mutation host: added a minimal GUI-independent headless ProjectMutationHost that reports dirty state without creating GUI Undo entries and preserves per-Command MutationTransaction semantics.
  • Export plumbing: exposed canonical-scene-to-file seam on exporter (ExportCanonicalSnapshotToFile) and split application-owned overloads into mvrexporter_application.cpp so CLI uses the explicit-scene export path without consulting ConfigManager.
  • Build: added a focused perastage_mvr_export and perastage_external_scene_workflow targets and wired the CLI support target to link the external-workflow consumer; adjusted CMake to keep exporter and read components in production targets rather than moving format logic into cli/.
  • Capabilities: updated capability metadata so the development_cli frontend truthfully exposes the implemented operations (scene.selection.clear → full; scene.selection.update → partial; scene.transform.position/rotation → full).
  • Tests and policy: added an end-to-end executable test tests/perastage_cli_scene_test.py that runs the built perastage-cli against synthetic MVR fixtures and verifies transform, canonical export, package/resource retention, byte-for-byte source preservation, existing-destination protection, overwrite behavior, failure-safety, and same-input/output rejection; added tests/check_external_scene_workflow_boundary.sh to ensure the external workflow contains no GUI/ConfigManager or IPC dependencies; hooked tests into CTest.
  • Docs & notes: documented the CLI syntax, the explicit read→Command→canonical-write dependency path, differences between embedded Console and external file workflow, and added a brief release-notes entry describing the new headless workflow and preservation guarantees.

Testing

  • Built the CLI and focused test targets and ran the focused test suite: perastage_cli, perastage_cli_runner_test, perastage_cli_inspection_presentation_test, capability_catalog_test, and the new scene tests; targeted build and test runs were executed in CI-like local mode and completed successfully.
  • Ran CTest for the CLI-focused set: PerastageCliRunner, PerastageCliInspectionPresentation, PerastageCliSmoke, PerastageCliInspect, PerastageCliScene, ExternalSceneWorkflowBoundary, and CapabilityCatalog; all targeted tests passed.
  • Ran repository policy and architecture checks: tests/check_perastage_tree_modules.sh, tests/check_no_configmanager_get_in_gui.sh, python3 tests/check_source_file_size.py, python3 tests/check_repository_hygiene.py, and CLI boundary checks; all passed.

If you want, I can open the formal pull request with this branch title and the summary above as the PR body, or iterate on the test cases, documentation wording, or CLI JSON envelope schema.


Codex Task

@PeramatoG
PeramatoG merged commit 980a64e into main Oct 2, 2026
4 checks passed
@PeramatoG
PeramatoG deleted the codex/implement-external-cli-scene-workflows branch October 2, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant