feat: finalize cyclic topology support - #14
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47475da0f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (selected == null) { | ||
| throw new IllegalArgumentException("No exact value at " + pointer); | ||
| } | ||
| return wrap(ExactValue.verified(selected)); |
There was a problem hiding this comment.
Preserve cyclic identity for root-pointer reads
When pointer is the valid root JSON Pointer ("") and this value is a cyclic member, copyNode() returns the local member body and ExactValue.verified(selected) recomputes that body's standalone hash. Consequently snapshot.valueAt("") does not equal snapshot.exact(), loses the authoritative MASTER#n BlueId, and reports cyclicMember() as false; preserve the original exact value for the root pointer instead of re-verifying its body.
Useful? React with 👍 / 👎.
| route.contains("timelineId=" + intent.timelineId()) | ||
| && route.contains("actorId=" + intent.actorId())); |
There was a problem hiding this comment.
Match route source identities exactly
When a rejected call uses a source ID that is a prefix of an accepted source—for example timeline team while the route contains timelineId=team-admin with the same actor—these substring checks report the source as accepted. The zero-attempt mapper then returns the fallback TARGET_NOT_SELECTED diagnostic instead of the promised precise TARGET_CHANNEL_SOURCE_MISMATCH; compare structured source fields or delimiter-bounded values rather than using contains.
Useful? React with 👍 / 👎.
| session.restoreCoordinationState( | ||
| resulting.terminated() | ||
| ? SessionStatus.TERMINATED | ||
| : SessionStatus.READY, | ||
| frontier, |
There was a problem hiding this comment.
Catch up historical admissions before marking them ready
When a FULL_HISTORY or FROM_FRONTIER closure is admitted after the journal's global processedThrough cursor has already advanced beyond relevant retained entries, this publishes the epoch-zero state directly as READY without replaying those entries. Subsequent drains begin at that existing global cursor, so they cannot revisit the skipped history and the document silently exposes stale state despite the advertised import policy; admission must run a lane-local catch-up through the retained frontier before publishing application readiness.
Useful? React with 👍 / 👎.
| if (snapshot.status() != SessionStatus.READY) { | ||
| throw new IllegalStateException( | ||
| "DOCUMENT_NOT_READY: " + id); |
There was a problem hiding this comment.
Allow snapshots of terminated documents
When a Contracts process reaches TERMINATED, engine.document(id) still treats its durable final head as application-readable, but this additional SDK check rejects DocumentHandle.snapshot() as DOCUMENT_NOT_READY. The same handle can still return exact() and history(), leaving ordinary callers unable to obtain the otherwise valid final snapshot; accept TERMINATED alongside READY or consistently make termination unreadable at the engine boundary.
Useful? React with 👍 / 👎.
| private ContractsClosureAdmissionReceipt admitCompiled( | ||
| Contracts10AuthoredClosureCompiler.CompiledClosure compiled, | ||
| Set<DocumentId> roots) { | ||
| engine.authorizeContractsPublicRoots(roots); |
There was a problem hiding this comment.
Roll back root authorization after failed admission
When Contracts returns NEEDS_RESOURCES or any complete non-publishing admission result, the root authorization performed here remains permanently installed even though the SDK immediately throws and no document was admitted. Reusing that still-absent DocumentId as an internal managed draft then fails because validateManagedDraftDeclarations sees it as a configured public Root, and later closure root matching can also be polluted; make authorization part of the successful admission transaction or remove it on every non-published outcome.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1aaeed36c5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ContractsRootFeederCoordinator.EventProgress progress = | ||
| feeder.process(entry); |
There was a problem hiding this comment.
Honor transition budgets between cohort commits
When one entry selects multiple disconnected cohorts and the remaining transition budget is smaller than their combined work, this single feeder.process(entry) call executes every selected cohort in ContractsRootFeederCoordinator.process before the budget is checked again. For example, DrainBudget(1, ...) can publish two independent one-document closures and report two committed transitions, even though these are separate PROCESS commits that can be paused between; pass the remaining transition allowance into cohort execution or stop after the permitted cohort instead of exceeding maxCommittedProcessTransitions.
Useful? React with 👍 / 👎.
Summary
Finalizes cyclic-topology support and prepares Blue Coordination
3.0.0-rc.3for publication to Maven Central as a bounded external-pilot release candidate.Highlights
3.1.0-rc.21, BEX1.1.0-rc.4, and Repository3.0.0-rc.21;// given,// when,// thenphases;Verification
stageRelease: passedreleaseCheck: passedverifyRcReadiness: passedRelease scope
This candidate is authorized for the bounded external-pilot tier.
It does not claim production readiness, stable-release readiness, durability, distributed execution, or a stable latency SLA.