Skip to content

feat(test): mesh replay rolls across a graph change and records each link's negotiated version - #9285

Draft
kixelated wants to merge 1 commit into
mainfrom
mesh-replay-graph-roll
Draft

kixelated wants to merge 1 commit into
mainfrom
mesh-replay-graph-roll

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

The mesh replay holds one graph for the whole run, and it infers which links run moq-lite-07 from the configured version lists, counting a build with its default list as not lite-07.

  • A deployment whose new build renders its dial set by a new rule rolls across a graph change: mid-roll, each relay dials what its own build renders, so the live graph is neither the old nor the new one. A static mesh replays neither that middle nor its edges, where a link drops as its dialer rolls.
  • A roll's per-step record of which link negotiated which version is what a canary-first roll needs to know before it starts (does the canary pair share a link that negotiates lite-07?), and the inference cannot say what a link actually negotiated, nor whether it is up.

Approach

  • A mesh link may name a build (old or new): only a dialer on that build dials it. The relay's config leaves the others out, the mesh must be connected on either build, the roll's drain report lists the links the drained relay held, and a reopen-link naming no link picks one every build dials.
  • Each relay's log is read incrementally for its negotiated version=... lines. A link's version is the one its acceptor logged on the dialer's newest session there that has not ended (the auth server's connect/end events), counting only the acceptor's current process; down when none. Every event records the map, which replaces the inference for the route counters' lite-07 attribution.
  • The report adds a table of the events that moved a link's version, with the links on each version and those that moved, and gives the link count and diameter per build when the graph changes.

Validation

  • python3 test/mesh-replay/replay.test.py: 23 pass. New: the version read (partial lines, a newer session winning, an ended one, a restarted acceptor, a one-build link), a build's config dialing only its links, the graph per build and the reopen-link default, the refusals, and the version table.
  • Real relays, ring4.toml plus an a-c chord only the old build dials, half-roll.toml, the release at upstream release df1562c3b against this branch: passed. The report read start: moq-lite-06 5, roll a to new: a-c: moq-lite-06 to -, roll b to new: a-b: moq-lite-06 to moq-lite-07-wip; independently, a's generated old config dials two peers and its new one only b.
  • A 32-relay, 123/97-link graph rolled canary-first and back through this harness (merged with moq-dev/moq#9236 for optimized binaries) recorded every step's versions; results stay with that deployment.
  • ruff check and ruff format --check pass.

Impact

No public API or wire change. report.json's mesh.diameter becomes a map ({"all": n}, or {"old": n, "new": m}), each event gains versions, and each link build. Mesh files gain an optional build key.

Alternatives

  • Two runs, one per graph: never replays the mixed middle, which is where a roll strands readers.
  • Keeping the configured-list inference: reports what should negotiate, not what did, and nothing for a default list.

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort

(Written by Claude Opus 5.5)

…link's negotiated version

A link may name the build whose dialers dial it, so a roll that also changes the graph replays mid-roll as each relay's build would dial. Each event records every dialed link's version as its acceptor negotiated it, replacing the inference from configured version lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant