Skip to content

docs(adr): demote 5 implementation/deployment ADRs to appendices - #349

Merged
alpergundogdu merged 5 commits into
mainfrom
docs/adr-demote-348
Apr 30, 2026
Merged

alpergundogdu merged 5 commits into
mainfrom
docs/adr-demote-348

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #348.

Demotes five ADRs from "core protocol decision" to "appendix / reference pattern" so the remaining ADR set reads as the canonical protocol spec, with implementation/deployment guidance clearly demarcated.

Demoted

Was Now Why
ADR 006 — E2E Encryption appendix-encrypted-content-publishing.md Protocol is encryption-agnostic; this is one deployment pattern (companion app server, cdn/keys/v1 ALPN). Alternative encryption schemes are acceptable.
ADR 020 — Observability appendix-observability.md Metric implementation is consumer-side; alternative monitoring stacks are acceptable. Where a metric is load-bearing for a protocol invariant (e.g. ADR 029's lock-rate read), the invariant lives in the consuming ADR.
ADR 021 — L2 Chain Selection appendix-l2-deployment.md Protocol depends on Arbitrum-class properties (forced-inclusion ≤ 24h, gas calibration, Balancer V3 Router) — those live in consuming ADRs. The choice of which Arbitrum-class L2 is a deployment decision.
ADR 023 — PoC/Production Seams appendix-poc-production-seams.md Rust crate-structure pattern. The principle "PoC and Prod must be visibly distinct" is a protocol design rule; the specific Rust layout is implementation guidance.
ADR 025 — Local Admin HTTP appendix-local-admin-http.md Binary-internal surface. Other nodes/clients don't interact with it; alternative implementations could expose admin via gRPC, Unix socket, or CLI.

ADR 019 (Node Onboarding) stays as core ADR per #348 disposition — operational but tied tightly enough to protocol mechanics (atomic stake-then-register, gossip warmup invariants) to belong in the protocol set.

Mechanics

  • git mv preserves rename history (95-97% similarity per file).
  • Each appendix gets a top "this is an appendix, not a core protocol ADR" preamble distinguishing the protocol invariant from the implementation pattern.
  • 60+ inbound cross-references updated; link text changed from [ADR NNN] to [Appendix: <Name>] so the prose reflects appendix status.
  • architecture.md: demoted ADRs removed from the per-ADR numeric index; new "Appendices — Reference Patterns" section added at the end of Reading Order.
  • adr/README.md: new "ADRs vs appendices" section distinguishing the two document classes.
  • Root CLAUDE.md and README.md: repointed e2e encryption and PoC-seams cross-refs.

Final state

Out of scope (follow-ups)

Lifting protocol-level invariants from appendices into core ADRs where they would otherwise hide:

  • ADR 023's leaf-crate principle could be stated as a design rule in ADR 016 or ADR 026, with the Rust pattern remaining the appendix.
  • ADR 020's load-bearing metrics (e.g., decdn_ve_lock_rate consumed by ADR 029) could move their definitions into the consuming ADRs.
  • ADR 021's L2-property dependencies are already in consuming ADRs (003/007/018).

These can land alongside #345 (Tier 2 narrative connectives) where ADR bodies are already being touched. Not in this PR's scope.

Test plan

  • All 60+ inbound links resolve (programmatic check during review).
  • architecture.md § Reading Order ends with the Appendices subsection listing all 5 demoted documents.
  • architecture.md § Architectural Decisions (numeric per-ADR index) no longer contains demoted entries.
  • Each appendix opens with the "this is an appendix" preamble.
  • README.md § ADRs vs appendices explains the distinction.
  • No "ADR 006/020/021/023/025" textual references remain in core ADRs (link text updated to "Appendix: "; appendix-internal self-refs are the only remaining mentions).

🤖 Generated with Claude Code

Closes #348.

Demotes five ADRs from "core protocol decision" to
"appendix/reference pattern":

- 006 → appendix-encrypted-content-publishing.md (encryption-agnostic
  protocol; companion app server pattern)
- 020 → appendix-observability.md (metric registry; consumer-side
  implementation guidance)
- 021 → appendix-l2-deployment.md (Arbitrum One selection; deployment
  decision; protocol depends on Arbitrum-class properties calibrated
  in core ADRs)
- 023 → appendix-poc-production-seams.md (Rust crate-structure pattern;
  alternative implementations free to express the same principle
  differently)
- 025 → appendix-local-admin-http.md (binary-internal admin surface;
  not protocol mechanic)

Per #348 disposition, ADR 019 (Node Onboarding) stays as core because
its operational mechanics (atomic stake-then-register, gossip warmup
invariants) tie tightly to protocol behavior.

Mechanics:

1. `git mv` each demoted file to flat `adr/appendix-NAME.md` path
   (preserves rename history).
2. Replace ADR-decision-record framing at the top of each appendix
   with a "this is an appendix, not a core protocol ADR" preamble
   that distinguishes the protocol invariant (which lives in a core
   ADR) from the implementation pattern (in the appendix).
3. Update 60+ inbound cross-references across the ADR set:
   - From core ADRs in `/adr/` → appendix paths
   - Link-text update from "ADR NNN" to "Appendix: <Name>" so prose
     reading reflects the appendix status
4. Remove the demoted ADR entries from `architecture.md` per-ADR
   numeric index; appendices now have their own listing under
   "Appendices — Reference Patterns" in the Reading Order section.
5. Add `## ADRs vs appendices` section to `README.md` distinguishing
   the two document classes.
6. Update root `CLAUDE.md` and `README.md` to repoint the e2e
   encryption and PoC-seams cross-refs to their appendix homes.

Final state: 27 core ADRs (000-003, 005, 007-019, 022, 024,
026-032), 5 appendices, plus `README.md` and `architecture.md`.
The core ADR set now reads as the protocol; implementation/
deployment guidance is clearly demarcated.

Out of scope (deferred to follow-ups): lifting protocol-level
invariants from appendices into core ADRs where they would otherwise
hide. Examples: ADR 023's leaf-crate principle could be stated as a
design rule in ADR 016/026 with the Rust pattern remaining the
appendix; ADR 020's load-bearing metrics (e.g., `decdn_ve_lock_rate`
consumed by ADR 029) could move their definitions into the consuming
ADRs. Tracked separately for #345 (Tier 2 narrative connectives) to
land alongside the cross-cutting lift pass.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request reorganizes the project's documentation by demoting several Architecture Decision Records (ADRs 006, 020, 021, 023, and 025) to appendices and updating all internal references to reflect these changes. The feedback identifies a few remaining numeric references that were missed and suggests using correctly formatted anchor links for the new appendix documents to ensure consistency and proper navigation.

