Skip to content

refactor(testing): cut ecosystem specifics from run-e2e non-UI playbook - #17756

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-17744-44850734511-1
Nov 21, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-17744-44850734511-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17744

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Part 4 of 5 of #16755 (R11, rules revision 5). Row count: 2. F0446 (R11, K4): cut and replaced at a routing site. The per-surface table in plugins/testing/skills/run-e2e/context/non-ui.md no longer names WebApplicationFactory, Aspire AppHost, bats, pytest via uv, PSScriptAnalyzer, Pester or script -q. Each row still routes a surface to a step, so generic text points to the project's own conventions. The Python and PowerShell rows merge into one row for infrastructure code and scripts in a language other than shell. F0447 (R11, K4): cut and replaced at a routing site. The MCP stdio handshake's per-runtime spawn table (node/npm, dotnet run, uv run) and its harness list (vitest, xUnit, pytest) are gone. In their place is one generic spawn rule: run the built server directly, never through a package-manager script or a run command that builds, since step 3 reads the first stdout line as JSON-RPC. Neither row was GONE. No R4 or R8 rows are in this part, so no row is pending a measured case. The cut deletes part of the page, not the whole page. Script readers: none. A Grep for non-ui.md|non-ui over the repository (lane tooling excluded) found only markdown links (run-e2e SKILL.md:79, context/bundled-run.md:22, context/e2e-config.md:75, context/e2e.md:90), the CHANGELOG, and the eval prompts and graders below. No script reads the file, so neither row is held back. Existing eval cases that read the cut text: plugins/testing/evals/e2e-mcp-stdio-handshake (it reads the spawn and harness section, F0447) and e2e-mcp-server-no-ui (it routes to non-ui.md and reads the surface table, F0446). Their graders check initialize over stdio, protocolVersion/serverInfo, a read of the server, and routing to non-ui.md. None of them matches the removed names. e2e-run-driver-unattended reads row 9's pseudo-terminal recipe, which stays. AC10: this change adds no skill, enforcement-placing or otherwise. Choice of means: the review flagged that the old spawn table also carried an implicit rule (spawn the built entry point, not a wrapper that prints to stdout), so that rule was kept in generic form. The PTY source is kept as 'the platform's PTY utility or the harness's own PTY support'.

Not verified

  • check-affected skipped comment-hygiene (a network fetch was denied), size-check (script missing in the lane), typos (not installed) and three validate-plugins sub-checks that run checked-tree code. The PR's CI runs them.
  • portability-lint, eval-cases and evals-quality are CI-only per check-affected and are left to the PR's CI
  • tidy: ran the write-for-agents, write-for-humans and ai-slop rubric passes by reading the listed lines. The ai-slop deterministic detector (detect.sh) did not run because this lane's Bash runs only the named wrappers. Code passes 1-3 had nothing to do because the change is markdown only.
  • The host-session eval (a targeted before-and-after case on sonnet for run-e2e, using e2e-mcp-stdio-handshake and e2e-mcp-server-no-ui) and the do-not-merge hold are the host session's steps, not this lane's

Fix

  • plugins/testing/skills/run-e2e/context/non-ui.md: per-surface table rows 2, 3, 5 and 10 (now 9) drop the named tools. The Python and PowerShell rows merge into row 8. The MCP stdio handshake's per-runtime spawn table and harness list become one generic spawn rule.
  • plugins/testing/README.md: the run-e2e row now says 'shell and other script surfaces' in place of 'shell/PowerShell surfaces', to match the merged row.
  • .changes/testing/work-resolve-issue-issue-17744-44850734511-1-b329537f.md: new patch changelog fragment for the testing plugin.

Verification

The runner ran each check from the base copy against d9c1b90:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 3 fragments under .changes/ valid (run after the final edit)
  • check-changed-skills: run-e2e PASS, 0 errors, 5 warnings that predate this change (e2e.md TOC, Next section, description and body size)
  • check-affected: 14 passed, 9 skipped, 0 failed over 3 changed files (run after the final edit)
  • Grep non-ui\.md|non-ui across the repository: no script reads the file; only markdown links, CHANGELOG and eval cases reference it
  • Grep for \[Rr\]ow (8|9|10) in plugins/testing: no reference to the renumbered table rows
  • Read e2e-mcp-stdio-handshake graders (initialize-over-stdio regex): they do not depend on the removed spawn or harness text
  • Fresh-context review subagent over the whole diff: no broken references, no eval dependence. It reported 1 medium and 4 low findings (a lost stdout rule in the spawn step, a missing PTY source, *.test.sh cut beyond scope, vague row 8, a stale README line and fragment wording). All five were fixed…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44850734511

