Skip to content

STR-103: apply visual storytelling across all theoretical README sections - #136

Merged
Puneethkumarck merged 1 commit into
mainfrom
docs/visual-storytelling-all-sections
Apr 9, 2026
Merged

Puneethkumarck merged 1 commit into
mainfrom
docs/visual-storytelling-all-sections

Conversation

@Puneethkumarck

@Puneethkumarck Puneethkumarck commented Apr 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Apply emoji-driven visual storytelling to all remaining theoretical sections (the naive approach section was done in STR-103: improve naive approach section with visual storytelling #135)
  • Failure modes: severity table with emoji ratings
  • EVM chains: "Nonce Domino Effect" narrative, side-by-side TX replacement
  • Solana: "60-Second Clock" countdown, EVM vs Solana comparison block
  • Gas economics: EIP-1559 "Fee Anatomy" box, three-scenario table with mood emojis
  • Nonce management: race condition + Redis solution side-by-side, crash-recovery flow
  • Mempool: "Journey Through the Mempool" ASCII art, emoji property table
  • Escalation: $200 vs $500K side-by-side paths, gas budget formula with examples
  • Durable execution: crash before/after comparison (without vs with Temporal)
  • Lifecycle: ASCII overview + emoji-labeled sequence diagram

Test plan

  • Verify all mermaid diagrams render on GitHub
  • Check emoji display in code blocks and tables
  • Confirm practical sections (architecture, API, config) unchanged

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Restructured blockchain failure modes reference with severity labels and visual category indicators.
    • Enhanced section headings with visual symbols for EVM and other blockchain networks.
    • Expanded transaction recovery mechanism explanations with detailed examples and scenario-based callouts.
    • Added comprehensive flow diagrams and code snippets covering nonce synchronization, gas escalation strategies, and end-to-end transaction lifecycle scenarios.

…ions

Enhance every theoretical section with emoji-driven narratives, cinematic
scenarios, and visually scannable tables. Sections updated: failure modes,
EVM/Solana chain recovery, gas economics (EIP-1559), nonce management,
mempool behavior, escalation tiers, durable execution, and the full
transaction lifecycle sequence diagram.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 9, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Documentation-only update to README.md that restructures blockchain failure modes into tables with severity labels, enhances EVM/Solana architecture explanations with emoji indicators and scenario-based callouts, expands examples with code snippets and flow diagrams, and enriches visual presentation throughout with status markers and updated section headings.

Changes

Cohort / File(s) Summary
Documentation Restructuring
README.md
Replaced numbered lists of blockchain failure modes with emoji-coded, severity-labeled tables; added emoji prefixes to section headings (e.g., "⟠ EVM Chains", "◎ Solana"); enhanced visual storytelling with status markers and enriched formatting throughout.
Content Expansion
README.md
Added new illustrative code snippets and flow narratives including nonce race conditions with Redis atomic operations, nonce resync flows, transaction mempool journeys, gas escalation scenarios with formalized budget formulas, and durable-execution crash scenarios contrasting polling vs Temporal approaches.
Diagram and Table Enhancements
README.md
Updated Mermaid diagrams with richer status labels ("🚨 Stuck detection", "✅/❌" outcomes) and renamed subgraph titles; reformatted concept tables with icons and adjusted column contents for improved clarity and visual emphasis.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR#135: Overlaps with updates to the same Mermaid diagrams and emoji/table-driven visual storytelling patterns in README.md
  • PR#134: Shares overlapping doc-level changes to README.md covering theoretical sections on EVM vs Solana, nonce/gas/mempool mechanics, and Temporal/durable execution concepts

Poem

🐰 Emojis dance across the page so bright,
Tables gleaming with severity's light!
Nonce races, gas budgets, flows divine—
The docs now sing in structured design. ✨
Hops away with joy 📚

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: applying visual storytelling enhancements across theoretical README sections, directly aligned with the changeset's primary objective.
Description check ✅ Passed The description provides comprehensive details of changes with a well-organized summary section and test plan, though it deviates from the repository's template structure (STR Issue, Changes checklist format).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/visual-storytelling-all-sections

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 and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 409-420: The documentation's nonce-management narrative is
incorrect and should be updated to reflect the actual implementation: replace
the SETNX/INCR description and the CAS claim with an explanation of the
WATCH/MULTI/EXEC optimistic locking flow, the Redis hash fields named
"allocated" and "confirmed", and the inflight set tracking; correct the resync
example so eth_getTransactionCount and the documented confirmed/non-conflicting
allocated nonces are consistent (e.g., if eth_getTransactionCount returns 45, do
not claim both 45 and 46 are confirmed), and update the diagrams and lines
referenced (previous SETNX/INCR text and the resync example) to match this
WATCH/MULTI/EXEC + hash + inflight-set behavior.
- Around line 557-590: The README's escalation tiers and multipliers conflict
with the actual runtime defaults in TransactionLifecycleWorkflowImpl
(implemented as 5/15/30 minutes and 1.5x/2.0x/3.0x), which will mislead
operators; update the documentation blocks and mermaid diagram to either (a)
match the implemented defaults in TransactionLifecycleWorkflowImpl (replace the
10/30/60 and 1.2x/1.5x/2.0x or 5/20/45 and 1.1x/1.3x settings with 5/15/30 and
1.5x/2.0x/3.0x), or (b) explicitly label the shown timings and multipliers as
“example policy values”/illustrative and add a note pointing readers to
TransactionLifecycleWorkflowImpl for the actual configured defaults so operators
aren’t misled.
- Line 186: Several fenced code blocks in the README are missing language
identifiers (violating markdownlint MD040) causing lint failures and poorer
rendering; update every triple-backtick fence that currently has no language to
include an appropriate identifier (e.g., use text for ASCII narrative blocks,
bash for shell snippets, json for JSON payloads, keep mermaid where applicable)
so replace ``` with ```text, ```bash, ```json, or ```mermaid as appropriate for
each snippet and ensure consistency across the affected fences referenced in the
review.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b09d2d9d-fdd5-4988-85e0-6d3869942404

📥 Commits

Reviewing files that changed from the base of the PR and between 17d3ae9 and 90cc8f2.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md

> **🎬 The Nonce Domino Effect**

```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language identifiers to fenced code blocks (markdownlint MD040).

These fences are missing language tags, which breaks linting and reduces readability in GitHub rendering.

Proposed fix pattern
- ```
+ ```text
  ...ascii narrative block...
- ```
+ ```

Use text for ASCII story blocks, bash for shell snippets, json for JSON, and keep mermaid where applicable.

Also applies to: 228-228, 247-247, 286-286, 299-299, 323-323, 379-379, 399-399, 411-411, 451-451, 474-474, 552-552, 611-611, 631-631, 700-700

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 186-186: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 186, Several fenced code blocks in the README are missing
language identifiers (violating markdownlint MD040) causing lint failures and
poorer rendering; update every triple-backtick fence that currently has no
language to include an appropriate identifier (e.g., use text for ASCII
narrative blocks, bash for shell snippets, json for JSON payloads, keep mermaid
where applicable) so replace ``` with ```text, ```bash, ```json, or ```mermaid
as appropriate for each snippet and ensure consistency across the affected
fences referenced in the review.

Comment thread README.md
Comment on lines +409 to +420
> **✅ How We Solve It: Redis Atomic Operations**

```
🧵 Thread A 🧵 Thread B
─────────── ───────────
🔒 Redis INCR → 42 ⏳ (waits for atomic op)
📤 Submit TX (nonce=42) ✅ 🔒 Redis INCR → 43
📤 Submit TX (nonce=43) ✅

Redis CAS (compare-and-swap) guarantees strictly
sequential nonce allocation, even under concurrency. 🎯
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Nonce-management narrative is inconsistent with actual Redis design and nonce semantics.

Line 414/415 and Line 428–437 describe SETNX/INCR flow, but the implementation uses Redis WATCH/MULTI/EXEC, hash fields (allocated/confirmed), and inflight set tracking.
Also, the resync example at Lines 456–459 is internally inconsistent: eth_getTransactionCount → 45 cannot simultaneously imply nonces 45 and 46 were already confirmed.

Proposed doc fix (match implementation-level behavior)
- 🔒 Redis INCR → 42
+ 🔒 Redis WATCH + MULTI/EXEC allocates next nonce atomically

- App->>Redis: SETNX nonce:0xSigner = 42
- App->>Redis: 🔒 GET nonce → 42, INCR → 43
+ App->>Redis: WATCH nonce-hash
+ App->>Redis: Read allocated + on-chain tx count
+ App->>Redis: MULTI: HSET allocated, SADD inflight, EXEC

- 📡 Call eth_getTransactionCount(0xSigner) → 45
- 💡 Two TXs (45, 46) confirmed while we were down!
- 🔒 Redis SET nonce:0xSigner = 47
+ 📡 Call eth_getTransactionCount(0xSigner) → N (next nonce)
+ 🔒 syncFromChain resets allocated/confirmed to N-1 and clears inflight
+ ✅ Next allocation returns nonce N

Also applies to: 428-437, 454-459

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 411-411: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 409 - 420, The documentation's nonce-management
narrative is incorrect and should be updated to reflect the actual
implementation: replace the SETNX/INCR description and the CAS claim with an
explanation of the WATCH/MULTI/EXEC optimistic locking flow, the Redis hash
fields named "allocated" and "confirmed", and the inflight set tracking; correct
the resync example so eth_getTransactionCount and the documented
confirmed/non-conflicting allocated nonces are consistent (e.g., if
eth_getTransactionCount returns 45, do not claim both 45 and 46 are confirmed),
and update the diagrams and lines referenced (previous SETNX/INCR text and the
resync example) to match this WATCH/MULTI/EXEC + hash + inflight-set behavior.

Comment thread README.md
Comment on lines +557 to +590
│ ⏱️ +10 min │ 🟢 Tier 1: Auto gas bump 1.2x → Still stuck│
│ ⏱️ +30 min │ 🟡 Tier 2: Auto gas bump 1.5x → Still stuck│
│ ⏱️ +60 min │ 🔴 Tier 3: Nonce replace 2.0x → 👤 HUMAN │
│ │ │
│ 📊 Gas budget: max($200 × 1%, $5) = $5.00 │
│ 💡 Most resolve at Tier 1 — engineer never knows it happened │
│ │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ 💎 High-Value Transaction: $500,000 USDC │
│ ───────────────────────────────────────── │
│ ⏱️ +5 min │ 🟢 Tier 1: Auto gas bump 1.1x (gentle) → Still stuck│
│ ⏱️ +20 min │ 🟡 Tier 2: Auto gas bump 1.3x → Still stuck│
│ ⏱️ +45 min │ 🔴 Tier 3: FULL STOP → 👤 HUMAN │
│ │ Operator must approve ANY action │
│ │
│ 📊 Gas budget: min($500K × 1%, $500) = $500.00 │
│ 🛡️ Conservative multipliers — protecting $500K > saving 15 min │
│ │
└─────────────────────────────────────────────────────────────────────┘
```

```mermaid
flowchart TB
STUCK["Transaction detected as STUCK"] --> CHECK{"Value > $50,000?"}
STUCK["🚨 Transaction detected as STUCK"] --> CHECK{"💰 Value > $50,000?"}

CHECK -->|"No (standard)"| T1S["Tier 1: Gas bump 1.2x<br/><i>after 10 min stuck</i><br/>Automatic"]
CHECK -->|"Yes (high-value)"| T1H["Tier 1: Gas bump 1.1x<br/><i>after 5 min stuck</i><br/>Automatic, conservative"]
CHECK -->|"No (standard)"| T1S["🟢 Tier 1: Gas bump 1.2x<br/><i>⏱️ after 10 min stuck</i><br/>🤖 Automatic"]
CHECK -->|"Yes (high-value)"| T1H["🟢 Tier 1: Gas bump 1.1x<br/><i>⏱️ after 5 min stuck</i><br/>🤖 Automatic, conservative"]

T1S --> T2S["Tier 2: Gas bump 1.5x<br/><i>after 30 min stuck</i><br/>Automatic"]
T1H --> T2H["Tier 2: Gas bump 1.3x<br/><i>after 20 min stuck</i><br/>Automatic, still conservative"]
T1S --> T2S["🟡 Tier 2: Gas bump 1.5x<br/><i>⏱️ after 30 min stuck</i><br/>🤖 Automatic"]
T1H --> T2H["🟡 Tier 2: Gas bump 1.3x<br/><i>⏱️ after 20 min stuck</i><br/>🤖 Automatic, still conservative"]

T2S --> T3S["Tier 3: Nonce replacement 2.0x<br/><i>after 60 min stuck</i><br/>Human approval required"]
T2H --> T3H["Tier 3: Human review<br/><i>after 45 min stuck</i><br/>Operator must approve ANY action"]
T2S --> T3S["🔴 Tier 3: Nonce replacement 2.0x<br/><i>⏱️ after 60 min stuck</i><br/>👤 Human approval required"]
T2H --> T3H["🔴 Tier 3: Human review<br/><i>⏱️ after 45 min stuck</i><br/>👤 Operator must approve ANY action"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Documentation escalation tiers don’t match runtime behavior.

Lines 557–590 and Lines 603–608 describe standard/high-value triggers and multipliers that conflict with TransactionLifecycleWorkflowImpl (5/15/30 minutes, 1.5x/2.0x/3.0x). This will mislead operators during incidents.

Proposed doc fix (align to implemented defaults or mark as illustrative)
- │  ⏱️ +10 min  │ 🟢 Tier 1: Auto gas bump 1.2x
- │  ⏱️ +30 min  │ 🟡 Tier 2: Auto gas bump 1.5x
- │  ⏱️ +60 min  │ 🔴 Tier 3: Nonce replace 2.0x
+ │  ⏱️ +5 min   │ 🟢 Tier 1: Auto gas bump 1.5x
+ │  ⏱️ +15 min  │ 🟡 Tier 2: Auto gas bump 2.0x
+ │  ⏱️ +30 min  │ 🔴 Tier 3: Nonce replace 3.0x

Or, if these values are intentionally illustrative, explicitly label them as example policy values and avoid concrete defaults in the narrative/diagram.

Also applies to: 603-608

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 557 - 590, The README's escalation tiers and
multipliers conflict with the actual runtime defaults in
TransactionLifecycleWorkflowImpl (implemented as 5/15/30 minutes and
1.5x/2.0x/3.0x), which will mislead operators; update the documentation blocks
and mermaid diagram to either (a) match the implemented defaults in
TransactionLifecycleWorkflowImpl (replace the 10/30/60 and 1.2x/1.5x/2.0x or
5/20/45 and 1.1x/1.3x settings with 5/15/30 and 1.5x/2.0x/3.0x), or (b)
explicitly label the shown timings and multipliers as “example policy
values”/illustrative and add a note pointing readers to
TransactionLifecycleWorkflowImpl for the actual configured defaults so operators
aren’t misled.

@Puneethkumarck
Puneethkumarck merged commit 40442b6 into main Apr 9, 2026
6 checks passed
Puneethkumarck added a commit that referenced this pull request Apr 9, 2026
Address three CodeRabbit findings from PR #136:
1. Add language identifiers to all fenced code blocks (MD040)
2. Fix nonce management narrative to match actual WATCH/MULTI/EXEC
   + hash fields (allocated/confirmed) + inflight set implementation
3. Update escalation tiers to match application.yml defaults
   (5-tier standard: 0s/1m/3m/10m/30m, 3-tier high-value: 0s/1m/5m)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Puneethkumarck added a commit that referenced this pull request Apr 9, 2026
Address three CodeRabbit findings from PR #136:
1. Add language identifiers to all fenced code blocks (MD040)
2. Fix nonce management narrative to match actual WATCH/MULTI/EXEC
   + hash fields (allocated/confirmed) + inflight set implementation
3. Update escalation tiers to match application.yml defaults
   (5-tier standard: 0s/1m/3m/10m/30m, 3-tier high-value: 0s/1m/5m)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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