Comment thread adr/017-privacy.md Resolved
Comment thread adr/architecture.md Resolved
…ndix

The encrypted-content-publishing appendix is the only consumer of
cdn/keys/v1 — it's not a CDN protocol participant. Letting it appear
in core protocol ADRs (005, 013, 015, 017), in architecture.md's
top-level wire-protocol table, and in CLAUDE.md/README.md polluted
the protocol's reading surface. Now contained entirely to the
appendix.

Touched:

- ADR 005 (Wire Protocol):
  - Dropped the "Companion protocol (app server)" ALPN table that
    listed cdn/keys/v1
  - Dropped the "see appendix for cdn/keys/v1 stream types" note
  - Removed cdn/keys/v1 from the 0-RTT prose
  - Dropped the "for the companion protocol" concurrent-stream-limits
    sub-table

- ADR 013 (Schema Evolution):
  - Reduced the "ad-hoc evolution patterns" enumeration from 2 entries
    to 1 (the StreamRequest optional-trailing-fields pattern). The
    KeysMessage 1-byte-prefix supersession was an appendix-internal
    concern.
  - Removed the KeysMessage enum example from the protocol-enum
    illustration block; the framing rules apply universally and the
    appendix uses them like any other ALPN consumer.
  - Removed the corresponding "ADRs Affected" entry.

- ADR 015 (Zero-RTT):
  - Dropped the cdn/keys/v1 row from the 0-RTT eligibility table
  - Replaced the per-ALPN cdn/keys/v1 decision section with a
    one-liner noting external ALPNs make their own 0-RTT decisions
  - Dropped the KeysMessage::PlayRequest replay-safety analysis (an
    appendix-internal concern)
  - Cleaned the Server-Side Controls list and Future Work bullet
  - Dropped the appendix cross-ref from the References section

