Skip to content

feat(skills): the uno-testing hook asks for uno_app_restart after a rude edit - #189

Merged
kazo0 merged 1 commit into
mainfrom
dev/steve/hook-restart
Oct 12, 2026
Merged

kazo0 merged 1 commit into
mainfrom
dev/steve/hook-restart

Conversation

@kazo0

@kazo0 kazo0 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

After an edit the PostToolUse hook reports RudeEdit with the restart guidance. It now says a restart is needed and that no later edit applies until it, then tells the agent to finish the edits that belong together and restart once:

  • uno_app_restart when the App MCP offers it (one call: close, then start with the last start's arguments; unoplatform/uno.app-mcp#198),
  • uno_app_close + uno_app_start otherwise.

The hook reads the tools list once for both the status and the restart tool. Workflow step 8 of the uno-testing skill says the same.

Why

Rude edits come in groups (a data model reshaped), so restarting after each wastes 20–40 s per edit, and on the current DevServer host every edit after a rude one is lost until the app is rebuilt (unoplatform/uno#25378). In the FieldCheck session the agent restarted 18 times in an hour.

Verified

  • Stub CLI: exit 3 with and without the restart tool, exit 0 and 1 — valid hook JSON, expected text.
  • Real CLI (unoplatform/uno#25374) against a 7.0.0-dev.73 app with an ENC0014 rude edit: the hook returned the uno_app_restart text; app restart then rebuilt and reconnected (Hot Reload Ready).

Also

With a host running but 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 runs the edit (100 times before the first start in the 2026-10-12 FieldCheck run). It now falls back to the reminder when the answer carries no verdict.

Cost

One CLI call per edit, 5 s wait. 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, and the restart guidance is read from the verdict text. The two-call version cost 1.7 s median per edit, 7 minutes over 199 edits in the 2026-10-12 run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NzKY9EQxsHN7uhcmPniyJZ

…ude edit, once the related edits are done

Rude edits come in groups (a data model reshaped), and on the current host
no later edit applies until the app is rebuilt (unoplatform/uno#25378), so
the hook now says to finish the edits that belong together and restart once.
It names uno_app_restart when the App MCP offers it (one call: close, then
start with the last start's arguments) and uno_app_close + uno_app_start
otherwise. Workflow step 8 of the skill says the same.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NzKY9EQxsHN7uhcmPniyJZ
@kazo0
kazo0 merged commit 1110220 into main Oct 12, 2026
3 of 4 checks passed
@kazo0
kazo0 deleted the dev/steve/hook-restart branch October 12, 2026 21:00
kazo0 added a commit that referenced this pull request Oct 13, 2026
)

* fix(skills): the uno-testing hook falls back to the reminder when the 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

* perf(skills): the uno-testing hook makes one CLI call per edit and waits 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

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

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

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
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