Skip to content

[3811 by GPT-6.2 Astra] Idle shutdown: redeliver the GitHub webhook that woke the instance (direct-webhook mode) - #3812

Merged
integry merged 4 commits into
3758-epic-runtime-abstraction-sc0from
3811/gpt-6.2-astra-idle-shutdown-redeliver-t-20261125-1715-kfx
Nov 25, 2026
Merged

integry merged 4 commits into
3758-epic-runtime-abstraction-sc0from
3811/gpt-6.2-astra-idle-shutdown-redeliver-t-20261125-1715-kfx

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3811

Branch: 3811/gpt-6.2-astra-idle-shutdown-redeliver-t-20261125-1715-kfx
Commits: ✅ Changes committed (bebd3a3)


AI Processing Completed

Execution Details:

Summary:
Implemented direct-webhook recovery for issue #3811. After a recorded idle stop, ProPR waits for the webhook listener, scans GitHub App deliveries back to two minutes before the stop, and requests up to 200 redeliveries. It skips GUIDs with a later successful attempt and stops on rate limits. Recovery counts are logged and exposed at idleShutdown.lastWake.webhookRecovery.

The Fly smoke workflow and tutorial use the versions from PR #3804, which were absent from this checkout. The workflow now checks the App’s event subscriptions, configures its webhook, verifies that GitHub accepted a redelivery after wake, and restores the previous configuration during cleanup.

Verification: 77 tests passed, including an in-flight duplicate test. TypeScript, OpenAPI validation, and the docs build passed. App JWT requests and fixture restoration were also verified with mocked GitHub responses.

Live Fly verification remains pending. The temporary-branch push needed to trigger it is handled by the automated workflow, so there is no live run link yet.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • .github/workflows/fly-e2e.yml (added, +290/−0): CI or workflow file
  • Normal risk (8 files)
    • packages/api/openapi/routeDocsIdleShutdown.ts (+4/−0)
    • packages/api/server.ts (+4/−1)
    • packages/api/webhookHandler.ts (+8/−11)
    • packages/client/src/generated/apiTypes.ts (+7/−0)
    • packages/shared/src/idleShutdown.ts (+9/−0)
    • src/daemon.ts (+12/−4)
    • src/daemon/directWebhookRecovery.ts (added, +94/−0)
    • src/daemon/idleShutdown.ts (+10/−0)
  • Low risk (6 files)
    • docs/docs/operations/idle-shutdown.md (+5/−1)
    • docs/docs/tutorials/setup-fly.md (added, +135/−0)
    • docs/static/openapi/propr-api.yaml (+19/−0)
    • test/directWebhookRecovery.test.ts (added, +61/−0)
    • test/idleShutdownRecovery.test.ts (+23/−0)
    • test/webhookReplayProtection.test.ts (+29/−0)

Diff size: 15 files changed, +710/−17 lines

View task for the run's logs and conversation.


This PR was created automatically by ProPR after processing issue #3811.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

Recovering the webhook that wakes a Fly Machine

Recovering the webhook that wakes a Fly Machine

Idle shutdown guide showing the measured cold start, recovery window, and API status counters.

Full-size original

Implemented direct-webhook recovery for issue #3811. After a recorded idle stop, ProPR waits for the webhook listener, scans GitHub App deliveries back to two minutes before the stop, and requests up to 200 redeliveries. It skips GUIDs with a later successful attempt and stops on rate limits. Recovery counts are logged and exposed at `idleShutdown.lastWake.webhookRecovery`.

The Fly smoke workflow and tutorial use the versions from PR #3804, which were absent from this checkout. The workflow now checks the App’s event subscriptions, configures its webhook, verifies that GitHub accepted a redelivery after wake, and restores the previous configuration during cleanup.

Verification: 77 tests passed, including an in-flight duplicate test. TypeScript, OpenAPI validation, and the docs build passed. App JWT requests and fixture restoration were also verified with mocked GitHub responses.

Live Fly verification remains pending. The temporary-branch push needed to trigger it is handled by the automated workflow, so there is no live run link yet.

ProPR-Agent: codex/gpt-6.2-astra
@github-actions

Copy link
Copy Markdown

Checks Failed

Validation failed during setup, tests, CLI packaging, linting, or build checks.

View Logs
Build check diagnostics for run 45664586342, attempt 1
Checkout outcome: success

--- GitHub Actions workflow lint ---
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667: Pulling from rhysd/actionlint
589002ba0eae: Pulling fs layer
c09af8888d6a: Pulling fs layer
4ccd7d76ca98: Pulling fs layer
b6b4b7b0e257: Pulling fs layer
b6b4b7b0e257: Waiting
589002ba0eae: Verifying Checksum
589002ba0eae: Download complete
c09af8888d6a: Verifying Checksum
c09af8888d6a: Download complete
4ccd7d76ca98: Verifying Checksum
4ccd7d76ca98: Download complete
589002ba0eae: Pull complete
b6b4b7b0e257: Verifying Checksum
b6b4b7b0e257: Download complete
c09af8888d6a: Pull complete
4ccd7d76ca98: Pull complete
b6b4b7b0e257: Pull complete
Digest: sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
Status: Downloaded newer image for rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667

--- Release shell script lint ---

--- Toolchain ---
v22.23.5
10.9.9

--- Dependency installation ---
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@fly/[email protected]',
npm warn EBADENGINE   required: { node: '>=24.0.0' },
npm warn EBADENGINE   current: { node: 'v22.23.5', npm: '10.9.9' }
npm warn EBADENGINE }
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
npm warn deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

added 1120 packages, and audited 1130 packages in 1m

318 packages are looking for funding
  run `npm fund` for details

8 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

--- CLI release package ---
Verifying propr-cli release package...

> [email protected] cli:pack
> node packages/cli/scripts/build-publish.mjs


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc && node scripts/copy-assets.mjs

copy-assets: copied 9 file(s) into the CLI package.

Staged [email protected] at /home/runner/work/propr/propr/dist-publish/propr-cli
npm notice
npm notice 📦  [email protected]
npm notice Tarball Contents
npm notice 32.0kB README.md
npm notice 36.3kB dist/agentSkill.js
npm notice 477B dist/api/admission.js
npm notice 754B dist/api/agentRuntime.js
npm notice 7.1kB dist/api/agents.js
npm notice 2.6kB dist/api/agentTank.js
npm notice 4.4kB dist/api/automations.js
npm notice 13.3kB dist/api/client.js
npm notice 5.9kB dist/api/errors.js
npm notice 1.6kB dist/api/followupHandoffs.js
npm notice 16.9kB dist/api/goals.js
npm notice 6.0kB dist/api/implement.js
npm notice 2.9kB dist/api/index.js
npm notice 1.9kB dist/api/logs.js
npm notice 7.7kB dist/api/plans.js
npm notice 586B dist/api/pullRequests.js
npm notice 4.2kB dist/api/relay.js
npm notice 12.5kB dist/api/repos.js
npm notice 2.5kB dist/api/repositoryEvents.js
npm notice 16.2kB dist/api/settings.js
npm notice 2.0kB dist/api/stats.js
npm notice 1.6kB dist/api/syntheticPools.js
npm notice 1.8kB dist/api/system.js
npm notice 5.9kB dist/api/tasks.js
npm notice 2.9kB dist/api/todos.js
npm notice 86B dist/api/types.js
npm notice 313B dist/api/visualPreviewAuth.js
npm notice 35.2kB dist/assets/env.example.txt
npm notice 5.9kB dist/auth/githubLogin.js
npm notice 5.0kB dist/auth/verifyToken.js
npm notice 10.5kB dist/commands/admissionCommands.js
npm notice 19.7kB dist/commands/agentCommands.js
npm notice 4.2kB dist/commands/agentPoolCommands.js
npm notice 4.3kB dist/commands/agentSkillCommands.js
npm notice 30.0kB dist/commands/agentValidation.js
npm notice 31.2kB dist/commands/automationCommands.js
npm notice 73.1kB dist/commands/checkCommands.js
npm notice 8.9kB dist/commands/configCommands.js
npm notice 14.6kB dist/commands/connectCommand.js
npm notice 3.1kB dist/commands/deploy/flyBrowserAuth.js
npm notice 7.6kB dist/commands/deploy/flyctlBackend.js
npm notice 18.3kB dist/commands/deploy/flyDeployRunner.js
npm notice 7.3kB dist/commands/deploy/flyIntake.js
npm notice 13.6kB dist/commands/deploy/flyLegacyDocker.js
npm notice 18.4kB dist/commands/deploy/flyMachineConfig.js
npm notice 7.8kB dist/commands/deploy/flyMachinesApi.js
npm notice 2.7kB dist/commands/deploy/flyOrgPlan.js
npm notice 8.4kB dist/commands/deploy/flyRelay.js
npm notice 2.3kB dist/commands/deploy/flyStaleMachineConfig.js
npm notice 24.7kB dist/commands/deployFly.js
npm notice 12.2kB dist/commands/eventCommands.js
npm notice 5.5kB dist/commands/githubAppApi.js
npm notice 27.7kB dist/commands/githubAppCommands.js
npm notice 60.8kB dist/commands/goalCommands.js
npm notice 9.4kB dist/commands/handoffCommands.js
npm notice 3.7kB dist/commands/idleShutdownCheck.js
npm notice 2.4kB dist/commands/imageCommands.js
npm notice 8.6kB dist/commands/implementCommands.js
npm notice 2.1kB dist/commands/index.js
npm notice 8.4kB dist/commands/initCommands.js
npm notice 14.1kB dist/commands/initStack.js
npm notice 6.1kB dist/commands/logCommands.js
npm notice 26.5kB dist/commands/planCommands.js
npm notice 3.1kB dist/commands/prCommands.js
npm notice 8.4kB dist/commands/relayCommands.js
npm notice 41.4kB dist/commands/repoCommands.js
npm notice 2.7kB dist/commands/repoValidate.js
npm notice 7.5kB dist/commands/runtimeCommands.js
npm notice 19.8kB dist/commands/settingCommands.js
npm notice 4.6kB dist/commands/setup/agentHostActions.js
npm notice 123B dist/commands/setup/agents.js
npm notice 4.7kB dist/commands/setup/engine.js
npm notice 51B dist/commands/setup/github.js
npm notice 37.3kB dist/commands/setup/hostActions.js
npm notice 3.2kB dist/commands/setup/imagePlatform.js
npm notice 27.3kB dist/commands/setup/sequential.js
npm notice 51B dist/commands/setup/state.js
npm notice 51B dist/commands/setup/types.js
npm notice 10.7kB dist/commands/setupCommand.js
npm notice 4.4kB dist/commands/stackCommands.js
npm notice 1.8kB dist/commands/startCommand.js
npm notice 4.8kB dist/commands/statsCommands.js
npm notice 4.9kB dist/commands/statsCostCommand.js
npm notice 15.2kB dist/commands/systemCommands.js
npm notice 3.5kB dist/commands/tankCommands.js
npm notice 47.6kB dist/commands/taskCommands.js
npm notice 29.7kB dist/commands/todoCommands.js
npm notice 31.0kB dist/commands/tunnelCommand.js
npm notice 2.7kB dist/commands/uiDocsCommands.js
npm notice 8.3kB dist/completion.js
npm notice 27.3kB dist/config/ConfigManager.js
npm notice 276B dist/config/index.js
npm notice 989B dist/config/rootKey.js
npm notice 345B dist/config/types.js
npm notice 46.0kB dist/connectIdentity.js
npm notice 25.0kB dist/connectRootAuthority.js
npm notice 32.5kB dist/connectWindowsAuthority.js
npm notice 2.2kB dist/desktopDiscovery.js
npm notice 13.3kB dist/desktopLocalSetup.js
npm notice 17.4kB dist/index.js
npm notice 4.5kB dist/native/darwin-authority-broker.c
npm notice 8.9kB dist/native/directory-operations.c
npm notice 50.1kB dist/native/prebuilds/darwin-arm64/connect-authority-broker
npm notice 54.2kB dist/native/prebuilds/darwin-arm64/directory-operations.node
npm notice 17.1kB dist/native/prebuilds/darwin-x64/connect-authority-broker
npm notice 24.3kB dist/native/prebuilds/darwin-x64/directory-operations.node
npm notice 28.9kB dist/native/prebuilds/linux-arm64/directory-operations.node
npm notice 17.4kB dist/native/prebuilds/linux-x64/directory-operations.node
npm notice 1.2kB dist/native/README.md
npm notice 3.1kB dist/orchestrator/format.js
npm notice 14.4kB dist/orchestrator/index.js
npm notice 302B dist/orchestrator/manifest.json
npm notice 137.3kB dist/orchestrator/orchestrator.mjs
npm notice 408B dist/orchestrator/types.js
npm notice 6.2kB dist/rootHelp.js
npm notice 237B dist/skill/propr/agents/openai.yaml
npm notice 8.9kB dist/skill/propr/SKILL.md
npm notice 4.5kB dist/tui/AgentTableApp.js
npm notice 4.5kB dist/tui/app.js
npm notice 11.6kB dist/tui/CheckApp.js
npm notice 5.4kB dist/tui/render.js
npm notice 32.5kB dist/tui/SetupApp.js
npm notice 18.4kB dist/tui/SetupApp.test.js
npm notice 8.4kB dist/tui/StartApp.js
npm notice 3.8kB dist/utils/apiErrorPresentation.js
npm notice 12.0kB dist/utils/directoryDescriptor.js
npm notice 739B dist/utils/dockerPort.js
npm notice 5.0kB dist/utils/envFile.js
npm notice 520B dist/utils/index.js
npm notice 5.7kB dist/utils/io.js
npm notice 717B dist/utils/localSetupPlatform.js
npm notice 1.5kB dist/utils/nativeArtifact.js
npm notice 544B dist/utils/parseState.js
npm notice 417B dist/utils/positiveInteger.js
npm notice 4.5kB dist/utils/privateFilesystem.js
npm notice 4.2kB dist/utils/resolveProject.js
npm notice 7.2kB dist/vendor/local-setup/agents.js
npm notice 64.5kB dist/vendor/local-setup/engine.js
npm notice 5.0kB dist/vendor/local-setup/envFile.js
npm notice 11.4kB dist/vendor/local-setup/github.js
npm notice 188B dist/vendor/local-setup/index.js
npm notice 27.5kB dist/vendor/local-setup/publicInstanceIdentity.js
npm notice 14.6kB dist/vendor/local-setup/state.js
npm notice 2.8kB dist/vendor/local-setup/types.js
npm notice 13.2kB dist/vendor/shared/acceptanceCriteria.js
npm notice 1.0kB dist/vendor/shared/accountStatusTimestamp.js
npm notice 7.7kB dist/vendor/shared/activityEvents.js
npm notice 2.8kB dist/vendor/shared/agentConfigRedaction.js
npm notice 4.4kB dist/vendor/shared/agentDefinitions.js
npm notice 2.3kB dist/vendor/shared/agentFailureLine.js
npm notice 3.4kB dist/vendor/shared/agentLogin.js
npm notice 3.1kB dist/vendor/shared/agentTank.js
npm notice 1.2kB dist/vendor/shared/agentTankHistory.js
npm notice 2.8kB dist/vendor/shared/analyticsTimeframe.js
npm notice 4.4kB dist/vendor/shared/antigravityCompatibility.js
npm notice 5.1kB dist/vendor/shared/apiOrigin.js
npm notice 3.5kB dist/vendor/shared/assignment.js
npm notice 17.2kB dist/vendor/shared/automationDefinitions.js
npm notice 9.2kB dist/vendor/shared/automationReportPreview.js
npm notice 2.4kB dist/vendor/shared/automationRunProductivity.js
npm notice 6.4kB dist/vendor/shared/automationTemplateContract.js
npm notice 18.5kB dist/vendor/shared/automationTemplates.catalog.json
npm notice 1.3kB dist/vendor/shared/automationTemplates.js
npm notice 3.4kB dist/vendor/shared/changedFileKinds.js
npm notice 1.4kB dist/vendor/shared/claudeCompatibility.js
npm notice 12.1kB dist/vendor/shared/commitSubject.js
npm notice 8.5kB dist/vendor/shared/connectDiscovery.js
npm notice 9.6kB dist/vendor/shared/cronSchedule.js
npm notice 254B dist/vendor/shared/demoMode.js
npm notice 4.3kB dist/vendor/shared/desktopPairing.js
npm notice 481B dist/vendor/shared/desktopTokenRevocation.js
npm notice 8.9kB dist/vendor/shared/events.js
npm notice 13.0kB dist/vendor/shared/extensionLibrary.js
npm notice 703B dist/vendor/shared/extensionOAuth.js
npm notice 4.0kB dist/vendor/shared/extensionPackages.js
npm notice 2.9kB dist/vendor/shared/extensionProfiles.js
npm notice 2.7kB dist/vendor/shared/fleetData.js
npm notice 2.5kB dist/vendor/shared/githubAppManifest.js
npm notice 1.6kB dist/vendor/shared/githubAuthMode.js
npm notice 2.0kB dist/vendor/shared/githubEventIntakeMode.js
npm notice 12.8kB dist/vendor/shared/goalBlockers.js
npm notice 6.0kB dist/vendor/shared/goalCheckpoints.js
npm notice 4.0kB dist/vendor/shared/goalCreation.js
npm notice 5.1kB dist/vendor/shared/goalWait.js
npm notice 9.1kB dist/vendor/shared/idleShutdown.js
npm notice 14.7kB dist/vendor/shared/index.js
npm notice 214B dist/vendor/shared/instanceAuthorization.js
npm notice 54B dist/vendor/shared/instanceCatalog.js
npm notice 584B dist/vendor/shared/instanceStorage.js
npm notice 4.0kB dist/vendor/shared/intakeModePrerequisites.js
npm notice 2.9kB dist/vendor/shared/labelUtils.js
npm notice 21.0kB dist/vendor/shared/modelDefinitions.js
npm notice 3.5kB dist/vendor/shared/notificationLinks.js
npm notice 51.3kB dist/vendor/shared/notifications.js
npm notice 2.9kB dist/vendor/shared/openCodeCompatibility.js
npm notice 16.9kB dist/vendor/shared/planItemGraph.js
npm notice 7.5kB dist/vendor/shared/previewStorage/v1.js
npm notice 866B dist/vendor/shared/projectSlug.js
npm notice 3.8kB dist/vendor/shared/proprCompatibility.js
npm notice 884B dist/vendor/shared/proprRuntimePaths.js
npm notice 13.0kB dist/vendor/shared/proprServiceUrls.js
npm notice 17.0kB dist/vendor/shared/prTemplate.js
npm notice 6.9kB dist/vendor/shared/prTitleStatusSlot.js
npm notice 2.2kB dist/vendor/shared/publishedVisualPreviews.js
npm notice 2.7kB dist/vendor/shared/reasoningLevels.js
npm notice 1.8kB dist/vendor/shared/repositoryEvents.js
npm notice 6.7kB dist/vendor/shared/repositoryEventWait.js
npm notice 1.2kB dist/vendor/shared/repositoryIcon.js
npm notice 1.4kB dist/vendor/shared/repositoryIconUrl.js
npm notice 3.9kB dist/vendor/shared/repositoryPresentation.js
npm notice 10.4kB dist/vendor/shared/reviewContextBudget.js
npm notice 5.8kB dist/vendor/shared/reviewFeedbackIds.js
npm notice 2.7kB dist/vendor/shared/reviewPrompt.js
npm notice 907B dist/vendor/shared/runCostCap.js
npm notice 861B dist/vendor/shared/sessionSecret.js
npm notice 392B dist/vendor/shared/sqliteTimestamp.js
npm notice 1.5kB dist/vendor/shared/statusKeys.js
npm notice 7.5kB dist/vendor/shared/syntheticAgents.js
npm notice 2.2kB dist/vendor/shared/taskIdentifiers.js
npm notice 2.0kB dist/vendor/shared/taskLifecycle.js
npm notice 733B dist/vendor/shared/taskReplacement.js
npm notice 957B dist/vendor/shared/text.js
npm notice 2.6kB dist/vendor/shared/tokenOutlierSettings.js
npm notice 1.9kB dist/vendor/shared/ultrafixCycle.js
npm notice 1.8kB dist/vendor/shared/unfinishedRun.js
npm notice 9.8kB dist/vendor/shared/usageTips.catalog.json
npm notice 5.0kB dist/vendor/shared/usageTips.js
npm notice 335B dist/vendor/shared/usageTypes.js
npm notice 1.1kB dist/vendor/shared/userWhitelist.js
npm notice 758B dist/vendor/shared/validateRelayUrl.js
npm notice 2.2kB dist/vendor/shared/validateRoutingUrl.js
npm notice 7.1kB dist/vendor/shared/visualPreviewCapacity.js
npm notice 9.3kB dist/vendor/shared/voice.js
npm notice 222B dist/vendor/shared/workEvidence.js
npm notice 828B package.json
npm notice Tarball Details
npm notice name: propr-cli
npm notice version: 0.9.3
npm notice filename: propr-cli-0.9.3.tgz
npm notice package size: 594.2 kB
npm notice unpacked size: 2.4 MB
npm notice shasum: d4cb90365a64c0f93f3bb572a717d5ca94acaec4
npm notice integrity: sha512-RVgIUFvmyTmD9[...]4SQHHKOEbl6SA==
npm notice total files: 235
npm notice
propr-cli-0.9.3.tgz

Dry run only. Re-run with --publish to publish to npm.
✅ propr-cli release package verified
Starting changed-area validation process...
Reusing this job's @propr/shared build from CLI packaging.
Reusing this job's @propr/local-setup build from CLI packaging.

--- Core Service: Lint & Build ---
❌ Core Lint FAILED

> [email protected] lint
> eslint src/ --max-warnings 0


/home/runner/work/propr/propr/src/daemon/idleShutdown.ts
  624:1  warning  File has too many lines (407). Maximum allowed is 400  max-lines

✖ 1 problem (0 errors, 1 warning)

ESLint found too many warnings (maximum: 0).

--- UI: Typecheck, Lint & Build ---
✅ Client Package validation passed
✅ UI Typecheck passed
✅ UI Lint passed
✅ UI Build passed

--- Docs: Typecheck & Build ---
✅ Docs Typecheck passed
✅ Docs Build passed
✅ Docs Static Serving Check passed

--- Core Package: Build & Lint ---
✅ Core Package Build passed
✅ Core Package Lint passed

--- CLI: Lint ---
✅ CLI Lint passed

--- API: Build & Lint ---
✅ API Build passed
✅ API Lint passed

--- API Reference: OpenAPI Spec & Client Contract ---
✅ OpenAPI spec is current and valid
✅ @propr/client matches the OpenAPI spec

