Skip to content

fix(help): correct input and MCP descriptions, add a first-screen help gate - #3788

Merged
thymikee merged 7 commits into
mainfrom
fix/help-facts-and-first-screen-gate
Oct 17, 2026
Merged

thymikee merged 7 commits into
mainfrom
fix/help-facts-and-first-screen-gate

Conversation

@thymikee

@thymikee thymikee commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Salvages three non-STE parts of closed #3735. The ASD-STE100 help rewrite is not brought over; main's help wording is unchanged.

  • fix(help): correct two wrong input descriptions — launchConsole is a file path for the initial iOS simulator launch stdout/stderr (direct app launches only, not URL opens), not a "launch console mode"; jitterPx is deterministic (pressJitter cycles a fixed table), not random. Matches the existing flag texts.
  • fix(help): name the root decision card in the MCP help tool description — the no-topic call returns buildUsageText() (the root decision card), not the workflow card.
  • fix(help): omit a topic's own entry from its Related footer — manual-qa/workflow no longer self-link.
  • test(help): pin each topic's key rules to its first 30 lines — new cli-help-first-screen.test.ts. Declared rules quote main's exact phrases. The gate passes for the root help and all 18 topics with no rule excluded, so there are no first-screen findings to report.
  • build(bench): default the help bench Codex runner to gpt-6-luna — gpt-5.4-mini fails with a ChatGPT login here.

Touched files: 7. No scope expansion beyond the salvaged items.

Validation

  • Head 138be32b01: pnpm check:affected --run --head 138be32b01 — all runnable checks passed; receipt at .tmp/validation/run-X9KO20/receipt.json (exactCommit=true).
  • pnpm vitest run src/commands/schema src/mcp — 294 passed.
  • Mutation proof: padding the workflow body so a declared rule lands on line 41 fails the gate; rewording "End with: agent-device close" out of the root help fails it as "missing". Both reverted.
  • Bench smoke: node scripts/help-conformance-bench.mjs --runner codex:gpt-6-luna --case focused-type-stops-at-success completes with no runner error.

View guided diff Turn on auto-fix

launchConsole said 'Launch console mode.', but the value is a file path:
runIosSimulatorConsoleLaunch writes the launch stdout/stderr to that path
(simctl launch --console-pty), and open refuses it off an iOS simulator
and for URL opens.

jitterPx said 'Randomization radius in pixels.', but pressJitter cycles a
fixed PRESS_JITTER table scaled by the amount, so the offsets are
deterministic; the --jitter-px flag text already says so.
callHelpTool returns buildUsageText() when the topic is absent, and
buildUsageText() renders renderCliHelpOverview(), the root decision card.
The description said that it returns the full workflow card.
The workflow and manual-qa topics listed themselves in the shared Related
footer. The self-link repeats the topic that the reader is on.
Agents often read only the first screen of a help text, and the help
benchmark caps the root help at 30 lines (`--help:first30`). Declare,
for the root help and for every topic id, the rules from the current
rendering that must stay in lines 1-30: prerequisites, refusals,
verification steps, and recovery. A topic id without an entry fails the
test. The declared rules quote the main rendering; no help text changed.
gpt-5.4-mini fails with a ChatGPT login on this host. gpt-6-luna is the
latest Codex model; a smoke run of one case completes the call and grades
the plan without a runner error.
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.38 MB 5.38 MB +421 B
Package (unpacked) 5.38 MB 5.38 MB +421 B
Package (download) 1.62 MB 1.62 MB +174 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 18.6 ms 19.4 ms +0.8 ms
CLI --help 51.8 ms 52.8 ms +1.0 ms

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

You’re at about 97% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/commands/schema/cli-help-first-screen.test.ts Outdated
Comment thread src/commands/command-input.ts Outdated
pressJitter multiplies a pattern that includes diagonal offsets, so a press
moves up to sqrt(2) x jitterPx. Align the input description, the response
schema, and the flag usage description on the per-axis wording.

#3788 (comment)
A substring match let a short generic rule like 'Commands:' pass from
inside unrelated prose. A rule now counts only when the trimmed rendered
line equals it or starts with it at a word boundary, and each pinned
rule quotes its line from its start. Mutation-proven: a rule moved below
line 30 and a deleted rule both still fail, and a short rule embedded in
prose fails.

#3788 (comment)
@thymikee

Copy link
Copy Markdown
Member Author

Both cubic P3 threads fixed and replied.

  • b1c8082 — jitterPx is now described as a deterministic per-axis offset (input schema, response schema, flag usageDescription); the old "radius" wording overstated nothing but misdescribed the diagonal reach of up to sqrt(2) x jitterPx.
  • 5d267ec — the first-screen gate matches rules against whole rendered lines (equal, or prefix ending at a word boundary); all pinned rules re-anchored to their line starts. Mutation proofs: rule moved below line 30 fails, deleted rule fails, short rule inside prose fails.

Validation: pnpm format, focused vitest (src/commands/schema, src/mcp, parser, option-field), check:mcp-metadata, then pnpm check:affected --run --head 5d267ec — all runnable checks passed (exactCommit=true). Pushed fast-forward on top of 138be32. No CI changes; no rebase needed.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed 5d267ec. The code looks good. The corrected launchConsole, jitterPx and MCP help-tool descriptions match the implementation. Both cubic threads are fixed at this head, so you can resolve them: rules now match whole rendered lines (#3788 (comment)), and jitterPx reads as a per-axis offset in all three places (#3788 (comment)).

Not blocking: no test pins the Related-footer self-omission (https://github.com/callstack/agent-device/blob/5d267ec/src/commands/schema/cli-help.ts#L970), and the router test at https://github.com/callstack/agent-device/blob/5d267ec/src/mcp/__tests__/router.test.ts#L103 still says "workflow card". Could the codex:gpt-6-luna bench default go in its own PR, or could the body say why this PR needs it?

Smoke Tests is still running, and every other check passes. The diff does not touch the smoke route, so a failure there would most likely be unrelated. There are no conflicts.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 17, 2026
@thymikee
thymikee merged commit 4a8abed into main Oct 17, 2026
17 of 18 checks passed
@thymikee
thymikee deleted the fix/help-facts-and-first-screen-gate branch October 17, 2026 18:23
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-17 18:24 UTC

thymikee added a commit that referenced this pull request Oct 17, 2026
…me-no-process-globals

* origin/main:
  fix(help): correct input and MCP descriptions, add a first-screen help gate (#3788)
  test(ios): isolate smoke contracts and synchronize observable state (#3786)
thymikee added a commit that referenced this pull request Oct 17, 2026
…ment

* origin/main:
  fix(help): correct input and MCP descriptions, add a first-screen help gate (#3788)
  test(ios): isolate smoke contracts and synchronize observable state (#3786)
thymikee added a commit that referenced this pull request Oct 18, 2026
…ntract

The gate asserted the pre-#3761 help literal, so the merged pair (#3788 test,
#3761 help owner) fails only in combination on main. Replace the stale rule
with the current full contract line, including the capture-panel-unidentified
refusal. The help text itself is unchanged; the assertion now matches the
rendered first screen.

CI evidence: Coverage job 117649571201 at 73d562b fails this assertion on
unchanged-base integration; it is not caused by this PR's edits and not a
flake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant