Skip to content

feat(goal/browser): stage persistent blocker audits and safer Stop recovery - #5

Draft
AKzar1el wants to merge 5 commits into
fix/windows-update-orphan-and-stale-banner-20261112from
fix/unify-goal-blocking-stop-recovery-20261114
Draft

AKzar1el wants to merge 5 commits into
fix/windows-update-orphan-and-stale-banner-20261112from
fix/unify-goal-blocking-stop-recovery-20261114

Conversation

@AKzar1el

Copy link
Copy Markdown
Owner

Objective

Stage (do not yet deploy) two narrowly scoped reliability changes on top of our tested Windows Codexify baseline. Based on relevant parts of LeZergan's upstream PR #24 and PR #22, not a wholesale import of either PR.

1. Persistent goal-blocker audit (opt-in)

  • agentChat.automation.persistentGoalBlockers defaults false.
  • When enabled, goal_finish(status=blocked) requires the same concrete blocker over three distinct goal turns spanning at least 60 seconds.
  • Tool errors instruct continued independently authorized, free-only work; authorization, payment, contracting, spending and private-access gates remain unchanged.
  • A private per-chat sidecar audit keeps original strict goal-state JSON unchanged so the installed binary has a rollback-compatible state format.
  • New revision/restart resets effective audit; no unbounded browser retries.

2. Stop/End-turn recovery

  • Recognize standard and localized Stop controls plus the explicit End-turn label.
  • Wait for a briefly disabled Stop/End-turn control with an 8s bounded click, rather than never attempting it.
  • Re-evaluate after modal confirmation, keeping strict Send ownership and actual dialog safeguards.
  • New non-native unit checks and native-browser regression fixture.

Deliberately not adopted yet

LeZergan's parallel four-lane browser pool is not enabled or merged. The 16 GB Windows host still needs a low-memory concurrency, replay, throttling and browser RSS soak.

Verification

  • cargo fmt --all, git diff --check: pass
  • cargo check --lib: pass
  • cargo check --tests: previously passed on earlier staged code; rerunning after private-sidecar migration
  • Browser TypeScript tsc --noEmit: pass
  • Stop-control non-browser tests: 2/2 pass
  • Native Chrome fixture: not verified (browser startup timeout on loaded Windows machine)
  • No local release, service restart, installed-browser patch, or config activation.

Release gate

Resolve native browser regression, obtain full CI, check exact tasks and idle/rollback permissions, then use the guarded maintenance path. No work on the existing 10 hourly source workers, no goal-state manufacturing, no unapproved revenue actions.

This is a fork-internal draft, based on the existing Windows branch rather than a duplicate upstream PR.

Copy link
Copy Markdown
Owner Author

Verification update for e5559ed (local Windows staging; not installed):

  • cargo fmt --all -- --check, git diff --check, cargo check --lib, and cargo check --tests: pass.
  • Standalone rustc --test for the pure blocker policy: 3/3 pass (distinct accepted turns, 60s threshold, clock rollback and overflow).
  • Browser TypeScript tsc --noEmit: pass; non-Chrome Stop-selector checks: 2/2 pass.
  • Bun 1.4.0, matching upstream CI, with isolated native Chrome fixtures:
    • disabled End turn waits, stops, and sends exactly once: pass
    • non-modal suggestion popovers are ignored: pass
    • localized Stop confirmation for chat/goal/combined prompts: pass
    • unrelated/ambiguous confirmation dialogs are never approved: pass
  • Bun 1.3.2 on this Windows host could launch Chrome but could not complete Patchright's connection; a minimal Node.js and Bun 1.4.0 probe showed the runner incompatibility. This was an isolated test-environment failure, not a production fix.
  • Full Rust test execution and full browser suite are not green/complete. Fork PR targets the existing Windows branch, so the GitHub workflow limited to PRs targeting main is not triggered automatically.
  • Installed service and Chrome companion left untouched; deployment requires the Windows scheduled-task Administrator gate and a guarded, recoverable maintenance step.

The original strict goal-state JSON remains unchanged. The blocker audit is opt-in and saved in a private sidecar; payment and authorization gates stay enforced. Parallel browser lanes remain off pending a memory/Send-idempotency soak.

Copy link
Copy Markdown
Owner Author

Follow-up commit 33fad0f addresses two observed Windows fleet issues: (1) ChatGPT conversation cooldowns previously created a background tab before rejecting navigation, then immediately closed it. The new preflight prevents that 1→2→1 tab flicker while preserving manually authorized Retry; its focused browser tests pass (34 pass, 1 native test skipped). (2) terminal goal states now clear stale turn-renewal state, the notice path refuses to renew non-active goals, and the supervisor retires terminal handoffs without affecting independent hourly worker chats. Rust cargo check --tests, TypeScript and Git diff validation pass. The live binary and installed companion remain unchanged until a guarded release is installed. The managed Chrome window has been minimized as a non-destructive interim mitigation.

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