Skip to content

docs(adr): condense protocol evolution guidance - #1447

Merged
thiras merged 3 commits into
mainfrom
codex/1433-condense-adr013
Jul 25, 2026
Merged

thiras merged 3 commits into
mainfrom
codex/1433-condense-adr013

Conversation

@altanoruc

@altanoruc altanoruc commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • condense ADR 013 around the retained framing, enum, gossip sentinel, two-phase deserialization, and signed-field rules
  • remove speculative ALPN selection, dual-handler guarantees, and the fixed deprecation schedule
  • preserve the Tier 1/2 operator checklists while deferring each Tier 3 migration to its concrete breaking-change ADR
  • reconcile the architecture and DHT schema-evolution summaries with the retained scope

Why

The documentation prescribed a multi-version runtime and migration schedule that the current single-version runtime does not implement. A concrete breaking change can define the compatibility and rollout guarantees it actually needs.

Impact

This is documentation-only. The GossipEnvelope.version sentinel, existing …/v1 ALPNs and topics, DHT behavior, wire types, Rust/Solidity code, snapshots, and tests are unchanged.

Validation

  • make -C adr check-book-list check-refs
  • npx --yes [email protected] --config .markdownlint.yaml adr/013-schema-evolution.md adr/appendix-operator-upgrade-path.md adr/architecture.md
  • npx --yes [email protected] --config .markdownlint.yaml adr/022-content-discovery.md
  • make -C adr MERMAID=0 PANDOC='<pandoc 3.9.0.2> --from=markdown+gfm_auto_identifiers --toc --toc-depth=2 --pdf-engine=typst' (both PDFs)
  • git diff --check
  • obsolete transition-term and dangling-anchor grep checks

Environment notes:

  • pre-commit is unavailable in the local environment, so the repository-pinned Markdown linter was run directly with npx and the local ADR guards were run through make.
  • The unoverridden PDF build with Homebrew Pandoc 3.10.1 and Typst 0.14.2 fails in Pandoc-generated template code with unknown variable: horizontalRule. The same prescribed Makefile build succeeds for both PDFs with temporary Pandoc 3.9.0.2 and the installed Typst 0.14.2.

Closes #1433

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@altanoruc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: 6a0766ec-e974-48b4-8c47-35759ba0f613

📥 Commits

Reviewing files that changed from the base of the PR and between f7da50e and 4adab65.

📒 Files selected for processing (4)
  • adr/013-schema-evolution.md
  • adr/022-content-discovery.md
  • adr/appendix-operator-upgrade-path.md
  • adr/architecture.md

Walkthrough

This documentation update clarifies protocol framing, gossip envelope evolution, signed-field structure, evolution tiers, operator upgrade guidance, and architecture index descriptions.

Changes

Schema evolution documentation

Layer / File(s) Summary
Framing and gossip evolution rules
adr/013-schema-evolution.md
Framing limits, gossip version guards, and topic-versus-envelope evolution rules are clarified.
Evolution tiers and signed structures
adr/013-schema-evolution.md
Tier 1 examples, Tier 3 migration boundaries, signed-field alignment, and consequence lists are updated.
Operator guidance and ADR indexes
adr/appendix-operator-upgrade-path.md, adr/architecture.md
Operator guidance and architecture references now use revised tier terminology and defer Tier 3 migration details to focused breaking-change ADRs.

Estimated code review effort: 1 (Trivial) | ~5 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@altanoruc altanoruc left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Docs-only, and the core call is right: the removed material described a multi-version runtime (dual ALPN handlers, T+4/T+12 deprecation schedule, no_application_protocol fallback) that nothing in crates/ implements, and a fixed calendar schedule for a break that hasn't been designed yet is worse than no schedule. Deferring Tier 3 to the ADR that ships the actual break is the correct shape.

Two things it also fixes as a side effect, worth calling out:

  • adr/022-content-discovery.md previously classified "new mandatory fields" as Medium → cdn/dht/v2. Under ADR 013 a mandatory field is Tier 3. The new bullets are the first time 022's tiers actually match 013's.
  • The Tier 1 example now shows binding: Option<ClientBinding>, which matches the shipped type (crates/protocol/src/client.rs:251-271) instead of the flat ethereum_address/binding_signature pair that was never implemented that way.

1. The safe-restart drain check was tier-independent, and it's now gone entirely

This is the one deletion I'd push back on. The removed Tier 3 cutover step 1 was the only place in the repo documenting how to stop a node without opening a phantom-slash window:

Nothing about that is specific to an ALPN bump — it applies to any restart. And ADR 005 is explicit that the failure mode is real, not theoretical: a signed StreamResponse { ok: false } inside the 30-second window "still constitutes valid phantom-announcement slash evidence — the error code is unsigned and invisible to the on-chain verifier." Meanwhile the retained Tier 1 checklist tells operators to "Pull and restart at your normal cadence. No drain."

Suggest keeping a short "restarting a node safely" subsection under the Tier 1/2 checklists with those two gauges. The stale caveat can go while you're there — admin_v1_drain is implemented now (crates/node/src/admin.rs, crates/cli/src/commands/node.rs:305, decdn node drain), so the "not yet implemented, use your load balancer" workaround text was already wrong.

2. Gossip envelope-version bumps no longer have a tier

The appendix's Tier 2 row changed from "new optional message types or gossip envelope versions" to "new optional protocol or gossip payload variants". That's the right correction — bumping GossipEnvelope.version makes every old peer silently drop the message under the Deserialization rule, which is nothing like Tier 2.

