Skip to content

feat: shorten cooldown only after confirmed recovery - #62

Closed
abruption wants to merge 2 commits into
mainfrom
fix/recovery-cooldown
Closed

abruption wants to merge 2 commits into
mainfrom
fix/recovery-cooldown

Conversation

@abruption

@abruption abruption commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Closes #61; related #44/#43. A recovered outage previously imposed the full global cooldown on a distinct new outage. This adds an explicit optional shorter interval for newly confirmed incidents while retaining daily budgets, one claim per incident, fresh state and new grant requirements.

  • Default remains disabled/3claims-per-24h/3600s. The operating proposal preserves12/24h and3600s, adding only600s for the eligible new-outage path.
  • Require a new-code-issued claim, immutable first explicit success report, and three distinct consecutive fresh verified_running SSH+ping healthy observations spanning60s with gaps<=150s. A later distinct pending incident must follow that confirmed boundary. Legacy/rollback-code claims, first unknown results, stale/local errors, ambiguity and missing proof keep the global interval.
  • Preserve durable claim/proof/report evidence and existing bounded policy-unblocked events. Status exposes configured/effective cooldown and basis; retry_at never grants execution.
  • Add a pinned root helper that checks the exact DB path and each unit independently, preserves KR's local mail extensions with a narrow constructor patch, and retains all existing policy/config fields. Schema adoption happens only after healthy/quiescent preflight and broker stop. Rollback never rewinds ledgers; new claims after restart require operator attention rather than older-code automatic restoration.

Validation:225 local research tests passed (one Linux-only skip), including45 core and19 deployment-helper cases. Research CI and standard CI passed on the exact candidate. Independent parallel Claude Code2.1.312/claude-opus-5-5 and Codex CLI0.165.0/isolated default model (actual name not exposed) final reviews both report no required corrections after fixes. Final frozen input SHA25687856e5b7fec21aef22e0b23816a37e179d695cc50828c371b96fb32c155a93c; private evidence retained.

The operator applied the pinned candidate on2026-10-29. Installed code/new configuration and individually active broker/socket/Caddy/audit services were verified; fresh relay delivery/subscription is healthy. Existing12/24h and3600s policy values, mail extensions, claims and subscriptions were preserved. See the deployment comment for observations and unrun natural recovery cases. No artificial live outage, claim or callback was generated. New-incident behavior has isolated validation; future natural recovery is separate evidence. Standard package version/source manifest remain unchanged; this does not enable the in-VM watchdog or automatic updates. Uncontrolled mixed-version reporting and certificate/transport policy changes are outside scope.

@abruption abruption added this to the v0.8.0 milestone Oct 28, 2026
@gitguardian

gitguardian Bot commented Oct 28, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
39201706 Triggered Generic Password 02b2800 research/mcp-events/test_new_incident_policy_deployment.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T13:39:15.306511Z 6f27ef6 PR opened
🔒 Security Review ✅ Completed 2026-10-28T13:41:46.071360Z 6f27ef6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption

Copy link
Copy Markdown
Owner Author

Operator deployment completed on2026-10-29 after sudo authentication. The helper reported applied=true with existing max_claims_per_24h=12 and cooldown_seconds=3600 preserved, adding only new_incident_cooldown_seconds=600. Before/after lifetime claims stayed24, subscriptions5, active subscriptions1 and no sending deliveries/open incidents. These are lifetime ledger counts, not a claim that24 attempts occurred within the rolling24h window.

Independent post-deployment checks: installed recovery_core.py SHA2562d3b20833e2772cb1916218ba38bee174e546d83b139781bf1e64ebad590367f matches the reviewed candidate; the live server load_recovery call contains the new keyword. Broker socket/service, Caddy and audit timer are individually active. Audit/monitor data are fresh with no active signals; relay reports failure_class=ok, stale_delivery=false and subscription_active=true. Existing mail extensions were preserved and the ledger was not restored.

No artificial outage, claim or callback was generated. The600s path applies only after a new-code-issued claim's first explicit success and qualifying external healthy evidence, for a later distinct outage. Existing/old-code claims are not backfilled. This verifies deployment/configuration; the next natural qualifying recovery remains separate end-to-end evidence. PR remains open for review/merge.

@abruption

Copy link
Copy Markdown
Owner Author

Superseded by #74, which carries this cooldown implementation into the reviewed v0.8.0 integration. The original discussion and historical operating evidence remain here. This PR is closed without merging; do not merge it separately.

@abruption abruption closed this Oct 29, 2026
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.

feat: shorten cooldown for new outages after confirmed recovery

1 participant