Skip to content

Max/docs threat model overhaul - #7005

Draft
mfahampshire wants to merge 16 commits into
developfrom
max/docs-threat-model-overhaul
Draft

Max/docs threat model overhaul#7005
mfahampshire wants to merge 16 commits into
developfrom
max/docs-threat-model-overhaul

Conversation

@mfahampshire

@mfahampshire mfahampshire commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

DON'T MERGE UNTIL #6984 is done

TODO

  • Wait on nym-swizzle being merged + published
  • Add nym-swizzle docs

Summary by CodeRabbit

  • New Features
    • Added a comprehensive network threat-model documentation section covering actors, vectors, unlinkability properties, configurations, comparisons, and worked examples.
    • Added interactive diagrams and deep dives for mixnet mixing, dVPN cover traffic, packet anatomy, latency, and network configurations.
    • Added privacy examples for wallet synchronization, private messaging, and web browsing.
    • Added a contributor guide for Simplified Technical English.
  • Documentation
    • Updated navigation, cross-links, redirects, developer guidance, and dVPN/mixnet explanations.
    • Added a dismissible banner highlighting the new threat-model resources.
  • Tests
    • Added automated latency and navigation validation.

This change is Reviewable

@mfahampshire
mfahampshire requested a review from merve64 as a code owner July 29, 2026 20:56
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-nextra Ready Ready Preview Jul 30, 2026 10:23am
nym-explorer-v2 Ready Ready Preview Jul 30, 2026 10:23am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nym-node-status Ignored Ignored Preview Jul 30, 2026 10:23am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 676245b2-afe6-45bf-a630-1e3aea9e9bcc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds a typed privacy threat-model foundation, reusable scenario data, interactive network and packet visualizations, worked examples, new threat-model documentation, navigation and redirect updates, styling, and Vitest support.

Changes

Threat-model foundation and visualizations

Layer / File(s) Summary
Privacy-model contracts and data
documentation/docs/lib/privacy-model/*
Adds shared types, threat-model actors/vectors/properties, scenario registries, topology builders, latency and packet-framing models, navigation helpers, and tests.
Interactive threat-model visualizations
documentation/docs/components/threat-model/*
Adds matrix, metadata, topology, packet anatomy, mixnet, dVPN cover-traffic, latency-control, and reduced-motion components.

Documentation and site integration

Layer / File(s) Summary
Threat-model pages and examples
documentation/docs/pages/network/threat-model/*, documentation/docs/pages/network/deep-dives/*, documentation/docs/pages/developers/*
Adds threat-model references, configuration pages, worked examples, packet deep dives, and developer documentation links.
Site integration and presentation
documentation/docs/pages/*, documentation/docs/next.config.js, documentation/docs/theme.config.tsx, documentation/docs/package.json
Updates navigation, redirects, global styles, visualization styles, the site banner, test scripts, dependencies, and build configuration.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • nymtech/nym#6928: Both changes update documentation/docs/pages/developers/concepts/exit-security.mdx and add related threat-model cross-references.

Suggested reviewers: merve64

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 39.06% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: a broad threat-model documentation overhaul.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch max/docs-threat-model-overhaul

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@mfahampshire
mfahampshire marked this pull request as draft July 29, 2026 21:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🧹 Nitpick comments (11)
documentation/docs/lib/privacy-model/examples/wallet.ts (1)

9-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Internal Confluence link in a public docs source file.

The nymtech.atlassian.net URL is not reachable for external readers/contributors. Consider citing the source by name only, or pointing at a public reference.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/lib/privacy-model/examples/wallet.ts` around lines 9 - 10,
Remove the internal nymtech.atlassian.net URL from the source comment in
wallet.ts, and retain only the cited source name or replace it with an
equivalent publicly accessible reference.
documentation/docs/tsconfig.json (1)

20-20: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Excluding tests drops type-checking for them entirely.

Optional: keep a tsconfig.test.json that extends this config and includes **/*.test.ts + vitest.config.ts, so the tests stay type-checked while the Next build ignores them.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/tsconfig.json` at line 20, Update the TypeScript
configuration around the exclude setting so test files and vitest.config.ts
remain type-checked without being included in the Next build. Add or retain a
tsconfig.test.json extending the base configuration, include **/*.test.ts and
vitest.config.ts there, and keep the existing exclusions for the application
build.
documentation/docs/lib/privacy-model/topology.ts (1)

52-55: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

as NodeKind hides unresolved node ids.

A topology whose routes[].nodeIds reference a missing node yields undefined kinds that flow silently into latency/legend calculations. Filtering (or throwing in dev) makes the data error visible.

🛡️ Suggested guard
 export function routeStages(topo: Topology, route: DiagramRoute): NodeKind[] {
   const byId = new Map(topo.nodes.map((n) => [n.id, n.kind]));
-  return route.nodeIds.map((id) => byId.get(id) as NodeKind);
+  return route.nodeIds.flatMap((id) => {
+    const kind = byId.get(id);
+    if (!kind) return [];
+    return [kind];
+  });
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/lib/privacy-model/topology.ts` around lines 52 - 55,
Update routeStages to explicitly handle node IDs that are absent from the
topology instead of coercing byId.get(id) with as NodeKind. Filter unresolved
IDs or throw a clear development-time error, ensuring latency and legend
calculations never receive undefined node kinds.
documentation/docs/lib/privacy-model/topologies.ts (1)

