Skip to content

fix(self-driving): keep a paused operational scout paused on rerun - #415

Open
posthog[bot] wants to merge 2 commits into
mainfrom
posthog-self-driving/fixself-driving-preserve-user-paused-2e9857
Open

posthog[bot] wants to merge 2 commits into
mainfrom
posthog-self-driving/fixself-driving-preserve-user-paused-2e9857

Conversation

@posthog

@posthog posthog Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • A user who pauses inbox validation, then reruns self-driving setup, gets the pause reversed. The scout then uses scheduled runs and restarts report checks without consent.
  • Step 6 told setup to update every disabled operational scout to { enabled: true }. That write also clears a failure-breaker pause, because the config API resumes a paused_by_system row on enabled: true.
  • Signals never resumes these pauses itself: see the reconcile contract and the setup-pause repair test.

Origin

  • Scout: a custom scout
  • First signal: 2026-09-28
  • Inbox report: open
  • Task started by: auto-start, after the report was rated P3 and ready to fix

Changes

  • Setup never writes to an operational scout. scout-config-sync already runs reconcile_operational_configs, which resumes the pauses the harness made (inactivity-sweep pauses, and rows the seed created disabled). That sync is the server-supported recovery path.
  • A row that is still disabled after the sync stays disabled. Setup reads status and pause_reason and records one follow-up:
Row state Setup action
paused_by_user Leave off. Follow-up: turn it back on if nobody paused it on purpose.
paused_by_system + repeated_failures Leave off. Follow-up: the breaker probes it; check recent runs.
paused_by_system + other reason Leave off. Follow-up: likely the enabled-scout cap.
no status field (older deploy) Leave off. Follow-up: state unknown.
  • The normal disable pass still skips operational scouts. Step 7 lists any operational scout that setup left off.

Note

The config API does not expose status_changed_by or status_changed_at, so setup cannot tell a pause from an earlier setup version apart from a person's pause. It leaves both off. PostHog's resume_setup_paused_operational_scouts command repairs the setup-created ones server-side.

Agent context

  • Verified against posthog 03b9fe1b (current master): fleet_sync.materialize_scout_fleet → register_missing_configs → reconcile_operational_configs; SignalScoutConfigSerializer exposes status and pause_reason only.
  • Rejected: having setup read provenance and send enabled: true for setup-created pauses. The API exposes no attribution field, and the sync already covers every pause the server can safely resume.
  • npm test and npm run build pass. The change is prose only.

Created with PostHog Desktop from this inbox report.

🤖 Generated with Claude Code

Step 6 told setup to update every disabled operational scout to enabled: true. That overrules a pause a person made and a pause the failure breaker owns, which Signals itself never resumes. scout-config-sync already resumes the pauses the harness made, so setup now leaves a still-disabled operational scout as it is and records a follow-up keyed on status and pause_reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 8faa167d-f453-42b5-ad52-3bb48ec1afcc
@posthog posthog Bot added the self-driving label Sep 28, 2026
@posthog
posthog Bot marked this pull request as ready for review September 28, 2026 12:10
@posthog

posthog Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

🦔 PostHog Review reviewed this pull request

Found 0 must fix, 1 should fix, 0 consider.

Published 1 finding (view the review).

Resolved comments: 1 fixed

@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a wizard branch:

  • /wizard-ci all wizard:my-branch

Add wizard:<branch> to any command above to pin the wizard branch. It defaults to main.

Results will be posted here when complete.

@posthog

posthog Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PostHog Review

Found 1 should fix.

Comment thread context/skills/self-driving/references/6-scouts.md Outdated
…l scout

Step 1c counted only enabled operational scouts against max_enabled_scouts. A breaker-paused operational scout is disabled, so setup could give its slot to a troop scout. The breaker resume checks the cap and has no operational exemption, and scout-config-sync leaves repeated_failures pauses alone, so the lane could stay paused after a successful probe.

Step 1c now reserves a slot for each breaker-paused operational scout. When the cap is already full, setup records a follow-up that names the cap as the blocker, and the step 3 breaker follow-up no longer promises a resume that cannot happen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: c9f4508e-5c80-4a4a-b443-6afde95694e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant