Repository navigation
feat(campaign): a tick's releases go out as one batch through an internal seam member (#285, throughput Part 3/3) - #558
Conversation
…rnal seam member (#285) Owner decision on #285 (2026-11-09): the batch goes through a NON-PUBLIC member on the messaging seam, implemented by both engines and reached by Goldpath.Campaign through InternalsVisibleTo. - Goldpath.Messaging: internal IGoldpathBatchPublisher and GoldpathBatchPublishing (the entry point: the engine's member, else one at a time; BoundedAsync keeps at most 64 publishes outstanding and rethrows only after every started one has settled). - MassTransit engine: concurrent on the wire only when the engine composed no outbox (MassTransitPublishMode); with the bus outbox, or on the configureBus registration, one at a time. Wolverine engine: envelopes built first, then GoldpathWire.PublishBatchAsync on the one confirming channel; with the outbox, rows added in order. The outbox size guard carries no batch member, so an outbox host publishes a batch one event at a time by construction. - Campaign: ReleaseBatchAsync, ReleaseRipeRetriesAsync and ReleaseOrphansAsync publish their messages as one batch, then mark (publish-then-mark unchanged). - No PublicAPI line changes. Proof: BatchedReleaseTests (red with the per-item loops back), BatchPublishTests (bound, outbox/no-mode sequential, failure settles, cancellation, wiring), conformance S2_22/S2_23 on both engines, TickQueryCountTests (7 commands per steady tick, the same on main). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ery count, T67 (#285) - ops/campaign-benchmarks.md: before/after on the overnight sandbox (no run id): smoke 584.4/s -> 969.2/s (0% -> 72.5% of windows in band); 15 minutes 809.0/s, 37.6% in band, 50 windows above 1000 - still RED; exactly-once over 724,500 items; 7 commands per steady tick on both. - RFC goldpath-campaign §6: the measured line, saying the bar is not met on that profile. - scenario-campaign S-FLEET-02a evidence names the run; ga-gate-status G10c notes it. - open-threads T67: what remains (the co-located profile; wall-clock seconds vs seconds of ticks for "zero windows above 1000", for the owner). - CHANGELOG [Unreleased] ### Changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…100+-message outbox (#285) The full conformance run on 499f74b was red in one place: BusDifferentialTests' S3 record of the new S2_23 (a 200-event batch through the outbox) differed on store.outbox-state.rows and .delivered (oracle 1, candidate 0). Bisected on real RabbitMQ + PostgreSQL: equal at 1, 2, 50 and 99 events in one outbox, different from 100 — MassTransit's delivery pass stops at its MessageDeliveryLimit (100) and keeps the row, marked delivered, until the duplicate-detection window; Wolverine removes it. Engine bookkeeping, not a seam promise: the deliveries (every event once) are compared line by line and equal. Two allow-list entries for S2_23, with the measurement as their reason. BusDifferentialTests + OutcomeComparatorTests: 36/36. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mpleted batch; the diff-mode score (#285) Diff-mode mutation run of Goldpath.Messaging at 499f74b: 92.11 %, gate green (73 mutants, 43.5 min). On #285's lines, `start < items.Count` -> `<=` survived: with a count that is an exact multiple of the bound, a cancellation during the last window failed a batch whose every publish had completed. New fact kills it (planted, red). The empty-batch early return is equivalent. Recorded in stryker/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Follow-up to the PR body, with the two runs that were still going when it was opened. The head is now 1. Full conformance suite (both engines, real RabbitMQ + PostgreSQL), on
2. Mutation, diff mode (
Generated by Claude Code |
Verifier verdict (run 2026-11-11)Head verified: Verdict: no blocking findings. 0 BLOCKER, 0 MAJOR, 0 MINOR, 1 NIT.
What I checked
Deep review
Edge-case probes (throwaway facts in
|
| # | Probe | Result |
|---|---|---|
| P1 | BoundedAsync over 130 items (three windows) |
Each published exactly once (130 distinct). Pass |
| P2 | Items 3 and 10 fail in the first window of 130 | Rethrows boom 3 after the window settles. 62 published, and none ≥ 64: no second window starts. Pass (the caller treats it as unpublished-maybe-delivered, as documented) |
| P3 | Exactly 64 items, held open | 64 outstanding at once: one window, never 65. Pass |
NIT (optional)
- The PR body's RED 2 recipe does not compile.
sed 's/=> mode is { ConcurrentOnTheWire: true }/=> true/'leaves themodeparameter unread, soCS9113fails the build, and "I saw exactly the failures listed for each red run" cannot be true for that line. Use=> mode is not null(red: theFalserow) or… || mode is null(red: thenullrow) in the PR body.
Question for the owner (needs-owner)
Should this PR close #285 although the 15-minute, 1000 TPS bench criterion is unmet, or should #285 stay open until T67's proof runs on the reference profile?
- My recommendation: merge the code, which is verified and is a clear improvement (about 584/s → about 960/s on the same box, exactly-once intact).
- But change
Closes qorpe/goldpath#285toRefs #285, so the issue and T67 close together, when a green run on the CI reference profile or the Lima VM names its run id.
Labels: agent-verified and needs-owner. Tier C, so not auto-merged.
Owner: safe to merge — summary: the campaign engine publishes each tick's releases, ripe retries and orphan re-releases as one batch, with at most 64 broker confirms outstanding instead of one round trip per item. Outbox hosts are unchanged, and no public API moves.
Generated by Claude Code
…d included (main red after #529 + #558) (#563) #558 pinned 7 commands per steady tick, measured on a main without R3-S8. #529 (R3-S8, #290) landed first and reads the live ceilings in one query a tick, by design (campaign RFC R3.2), so main counts 8 and TickQueryCountTests is red on 02128c5. The extra command is that read: SELECT ... FROM "GoldpathCampaignCeilings", as the interceptor's SQL log shows for a steady tick. The pin and the two prose mentions say 8 now. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What and why
#285 is campaign throughput, Part 3/3. A tick's releases were published one awaited broker round trip per item: at 1000 TPS with a 250 ms tick, that is 250 sequential confirms in every tick. This PR implements the owner's decision of 2026-11-09 on #285:
IGoldpathBatchPublisherlives inGoldpath.Messaging. Both engines implement it, andGoldpath.Campaignreaches it throughInternalsVisibleTo. Effects:PublicAPI.*.txt(ADR-0013, GA G1).IPublishEndpoint, and only when the engine itself composed no outbox (MassTransitPublishMode).GoldpathWire.PublishBatchAsyncon its one confirming channel, under the existing gate.DbContext, so the rows are added one at a time.configureBusregistration carries no mode, so it is never assumed outbox-free.EngineTests.CrashBetweenPublishAndMarkRepublishesButNeverDoubleClaimsnow runs through the batch member, because the fixture's publisher carries it, and it stays green.Acceptance criteria of #285, each with its evidence
Releases are published without one awaited round trip per item, and publish-then-mark and the claim guard are kept.
BatchedReleaseTests: each of the three paths publishes exactly one batch, with zero single publishes. They go red (3 facts) withmain's engine file put back.No new
MassTransit.type in anyPublicAPI.*.txt. NoPublicAPIfile changed:git diff origin/main --stat -- '**/PublicAPI*'is empty. Everything new isinternal.The per-tick query count is measured before and after, and written in the bench report. It is 7 commands per steady tick for one hungry campaign, on
mainand on this branch alike.TickQueryCountTestsruns the pacer on a tick-exact clock and pins 7.main(2782d3c) in a separate worktree: green at 7.Part 1's bench at
Tps = 1000for ≥15 minutes is green against S-FLEET-02a: NOT MET on the only profile I have. The numbers are published inops/campaign-benchmarks.md, and RFC §6 carries the measured line, saying it is not met. Local sandbox, 4 CPUs, everything co-located, no run id:main2782d3c86615f686615f6Why it is still red: two causes, neither in the publish path.
BurstControlTests).This is recorded as open-threads T67, with its trigger and proof, and in the G10c status row, because S-FLEET-02 is judged by the same words.
The S-FLEET-02a
evidence:field names the run. It names the branch, the commit, the date, and "local run, no run id".Reproduce
I saw exactly the failures listed for each red run, and nothing else.
Gates run
dotnet build Goldpath.sln -c ReleaseGoldpath.Campaign.TestsGoldpath.Messaging.TestsS2_22,S2_23(MassTransit and Wolverine, real RabbitMQ and PostgreSQL)docs-freshness,ledger-check,schema-honesty,skills-parity,template-pinsGOLDPATH_MUTATE_SINCE=origin/main scripts/mutation-gate.sh Goldpath.Messaging)stryker/README.mdPre-PR self-check
[Unreleased] ### Changed;ops/campaign-benchmarks.md, a new section with profile, date, commits and "no run id";scenario-campaign.mdS-FLEET-02aevidence:;ga-gate-status.mdG10c.docs/rfc/goldpath-ga-readiness.mdis not edited.PublishItemsAsyncis inserted beforeRollQuotaDayIfNeededAsync's own///block, not between that block and its declaration.GoldpathWire.PublishBatchAsyncis inserted beforePublishAsync's///. Both re-read.The_default_engine_composes_the_mode_from_the_outboxbuilds the host throughAddGoldpathMessagingand checks two things: the mode follows the outbox, and the resolved publisher is the engine's (no outbox) or the guard (outbox). The bench runs the real host end to end.ReleaseBatchSize.Not verified, and observations
ReleaseRipeRetriesAsyncandReleaseOrphansAsyncmark withExecuteUpdateAsyncand never callSaveChangesAsync. Under MassTransit's bus outbox their re-publishes may never leave the change tracker. This PR does not change that. It wants its ownbugissue, proven red first.Goldpath.Campaignwas not run: about 113 min on this sandbox per feat(campaign): target-system ceilings as data — the seed rows, the pacer's bucket (R3.2a, R3-S8, #290) #529. Only the helper's lines changed there, andBatchedReleaseTestskills their removal.Refs #285 — not closed by this PR: the bench criterion is still open under T67 (owner decision, 2026-11-11).
Generated by Claude Code