5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Column-convention comment does not match multipathDvpnTopology, and MIX_IDS can be derived.

Line 5 documents 5 exit(s), 6 destination, but the dVPN builder places exits at col: 2 and the destination at col: 3 (correct for a mix-free route, just undocumented). Also MIX_IDS restates the ids already in MIX_NODES.

♻️ Suggested tweaks
-// Columns: 0 client, 1 entry, 2-4 mix layers, 5 exit(s), 6 destination.
+// Columns (mixnet routes): 0 client, 1 entry, 2-4 mix layers, 5 exit(s),
+// 6 destination. dVPN-only routes compress to: 0 client, 1 entry, 2 exit(s),
+// 3 destination.
-const MIX_IDS = ["mix1", "mix2", "mix3"];
+const MIX_IDS = MIX_NODES.map((n) => n.id);

Also applies to: 15-20, 95-105

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/lib/privacy-model/topologies.ts` at line 5, Update the
column-convention comment to document both standard mix-layer routes and the
mix-free multipathDvpnTopology layout, including exits at column 2 and the
destination at column 3. In the topology definitions around MIX_IDS and
multipathDvpnTopology, remove the redundant MIX_IDS constant and derive mix
identifiers directly from MIX_NODES while preserving existing topology behavior.
documentation/docs/lib/privacy-model/examples/browsing.ts (1)

53-56: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicate cell helper across the four example modules.

cell(verdict, text) is defined identically in browsing.ts, generic.ts, messaging.ts, and wallet.ts. Export it once (e.g. from ../tri or ../types-adjacent helper module) and import it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/lib/privacy-model/examples/browsing.ts` around lines 53 -
56, Remove the duplicate cell helper from browsing.ts, generic.ts, messaging.ts,
and wallet.ts, define and export a single shared cell function in the
appropriate adjacent helper module such as ../tri or ../types, then import and
reuse that shared symbol in all four example modules while preserving the
existing signature and behavior.
documentation/docs/components/threat-model/ConfigMatrix.tsx (1)

13-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Give the verdict glyphs a text alternative and add scope="col".

The verdict is conveyed only by an emoji glyph, so assistive tech announces "cross mark"/"check mark" rather than the yes/no/partial meaning, and the header cells lack scope, which weakens row/column association in a 6-column matrix.

♿ Suggested change
 function VerdictCell({ c }: { c: MatrixCell }) {
   return (
     <td>
-      <span className={triClass(c.verdict)}>{triGlyph(c.verdict)}</span>
+      <span className={triClass(c.verdict)} role="img" aria-label={c.verdict}>
+        {triGlyph(c.verdict)}
+      </span>
       <span className="matrix-col-sub">{c.text}</span>
     </td>
   );
 }
-              <th style={{ textAlign: "left" }}>Configuration</th>
-              <th>
+              <th scope="col" style={{ textAlign: "left" }}>Configuration</th>
+              <th scope="col">

(apply scope="col" to the remaining header cells, and the same aria-label treatment to the "Fast" glyph on Line 71.)

Also applies to: 29-54

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/components/threat-model/ConfigMatrix.tsx` around lines 13
- 20, Update VerdictCell to give each verdict glyph an explicit aria-label
describing its yes/no/partial meaning, including the “Fast” glyph usage, while
preserving the visual glyph. Add scope="col" to every matrix header cell in the
table, including the remaining headers, so all six columns have proper column
associations.
documentation/docs/components/threat-model/NetworkDiagram.tsx (2)

322-322: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

SVG lacks an accessible name.

role="img" on the wrapping <svg> tells assistive tech to treat it as a single image, but there's no aria-label/aria-labelledby/<title>, so screen readers announce it with no description.

♿ Proposed fix
-        <svg viewBox={`0 0 ${WIDTH} ${height}`} role="img">
+        <svg viewBox={`0 0 ${WIDTH} ${height}`} role="img" aria-label={topo.caption ?? "Network diagram"}>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/components/threat-model/NetworkDiagram.tsx` at line 322,
Add an accessible name to the wrapping SVG in the NetworkDiagram component by
providing a descriptive aria-label, aria-labelledby reference, or SVG title
alongside role="img". Ensure assistive technologies receive a meaningful
description of the network diagram.

237-244: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated packet-duration formula.

The same formula (surb ? 3.0 : mixish ? 3.2 : dvpn ? 2.2 : 2.4) + mixCount * 0.4 is computed once in routeDuration (used only to derive dlBase) and again independently in Packet's duration. If one is tuned without the other, download start times and actual animation durations will silently drift out of sync.

♻️ Proposed fix: extract a shared helper
+function routeDuration(r: DiagramRoute, mixNodeIds: Set<string>): number {
+  const mixish = r.mode === "mixnet";
+  const mixCount = r.nodeIds.filter((id) => mixNodeIds.has(id)).length;
+  return (
+    (r.surb ? 3.0 : mixish ? 3.2 : r.mode === "dvpn" ? 2.2 : 2.4) +
+    mixCount * 0.4
+  );
+}

Use it from both packetSpecs (passing the mixNodeIds set already computed there) and from Packet (build a mixNodeIds set from kindMap, or pass it down as a prop).

Also applies to: 486-488

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/components/threat-model/NetworkDiagram.tsx` around lines
237 - 244, Extract the duplicated packet-duration calculation into a shared
helper in the NetworkDiagram module. Update routeDuration and packetSpecs to use
it with the existing mixNodeIds set, and update Packet to use the same helper
with a mixNodeIds set derived from kindMap or passed through props, preserving
the current mode, surb, and mix-node duration behavior.
documentation/docs/components/threat-model/MixnetDeepDive.tsx (3)

434-440: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

kind is never used by label.

Drop the parameter (and the call-site arguments) or use it for styling.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/components/threat-model/MixnetDeepDive.tsx` around lines
434 - 440, Update the label function to remove the unused kind parameter, and
remove the corresponding NodeKind arguments from every label call site; preserve
the existing label rendering and positioning.

88-144: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Latency slider movement re-randomizes every route.

durationSec is derived from params, so each slider tick rebuilds the packet pool with fresh random waypoints and restarts every animation. Keep the routes stable and let duration come from the transition instead.

♻️ Sketch

