Skip to content

fix: name batch guard steps and add actionable command-syntax and loopback hints - #459

Merged
fitchmultz merged 1 commit into
mainfrom
fix/actionable-guard-hints
Nov 25, 2026
Merged

fitchmultz merged 1 commit into
mainfrom
fix/actionable-guard-hints

Conversation

@fitchmultz

Copy link
Copy Markdown
Owner

Summary

Make agent_browser guard refusals and syntax errors immediately actionable based on 3 days of fleet session traces (43 unique errors), keeping every ref, page-target, and click-actionability guard unchanged.

Changes

  • Exact step references on batch guard refusals (session-state-refs.ts, page-target-batch.ts, page-target-validation.ts, batch-stdin.ts, runtime-redaction.ts):
    • Name the exact earlier batch step (1-based original row number + redacted command) that invalidated page-scoped @eN refs.
    • Name the first batch step requiring a verified page before open or get url.
  • Actionable command-syntax & loopback hints (command-error-hints.ts, errors.ts, batch-step.ts):
    • Suggest wait --text <text> for wait text=..., launch-time --user-agent <ua> for set user-agent, and standard CSS / native find role / find text for Playwright-only :text-is() / :has-text() selectors.
    • Lead loopback ERR_CONNECTION_REFUSED hints with checking that the local server/fixture is running and listening before browser-host routing diagnostics.
  • Codemode follow-on guidance (playbook.ts, docs):
    • Remind codemode callers to check .success after open before issuing follow-on commands in that session (within the existing startup/prompt token budget).
  • Synchronized README.md, docs/{ARCHITECTURE,COMMAND_REFERENCE,SUPPORT_MATRIX,TOOL_CONTRACT}.md, and focused tests.

Verification

  • npm run format:check, npm run lint, npm run quality:scope, npm run quality:policy, npm run typecheck, npm run docs, git diff --check passed.
  • Focused tests across 4 modified test files passed 109/109. Full verify runs in hosted CI.

@fitchmultz
fitchmultz force-pushed the fix/actionable-guard-hints branch from 73c138a to 3ebc579 Compare November 25, 2026 22:31
@fitchmultz
fitchmultz merged commit 884e563 into main Nov 25, 2026
11 checks passed
@fitchmultz
fitchmultz deleted the fix/actionable-guard-hints branch November 25, 2026 22:38
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