- ADR 017 (Privacy): removed cdn/keys/v1 from the ALPN-identification
  privacy surface (P-04). Privacy concerns specific to the appendix's
  ALPN belong in the appendix.

- ADR 012 (Client): the iroh-Ed25519 compromised-key threat row
  rewritten to scope app-server attack to "if the client uses a
  companion app server" rather than naming the ALPN directly.

- architecture.md:
  - System Diagram: dropped the App Server node and the cdn/keys/v1
    arrows; the diagram now shows the pure CDN protocol topology
  - Wire Protocols section: removed the "Companion protocol" sub-table
  - 0-RTT description: dropped cdn/keys/v1 mention
  - External Components: collapsed the App Server section from a
    detailed re-statement of the appendix to a single bullet
    pointing at the appendix

- README.md (root): dropped the "Companion Protocol (App Server)"
  table; rewrote the "E2E encryption" Key Design Decisions bullet to
  state the protocol is encryption-agnostic and link to the appendix.

- CLAUDE.md (root): dropped the "Companion Protocol (App Server)"
  table.

The appendix-encrypted-content-publishing.md retains all the
cdn/keys/v1 specification — it's the canonical home now.

Net: -95 / +12 LOC across 8 files. The core protocol ADR set no
longer mentions cdn/keys/v1 or the app server; the appendix is fully
self-contained.
Three stale numeric ADR references missed in the demotion sweep:

- adr/017-privacy.md:51-52 — P-19 and P-20 source-cell links still
  read `[006]` instead of the appendix link text. Updated both rows.
- adr/architecture.md:263 — ADR 017 summary listed scattered ADR
  numbers including `006`. Removed `006` and added a reference to the
  encrypted-content-publishing appendix.
- adr/012-client.md:236 — Positive-consequence bullet listed `005,
  006, 008` for consolidated source ADRs. Removed `006` and added the
  appendix reference.

All three are mechanical link-text / list-membership fixes; no
content-level changes.
…ent ADR

ADR 012 (Client Architecture) is a core protocol ADR — should be
encryption-agnostic. The CDN protocol shuttles bytes; the client
streams content from CDN nodes regardless of whether it's plaintext
or ciphertext. Encrypted-content-publishing usage is an appendix-
level concern.

Removed:

- §iroh Identity Key purpose: dropped "and for key delivery from the
  app server (cdn/keys/v1, Appendix...)". The iroh key is for QUIC
  authentication on `cdn/client/v1` and `cdn/probe/v1` — that's it.
  An encrypted-content client may also use the same key for a
  companion app-server connection, but that's documented in the
  appendix.

- §iroh Ed25519 compromised-key threat row: dropped the "if the
  client uses a companion app server..." sub-clause. Core threat
  model: attacker impersonates NodeId. Appendix-specific threats
  (app-server connection without session token) belong in the
  appendix.

- §Trust Boundary "App server" bullet: dropped the entire "trusted
  external" entry. The app server is not a CDN protocol participant;
  the appendix carries its own trust analysis.

- §Configuration `[app_server]` block: dropped. The appendix
  documents its own client-side configuration extension.

- §File Manifests `ChunkEntry`: dropped the `encryption:
  Option<ChunkEncryption>` field and the `ChunkEncryption` struct.
  Core manifest format is plaintext-only; the appendix can document
  an encrypted-content extension.

- §Download flow: dropped the "For encrypted files, fetch K_blob per
  chunk..." paragraph.

- §Positive consequences: dropped "and the encrypted-content-
  publishing appendix" from the consolidated-source-ADRs list.

Net: client ADR no longer mentions encrypted content publishing,
cdn/keys/v1, K_blob, or the app server. The appendix retains all the
appendix-side spec.
Audit pass after the ADR 012 cleanup. Three more places where
encrypted-content-publishing concepts had leaked into core protocol
docs:

