Repository navigation
feat(moduleauthority): ReadJournal reads the host's journal by page - #40
Draft
crisfiorini-oss wants to merge 18 commits into
Draft
crisfiorini-oss wants to merge 18 commits into
crisfiorini-oss wants to merge 18 commits into
Conversation
crisfiorini-oss
force-pushed
the
feat/read-journal
branch
from
October 13, 2026 14:58
b8a38a2 to
1ead5f3
Compare
crisfiorini-oss
marked this pull request as ready for review
October 13, 2026 15:18
crisfiorini-oss
force-pushed
the
feat/read-journal
branch
from
October 15, 2026 16:24
4fae273 to
173ae0b
Compare
STOPGAP, labelled: ModuleCapabilitiesService.ReadJournal and its messages (ModuleReadJournalRequest, ModuleJournalEntry, ModuleReadJournalResponse) are not in module-saas-starter v0.0.94 and no release carries them yet. These two files were generated by this repo's buf.gen.yaml (buf 1.73.0, pinned plugins) from the v0.0.94 proto with the agreed wire contract added to module_capabilities.proto in a scratch checkout. The v0.0.94 proto alone reproduces gen/ byte for byte, so the diff is the contract and nothing else. The gen-drift job fails until gen/ is regenerated from the release that publishes the contract; SOURCE.txt says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Client.ReadJournal(ctx, afterSeq, limit, types) calls ModuleCapabilitiesService.ReadJournal on the authority endpoint as the module, through callAsModule like the sibling methods: host codes preserved, a rejected capability refreshed once, nothing else retried. JournalPage.NextAfterSeq is the host's resume point. A negative position, a limit outside 0..500 or no type is ErrInvalidJournalRead before any call. Depends on the generated contract in the previous commit, which is waiting for the saas-starter release (see CHANGELOG.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReadJournal(ctx, after, limit, types, deliveryBindings) takes and returns opaque positions: a reader stores and compares them, never parses them. JournalEntry gains Position and DeliveryMachinery (the host's mark for a mint or exchange of one of the named delivery bindings, or the caller's own module mint), and JournalPage.NextAfter replaces NextAfterSeq. An empty type or delivery binding id is ErrInvalidJournalRead before any call. The host fake serves the new contract and the tests follow it. STOPGAP, labelled, as before: the regenerated gen/ carries the contract (ModuleReadJournalRequest with after and delivery_bindings, ModuleJournalEntry with position and delivery_machinery, ModuleReadJournalResponse with next_after) from a scratch saas-starter v0.0.94 checkout plus the contract, by this repo's buf.gen.yaml (buf 1.73.0). It replaces the earlier contract, which was never published. The gen-drift job fails until gen/ is regenerated from the saas-starter release that publishes it; SOURCE.txt and CHANGELOG.md say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ldest entry The host defines the literal "start": it accepts it as ReadJournal's after and as the from of its delivery operation, and never returns it as an entry's position. A reader with no position of its own starts a range from it. The host fake accepts it and a test reads from it. The regenerated proto comment says so (comment-only change in gen/, still waiting for the saas-starter release). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generate the complete host-owned schema from module-saas-starter d5ea5dc75790dfeb55a5492eaa7c7b759df7a84d with the pinned SDK plugins. Consume the exact host Core contract and remove ApprovedBuild from WorkContextSources, matching the current live verifier API. Keep Work Contexts opaque and retain the real workload-listener conformance assertions.
Record the exact final host source after its rebase onto current main. Preserve current SDK facade and mint APIs, keep journal changes under Unreleased, and document the protected workload-listener conformance coverage. The full owner generation reproduces from the unchanged accounts proto tree.
crisfiorini-oss
force-pushed
the
feat/read-journal
branch
from
October 21, 2026 20:34
09d8c6f to
4a785ff
Compare
crisfiorini-oss
marked this pull request as draft
October 26, 2026 19:32
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add bounded journal reads to the existing
moduleauthority.Client, preserving its authenticated transport, module-credential cache and refresh-once behavior. Journal positions remain opaque and the host marks delivery machinery.Draft: hosted CI requires repository-admin approval. Publication also requires the actual host release and compatible shared owner releases; no release version is guessed.
Changes
Client.ReadJournal; reuse the existing client, broker, credentials, HTTP/2 transport, Connect errors and decoder. Remove the extra reader factory and its duplicate fixtures. No new credential producer, cache, retry loop or transport is added.v0.0.0-20261026143932-67b85b14a942requires Corev0.19.7-0.20261026092055-b23dc13543b2; Go 1.27.3 remains required. These refs are not represented as released tags.Classification: fix, at the existing journal/schema client owner.
Client.ReadJournaland remove the additional reader factory. Request validation and page decoding stay in this owner; consumers map the existing projection.Validation
Rebased onto upstream main
29ab843f; pushed headf73008be0b8703dc62f9f70e600b44419dd9e411. SOURCE.txt records exact host protocol revisionbb66a84cfff053bcccf3f0842bc6ffa6b2e0d159. Later host commits change Go/tests/audit metadata, not these schema/generator inputs. Publication must regenerate from the actual host tag.Release prerequisites
Release the host, regenerate from the actual host tag and adopt compatible shared owner releases before SDK publication. Downstream consumers require the resulting actual SDK release and green CI.
This PR does not claim a composed Runtime credential producer: the shared Authority cannot mint the unbound
module-capabilitiesidentity assumed by the earlier consumer adapter. Runtime now refuses enabled journal startup until its producer route is composed and reviewed. No live audit-delivery or warehouse round trip is claimed.