Skip to content

Show why a guarded command failed - #278

Merged
woksin merged 1 commit into
mainfrom
scene-guarded-action-messages
Oct 30, 2026
Merged

woksin merged 1 commit into
mainfrom
scene-guarded-action-messages

Conversation

@woksin

@woksin woksin commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Fixed

@woksin woksin added the patch label Oct 29, 2026
@woksin woksin self-assigned this Oct 29, 2026
@woksin

woksin commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Reviewer notes

  • Change: CoreGuardedAction reads CommandOutcome.exceptionMessages and validationErrors and combines them into the thrown error (trimmed, blank entries dropped, newline-joined). The generic text remains the fallback. Dispatchers stay outcome-based.

  • Specs: for_CoreGuardedAction/when_running_a_guarded_command.tsx adds cases for exception messages, validation messages, both together, and the empty fallback. They failed before the fix and pass after it.

  • Local: scene.react tests, lint:ci and build pass. In the full yarn ci, one untouched spec failed: primereact/for_editor/when_sanitizing_hostile_html (the 5000-deep nesting case took 6.8 s against the 5 s test timeout, with machine load around 60). It is in a workspace this PR does not touch, and it passed in CI on the same tree (run 40890014802). CI is the authority here.

  • Advisory from review, not changed: ActionStatus may show the joined messages on one line. A follow-up can render line breaks if needed.

  • Downstream: Stage#857 consumes this through a Scene bump.

  • Candidate decision: Enforce Screenplay string-only contains semantics in native guard selection #276 (strict Contains, branch scene-276-strict-contains, built on this commit) is not part of this PR. Its implementation and Stage local-package proof are still hours away, and Stage#857 is waiting on this fix. Enforce Screenplay string-only contains semantics in native guard selection #276 follows in a separate minor PR after this merges.

@woksin
woksin merged commit 787fdf9 into main Oct 30, 2026
7 of 8 checks passed
@woksin
woksin deleted the scene-guarded-action-messages branch October 30, 2026 00:11
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