- architecture.md § Trust Assumptions: removed the "App server as
  trusted infrastructure" bullet. The app server is not a CDN
  protocol participant; its trust model belongs in the appendix.
  Architecture-level trust assumptions are now: NTP, L2 RPC
  provider, encrypted transport for vouchers, Arbitrum sequencer
  liveness, ERC-20 token behavior stability, iroh relay
  availability — all CDN-protocol-relevant.

- architecture.md § ADR 012 summary: removed "per-chunk encryption
  via the appendix on encrypted content publishing" from the file
  manifests description. The core manifest format is plaintext-only
  after the ADR 012 cleanup.

- adr/README.md § Reading Order: Chapter 7 (Operations) and Chapter 8
  (Supporting infrastructure) descriptions referenced the demoted
  ADRs (PoC/production seams, local admin surface, observability,
  L2 chain selection, end-to-end encryption). Updated to match the
  actual chapter contents and added a concluding paragraph pointing
  at the appendices for the demoted material. Also drops the
  "end-to-end encryption" mislabel (#350 will reframe the appendix
  itself).

- adr/017-privacy.md § References: list of architecture.md trust
  assumptions referenced "RPC provider, relay, app server". Removed
  "app server" and added NTP (which is in the architecture.md
  trust-assumptions list).

Surviving mentions are all appropriate context:
- 017-privacy.md:217 — scope-out boundary (legitimate)
- architecture.md:120 — appendix table-of-contents row
- architecture.md:263 — ADR 017 summary referring to the appendix
  (privacy ADR legitimately consolidates across both core and
  appendix surfaces)
- architecture.md:487 — workspace structure code-block comment
- adr/README.md:88 — appendix description in "ADRs vs appendices"
@alpergundogdu

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request reorganizes the project's documentation by reclassifying several ADRs (006, 020, 021, 023, and 025) as appendices. This clarifies that these documents represent reference patterns or deployment decisions rather than core protocol invariants, making the core protocol encryption-agnostic. All internal references and architectural diagrams have been updated to reflect this new structure. I have no feedback to provide.

@alpergundogdu
alpergundogdu merged commit 3617aa6 into main Apr 30, 2026
9 checks passed
@alpergundogdu
alpergundogdu deleted the docs/adr-demote-348 branch April 30, 2026 16:17
alpergundogdu added a commit that referenced this pull request Apr 30, 2026
* docs(adr): Tier 2 — chapter intros + ADR 026 connective opener

Closes #345.

Most of Tier 2's originally-scoped work (cross-cutting concept
lifts: epoch mechanics, FeeRouter surface, reentrancy, challenge
bonds, slashing schedule) was absorbed by earlier passes:

- #338 reframe: cross-cutting concepts framed as definitive design
  in their canonical homes (ADR 026 §2, §8; ADR 014 § Bond
  Handling).
- #343 cleanup: ADR 004 deletion forced canonical-cross-ref
  discipline across the set; 60+ inbound links repointed.
- #349 demotion: 5 implementation/deployment ADRs moved to
  appendices; protocol-level invariants extracted to consuming
  ADRs along the way.
- #351 reframe: encrypted-content publishing terminology aligned
  with ADR 002.

Remaining Tier 2 deliverables that this commit lands:

1. **Chapter intros in `architecture.md` § Reading Order.** Each of
   the 8 chapters now opens with a one-paragraph intro framing what
   the chapter is for and how the ADRs in it relate. Chapter 4
   (Tokenomics) explicitly directs readers at ADR 026 first and
   ADR 027 second; Chapter 5 cross-refs the slashing schedule's
   canonical home; thin chapters (7, 8) get a one-sentence frame
   so they don't read as orphaned ADRs.

2. **ADR 026 Context opener.** Replaced "A bandwidth-CDN protocol
   with paid byte delivery, slashable operator stake, and on-chain
   settlement needs an economic model..." (project-level
   restatement at chapter-4 entry) with "The economic model —
   sitting on top of paid byte delivery (ADR 003) and the slashing
   primitive (ADR 014) — has to hold up under four pressures..."
   The four-pressure framing carries the load; the new opener
   connects to the chapters the reader has just finished.

What was considered and skipped:

- ADR section structure standardization (forcing all ADRs into
  Context/Decision/Consequences with explicit Positive/Negative/
  Risks subsections). The current variation is intentional and
  works for each ADR's content shape; mass-converting would be
  cosmetic churn.
