Add durable internal resource events #247
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router!247
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-183-internal-events"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scope
Refs #183. Implements the authorized internal event producer on the accepted resource projection: a bounded durable store and independent cursors, semantic deduplication with explicit provenance currency, consistent snapshot/high-water, retained replay with explicit resync causes, restart epochs, caller-side notifications and failure-atomic worker inventory plus observation publication. Existing protocol and identities remain unchanged; no external consumer endpoint, permissions or credentials are introduced.
Event history is diagnostic history, not reconstructed live observations. Restart establishes a new epoch and requires snapshot resynchronization. The store retains at most 256 records / 16 MiB, with a 4 MiB event bound. Equivalent timestamp-only updates do not append events or wake waiters; replay preserves retained events and indicates whether timestamp provenance is current. Producer faults fail producer reads closed without preventing operational revocation; worker report storage failure closes the session and interrupts attempts. External consumer authorization, conformance and installed/browser acceptance remain separate outstanding requirements.
Base
f96d58e6d7d0fffdbe70476850d824efa5de2fb5; head824343ee633de4720ecba17ac8c657e65a7efd47.Validation: focused event, store, control, worker, security, concurrency, crash/restart and source tests;
uv sync --only-dev; fullmake check(3237 tests, 18 skips; package and basedpyright checks);uv run basedpyright;git diff --check. No live provider access.Whole-PR independent review #5 reserved for #183 (reviews #1-4 consumed by PR #244; default issue-delivery maximum 10). Frozen HEAD
2372e2c86314dfca4e0cc40e78454e8abfc6d3ed, base/merge-basef96d58e6d7d0fffdbe70476850d824efa5de2fb5. Review includes security and data-integrity assessment of the complete internal producer change. Reservation is not approval.Review #5 dispatched via native Agent Manager local session
ses_e675fc63bffeWWNGrRPlF9nrZT,pr-reviewerrole, for the reserved HEAD/base. Verdict pending; dispatch metadata is not approval or proof of remote backend identity.Independent review #5, native session
ses_e675fc63bffeWWNGrRPlF9nrZT, at HEAD2372e2c86314dfca4e0cc40e78454e8abfc6d3ed/ basef96d58e6d7d0fffdbe70476850d824efa5de2fb5: REQUEST_CHANGES. P2 findings: report acceptance and endpoint observed-binding update are not serialized with worker reassignment, permitting stale owner binding overwrite; event snapshots omit observation-time provenance, preventing consumers from establishing age after deduplicated refreshes. Reviewer verified frozen refs, complete diff and source; no reported limitations. Fresh review required after remediation.Review #5 findings addressed at
3cb62db0244392949aabac66cd97e503d846acbb: worker binding updates and reassignment share the publication lock; snapshots preserve timestamps with a provenance token and explicit resync for timestamp-only changes. Added interleaving, versioned consumer, schema mismatch and reconnect tests. Fullmake checkpassed (3232 tests, 18 skipped; package checks and basedpyright). Fresh whole-PR review #6 reserved (maximum 10) for HEAD3cb62db0244392949aabac66cd97e503d846acbb, base/merge-basef96d58e6d7d0fffdbe70476850d824efa5de2fb5. Reservation is not approval.Review #6 dispatched via native Agent Manager local session
ses_e6747ac27ffeucAxvJkQjPOWh3,pr-reviewerrole, for the reserved HEAD/base. Verdict pending; dispatch metadata is not approval or proof of remote backend identity.Independent review #6, native session
ses_e6747ac27ffeucAxvJkQjPOWh3, at HEAD3cb62db0244392949aabac66cd97e503d846acbb/ basef96d58e6d7d0fffdbe70476850d824efa5de2fb5: REQUEST_CHANGES. P2 findings: past quota reset timestamps can make a waiter spin at 1 ms; timestamp-only provenance changes do not wake an already waiting consumer for the required resynchronization. Reviewer verified frozen refs, complete diff and relevant source; no reported limitations. Fresh review required after remediation.Review #6 findings addressed at
54073c4d5f56eee7a7e87fdb172efebf308de4b8: waiting consumers are signaled for changed snapshot provenance without duplicate durable events, and deadline calculation filters past resets and rechecks a boundary crossing before waiting. Deterministic tests cover both. The current registry already evaluates a past-reset observation as stale, so the reset filter also defends against future registry changes. Fullmake checkpassed (3235 tests, 18 skipped; package checks and basedpyright). Fresh whole-PR review #7 reserved (maximum 10) for HEAD54073c4d5f56eee7a7e87fdb172efebf308de4b8, base/merge-basef96d58e6d7d0fffdbe70476850d824efa5de2fb5. Reservation is not approval.Review #7 dispatched via native Agent Manager local session
ses_e67302f9effeN27PHTsE01w0pu,pr-reviewerrole, for the reserved HEAD/base. Verdict pending; dispatch metadata is not approval or proof of remote backend identity.Independent review #7, native session
ses_e67302f9effeN27PHTsE01w0pu, HEAD54073c4d5f56eee7a7e87fdb172efebf308de4b8/ basef96d58e6d7d0fffdbe70476850d824efa5de2fb5: REQUEST_CHANGES. P1: producer journal failure can prevent live client-key revocation from taking effect; worker report storage failure can exit without session/attempt cleanup. P2: timestamp-only polling causes full resync notifications and can suppress retained semantic replay. Reviewer verified complete frozen diff and source; no limitations. All material findings block integration. Remaining whole-PR review ordinals: #8-10.Review #7 findings addressed at
824343ee633de4720ecba17ac8c657e65a7efd47: journal failure fences producer reads but does not prevent live operational revocation; worker report storage failure sends a fatal safe error and closes the session/interruption trackers; equivalent timestamp-only refreshes neither wake waiters nor discard retained semantic events, and replay explicitly reports provenance currency. Tests exercise immediate client authentication and in-flight authority rechecks, storage-failure worker cleanup with pending attempts, repeated refreshes and replay. Fullmake checkpassed (3237 tests, 18 skipped; package checks and basedpyright). Fresh whole-PR review #8 reserved (maximum 10) for HEAD824343ee633de4720ecba17ac8c657e65a7efd47, base/merge-basef96d58e6d7d0fffdbe70476850d824efa5de2fb5. Reservation is not approval.Review #8 dispatched via native Agent Manager local session
ses_e67151851ffeYG6284Szqep6Jh,pr-reviewerrole, for the reserved HEAD/base. Verdict pending; dispatch metadata is not approval or proof of remote backend identity.Independent review #8, native session
ses_e67151851ffeYG6284Szqep6Jh, returned APPROVE with empty findings for exact HEAD824343ee633de4720ecba17ac8c657e65a7efd47/ base and merge-basef96d58e6d7d0fffdbe70476850d824efa5de2fb5. The reviewer verified the complete frozen diff, relevant issue and security context and reported no limitations; review was read-only. UX: explicit resync and timestamp-provenance uncertainty, no new external interface. Forgejo CI and final currentness/integration gates remain pending.Native session-scoped metadata for review #8 records agent
pr-reviewer, provideropenai, modelgpt-6.1-terra, variantmedium; no per-session permission override was present. The selected reviewer profile is read-only and the native transcript shows read-only source operations. This metadata does not independently prove remote backend identity.Pre-merge currentness: approved HEAD
824343ee633de4720ecba17ac8c657e65a7efd47, freshly fetched base/merge-basef96d58e6d7d0fffdbe70476850d824efa5de2fb5, clean checkout, issue open with no excluded labels. Forgejo workflow #3453 completed SUCCESS on the approved HEAD; the newestci / check (pull_request)status is success, while the combined status resource still includes two earlier pending records and reports pending. No force or auto-merge will be used. Issue #183 remains open for external consumer authorization and conformance.