Repository navigation
docs(adr): pre-launch cleanup — anchors, framing, superseded ADR - #343
Conversation
Lands #339, #341, and #342 together since they overlap on several files and share the same definitive-framing rationale (the protocol has one design pre-launch; ADRs read as the canonical design, not as an iteration log). #339 — cross-reference hygiene (13 broken anchors) Em-dash collapse fixes (`--` → `-` in anchors): GFM strips em-dashes from headings and collapses surrounding whitespace into a single hyphen. Touched: ADR 002, ADR 005 (3 instances), ADR 013 (2 self-anchors), ADR 015 (3 instances). Renamed/missing target fixes: - ADR 011 → ADR 005 phantom-announcement: target heading didn't exist; repointed to the parent `cdn/probe/v1 — latency probe` heading where the mechanism is described inline. - ADR 012 → ADR 024 session-keys: heading was renamed; repointed to the actual `#3-session-keys-deferred-to-production-via-erc-7579-smartsessions`. - ADR 022 → ADR 013 schema-evolution-strategy: target didn't exist; repointed to `#protocol-enums` (the relevant section for the per-ALPN protocol enum pattern). Programmatic check post-fix: zero broken `*--*` anchors across the ADR tree. #341 — v3-iteration framing sweep (ADRs 009, 021) The PR #338 reframe pass missed several pockets. Cleaned up: - ADR 009 §Bootstrap consideration: "drops the auto-ve-lock-on-vest pattern from earlier v2 interim designs" → "Under ADR 026, vesting contracts release TOKEN unlocked... (no auto-ve-lock-on-vest)". - ADR 021 §Tokenomics Validation Requirements: dropped 8 instances of "v3 Tokenomics" / "deployment of v3 contracts" / "in v3" / "under v3" / "v3 deployment" / "during v3 contract integration testing". Section now reads as a definitive validation gate against ADR 026, not as a migration narrative. Programmatic check post-fix: zero `\bv3\b` hits in production ADR corpus excluding legitimate Balancer V3 / Uniswap V3 references. #342 — drop superseded ADR 004 + 'ADRs to update on acceptance' sections ADR 004 deletion. Pre-launch there's no v1 deployment to preserve historical record for. Audited every inbound cross-ref (54 hits across 13 files) and either: - repointed to ADR 026's canonical home (ADR 026 §1 supply, §7 staking parameters, §8 slashing/auto-ejection/challenge-bond, §11 governable parameters); - repointed to ADR 003's Deposit Economics for the gas-cost numbers (which ADR 003 already carries verbatim); or - dropped iteration-narrative phrasing entirely ("under ADR 004", "earlier drafts", "supersedes ADR 004", "ADR 004's X mechanic" etc.). Notable repoint targets: - ADR 005 / 011 / 014 challenge-bond + slash-schedule refs → ADR 026 §8 - ADR 001 staking refs → ADR 026 §7 - ADR 014 §Integration with Existing Contracts: dropped the `submitFraudProof()` historical-replacement note entirely. - ADR 016 §Contract Inventory table: removed [004] cells from TOKEN / StakingRegistry / BuybackBurner rows. - ADR 018 §Context: collapsed two paragraphs of "ADR 004 says X but ADR 026 changes it to Y" iteration narrative into one definitive block. - ADR 021 §Context + §Updates: reframed from "resolves ADR 004 deferral" to "selects production L2"; renamed §Updates to Prior ADRs → §Cross-ADR alignment. - architecture.md: dropped the standalone ADR 004 entry; updated ADR 026 summary to drop "Supersedes ADR 004 in full". - ADR 026 frontmatter: dropped "Supersedes: [ADR 004] in full". - ADR 026 / ADR 030 Alternatives Considered: dropped [ADR 004] links but kept the rejected-alternatives prose intact. "ADRs to update on acceptance" section deletions. Once #338 landed and the touched ADRs were updated, these sections became stale inventory of past work. Removed from: - ADR 026 (touched-list pointer) - ADR 027 (touched: 003, 007, 008, 014, 017, 026) - ADR 030 (touched: 008, 016, 019, 026 — minus the dropped 009 entry) - ADR 032 (deferred — touched on adoption: 003, 018, 026, 030) Final state: ADR tree contains 26 ADRs (001–003, 005–020, 022–032); ADR 004 slot retired (numbering doesn't reuse). No broken anchors. No v1/v2/v3 iteration framing in the canonical corpus.
Side effect of deleting ADR 004 in this PR — the consistency-checks section pointed at `004-tokenomics.md` for token names / contract references / fee parameters. ADR 026 is now the canonical home for that surface.
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive update of the project's Architecture Decision Records by removing the superseded ADR 004 and updating all cross-references to point to ADR 026 (Gauge-Boost Tokenomics). The cleanup involves deleting the ADR 004 file, refining contract interaction descriptions, and removing obsolete 'ADRs to update' sections across the documentation suite. Feedback focuses on correcting several broken internal anchor links in the documentation to ensure consistent navigation between the various ADR files.
There was a problem hiding this comment.
Pull request overview
Pre-launch ADR documentation cleanup to make the ADR corpus read as the canonical design (not an iteration log), while fixing cross-reference integrity and removing superseded/stale sections.
Changes:
- Removes superseded ADR 004 and rewires inbound references to ADR 026 (and other canonical sections).
- Fixes broken/misaligned anchors and retargets cross-refs to existing headings.
- Deletes stale “ADRs to update on acceptance” sections from newer ADRs.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| adr/architecture.md | Removes ADR 004 entry; updates tokenomics/chain-selection summaries to avoid superseded framing. |
| adr/032-bandwidth-futures-enterprise.md | Removes stale “ADRs to update on acceptance” section. |
| adr/030-preseed-usdc-deployment.md | Removes ADR 004 references; removes stale acceptance-update section. |
| adr/027-distinct-client-receipts.md | Removes stale “ADRs to update on acceptance” section. |
| adr/026-gauge-boost-tokenomics.md | Removes ADR 004 “Supersedes” frontmatter/references; removes stale acceptance-update section. |
| adr/023-poc-production-seams.md | Updates PoC/production seam tables to reference ADR 026/018 instead of ADR 004. |
| adr/022-content-discovery.md | Retargets schema-evolution cross-ref to the correct ADR 013 heading. |
| adr/021-l2-chain-selection.md | Removes ADR 004 deferral framing; retargets gas/assumption references to current canonical ADRs. |
| adr/019-node-onboarding.md | Removes “supersedes ADR 004” phrasing from ADR 026 reference. |
| adr/018-liquidity-strategy.md | Reframes ADR 026 alignment without ADR 004 dependency; updates references accordingly. |
| adr/016-contract-interactions.md | Removes ADR 004 from contract inventory and flow references; updates PoC/production wording. |
| adr/015-zero-rtt.md | Fixes renamed/normalized ADR 001 anchor references. |
| adr/014-on-chain-verification.md | Repoints slashing/challenge-bond references from ADR 004 to ADR 026; removes obsolete ADR 004 mentions. |
| adr/013-schema-evolution.md | Fixes self-anchor links for Tier 1 heading (em-dash/anchor normalization). |
| adr/012-client.md | Updates ADR 024 session-key anchor target. |
| adr/011-content-takedown.md | Repoints staking/slashing references from ADR 004 to ADR 026; fixes phantom-announcement anchor target. |
| adr/010-multi-token.md | Updates governance/slashing references to ADR 026 sections. |
| adr/009-governance.md | Removes ADR 004 dependency framing; updates parameter-table wording accordingly. |
| adr/005-protocol.md | Updates multiple anchors and slashing/challenge-bond references away from ADR 004; fixes internal anchor normalization. |
| adr/004-tokenomics.md | Deletes superseded ADR 004 file. |
| adr/003-payments.md | Removes ADR 004 references; updates fee-routing and slashing phrasing to current canonical model. |
| adr/002-content-addressing.md | Updates challenge-bond/slashing evidence references to ADR 026 + corrected ADR 005 anchor. |
| adr/001-network.md | Repoints staking/slashing references from ADR 004 to ADR 026; removes ADR 004-specific wording. |
| CONTRIBUTING.md | Updates review checklist to reference ADR 026 instead of ADR 004. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Six review comments. All valid; the em-dash anchor question reframed the original #339 fix. Em-dash anchor standardization (Gemini #1, #2, #3 — also rolls back part of this PR's own #339 fix) Issue #339's premise was wrong. GitHub's slugger (github-slugger) replaces *each* whitespace character with a hyphen — it does NOT collapse runs. So a heading like `Foo — Bar` becomes: 1. Lowercase: `foo — bar` 2. Strip `—`: `foo bar` (two consecutive spaces remain) 3. Each space → hyphen: `foo--bar` (double hyphen) The double-hyphen anchors in main were therefore CORRECT, not broken. This PR's earlier "fix" (single-hyphen) introduced the broken anchors. Reverted, and standardized on the actual GFM-generated form (`--`) across the ADR set: - `cdnprobev1--latency-probe` (heading: `cdn/probe/v1 — latency probe`) - `gossip--rate-change-announcements` (heading: `Gossip — rate change announcements`) - `tier-1--minor-no-coordination` (heading: `Tier 1 — Minor (no coordination)`) - `content-discovery-dht--probe` (heading: `Content Discovery (DHT + Probe)` — `+` removal also leaves two spaces) - `3-session-keys--deferred-to-production-via-erc-7579-smartsessions` (heading: `3. Session Keys — Deferred to Production via ERC-7579 smartsessions`) Also fixed two pre-existing single-hyphen refs that were never correct on main: `001-network.md:154` and `014-on-chain-verification.md:278`. ADR 002:34 (Copilot) — challenge bond ref repointed to ADR 014 Cross-ref pointed at ADR 026 §8 for "challenge bond requirements", but ADR 026 §8 only lists the bond as part of slashing distribution; the canonical home for bond mechanics (amount, transfer, forfeit rules) is ADR 014's `#### Bond Handling` section. Repointed. ADR 011:128 (Copilot) — keep single stake value (no PoC/Prod split) Copilot suggested adding "1,000 TOKEN PoC / 50,000 TOKEN production" to match other places. Per direction "PoC and Prod should follow the same structure, we'll just modify the fee router," the stake minimum is unified. Kept the single 50,000 TOKEN value here, and aligned ADR 016:143 (constructor deps row for StakingRegistry) to drop its own `PoC 1,000 TOKEN; production: 50,000 TOKEN` split. Also dropped the adjacent "discount-threshold parameters removed" framing since it was historical-iteration narrative left over from the ADR 004 deletion sweep — now reads as a definitive statement. ADR 016:28 (Copilot) — Phase column typo `FeeRouter` / `VotingEscrow` / `SafetyReserve` rows had Phase column "Production (production)" — duplicated/typoed. Normalized all three to "Production only" matching the other rows in the table.
|
/gemini review |
|
Warning Gemini is experiencing higher than usual traffic and was unable to create the review. Please try again in a few hours by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request removes ADR 004 and systematically updates references to it across the documentation to reflect its supersession by ADR 026. These changes ensure that the architectural and economic descriptions are consistent with the new Gauge-Boost tokenomics model. Review feedback suggests maintaining explicit references to ADR 004 in the frontmatter and headings of ADR 026 to preserve historical context and clarity.
2 of 3 comments addressed (1 wontfix). README.md:40 — Chunk glossary entry now cross-refs both ADR 002 (the addressing scheme) and ADR 014 (the slash-evidence verification flow). Gemini was right that ADR 014 is the canonical home for the verification logic; ADR 002 still owns the addressing scheme itself, so the entry now links both. README.md:65 — `working_bytes` formula now uses `*` for multiplication instead of `·` (middle dot). The middle dot is fine in most renderers but `*` is universally compatible across viewers and copy-paste-friendly into pseudocode contexts. Backticks kept (formula vs prose distinction). README.md:80 — wontfix. Gemini suggested the challenge-bond values (100 PoC / 50 production) were reversed because production bonds are "typically" higher than PoC. They aren't reversed: PoC TOKEN is freely-mintable testnet supply (no market value, so 100 TOKEN is essentially free), while production TOKEN is the fixed-supply (1B) canonical asset with real market value (so 50 TOKEN is the higher economic deterrent). Confirmed against the canonical values across ADRs 011, 014, and 023. Em-dash → semicolon suggestions across all three comments are also declined: em-dashes in *prose* (table cells, glossary entries) don't affect GFM anchors. Only em-dashes in *headings* produce the `--` double-hyphen anchor pattern, and #343 already standardized those to the actual GFM-generated form. Glossary prose stays.
* docs(adr): add README preamble + thematic reading order (Tier 1) Closes #344. Adds `adr/README.md` as the protocol's preamble — what deCDN is, the six core design principles, the canonical 32-term glossary (grouped into wire/payments/tokenomics/enforcement), and pointers into the reading order. GitHub auto-renders this when navigating to `/adr/`, making it the natural entry point. Adds a **Reading Order** section to `architecture.md` that groups the 32 ADRs into 8 thematic chapters, each assuming the previous chapters are read: 1. Foundations (000, 001, 002, 005) 2. Discovery (022, 015) 3. Payments (003, 010, 012, 024) 4. Tokenomics & incentives (026, 027, 018, 028, 029, 030, 031, 032) 5. Verification & enforcement (014, 007, 008, 011) 6. Governance & contracts (009, 016) 7. Operations (019, 020, 023, 025) 8. Supporting infrastructure (021, 013, 017, 006) The numeric per-ADR index below stays as the canonical reference; this section is the first-time-reader path. Consolidates the partial Glossary previously in `architecture.md` into the README's expanded version (32 terms vs the prior 11), and leaves a one-line pointer at the old location. Tier 1 of the book-readiness program; #345 (smooth narrative connectives + cross-cutting lifts) and #346 (move alternatives to adr/_history/) are queued behind this. Tier 1 was the lowest-risk, highest-leverage move — does not touch any individual ADR body. * docs(adr): address Gemini review on README 2 of 3 comments addressed (1 wontfix). README.md:40 — Chunk glossary entry now cross-refs both ADR 002 (the addressing scheme) and ADR 014 (the slash-evidence verification flow). Gemini was right that ADR 014 is the canonical home for the verification logic; ADR 002 still owns the addressing scheme itself, so the entry now links both. README.md:65 — `working_bytes` formula now uses `*` for multiplication instead of `·` (middle dot). The middle dot is fine in most renderers but `*` is universally compatible across viewers and copy-paste-friendly into pseudocode contexts. Backticks kept (formula vs prose distinction). README.md:80 — wontfix. Gemini suggested the challenge-bond values (100 PoC / 50 production) were reversed because production bonds are "typically" higher than PoC. They aren't reversed: PoC TOKEN is freely-mintable testnet supply (no market value, so 100 TOKEN is essentially free), while production TOKEN is the fixed-supply (1B) canonical asset with real market value (so 50 TOKEN is the higher economic deterrent). Confirmed against the canonical values across ADRs 011, 014, and 023. Em-dash → semicolon suggestions across all three comments are also declined: em-dashes in *prose* (table cells, glossary entries) don't affect GFM anchors. Only em-dashes in *headings* produce the `--` double-hyphen anchor pattern, and #343 already standardized those to the actual GFM-generated form. Glossary prose stays. * docs(adr): unify challenge bond to 100 TOKEN across PoC and production Same-structure principle ("PoC and Prod follow the same structure; fee router is the only thing that changes") applied to the challenge bond. The historical 100 PoC / 50 production split was rationalized by "PoC TOKEN has no market value, so the higher nominal makes a deterrent" — but that's exactly the kind of nominal-vs-real-value split that creates implementer confusion. Unify to 100 TOKEN. Touched: - README.md glossary entry - ADR 005:83 — wire-protocol cross-ref to challenge-bond requirement - ADR 011:207 — blacklist-violation slashing path - ADR 016:151 — SlashJudge constructor parameters table - ADR 023:23, :120 — PoC/Prod comparison tables (both columns now 100) - ADR 023:182 — `challenge_bond_token` constants table Programmatic check: zero `50 TOKEN` mentions remain in the ADR set.
* 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).
Closes #339, #341, #342.
Bundled into one PR per direction — they overlap on several files (ADRs 003, 005, 014, 016, 018, 021, 023) and share the same definitive-framing rationale: pre-launch the protocol has one design, so ADRs read as the canonical design rather than as an iteration log.
#339 — cross-reference hygiene (13 broken anchors)
Em-dash collapse (
--→-in anchors). GFM strips em-dashes from headings and collapses surrounding whitespace into a single hyphen. Touched: ADR 002, ADR 005 (3 instances), ADR 013 (2 self-anchors), ADR 015 (3 instances).Renamed/missing targets:
cdn/probe/v1 — latency probeheading.#3-session-keys-deferred-to-production-via-erc-7579-smartsessions.#protocol-enums.Programmatic check post-fix: zero broken
*--*anchors across the ADR tree.#341 — v3-iteration framing sweep (ADRs 009, 021)
PR #338's reframe pass missed two pockets:
Programmatic check post-fix: zero
\bv3\bhits in production ADR corpus excluding legitimate Balancer V3 / Uniswap V3 references.#342 — drop ADR 004 + 'ADRs to update on acceptance' sections
ADR 004 deletion. Pre-launch there's no v1 deployment to preserve historical record for. Audited every inbound cross-ref (54 hits across 13 files) and either:
Notable transformations:
"ADRs to update on acceptance" section deletions. Now that #338 has landed and the touched ADRs are updated, these sections are stale inventory of past work. Removed from ADRs 026, 027, 030, 032.
Final state
Test plan
\.md#[a-z0-9-]*--anchors acrossadr/.\bv3\bhits excluding Balancer V3 / Uniswap V3.🤖 Generated with Claude Code