Skip to content

fix(skills): the uno-testing hook blocks only on a compile failure - #190

Merged
kazo0 merged 3 commits into
mainfrom
dev/steve/hook-verdicts
Oct 13, 2026
Merged

kazo0 merged 3 commits into
mainfrom
dev/steve/hook-verdicts

Conversation

@kazo0

@kazo0 kazo0 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What

#189 was squash-merged with its first commit only. This PR carries the two follow-ups that missed the merge, and changes which verdicts block the edit.

  1. No verdict → the reminder (from feat(skills): the uno-testing hook asks for uno_app_restart after a rude edit #189). With a host running and no app connected, app hot-reload-status answers "No connected app instance" with exit code 0, and the hook told the agent the running app now ran the edit (100 times before the first start in the 2026-10-12 FieldCheck run).

  2. One CLI call per edit, 5 s wait (from feat(skills): the uno-testing hook asks for uno_app_restart after a rude edit #189). The tools-list probe is gone: with --no-start the CLI (unoplatform/uno#25374) does not wait for a tool the host does not list. The two-call version cost 1.7 s median per edit.

  3. Block only on a compile failure. Exit code 1 covers every verdict except applied and RudeEdit, and the hook blocked on all of them. Now:

    DevServer verdict Hook
    Failed in (compile errors) blocks, with the diagnostics: the file is the agent's to fix
    InternalError the DevServer failed, not the file: do not re-save, uno_app_restart once after the related edits
    : no changes an earlier operation compiled it: assert, restart only if the app lacks the change
    still processing, other not applied yet: confirm with uno_app_hot_reload_status, quoting the DevServer
    applied, edit to *App.xaml.cs adds: code that already ran at startup needs a restart

    The restart guidance is one string naming uno_app_restart (unoplatform/uno.app-mcp#198), with close + start as the fallback. Step 8 and the rules of uno-testing list InternalError among the restart signals.

It also syncs skills/uno-testing/SKILL.md with the plugin copy, which fixes the Validate plugin and skills check failing on main since #189.

Why

A blocked hook reads as "your edit is wrong". In the runs before this change the agent answered a DevServer InternalError by re-saving the same file (twice, about 20 s, in one run), when no edit applies until the app restarts (unoplatform/uno#25378; the InternalError seen here is a Roslyn EnC crash on MVUX-generated code, stack in the run logs).

Verified

  • Test-Plugin.ps1 and claude plugin validate --strict pass.

  • A fake CLI drove all 11 branches of the hook: valid hook JSON, expected text.

  • A/B on the new uno-hot-reload skill-ab scenario (four staged changes to a template app, each checked on Android and Windows desktop; App MCP 2.0.0-local.6, DevServer CLI 7.0.0-local.4; results):

    A (hook with 1 and 2 only) B (this PR)
    Checks all pass all pass
    Time / cost 1006 s / $3.18 1050 s / $3.81
    DevServer InternalErrors 3 3
    Edits the hook blocked 4 0
    InternalError → restart 13 s 10 s, no re-save

    B acted on the new text as intended. One run per variant: no time or cost claim.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WjQPjTHecnxjgcqBhM8z3e

kazo0 and others added 3 commits October 12, 2026 21:46
… DevServer answers without a verdict

With a host running but no app connected, `app hot-reload-status` prints
"No connected app instance" and exits 0, and the hook told the agent that
the running app now runs the edit. In the FieldCheck run of 2026-10-12
that message went out 100 times before the first app start.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NzKY9EQxsHN7uhcmPniyJZ
…its 5 s

The tools-list probe is gone: with --no-start the CLI (unoplatform/uno#25374)
no longer waits for a tool the host does not list, so a missing status tool
is exit code 2 at once, and the restart guidance is read from the verdict
itself, which names uno_app_restart when the App MCP offers it. The hook
cost 1.7 s median per edit in the 2026-10-12 FieldCheck run, 7 minutes
over 199 edits, most of it the second CLI launch.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NzKY9EQxsHN7uhcmPniyJZ
The CLI's exit code 1 covers every verdict but applied and RudeEdit, and the hook blocked on all of them
with "fix the file and save again". In uno-hot-reload-20261012-210349 that was right for 1 of 6 blocks:
the others were DevServer internal errors (3), an edit queued behind a running operation (1) and an edit
an earlier operation had already compiled (1).

- A compile failure still blocks, with the diagnostics.
- An InternalError asks for one restart after the related edits, as a rude edit does: in
  fieldcheck-20261012-180709 each run of internal errors (11 in all) ended only with a restart.
- "no changes" says to assert the UI instead of restarting.
- Any other not-applied verdict (still processing, not covered yet, superseded, ignored) passes the
  DevServer's text on without blocking, and says to confirm before asserting.
- An applied edit to App.xaml.cs says that code which already ran at startup needs a restart.
- uno_app_restart is named whenever a restart is asked for, with the close and start pair as the
  fallback, instead of only when the rude-edit text mentioned it.

Skill step 8 and its rules list InternalError among the restart signals. skills/ is synced with the
plugin copy, which also clears the mirror check that #189 left failing on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WjQPjTHecnxjgcqBhM8z3e
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