Store a per-packet speedFactor (the 0.85 + Math.random() * 0.4 term) in the memo, drop durationSec from the deps, and compute duration: durationSec * p.speedFactor at render time in the transition prop.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/components/threat-model/MixnetDeepDive.tsx` around lines
88 - 144, Update the packet generation in the useMemo callback to store each
packet’s randomized speedFactor instead of a computed duration, remove
durationSec from that memo’s dependency array, and keep routes stable when the
latency slider changes. In the packet rendering transition, compute the duration
from the current durationSec multiplied by the packet’s speedFactor.

38-56: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Don’t let the dVPN shape make cols.l1/l2/l3 valid

The current assertion only marks the mixnet return as Record<string, number>, while the dvpn branch returns a narrower shape. cols is still a union and property access for keys only present on one branch is not type-safe here; use an explicit shared type, discriminate by mode before accessing layers, or type the generic return so both branches are compatible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@documentation/docs/components/threat-model/MixnetDeepDive.tsx` around lines
38 - 56, Make the cols value type-safe across both mode branches without
allowing the dVPN shape to expose l1, l2, or l3 as valid properties. Update the
cols useMemo and the layers useMemo around cols.l1/cols.l2/cols.l3 to use an
explicit shared/discriminated type or guard mode before accessing mixnet-only
coordinates, while preserving the existing dVPN and mixnet coordinate values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@documentation/docs/components/threat-model/DvpnCoverTraffic.tsx`:
- Around line 12-15: Update the threat-model claims and related presentation
around ENTRY_REQUESTS and the sections covering the client request flow and
anonymity analysis so they do not treat all clients as one destination anonymity
set. Either remove the global anonymity-set claim or decouple request
destinations from entry-gateway assignment; accurately describe the remaining
cohort partitioning, timing, and linkability limits.
- Line 101: Update the SVG rendered by the DvpnCoverTraffic component to provide
an accessible name alongside role="img", using an appropriate aria-label or
accessible title that describes the diagram’s purpose.

In `@documentation/docs/components/threat-model/LatencyControls.tsx`:
- Around line 17-64: Associate every slider with its visible label using stable
unique IDs and matching htmlFor attributes. In
documentation/docs/components/threat-model/LatencyControls.tsx lines 17-64,
update both the geographic-delay and mixing-delay controls, using useId() where
needed to avoid collisions; in
documentation/docs/components/threat-model/MixnetDeepDive.tsx lines 182-193,
apply the same association to the “Mix nodes / layer” input.

In `@documentation/docs/components/threat-model/MixnetDeepDive.tsx`:
- Around line 234-235: Add an accessible name to the SVG in the diagram-wrap
markup, using an appropriate aria-label or equivalent labeling mechanism
alongside role="img". Keep the existing SVG viewBox and rendering behavior
unchanged.

In `@documentation/docs/components/threat-model/PacketAnatomy.tsx`:
- Around line 189-192: Update the isMix branch of the badge text in
PacketAnatomy so fixed 2000 B Sphinx packets are described as reducing
size-based correlation rather than being “unlinkable.” Preserve the existing
WireGuard wording and make the replacement explicitly avoid implying protection
against timing or traffic-correlation analysis.

In `@documentation/docs/lib/privacy-model/examples/generic.ts`:
- Line 26: Remove all em dashes from the privacy-model prose and comments,
updating documentation/docs/lib/privacy-model/examples/generic.ts:26-26
summaries, requires values, residuals, cons, and fit strings with colons, full
stops, or “None”; apply the same changes to cost, summaries, residuals, and
requires values in
documentation/docs/lib/privacy-model/examples/wallet.ts:21-21, including the
double-spaced single-IPR value; and rewrite the affected documentation comments
in documentation/docs/lib/privacy-model/types.ts:148-148 using commas or
parentheses.

In `@documentation/docs/pages/network/dvpn-mode.mdx`:
- Around line 19-25: The optional scenario lookups currently pass possibly
undefined values into the required NetworkDiagram item prop. In
documentation/docs/pages/network/dvpn-mode.mdx lines 19-25, guard dvpnScenario
before rendering NetworkDiagram or replace getGenericScenario with a throwing
requireGenericScenario helper; apply the same change to mixScenario in
documentation/docs/pages/network/mixnet-mode.mdx lines 20-26, ensuring unknown
scenario IDs fail safely rather than causing a client-side render crash.

In
`@documentation/docs/pages/network/threat-model/configurations/dvpn-single.mdx`:
- Around line 12-15: Restore prerendered threat-model content by updating the
GenericScenarioView integration to use an SSR-renderable or static equivalent,
or an SSR fallback that includes the verdict badges, diagram, and actor
assessment. Apply the same change at
documentation/docs/pages/network/threat-model/configurations/dvpn-single.mdx
(lines 12-15), end-to-end.mdx (lines 12-15), hybrid.mdx (lines 12-15),
mixnet-rotating.mdx (lines 13-16), mixnet.mdx (lines 12-15), unprotected.mdx
(lines 12-15), and vpn.mdx (lines 12-15); each site requires the same direct
update around GenericScenarioView.

In `@documentation/docs/pages/network/threat-model/examples/messaging.mdx`:
- Around line 19-20: Make fixed scenario lookups required at the registry helper
boundary so getMessagingScenario returns Scenario rather than Scenario |
undefined, asserting or throwing for missing IDs. Apply this to the lookups in
documentation/docs/pages/network/threat-model/examples/messaging.mdx lines
19-20, documentation/docs/pages/network/threat-model/examples/wallet.mdx lines
19-20, and documentation/docs/pages/network/threat-model/two-layer-model.mdx
lines 19-20; preserve the existing fixed scenario IDs and ensure NetworkDiagram
and MetadataPanel receive guaranteed scenarios.

In `@documentation/docs/pages/threat-model-viz.css`:
- Line 37: Update the --font-mono declaration to normalize Menlo and Consolas
according to the repository’s value-keyword-case Stylelint rule, while
preserving the existing font fallback order and values.

---

Nitpick comments:
In `@documentation/docs/components/threat-model/ConfigMatrix.tsx`:
- Around line 13-20: Update VerdictCell to give each verdict glyph an explicit
aria-label describing its yes/no/partial meaning, including the “Fast” glyph
usage, while preserving the visual glyph. Add scope="col" to every matrix header
cell in the table, including the remaining headers, so all six columns have
proper column associations.

In `@documentation/docs/components/threat-model/MixnetDeepDive.tsx`:
- Around line 434-440: Update the label function to remove the unused kind
parameter, and remove the corresponding NodeKind arguments from every label call
site; preserve the existing label rendering and positioning.
- Around line 88-144: Update the packet generation in the useMemo callback to
store each packet’s randomized speedFactor instead of a computed duration,
remove durationSec from that memo’s dependency array, and keep routes stable
when the latency slider changes. In the packet rendering transition, compute the
duration from the current durationSec multiplied by the packet’s speedFactor.
- Around line 38-56: Make the cols value type-safe across both mode branches
without allowing the dVPN shape to expose l1, l2, or l3 as valid properties.
Update the cols useMemo and the layers useMemo around cols.l1/cols.l2/cols.l3 to
use an explicit shared/discriminated type or guard mode before accessing
mixnet-only coordinates, while preserving the existing dVPN and mixnet
coordinate values.

In `@documentation/docs/components/threat-model/NetworkDiagram.tsx`:
- Line 322: Add an accessible name to the wrapping SVG in the NetworkDiagram
component by providing a descriptive aria-label, aria-labelledby reference, or
SVG title alongside role="img". Ensure assistive technologies receive a
meaningful description of the network diagram.
- Around line 237-244: Extract the duplicated packet-duration calculation into a
shared helper in the NetworkDiagram module. Update routeDuration and packetSpecs
to use it with the existing mixNodeIds set, and update Packet to use the same
helper with a mixNodeIds set derived from kindMap or passed through props,
preserving the current mode, surb, and mix-node duration behavior.

In `@documentation/docs/lib/privacy-model/examples/browsing.ts`:
- Around line 53-56: Remove the duplicate cell helper from browsing.ts,
generic.ts, messaging.ts, and wallet.ts, define and export a single shared cell
function in the appropriate adjacent helper module such as ../tri or ../types,
then import and reuse that shared symbol in all four example modules while
preserving the existing signature and behavior.

In `@documentation/docs/lib/privacy-model/examples/wallet.ts`:
- Around line 9-10: Remove the internal nymtech.atlassian.net URL from the
source comment in wallet.ts, and retain only the cited source name or replace it
with an equivalent publicly accessible reference.

In `@documentation/docs/lib/privacy-model/topologies.ts`:
- Line 5: Update the column-convention comment to document both standard
mix-layer routes and the mix-free multipathDvpnTopology layout, including exits
at column 2 and the destination at column 3. In the topology definitions around
MIX_IDS and multipathDvpnTopology, remove the redundant MIX_IDS constant and
derive mix identifiers directly from MIX_NODES while preserving existing
topology behavior.

In `@documentation/docs/lib/privacy-model/topology.ts`:
- Around line 52-55: Update routeStages to explicitly handle node IDs that are
absent from the topology instead of coercing byId.get(id) with as NodeKind.
Filter unresolved IDs or throw a clear development-time error, ensuring latency
and legend calculations never receive undefined node kinds.

In `@documentation/docs/tsconfig.json`:
- Line 20: Update the TypeScript configuration around the exclude setting so
test files and vitest.config.ts remain type-checked without being included in
the Next build. Add or retain a tsconfig.test.json extending the base
configuration, include **/*.test.ts and vitest.config.ts there, and keep the
existing exclusions for the application build.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4a03a3ee-ed5e-444a-87ac-150d41d45f01

📥 Commits

Reviewing files that changed from the base of the PR and between f7e55b1 and 804f8bd.

⛔ Files ignored due to path filters (1)
  • documentation/docs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (85)
  • documentation/docs/STE-STYLE.md
  • documentation/docs/components/threat-model/ConfigMatrix.tsx
  • documentation/docs/components/threat-model/DvpnCoverTraffic.tsx
  • documentation/docs/components/threat-model/GenericScenarioView.tsx
  • documentation/docs/components/threat-model/LatencyControls.tsx
  • documentation/docs/components/threat-model/MetadataPanel.tsx
  • documentation/docs/components/threat-model/MixnetDeepDive.tsx
  • documentation/docs/components/threat-model/NetworkDiagram.tsx
  • documentation/docs/components/threat-model/NodeGlyph.tsx
  • documentation/docs/components/threat-model/PacketAnatomy.tsx
  • documentation/docs/components/threat-model/PropertyBadges.tsx
  • documentation/docs/components/threat-model/ThreatModelReference.tsx
  • documentation/docs/lib/privacy-model/examples/browsing.ts
  • documentation/docs/lib/privacy-model/examples/generic.ts
  • documentation/docs/lib/privacy-model/examples/messaging.ts
  • documentation/docs/lib/privacy-model/examples/wallet.ts
  • documentation/docs/lib/privacy-model/latency.test.ts
  • documentation/docs/lib/privacy-model/latency.ts
  • documentation/docs/lib/privacy-model/links.ts
  • documentation/docs/lib/privacy-model/nav.test.ts
  • documentation/docs/lib/privacy-model/nav.ts
  • documentation/docs/lib/privacy-model/nodes.ts
  • documentation/docs/lib/privacy-model/packets.ts
  • documentation/docs/lib/privacy-model/threat-model.ts
  • documentation/docs/lib/privacy-model/topologies.ts
  • documentation/docs/lib/privacy-model/topology.ts
  • documentation/docs/lib/privacy-model/tri.ts
  • documentation/docs/lib/privacy-model/types.ts
  • documentation/docs/lib/privacy-model/useReducedMotion.ts
  • documentation/docs/next.config.js
  • documentation/docs/package.json
  • documentation/docs/pages/_app.tsx
  • documentation/docs/pages/developers/_meta.json
  • documentation/docs/pages/developers/concepts/exit-security.mdx
  • documentation/docs/pages/developers/index.mdx
  • documentation/docs/pages/developers/mix-architecture.mdx
  • documentation/docs/pages/developers/rust.mdx
  • documentation/docs/pages/developers/smoldvpn.mdx
  • documentation/docs/pages/developers/smolmix.mdx
  • documentation/docs/pages/developers/swizzle.mdx
  • documentation/docs/pages/developers/typescript.mdx
  • documentation/docs/pages/network/_meta.json
  • documentation/docs/pages/network/deep-dives/_meta.json
  • documentation/docs/pages/network/deep-dives/dvpn-cover.mdx
  • documentation/docs/pages/network/deep-dives/hidden-services.mdx
  • documentation/docs/pages/network/deep-dives/mixing.mdx
  • documentation/docs/pages/network/deep-dives/packet-anatomy.mdx
  • documentation/docs/pages/network/dvpn-mode.md
  • documentation/docs/pages/network/dvpn-mode.mdx
  • documentation/docs/pages/network/dvpn-mode/censorship-resistance.md
  • documentation/docs/pages/network/index.md
  • documentation/docs/pages/network/infrastructure/nym-nodes.mdx
  • documentation/docs/pages/network/mixnet-mode.mdx
  • documentation/docs/pages/network/overview.md
  • documentation/docs/pages/network/overview/_meta.json
  • documentation/docs/pages/network/overview/choosing-a-mode.md
  • documentation/docs/pages/network/overview/comparisons.md
  • documentation/docs/pages/network/overview/privacy-problem.md
  • documentation/docs/pages/network/threat-model.mdx
  • documentation/docs/pages/network/threat-model/_meta.json
  • documentation/docs/pages/network/threat-model/actors.mdx
  • documentation/docs/pages/network/threat-model/choose-config.mdx
  • documentation/docs/pages/network/threat-model/comparisons.mdx
  • documentation/docs/pages/network/threat-model/configurations/_meta.json
  • documentation/docs/pages/network/threat-model/configurations/dvpn-multi.mdx
  • documentation/docs/pages/network/threat-model/configurations/dvpn-single.mdx
  • documentation/docs/pages/network/threat-model/configurations/end-to-end.mdx
  • documentation/docs/pages/network/threat-model/configurations/hybrid.mdx
  • documentation/docs/pages/network/threat-model/configurations/mixnet-rotating.mdx
  • documentation/docs/pages/network/threat-model/configurations/mixnet.mdx
  • documentation/docs/pages/network/threat-model/configurations/unprotected.mdx
  • documentation/docs/pages/network/threat-model/configurations/vpn.mdx
  • documentation/docs/pages/network/threat-model/examples/_meta.json
  • documentation/docs/pages/network/threat-model/examples/browsing.mdx
  • documentation/docs/pages/network/threat-model/examples/messaging.mdx
  • documentation/docs/pages/network/threat-model/examples/wallet.mdx
  • documentation/docs/pages/network/threat-model/properties.mdx
  • documentation/docs/pages/network/threat-model/two-layer-model.mdx
  • documentation/docs/pages/network/threat-model/vectors.mdx
  • documentation/docs/pages/styles.css
  • documentation/docs/pages/threat-model-viz.css
  • documentation/docs/pnpm-workspace.yaml
  • documentation/docs/theme.config.tsx
  • documentation/docs/tsconfig.json
  • documentation/docs/vitest.config.ts
💤 Files with no reviewable changes (3)
  • documentation/docs/pages/network/overview/comparisons.md
  • documentation/docs/pages/network/overview/choosing-a-mode.md
  • documentation/docs/pages/network/dvpn-mode.md

Comment thread documentation/docs/components/threat-model/DvpnCoverTraffic.tsx
Comment thread documentation/docs/components/threat-model/DvpnCoverTraffic.tsx Outdated
Comment thread documentation/docs/components/threat-model/LatencyControls.tsx
Comment thread documentation/docs/components/threat-model/MixnetDeepDive.tsx Outdated
Comment thread documentation/docs/components/threat-model/PacketAnatomy.tsx
Comment thread documentation/docs/lib/privacy-model/examples/generic.ts Outdated
Comment thread documentation/docs/pages/network/dvpn-mode.mdx Outdated
Comment thread documentation/docs/pages/network/threat-model/configurations/dvpn-single.mdx Outdated
Comment thread documentation/docs/pages/network/threat-model/examples/messaging.mdx Outdated
Comment thread documentation/docs/pages/threat-model-viz.css Outdated
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