Skip to content

feat(breg): add native record timers for governed future actions - #2478

Merged
jeremi merged 3 commits into
mainfrom
feat/breg-record-timers
Oct 28, 2026
Merged

jeremi merged 3 commits into
mainfrom
feat/breg-record-timers

Conversation

@jeremi

@jeremi jeremi commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

A Record type can schedule a one-shot immediate Action from its stored due date, window and rearm fields. Execution reads current Record facts and commits the Action effects, history, receipt, outbox event and timer settlement together. Pausing and resuming eligibility does not make settled work fire again.

The change adds strict timer declarations and exact root grants, atomic staging on the existing write paths, lazy package-policy reconciliation, PostgreSQL claims and fencing across BReg processes, and bounded inspection, pause, resume and technical retry commands. A maintained future-activation example and operating guide cover upgrade, adoption, retention and replica setup.

Validation:

  • The final clean eight-package BReg run passes 3,144 tests, with 16 existing explicitly ignored benchmark, helper and environment/composition cases. The MCP target passes 125/125. The selected timer PostgreSQL proofs execute separately rather than silently skipping without a database.
  • Real PostgreSQL runs on the repaired runtime pass core 60/60, clock 6/6, metrics 6/6, retention 3/3, native process tests 29/29, operator tests 16/16 with the freshly built CLI, and writer/package tests 224/224. The final test-only strengthening separately passes import-authority rollback/success/replay and distinct durable claims by two replica processes, one focused test each from a clean detached checkout.
  • Managed-catalog fingerprint tests pass 12/12 on PostgreSQL 17 and 12/12 on PostgreSQL 18.4. Required replica, crash, stale-owner, policy refresh, no-refire, authority and recovery assertions are retained.
  • Hosted verification exposed test assumptions about timestamp precision, fixture setup time and concurrent worker cleanup. The repairs force a sub-microsecond input, preserve current-policy window assertions, compare lag with a known persisted due time, and quiesce the worker before the synthetic removed-binding projection. All 60 lifecycle, six metrics and 16 operator tests pass on the clean follow-up candidates, with applicable PG-feature Clippy. The strict assertions and production behavior are preserved. All required hosted checks and all eight heavy BReg lanes are green on the current head.
  • Applicable generated-artifact comparisons, identifier closure, CLI documentation, language-server, Python, product/static checks, Clippy configurations, formatting and secret scans pass at their recorded checkpoints. The final test-only MCP diagnostics also pass all-target Clippy with warnings denied.
  • The final production documentation check passes, including the built internal link check. Source and generated artifacts remain clean after verification.

Two earlier local full-package attempts failed intermittently in the existing concurrent MCP retry test. The cause was not reproduced in the diagnostic or final clean run. Safe test-only elapsed, transport/status and method/path observations are retained; production behavior, timeout settings and the success/same-ID/single-creation assertions are unchanged.

This milestone covers one-shot current-record timers. Backfill tooling, timer-initiated recurrence, Messaging delivery, Studio authoring, Proposal timing, membership authorization and per-record timer projections remain separate work. Mixed-binary rolling replacement, full physical restore and large-backlog capacity are not claimed. Release and deployment are separate from this implementation PR.

@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-28T17:29:17.314423Z b15aec2 Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c549207f8

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jeremi jeremi added the ci:full Run the heavy integration tier on this pull request label Oct 28, 2026
@jeremi
jeremi marked this pull request as draft October 28, 2026 11:11
Add one-shot record timers with exact root authority, atomic current-record execution, replica fencing and bounded operator recovery.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi force-pushed the feat/breg-record-timers branch from 5c54920 to a11aa4a Compare October 28, 2026 15:39
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi marked this pull request as ready for review October 28, 2026 17:26
@jeremi
jeremi added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit e92bd76 Oct 28, 2026
73 checks passed
@jeremi
jeremi deleted the feat/breg-record-timers branch October 28, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the heavy integration tier on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant