-
Notifications
You must be signed in to change notification settings - Fork 9
docs: nightly doc-gardening sweep 2026-06-08 #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # p-models/durableactor/bridge | ||
|
|
||
| ## Purpose | ||
|
|
||
| Go conformance harness that replays P model mailbox traces against the real | ||
| `db/actordelivery` SQLite store. Keeps the formal P model abstraction tied to | ||
| the SQL claim implementation: every P scenario in `mailbox_fifo_test.p` | ||
| that produces a trace is replayed here using production store code, so a | ||
| divergence between the model and the implementation fails the Go test rather | ||
| than the P checker. | ||
|
|
||
| ## Key Types | ||
|
|
||
| - `MailboxTrace` — A named sequence of mailbox operations loaded from a JSON | ||
| trace file (`trace_id`, `description`, `events`). | ||
| - `MailboxTraceEvent` — One store operation in a trace: `op` (enqueue/lease/ | ||
| nack/ack/commit/dead_letter/expire_leases), plus op-specific fields for id, | ||
| mailbox_id, lease_token, expected outcome, etc. `ExpectDuplicate` asserts | ||
| idempotent no-op enqueue semantics. `ExpectProcessed` verifies the dedup | ||
| mark after a fenced commit. | ||
| - `ParseMailboxTrace(path)` — Parses one trace file from disk. | ||
| - `ParseMailboxTraceDir(dir)` — Parses all `*.json` trace files in a directory, | ||
| sorted by `TraceID`. | ||
| - `ReplayMailboxTrace(t, trace)` — Replays a trace against a fresh SQLite | ||
| `actordelivery` store in a temp dir. The `commit` op models the Read/Commit | ||
| fenced-ack pattern exactly: it runs `AckMessage` + `MarkProcessed` inside one | ||
| writer transaction, rolling back with `actor.ErrLeaseLost` when the ack row | ||
| count is zero. | ||
|
|
||
| ## Relationships | ||
|
|
||
| - **Depends on**: `db/actordelivery` (real store under test), `baselib/actor` | ||
| (store interfaces, `ErrLeaseLost`), `db/sqlc` (backend type constants). | ||
| - **Depended on by**: nothing (test-only package, invoked via | ||
| `go test ./p-models/durableactor/bridge`). | ||
|
|
||
| ## Invariants | ||
|
|
||
| - Every trace op that can fail hard uses `t.Fatal`; partial replays are not | ||
| allowed to proceed silently. | ||
| - The `commit` op is the sole site where `ExecTx`/`AckMessage`/`MarkProcessed` | ||
| are combined — it deliberately mirrors `execCore.commit` in `baselib/actor` | ||
| so the P model's commit-fence scenario stays tied to the real SQL path. | ||
| - Duplicate enqueue ops (`ExpectDuplicate: true`) must complete without error; | ||
| a future rejection would fail here explicitly rather than at a later lease | ||
| step. | ||
|
|
||
| ## Deep Docs | ||
|
|
||
| - [p-models/durableactor/CLAUDE.md](../CLAUDE.md) — P model structure, trace | ||
| layout, and check commands. | ||
| - [p-models/CLAUDE.md](../../CLAUDE.md) — Top-level p-models layout and | ||
| orchestration. | ||
| - [docs/durable_actor_architecture.md](../../../docs/durable_actor_architecture.md) | ||
| — Durable actor internals. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method name
LeaseNextMailboxMessageis a typo. The actual method implemented on the store and called indurable_mailbox.goisLeaseNextMessage.