- ADR 022's `## §N — Title` non-canonical heading style. Works in
  context; standardizing to plain `## ` would reorder the existing
  numbered sub-decisions. Skip.
- Aggressive Context-section trimming. Spot-checks of the longest
  Contexts (ADR 029 44 lines, ADR 032 50 lines) found each was
  carrying its own load; tightening would lose context.

* docs(adr): correct chapter 4 launch-vs-deferred categorization

Address Gemini review on PR #352 + sharpen post-launch framing.

**Gemini's points (both valid):**

- ADR 030 (pre-seed USDC) is an explicit mainnet-launch prerequisite
  ($1M floor required before launch), not a "program/follow-up".
- ADR 018 (Balancer V3 POL) is the destination for the 10% genesis
  liquidity allocation and is required at launch for buyback +
  delegator-pool mechanics, not an "extension".

**Reframed categorization:**

- **Launch-required:** 026 (canonical), 027 (gauge security),
  018 (Balancer V3 POL), 030 (pre-seed USDC pool).
- **Deferred adoption:** 028 (sveTOKEN wrapper), 029 (adaptive
  FeeRouter) — spec lands now, deployment decision waits on
  post-launch dynamics; either may close as Rejected if launch
  dynamics make them unnecessary.
- **Post-launch additions:** 031 (BME prepay), 032 (bandwidth
  futures + Enterprise SLA) — they build on launch-time
  infrastructure to deliver the demand-side TOKEN sink and the
  Enterprise revenue tier. "Deferred from launch, not from the
  design" — these are crucial parts of the long-term economic
  model that don't ship at launch but are not optional/nice-to-have.

The earlier "post-launch follow-ups" framing understated their
importance; the reframe makes their role explicit.

* docs(adr): tighten chapter 4 intro

Same launch-vs-deferred-vs-additive structure, ~80% shorter:
launch-required path enumerated as a list (ADRs without
sub-explanations — those live in each ADR), deferred and additive
each get one clause. Length now matches other chapter intros (3
sentences, ~50 words).
thiras added a commit that referenced this pull request Sep 10, 2026
…1983)

* docs: sync README with the tree and retarget dangling ADR citations

README.md had drifted far enough that several of its claims were false
against the code. It documented a `gossip` crate and an `iroh-gossip`
wire protocol that exist nowhere, listed 9 of the 11 workspace crates,
and described a CLI surface of 5 top-level commands when there are 12 --
naming `node peers`, `node announce`, and `bundle create`, none of which
exist. It also pointed at a status note that was never written.

Rewrite it against the tree: three ALPNs, all 11 crates, a grouped table
of the real command surface, and new Status, Quickstart and License
sections. Add CI, Security, license and MSRV badges. Correct the
selection score to the unified formula in ADR 001, the discovery
fallback to the on-chain origin directory per ADR 022, and the bao
mechanism per ADR 038. Drop the multi-token payments bullet: no live ADR
supports an ERC-20 allowlist, and ADR 016 fixes USDC at deployment.

Separately, ADR 007, 020, 021, 023 and 025 were demoted to appendices in
 #349 and #422, but 23 citations across 18 files still named the numbered
files. Retarget them to `adr/appendix-local-admin-http.md` and
`adr/appendix-observability.md`. Add all five numbers to the do-not-reuse
list in CLAUDE.md and advance the counter to 042.

Remove `node region-stats` from CLAUDE.md, the binaries appendix, and the
admin appendix's DTO list -- that subcommand exists nowhere. Update the
crates.io description and the clap help, which claimed a `publish`
vetting step the module doc calls impossible and had `bundle` inverted.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kt6vxCuFjhTgkMfU4Q3WGc

* docs: make the cli crate blurb non-exhaustive

The crate-structure line enumerated 6 of 12 commands, omitting fetch,
setup, pool, publish, appeal and whoami -- the same enumeration drift
this branch removes elsewhere. Point at the CLI Surface table instead,
so the command list lives in exactly one place.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kt6vxCuFjhTgkMfU4Q3WGc

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

ADR audit: demote optional patterns / implementation guides to appendices

1 participant