--- Stage outcomes ---
Workflow lint: success
Release shell lint: success
Pre-setup gate: skipped
Node setup: success
Toolchain: success
Dependency install: success
Release metadata: success
CLI packaging: success
Change detection: success
Changed-area checks: failure
Chromium install: skipped
PWA and mobile browser smoke: skipped

View Workflow

@propr-dev

propr-dev Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate Changes

Please investigate and fix this CI failure.

Failure evidence

.github:8
Process completed with exit code 1.

.github:415
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 34881fd

Summary of Changes

Fixed the max-lines failure in idleShutdown.ts by reusing five existing IdleDrainContext field definitions and simplifying an import. The change preserves runtime behavior.

Core lint passed with zero warnings, the TypeScript build passed, and all 62 focused shutdown and webhook recovery tests passed.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • src/daemon/idleShutdown.ts (+2/−15)
  • Low risk: none

Diff size: 1 file changed, +2/−15 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @github-actions[bot]
  • Time: 5m 32s
  • Tokens: 660,720 (659,343 in / 1,377 out)
  • Cost: $0.57

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7169598790✓

Fixed the `max-lines` failure in [idleShutdown.ts](/home/node/workspace/src/daemon/idleShutdown.ts) by reusing five existing `IdleDrainContext` field definitions and simplifying an import. The change preserves runtime behavior.

Core lint passed with zero warnings, the TypeScript build passed, and all 62 focused shutdown and webhook recovery tests passed.

PR: #3812
Comment by: @github-actions[bot] (ID: 7169598790)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @propr-dev[bot]

Analysis Summary

The reported Validate Changes failure is already fixed on the PR branch. At bebd3a3929e0, ESLint counted 407 lines in src/daemon/idleShutdown.ts, exceeding the 400-line limit. Follow-up 34881fd3a removed duplicated type declarations.

I reproduced the original failure and verified that npm run lint -- --max-warnings 0 passes on the current branch. All 62 focused idle-shutdown and webhook recovery tests also passed. No additional edits were needed.

GitHub canceled the follow-up validation run during dependency installation, before it reached lint.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: GPT-6.2 Astra (medium)
  • Time: 6m 5s
  • Tokens: 1,003,852 (1,001,311 in / 2,541 out)
  • Cost: $0.73

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7169600435✓

@integry

integry commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Scope: keep this PR to the core recovery

F1 (blocker): this PR creates .github/workflows/fly-e2e.yml (+290) and docs/docs/tutorials/setup-fly.md (+135), which don't exist on the epic branch yet. They come from #3804 (Fly docs and the end-to-end smoke), which is still open against the epic. Merging both PRs would conflict on two new files with diverging contents.

Please:

  1. Remove .github/workflows/fly-e2e.yml and docs/docs/tutorials/setup-fly.md from this PR entirely, so the diff against 3758-epic-runtime-abstraction-sc0 no longer touches them.
  2. Keep the core change: src/daemon/directWebhookRecovery.ts, the daemon / idle-shutdown / webhook-handler wiring, the replay protection, the idle-shutdown status field (OpenAPI and client types), the tests, and the docs/docs/operations/idle-shutdown.md update (including the measured 15–20 s cold start).
  3. In the PR description, list what [3769 by GPT-6.2 Astra] Docs and end-to-end smoke test: ProPR on Fly under $5/month #3804 needs from this PR so it can be applied there after this merges and [3769 by GPT-6.2 Astra] Docs and end-to-end smoke test: ProPR on Fly under $5/month #3804 is updated from the epic:
    • the smoke workflow points the fixture App's own webhook at the disposable instance with PATCH /app/hook/config, instead of creating a repository webhook with the PAT, and restores it in an always() step;
    • the App subscription requirement (Issues and Pull request events);
    • the tutorial note that the waking delivery is redelivered after start.

Items 6 and 7 of #3811 move to #3804. The live smoke acceptance for #3811 runs from #3804 once both are on the epic branch.

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 75053c9

Summary of Changes

Removed the Fly smoke workflow and setup tutorial from #3812. Both paths now have an empty diff against 3758-epic-runtime-abstraction-sc0. The core recovery, replay protection, status API and client types, tests, and operations guide with the measured 15–20 s cold start are intact. All 35 focused tests passed.

GitHub denied the integration permission to edit the PR description. The handoff text remains pending:

Handoff to #3804

Items 6 and 7 of #3811 move to #3804. After #3812 merges, update #3804 from the epic and apply these changes:

  • Replace PAT-based repository webhook creation in the smoke workflow. Save the fixture App’s webhook configuration, point its own webhook at the disposable instance with PATCH /app/hook/config, and restore the original configuration in an always() step.
  • Require the fixture App to subscribe to both Issues and Pull request events.
  • Update the Fly tutorial to explain that after the instance starts, ProPR requests redelivery of the webhook delivery that woke it.

Run live smoke acceptance for #3811 from #3804 once both changes are on the epic branch.

Review digest

Risk-tiered paths

  • High risk (1 file)
    • .github/workflows/fly-e2e.yml (deleted, +0/−290): CI or workflow file
  • Normal risk: none
  • Low risk (1 file)
    • docs/docs/tutorials/setup-fly.md (deleted, +0/−133)

Diff size: 2 files changed, +0/−423 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @integry
  • Time: 4m 10s
  • Tokens: 289,894 (287,753 in / 2,141 out)
  • Cost: $0.31

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7170914658✓

Removed the Fly smoke workflow and setup tutorial from #3812. Both paths now have an empty diff against `3758-epic-runtime-abstraction-sc0`. The core recovery, replay protection, status API and client types, tests, and operations guide with the measured 15–20 s cold start are intact. All 35 focused tests passed.

GitHub denied the integration permission to edit the [PR description](#3812). The handoff text remains pending:

### Handoff to #3804

Items 6 and 7 of #3811 move to #3804. After #3812 merges, update #3804 from the epic and apply these changes:

- Replace PAT-based repository webhook creation in the smoke workflow. Save the fixture App’s webhook configuration, point its own webhook at the disposable instance with `PATCH /app/hook/config`, and restore the original configuration in an `always()` step.
- Require the fixture App to subscribe to both **Issues** and **Pull request** events.
- Update the Fly tutorial to explain that after the instance starts, ProPR requests redelivery of the webhook delivery that woke it.

Run live smoke acceptance for #3811 from #3804 once both changes are on the epic branch.

PR: #3812
Comment by: @integry (ID: 7170914658)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra

integry commented Nov 25, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=3

@propr-dev propr-dev Bot added the ultrafix label Nov 25, 2026
@propr-dev

propr-dev Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 3)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds bounded GitHub App delivery recovery after idle wake, with status reporting and focused tests. It needs a localized correction to deduplication retention before merge.

✅ Listener readiness — API startup now awaits listening, so sequential all-in-one startup makes the webhook endpoint available before daemon recovery.

✅ Bounded recovery — Recovery caps redelivery requests at 200, spaces requests, and reports errors and counters.

✅ Concurrent duplicate protection — The added test verifies that a redelivery arriving during original processing receives 409 without invoking the processor again.

The supplied current-head checks show no failures and one pending check. This review uses static analysis of the supplied code; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Retain reservations across duplicate attempts

  • Category: correctness

  • Required behavior: Recovery must not repeat already-processed webhook side effects while recovering failed attempts still present in GitHub’s delivery history.

  • Evidence: packages/api/webhookHandler.ts:19, WEBHOOK_DELIVERY_TTL_SECONDS; src/daemon/directWebhookRecovery.ts:43, listFailedDeliveries

    1. A direct webhook is successfully processed on day 0. Its Redis reservation expires three days after that first acceptance.
    2. On day 2, an operator requests a GitHub redelivery of the same GUID. The existing reservation causes the handler to return 409. The SET NX failure does not extend the reservation’s expiration, while this new failed attempt has its own delivery timestamp.
    3. The instance subsequently stops idle. Shortly after day 3, it wakes and scans a window containing the day-2 attempt. That attempt remains within the documented three-day delivery history, but the original success is outside that history and the Redis reservation has expired.
    4. Recovery selects the failed attempt and requests another redelivery. The handler now accepts the GUID and invokes the processor again, repeating an already-processed event.

    The three-day TTL protects only the interval following initial acceptance, whereas recovery operates on recent attempts, including attempts of older GUIDs. The seen set cannot find the original success outside the scan/history, and the in-flight duplicate test does not cover reservation expiration. static trace: the supplied handler retains the original TTL on duplicate rejection, and the new scanner selects failed attempts by their delivered_at timestamp. This sequence was not executed.

  • Minimum fix: Refresh an existing GUID reservation’s retention when rejecting a duplicate, without allowing concurrent duplicates to enter processing. Add a regression covering a duplicate attempt near the original reservation’s expiry followed by idle recovery.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise live wake recovery

