Skip to content

Add deterministic visual authoring independence regressions - #1345

Merged
multiplex55 merged 1 commit into
macro-imagefrom
codex/add-focused-integration-tests-for-action-editor
Aug 23, 2026
Merged

multiplex55 merged 1 commit into
macro-imagefrom
codex/add-focused-integration-tests-for-action-editor

Conversation

@multiplex55

Copy link
Copy Markdown
Owner

Motivation

  • Ensure the Action Editor preserves independence between search-region editing and reference-image capture by exercising the full VisualCaptureWorkflow inside a real ActionEditorState fixture so terminal outcomes are restored and applied only through the normal editor paths.
  • Make the authoring workflows fully testable and deterministic (no sleeps, no real overlays, no real screen/file access) so regressions around capture, staging, cancellation and stale tokens are reliably detected.

Description

  • Add a fake-backed full-editor fixture and a suite of deterministic tests that install a real VisualCaptureWorkflow into ActionEditorState with fake VisibilityAdapter, WorkflowClock, RectangleOverlay, CaptureAdapter, and AssetStoreAdapter.
  • Add tests covering Pick Region success, Reference Image Capture success, capture cancellation at two useful points, capture downstream failures (capture and staging), and a stale-token variant that must be ignored while launcher restoration still occurs.
  • Initialize scenarios with a known macro id and draft generation, an initial MkImagePayload containing asset_id = 7 and SearchRegion::Rectangle { rect: ScreenRect::new(100,100,800,600) }, and snapshot/clone unrelated payload fields before operations to assert they remain unchanged.
  • Make ImageSearchEditorState comparable by deriving PartialEq/Eq to enable byte-for-byte or field-for-field equality assertions in cancellation and stale-token tests.

Testing

  • git diff --check was run and passed for the patch format.
  • cargo test visual_authoring_independence --lib was invoked; compilation progressed but a full run is blocked on platform-specific unconditional Windows API imports when building on Linux (the test logic itself is platform-agnostic and uses the fake adapters).
  • Repository formatting checks were performed (rustfmt/cargo fmt) and modified files were formatted as part of the change.

Codex Task

@multiplex55
multiplex55 merged commit 726071b into macro-image Aug 23, 2026
@multiplex55
multiplex55 deleted the codex/add-focused-integration-tests-for-action-editor branch August 28, 2026 18:54
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