upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/how-to/production-sync-testing.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/how-to/production-sync-testing.md')
-rw-r--r--docs/how-to/production-sync-testing.md88
1 files changed, 75 insertions, 13 deletions
diff --git a/docs/how-to/production-sync-testing.md b/docs/how-to/production-sync-testing.md
index a55e9ea..b0f93b0 100644
--- a/docs/how-to/production-sync-testing.md
+++ b/docs/how-to/production-sync-testing.md
@@ -1,5 +1,7 @@
1# How-To: Test Sync Against Production Data 1# How-To: Test Sync Against Production Data
2 2
3> **Quick Start Prompt:** Run a 30-second production sync test following docs/how-to/production-sync-testing.md. Use the minimal test command with sanitized output. Analyze the log for errors, warnings, and unexpected patterns. Document findings as individual markdown files in work/active-issues/ and suggest code fixes or logging improvements.
4
3**Problem:** Debug and improve sync behavior using real-world data from production relays 5**Problem:** Debug and improve sync behavior using real-world data from production relays
4**Difficulty:** Intermediate 6**Difficulty:** Intermediate
5**Time:** 30 minutes per iteration 7**Time:** 30 minutes per iteration
@@ -169,7 +171,43 @@ grep -i panic iteration-1.log
169 171
170### Step 3: Document Findings 172### Step 3: Document Findings
171 173
172Add findings to this file's [Known Issues](#known-issues) section or create GitHub issues. 174Create individual markdown files in `work/active-issues/` for each issue discovered:
175
176```bash
177# Example: Document a connection timeout issue
178cat > work/active-issues/connection-timeout-bootstrap.md <<'EOF'
179# Issue: Connection Timeout on Bootstrap Relay
180
181**Discovered:** 2026-01-09
182**Status:** Open
183
184## Symptoms
185
186- Connection to wss://git.shakespeare.diy fails after 10s timeout
187- Log shows: `error: connection failed: timeout`
188- Occurs 100% of time with this relay
189
190## Root Cause
191
192[To be determined]
193
194## Proposed Fix
195
196- Increase connection timeout from 10s to 30s for initial bootstrap
197- Add retry logic with exponential backoff
198- Consider fallback bootstrap relays
199
200## Code Location
201
202- `src/sync/relay_connection.rs:45` - connection timeout constant
203EOF
204```
205
206**Why individual files?**
207- Keeps the how-to guide clean and focused
208- Prevents accidental commits of transient issues to tracked files
209- Easy to delete resolved issues or archive important ones
210- Each file can be worked on independently
173 211
174### Step 4: Fix and Re-test 212### Step 4: Fix and Re-test
175 213
@@ -215,26 +253,50 @@ If a log line appears too frequently:
215tracing::trace!("Per-event detail that's too noisy"); 253tracing::trace!("Per-event detail that's too noisy");
216``` 254```
217 255
218## Known Issues 256## Active Issues
219 257
220*Document issues discovered during testing here. Delete this section when empty.* 258Issues discovered during production sync testing are tracked in `work/active-issues/` as individual markdown files.
221 259
222### Template for New Issues 260**View current issues:**
261```bash
262ls work/active-issues/
263```
223 264
224```markdown 265**Create a new issue:**
225### Issue: [Short description] 266```bash
267# Use kebab-case filename describing the issue
268cat > work/active-issues/[issue-name].md <<'EOF'
269# Issue: [Short Description]
226 270
227**Discovered:** [Date] 271**Discovered:** [Date]
228**Status:** [Open/Fixed in PR#xxx] 272**Status:** Open
273
274## Symptoms
275
276- Log patterns observed
277- Reproduction steps if known
229 278
230**Symptoms:** 279## Root Cause
231- Log pattern observed
232 280
233**Root cause:** 281[To be determined / Known cause]
234- [If known]
235 282
236**Fix:** 283## Proposed Fix
237- [If known] 284
285- Suggested code changes
286- Alternative approaches
287
288## Code Location
289
290- File paths and line numbers where changes are needed
291EOF
292```
293
294**Resolve an issue:**
295```bash
296# After fixing, either delete or move to archive
297rm work/active-issues/resolved-issue.md
298# OR
299mv work/active-issues/important-issue.md docs/archive/2026-01-09-important-issue.md
238``` 300```
239 301
240--- 302---