The implementation summary says live Fly verification remains pending. A smoke run demonstrating a timed-out waking delivery followed by successful processing would complement the injected API tests and verify the platform timing assumptions. This is optional deployment evidence, rather than a separate verified code blocker.

Score

The implementation is focused and the reported checks are encouraging, but automatic recovery can outlive the deduplication reservation and repeat processing. The required correction is localized.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 4s
  • Tokens: 57,848 (56,344 in / 1,504 out)
  • Cost: $0.53

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 1e79e6f

Addressed 1 AI review comment (IDs: 7171601113)

Addressed finding F1

Summary of Changes

Fixed F1. A duplicate webhook now atomically renews its GUID reservation before returning HTTP 409, so concurrent attempts cannot both enter processing.

The new regression covers a duplicate just before expiry followed by idle recovery just after the original expiry. Recovery received 409, and the processor ran exactly once.

All 42 focused tests passed. TypeScript and git diff --check also passed.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (2 files)
    • packages/api/server.ts (+1/−3)
    • packages/api/webhookHandler.ts (+7/−6)
  • Low risk (2 files)
    • packages/api/test/mergedPrTaskCancellation.test.ts (+1/−1)
    • test/webhookReplayProtection.test.ts (+51/−107)

Diff size: 4 files changed, +60/−117 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @propr-ultrafix
  • Time: 4m 26s
  • Tokens: 456,501 (453,683 in / 2,818 out)
  • Cost: $0.51

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

Fixed F1. A duplicate webhook now atomically renews its GUID reservation before returning HTTP 409, so concurrent attempts cannot both enter processing.

The new regression covers a duplicate just before expiry followed by idle recovery just after the original expiry. Recovery received 409, and the processor ran exactly once.

All 42 focused tests passed. TypeScript and `git diff --check` also passed.

PR: #3812
Comment by: @propr-ultrafix (ID: 0)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR adds bounded GitHub App webhook recovery after idle wake, extends delivery deduplication retention, and exposes recovery results through the status API. No merge-blocking defect is demonstrated by the supplied diff and context. Merge readiness is conditional on the remaining checks completing successfully.

✅ Listener readiness — API startup now awaits the listening event before the all-in-one supervisor starts the daemon.

✅ Bounded recovery — Recovery deduplicates delivery GUIDs across pages, caps redelivery requests at 200, and stops on reported rate-limit exhaustion.

✅ Concurrent replay protection — The atomic Redis operation retains duplicate suppression while renewing expiry; the added test covers redelivery during original processing.

This was a static review; no commands were run.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Cover recovery API failures

The new tests cover pagination, request limits, and quota exhaustion, but not exceptions during listing or partway through redelivery. Optional tests could verify that error, redelivered, and skipped accurately describe partial recovery. The error-handling path is present; this would strengthen regression coverage.

S3: 🟢 Verify production Redis semantics

The replay tests use an in-memory implementation of SET GET EX. An optional integration test against the supported Redis version would verify first-delivery acceptance, duplicate rejection, and TTL renewal through the actual client used by server.ts.

Score

The implementation is focused and includes useful boundary and concurrency coverage. No verified blocker remains; the supplied current-head status reports no failures and four pending checks, while live Fly verification remains unconfirmed.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 32s
  • Tokens: 61,913 (61,295 in / 618 out)
  • Cost: $0.53

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S2 S3

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 25, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3811 by GPT-6.2 Astra] Idle shutdown: redeliver the GitHub webhook that woke the instance (direct-webhook mode) ✅❽ [3811 by GPT-6.2 Astra] Idle shutdown: redeliver the GitHub webhook that woke the instance (direct-webhook mode) Nov 25, 2026
@integry
integry merged commit 695ec09 into 3758-epic-runtime-abstraction-sc0 Nov 25, 2026
50 checks passed
@propr-dev propr-dev Bot changed the title ✅❽ [3811 by GPT-6.2 Astra] Idle shutdown: redeliver the GitHub webhook that woke the instance (direct-webhook mode) [3811 by GPT-6.2 Astra] Idle shutdown: redeliver the GitHub webhook that woke the instance (direct-webhook mode) Nov 25, 2026
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