Left out: the items under Not verified.

Related

#17744

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes melodic-automation-lanes Bot added the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Held for the before-and-after eval that cut item #17744 needs. The pr-merge release step lifts this hold when an eval-pair record exists for the current head.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d9c1b90d8a03187346797cebd1916877bf533838: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This pull request changes only documentation: a changelog fragment, one row of the testing plugin README, and the /testing:run-e2e non-UI playbook (plugins/testing/skills/run-e2e/context/non-ui.md). I read every hunk of all three files.

  • Instruction-surface lens: the diff narrows the skill text. It removes named tools from the per-surface table and replaces the per-runtime MCP spawn table with one generic rule. None of the removed text was a guardrail against a dangerous action, such as a block list, a permission rule, a confirmation step or a credential-handling rule. The new spawn rule is more protective: run the built server directly, skip package-manager or build wrappers. The pseudo-terminal recipe still tells the session to report the gap instead of running without a terminal. I did not consult the protected-class register file; I judged each removed line by its consequence.
  • Trust controls and manifests: no changed file matches a trusted path, a trust control or a plugin manifest. Nothing touches tokens, secrets, workflows, hooks or code that runs.
  • Cost: none.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed d9c1b90d8a03187346797cebd1916877bf533838: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR changes only markdown. It removes tool and runtime names from /testing:run-e2e's non-UI playbook. It also updates the run-e2e row in the testing README and adds a patch changelog fragment. I read every hunk of all 3 changed files and the whole non-ui.md at head.

Closing issue #17744. Both rows are handled:

  • F0446: the per-surface table no longer names WebApplicationFactory, Aspire AppHost, bats, pytest/uv, PSScriptAnalyzer, Pester or script -q. The Python and PowerShell rows are merged into row 8.
  • F0447: the per-runtime spawn table and the vitest/xUnit/pytest harness list are replaced by one generic spawn rule. The rule keeps the old table's hidden constraint: step 3 reads the first stdout line, so the server must not start through a wrapper that prints to stdout.

The other "Done when" items are about the PR body: row count, script-reader search, eval cases, whole-page or partial cut, and AC10. The body covers each of them. These are statements about the body, so no test applies.

Checks I ran with the tools I had:

  • Row-number references: no file under plugins/testing points to the renumbered rows. The old row 10 is now row 9.
  • Eval case: the e2e-run-driver-unattended eval checks for "pseudo-terminal". That word is still in row 9.
  • Links: the other non-ui.md references are markdown links that still resolve.

The PR author's verification results (check-changelog-fragments, check-changed-skills, check-affected) are their own claims. I did not re-run them.

Rules: the path-scoped rules skill-bodies-state-current-rules.md and cost-claims.md match non-ui.md. The change breaks neither, and it removes tool names rather than adding new upstream details.

Loosened checks: no check was loosened. The diff contains only documentation and a changelog fragment. The prompt had no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail with no consumer entries. It had no loosened_check_decision_record: line either, so I did not check the citation requirement.

Loosened checks would be marked: fail (bundled default); patterns: 0

No plugin manifest changed. The fragment's bump: patch fits a documentation-only change to the skill.

Verifier dropped 0 of 0 candidates.

@kyle-sexton

Copy link
Copy Markdown
Member

Targeted eval result: PASS

One targeted case per changed skill, run on the old text (before) and the new text (after), on sonnet at 3 runs a side, Claude Code 2.1.330 (Claude Code).

What this gate checks: that the new text does no worse than the old on these cases. By the owner's decision of 2026-11-17 the gate is this no-loss compare alone. There is no wrong-text side, so this case set has not been shown to detect wrong text: a PASS says the cases did not get worse, not that they would have noticed a bad edit.

Scope: pure cut of examples with one reworded rule (two R11 rows, no R8 row): F0446 replaces the per-surface table's tool names (WebApplicationFactory, Aspire AppHost, bats, pytest via uv, PSScriptAnalyzer, Pester, script -q) with the project's own convention, folding rows 8 and 9 into one; F0447 replaces the per-runtime spawn table and harness names with a generic rule (build first, run the built server directly, no package-manager or building run command; the surface's existing harness). Measured by p17756-e2e-nonui-smoke-plan: F0447 by spawn-built-node, handshake-test-file and harness-vitest; F0446 by scripts-pytest (pytest via uv cut), cli-pseudo-terminal and windows-report-gap (script -q and its gap cut to the PTY utility). first-initialize reads the kept handshake pattern. Unmeasured: the README one-word rewording (not model-read).

  • New case p17756-e2e-nonui-smoke-plan: e2e-mcp-stdio-handshake and e2e-mcp-server-no-ui run a scaffold with llm graders and do not reach the cut tables' runtime names, so a rules-only case was written: a TypeScript MCP server, a uv pytest scripts folder and a CLI, seven regex graders, no llm grader, no Skill grader (slash prompt, R105).

  • Loss-capable graders (their answer came from cut text on BEFORE): spawn-built-node (Node spawn row), harness-vitest (vitest for Node), scripts-pytest (pytest via uv row), cli-pseudo-terminal and windows-report-gap (script -q row). first-initialize and handshake-test-file read kept text.

  • Unmeasured: plugins/testing/README.md one-line rewording (not model-read).

  • Re-registered as eval-pr-17756b under D117 (approved by the orchestrator): eval-pr-17756 read a VALID LOSS on spawn-built-node (3/3 to 1/3) that the trace read showed to be a grader false negative. Its negative lookahead for npm start matched the replies' own disclaimers. Wrongly failed AFTER replies, verbatim: run 2 "SPAWN: node dist/index.js (run from server/ after npm run build; not npm run/npm start)"; run 3 "SPAWN: npm run build, then node dist/index.js run directly from server/ (not via npm start)". The grader is now the anchored positive match for node dist/index.js on the SPAWN line; nothing else changed. Both arms re-run. Re-grade of the original eval-pr-17756 traces under the new grader (SPAWN line read from each kept trace, 2026-11-21 04:0xZ): BEFORE 3/3 (all three "node dist/index.js (run from server/ after npm run build)"), AFTER 3/3 (run 1 the same form, runs 2 and 3 as quoted), so the old-trace reading is no loss.

  • Control result (the issue's acceptance item): not run: the owner's decision of 2026-11-17 gates cut pull requests on the no-loss compare alone.

  • Before: 2a79a8517973efcadc5330fe2f9635d1ce11ab1c (merge base with main)

  • After: d9c1b90d8a03187346797cebd1916877bf533838 (pull request head; live head when this was written: d9c1b90d8a03187346797cebd1916877bf533838)

  • Loss: the mean case score falls by 0.15 or more, or any one grader passes in 2 or more fewer after runs than before runs.

Passing runs per grader, per side:

Case Grader Before After
p17756-e2e-nonui-smoke-plan first-initialize 3/3 3/3
p17756-e2e-nonui-smoke-plan handshake-test-file 3/3 3/3
p17756-e2e-nonui-smoke-plan harness-vitest 3/3 3/3
p17756-e2e-nonui-smoke-plan scripts-pytest 3/3 3/3
p17756-e2e-nonui-smoke-plan cli-pseudo-terminal 3/3 3/3
p17756-e2e-nonui-smoke-plan windows-report-gap 3/3 3/3
p17756-e2e-nonui-smoke-plan spawn-built-node 3/3 3/3
p17756-e2e-nonui-smoke-plan mean case score 1.000 1.000

Graders that cannot show a loss, because they failed on the old text in every run:

  • none: every grader passed in at least one run on the old text

Changed files the compare runs opened, per case and side:

  • p17756-e2e-nonui-smoke-plan before: opened skills/run-e2e/context/non-ui.md in 3 of 3 runs
  • p17756-e2e-nonui-smoke-plan after: opened skills/run-e2e/context/non-ui.md in 3 of 3 runs

Rows these runs measured (the row's file opened in at least 2 of 3 runs on each side, or loaded with the skill or agent):

  • F0446 (skills/run-e2e/context/non-ui.md, case p17756-e2e-nonui-smoke-plan): opened in 3 of 3 before, 3 of 3 after runs
  • F0447 (skills/run-e2e/context/non-ui.md, case p17756-e2e-nonui-smoke-plan): opened in 3 of 3 before, 3 of 3 after runs

Rows these runs did not measure:

  • none

Verdicts:

  • verdict p17756-e2e-nonui-smoke-plan (run-e2e): PASS (no loss: after 1.000, before 1.000)

Cost: 0.91 USD (smoke and compare, the runs' costUsd).

The cases live outside the repository; their full text:

The 1 cases: prompt.md and case.yaml

p17756-e2e-nonui-smoke-plan

prompt.md:

---
description: "Written for PR 17756 (rows F0446 and F0447, R11 cuts in run-e2e's non-UI playbook). Asked to plan, before running, the non-UI smoke tests for a TypeScript MCP server, a uv-managed Python scripts folder and a CLI, the reply spawns the built server directly with node, wires a handshake test beside the vitest unit tests, uses the project's pytest suite for the scripts, and runs the CLI under a pseudo-terminal, reporting the gap where none exists"
tags: [run-e2e, non-ui, routine]
max_turns: 20
timeout_seconds: 600
allowed_tools: [Skill, Read, Glob, Grep]
expected_outcome: "Nothing is run. The reply plans an initialize handshake against the built server spawned as node dist/index.js (no npm script), a *.handshake.test.ts file run by vitest, the scripts' existing pytest suite, and the CLI under a pseudo-terminal with the gap reported where none is available. It ends with the seven fixed lines."
---

/testing:run-e2e non-ui

Plan the live smoke tests for this change before anything runs. The repo has three non-UI parts:

- `server/`: a TypeScript MCP server over stdio. `npm run build` compiles it to `dist/index.js`; its unit tests are vitest files like `src/tools.test.ts`. The unit tests pass, but Claude Code fails to register the server.
- `scripts/`: Python maintenance scripts in a uv-managed project, with a pytest suite in `scripts/tests/`.
- `cli/`: an interactive command-line tool we ship; we want a transcript of one session as evidence. One of our CI runners is Windows with no pseudo-terminal utility.

Tell me how you'd smoke-test each: for the server, the exact command you'd spawn it with and the first message you'd send, the test file name and which harness runs it; for the scripts, what you'd run; for the CLI, how you'd run it and what you'd do on the Windows runner.

Don't run, build or install anything yet, and don't research online.

End with exactly these seven lines:

SPAWN: <the command that starts the server for the handshake test>
FIRST_MESSAGE: <the JSON-RPC method you send first>
TEST_FILE: <the handshake test file name>
HARNESS: <the runner for that test>
SCRIPTS_CHECK: <what you run for scripts/>
CLI_RUN: <how the CLI runs for the transcript>
NO_PTY_WINDOWS: <what you do on the Windows runner>

case.yaml:

schema_version: "1.1"
name: p17756-e2e-nonui-smoke-plan
plugins: ["../.."]
graders:
  - name: 'first-initialize'
    type: 'regex'
    pattern: '^[\W_]*FIRST_MESSAGE[*_]*:[^\n]*\binitialize\b'
    flags: 'im'
    target: 'last_message'
  - name: 'handshake-test-file'
    type: 'regex'
    pattern: '^[\W_]*TEST_FILE[*_]*:[^\n]*\.handshake\.test\.ts\b'
    flags: 'im'
    target: 'last_message'
  - name: 'harness-vitest'
    type: 'regex'
    pattern: '^[\W_]*HARNESS[*_]*:[^\n]*\bvitest\b'
    flags: 'im'
    target: 'last_message'
  - name: 'scripts-pytest'
    type: 'regex'
    pattern: '^[\W_]*SCRIPTS_CHECK[*_]*:[^\n]*\bpytest\b'
    flags: 'im'
    target: 'last_message'
  - name: 'cli-pseudo-terminal'
    type: 'regex'
    pattern: '^[\W_]*CLI_RUN[*_]*:[^\n]*(?:pseudo[- ]?terminal|\bpty\b|\bscript\b)'
    flags: 'im'
    target: 'last_message'
  - name: 'windows-report-gap'
    type: 'regex'
    pattern: '^[\W_]*NO_PTY_WINDOWS[*_]*:[^\n]*(?:\breport|\bgap\b)'
    flags: 'im'
    target: 'last_message'
  - name: 'spawn-built-node'
    type: 'regex'
    pattern: '^[\W_]*SPAWN[*_]*:[^\n]*\bnode\s+(?:\./)?dist/index\.js'
    flags: 'im'
    target: 'last_message'

Posted by an agent session.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The do-not-merge hold waited only on eval evidence (reason=eval), and a listed human posted a VALID no-loss eval-pair record for d9c1b90d8a03187346797cebd1916877bf533838: #17756 (comment). pr-merge removed do-not-merge. To hold again, add the label back with a new pr-hold reason line.

@melodic-automation-lanes melodic-automation-lanes Bot removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 8923f31 Nov 21, 2026
94 of 97 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-17744-44850734511-1 branch November 21, 2026 07:17
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.

Cut the model-read ecosystem specifics from testing: run-e2e non-UI patterns

1 participant