But the classification didn't land anywhere else. ADR 013 § Rule for choosing between envelope evolution and topic bump still lists "Bump GossipEnvelope.version" as a flavor of envelope evolution, i.e. bucketed with the Tier 1/Tier 2 options, while Tier 3's trigger list only covers it by implication via "Changing the framing format itself." One clause in § Tier 3 — an envelope-version bump is Tier 3, since old peers drop rather than degrade — closes the hole.

3. adr/appendix-operator-upgrade-path.md:9 — "that gap" lost its antecedent

The Context paragraph that established the gap ("the operator question — what do I do when a release ships? — is not [specified]") was replaced, but "This runbook fills that gap." survived. It now attaches to the preceding sentence about Tier 3 needing its own migration — asserting exactly the opposite of what the PR does.

4. Nits

  • adr/013-schema-evolution.md:354 — stray blank line inside the NodeAnnounce code fence, left behind when NodeAnnounceExt was deleted.
  • Appendix Tier overview table: rows 1 and 2 link to their sections, row 3 no longer links to #tier-3--major-alpn-bump even though the heading still exists. That heading is also narrower than its body now — the text covers gossip-topic bumps and the table cell says "Bumped ALPN or topic", so something like "Tier 3 — major break (ALPN or topic bump)" fits better.

Follow-ups (out of scope here, but this PR is what surfaces them)

  • ADR 005 § Client identity binding still sketches ethereum_address: Option<Address> + binding_signature: Option<Bytes> and states "These are Option fields in the StreamRequestExt extensions struct" — plural, two fields. After this PR, 013 and the code both say one field, binding: Option<ClientBinding>. 013's Cross-ADR struct alignment clause licenses other ADRs to keep flat representations for readability, but that covers flat-vs-split layout, not a different field set.
  • adr/022-content-discovery.md:292 — "Unknown variants are silently dropped." cdn/dht/v1 is a QUIC stream protocol, and ADR 013 § Unknown variant handling mandates the receiver MUST close the stream with 0x01 UNSUPPORTED_MESSAGE; silent drop is the gossip rule. The next paragraph then relies on "stream-close-without-ack" as the fallback signal, which is 013's QUIC behavior — so the mechanism described is right and only the label is wrong. Pre-existing, but this PR rewrites the block directly above it.

What I verified

  • Grepped the repo for every removed anchor (#alpn-version-negotiation, #deprecation-timeline, #multi-version-support, #tier-3--major-alpn-bump, #cutover--rolling-upgrade-per-node, #pre-cutover-t0…, #post-cutover-t4…, #coordination-touchpoints) — zero inbound references outside adr/_history/. Clean removal.
  • All six anchors pointing into ADR 013 (adr-013-schema-evolution, application-error-codes, protocol-enums, signed-field-freezing, tier-1--minor-no-coordination, tier-2--medium-new-message-types-no-alpn-bump) resolve to existing headings. The two anchor fixes in the appendix (#signed-field-freezing, #tier-2--medium-…) previously pointed at the ADR-title anchor, so those are genuine improvements.
  • No residual "deprecation" / "dual-subscription" / "dual-version" / "T+12" language anywhere in adr/ outside _history/.
  • CI green — markdownlint and ADR book check both pass; code jobs correctly skipped on the docs path filter.

None of the above blocks merge. Items 1 and 2 are the ones I'd want addressed before this lands, since they're removals of operational content rather than removals of speculation.


Generated by Claude Code

Removing the Tier 3 rollout procedure was right — it described a
multi-version runtime the code does not implement — but three things went
out with it that were not Tier 3 specific.

Restore the safe-restart drain procedure as its own tier-independent
section. A node that signed `has_blob: true` and then answers a
`StreamRequest` with a signed `StreamResponse { ok: false }` inside the
30-second window produces valid phantom-announcement slash evidence
(ADR 005 § Probe-Triggered Eviction Hold); `EvictedSinceProbe` is unsigned
and invisible to the on-chain verifier. Eviction holds are in-process
state and do not survive a restart, so this applies to every restart, not
only to protocol upgrades. The procedure uses the surfaces that actually
shipped — `decdn node drain --wait` polling `admin_v1_health` for
`in_flight_streams == 0`, and `decdn node health` — rather than the
`/health` endpoint and "drain not yet implemented" caveat carried by the
removed text, both of which were stale.

Classify a `GossipEnvelope.version` bump as Tier 3 in ADR 013. The
appendix previously listed envelope-version bumps under Tier 2; dropping
that was correct (old peers silently drop every message under the
Deserialization rule rather than degrading) but left the change with no
tier to land in.

Fix the Context paragraph, whose "This runbook fills that gap" lost the
sentence establishing the gap and read as promising the Tier 3 coverage
the appendix explicitly defers. Retitle the Tier 3 section to cover topic
bumps as well as ALPN bumps and relink it from the tier table.

Also correct ADR 022's "unknown variants are silently dropped" —
`cdn/dht/v1` is a QUIC stream protocol, so ADR 013 § Unknown variant
handling mandates a stream close with `UNSUPPORTED_MESSAGE` (0x01), which
is what `crates/node/src/handlers/dht.rs` implements and what the adjacent
`BatchStore` fallback paragraph already relies on.

Docs only. No wire types, contracts, or Rust code change.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J272yk7jeVEqPYWZV7fAqm
@thiras
thiras merged commit 3c65287 into main Jul 25, 2026
24 checks passed
@thiras
thiras deleted the codex/1433-condense-adr013 branch July 25, 2026 15:56
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.

Drop the protocol version-negotiation runtime; condense ADR 013

3 participants