Skip to content

Validate explicit targets in layer row commands (part of #785). - #1255

Open
FredApps wants to merge 1 commit into
storytold:mainfrom
FredApps:fix/layer-target-validation-785-20261011
Open

FredApps wants to merge 1 commit into
storytold:mainfrom
FredApps:fix/layer-target-validation-785-20261011

Conversation

@FredApps

@FredApps FredApps commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Malformed or unknown explicit targets now fail before mutation for layer.delete, layer.duplicate, layer.setProps, layer.template, layer.merge, layer.reverse, layer.hideOthers, layer.outlineOthers, and layer.lockOthers, plus layer.collectInNew.ids and layer.flatten.id. Complete target arrays are validated before the existing work cap is applied.

Omitted defaults, ids precedence, and explicit empty-list behavior are preserved. An empty keep list retains the all-layer effects of the Others commands. This addresses part of #785; it does not cover every selector or close the whole issue.

Implementation and testing were AI-assisted under FredApps.

How it was tested

  • All three reported failures were reproduced on synthetic baseline documents.
  • 29 focused layer tests passed, including six new regressions.
  • All seven local cargo xtask ci gates passed: 5,364 tests passed, zero failed, and four ignored.
  • Independent source review cleared the bounded scope.

Tested head: 8d60ff69055d421f3c624543ddcf8ee0d83262b5; tree: fa22be9876b984f8dbd1383141db0ddf6fdf2693; base: 53bc86fdb454ed33cd26cba5e29695ebe0befeff.

Main advanced to 2ac3ba2b866ad9d34b2252dd8024f73e34f4b2b8 without changes in the affected files. Integration with that newer main was not tested. No hosted CI or runtime MCP transport pass is claimed.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm), locally on the tested head above.
  • No new panics in shipped code: no new unwrap(), expect(), panic!, unreachable!, todo! or
    unimplemented! outside tests, and no new unchecked indexing on data from files, parameters or
    messages. Errors are returned as Result and shown to the user
    (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md (no new assets).

@FredApps FredApps changed the title M2: reject malformed explicit layer targets (#785) Validate explicit targets in layer row commands (part of #785). Oct 11, 2026
@FredApps
FredApps marked this pull request as ready for review October 11, 2026 19:14

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant