feat(bench): renderer-pinned samples, topic-coverage gate, error-recovery quizzes; trim skillgym to agentic checks - #1411
Conversation
…zes; trim skillgym to agentic checks The help conformance bench's quoted CLI output is now sourced from scripts/help-conformance-sample-outputs.mjs, and every sample is rebuilt through the real production renderers (settle output formatters, printHumanError, formatSnapshotText, refMutationAdmissionResponse) by scripts/__tests__/help-conformance-sample-outputs.test.ts — a rendering or message change fails deterministically instead of leaving the bench grading against output the CLI no longer prints. This retires the fabricated recoverable-failure envelope (production never throws a textual settle timeout; that case is replaced by a real DEVICE_IN_USE recovery quiz). Bench cases move to scripts/help-conformance-cases.mjs and are enumerated against the help-topic registry: helpTopicIds() is exported from cli-help, and scripts/__tests__/help-conformance-topic-coverage.test.ts fails when a help topic has neither a bench case nor an explicit waiver. New case families: error-envelope recovery quizzes (device-in-use, stale pinned ref, ambiguous find match, app-not-installed) pinned to real error text, topic coverage for tv/web/react-native/debugging/workflow, and a metamorphic twin of the settled-diff quiz. The skillgym smoke suite shrinks from 119 cases to the 5 that measure what only an agentic runner can show: skill routing plus output interpretation with a proven local CLI help probe (local-cli-help-policy). Its embedded samples now import the same pinned constants, replacing hand-transcribed output that had already drifted from the renderer. Knowledge checks belong to the bench; live fixture behavior belongs to the iOS simulator e2e suite.
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
|
Reviewed exact head
Keep |
#1296 explicitly leaves physical-iPhone SpringBoard unverified; the only evidence so far is an iPhone simulator run, whose private-AX fallback is simulator-only. Applied to both the CLI help topic and website/docs/docs/commands.md, with a link to the tracking issue. Dropped the SkillGym case from this PR per thymikee: most of that harness is being removed in #1411, so it's not worth iterating on here.
…-help on the routing smoke The DEVICE_IN_USE, AMBIGUOUS_MATCH, and APP_NOT_INSTALLED parity tests no longer hand-author the producer message before rendering: each drives the actual producer — buildDeviceInUseBySessionError (extracted in session-open.ts and called by the handler), buildAmbiguousMatchError (now exported from find.ts), and buildAppNotInstalledError (extracted in app-resolution.ts and thrown by the resolver). Because each factory is exported from its producer file and called by the production path, dropping the production call would make it test-only and fail check:production-exports — the wiring is gate-enforced, not conventional. open-and-snapshot now sets requireLocalCliHelp and allowOnlyLocalCliHelpCommands, so the 'skill plus local help' claim is observed rather than assumed; without them the case can pass on model prior alone.
|
Both P2s addressed at ec31963:
Gates: format/typecheck/lint green; scripts/tests + local-cli-help-policy 37/37; find/session-open/app-resolution suites 53/53; fallow audit + production-exports clean. 🤖 Addressed by Claude Code |
|
Re-reviewed exact head |
… A) (#1395) * docs: bless the works-today iOS SpringBoard/widget workflow (#1296 PR A) Live probe on iOS 26.2/Xcode 26.2 proved open com.apple.springboard already binds a driveable SpringBoard session with zero code changes: the full widget add/edit/remove flow is selector-driven from a fresh snapshot, aside from two documented coordinate fallbacks. Add a help ios-system-ui topic (and cross-links from physical-device/workflow, the skill router, and docs/commands.md) so agents can use it today, ahead of the --ui-target contract and gallery-capture fix landing. * docs: scope the SpringBoard claim to verified iOS simulator support #1296 explicitly leaves physical-iPhone SpringBoard unverified; the only evidence so far is an iPhone simulator run, whose private-AX fallback is simulator-only. Applied to both the CLI help topic and website/docs/docs/commands.md, with a link to the tracking issue. Dropped the SkillGym case from this PR per thymikee: most of that harness is being removed in #1411, so it's not worth iterating on here. * fix(test): keep help ios-system-ui out of the 30-line first-screen budget #1404 added a benchmark gate requiring every Agent Workflows pointer to stay within the first 30 lines of bare `agent-device help` output. Adding ios-system-ui to that list pushed help macos to line 31. Drop the AGENT_WORKFLOWS entry; the topic stays fully reachable via its cross-references from help physical-device, help workflow's Escalate section, the agent-device skill router, and website/docs/docs/commands.md.
Summary
Follow-up to #1404: makes the help conformance bench the single command-planning benchmark and trims SkillGym to the checks only an agentic runner can provide.
scripts/help-conformance-sample-outputs.mjs, andscripts/__tests__/help-conformance-sample-outputs.test.tsrebuilds every sample through the real production code: the settle output formatters (including the ADR 0014 pinned tail refs the old samples were missing),printHumanError,formatSnapshotTextwith the real private-ax quality warning, and the actualrefMutationAdmissionResponserejection. A rendering or message change now fails a deterministic unit test instead of leaving the bench grading models against output the CLI no longer prints.sample-output-recoverable-failure-retries-in-sessioncase quoted anerror COMMAND_FAILED: / retriable: / details:envelope the CLI never renders — a production settle timeout is a success withnot settled after Nms. It is replaced by a realDEVICE_IN_USErecovery quiz whose message and recovery hint come fromsession-open.tsandbuildSessionRecoveryHint.scripts/help-conformance-cases.mjs;helpTopicIds()is exported fromcli-help.ts, andscripts/__tests__/help-conformance-topic-coverage.test.tsfails when a help topic has neither a bench case nor an explicit, reasoned waiver (waived: cdp, macos, maestro, physical-device, react-devtools, remote). Stale or already-covered waivers also fail.snapshot -i; ambiguous find → re-observe rather than guess unseen refs; app-not-installed →appsdiscovery, no invented installs), topic-keyed planning cases fortv,web,react-native,debugging, andworkflow, and a metamorphic twin of the settled-diff quiz to resist overfitting the help text to the benchmark.local-cli-help-policy). Their embedded samples import the same pinned constants through a small.d.mts, replacing hand-transcribed output that had already drifted from the renderer. README anddocs/agents/testing.mdnow route command-planning knowledge checks to the bench and live fixture behavior to the iOS simulator e2e suite (test(ios): expand simulator e2e coverage #1408).Validation
pnpm format:check,pnpm typecheck,pnpm lint,pnpm check:layering,pnpm check:fallow,pnpm check:production-exportsall green.scripts/__tests__,test/skillgym/suites/local-cli-help-policy.test.ts, andsrc/cli/parser/__tests__/cli-help-topics.test.ts.unit-corerun: 499 files passed; 4 timeout-shaped failures in the documented contention-flaky files (request-router-open,runner-client, plus the subprocess-spawning bench test under full-suite load) — all 92 tests in those files pass in isolation.pnpm bench:help-conformance --repeat 3(paid LLM calls, local) before treating them as regression signal; the tv/web matchers are the most likely to need loosening.