Skip to content

feat(reactlynx-snapshot-debugging): add RL3 snapshot error debugging skill - #99

Draft
upupming wants to merge 1 commit into
mainfrom
feat/reactlynx-snapshot-debugging-skill
Draft

feat(reactlynx-snapshot-debugging): add RL3 snapshot error debugging skill#99
upupming wants to merge 1 commit into
mainfrom
feat/reactlynx-snapshot-debugging-skill

Conversation

@upupming

@upupming upupming commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a new skill reactlynx-snapshot-debugging — a troubleshooting guide for ReactLynx 3 Snapshot runtime errors, wired into the reactlynx plugin.

Covers the two most common RL3 snapshot errors:

  • snapshotPatchApply failed: ctx not found
  • Error: Snapshot not found: __Card__:__snapshot_...

Contents

  • Diagnosis workflow — the dual-thread hydrate/snapshotPatch model and a "rule out the upstream crash first" procedure (most snapshot errors are a downstream symptom of an earlier main-thread or background-thread crash).
  • Capturing dual-thread logs (references/debug-instrumentation.md):
    • Built-in ALog macros first — REACT_ALOG=true / REACT_ALOG_ELEMENT_API=true emit [ReactLynxDebug] diagnostics on both threads. Gated by version: available since @lynx-js/react 0.111.2 (separate REACT_ALOG_ELEMENT_API since 0.116.3).
    • Driving the lynx-devtool skill to dump both threads and analyze root cause directly (with the user's consent), including an annotated worked walkthrough.
    • Manual entry-file instrumentation only as a fallback for @lynx-js/react < 0.111.2.
  • snapshotPatch decoding — opcode table + pretty-printer.
  • Per-error playbooks for the two errors above.
  • Evals — 3 task evals + trigger evals.

Wiring

  • New source package @lynx-js/skill-reactlynx-snapshot-debugging under packages/skills/.
  • Registered in root package.json and the reactlynx plugin package.json (workspace:*).
  • Changeset included.

Notes

Content is open-source-clean: no internal doc links, tools, or product names.

Draft — watching CI.

…skill

Add a troubleshooting skill for ReactLynx 3 Snapshot runtime errors
(`snapshotPatchApply failed: ctx not found` and `Snapshot not found`).

- Dual-thread hydrate/snapshotPatch model and rule-out-upstream-crash
  diagnosis workflow
- Capturing dual-thread logs: built-in ALog macros (`REACT_ALOG` /
  `REACT_ALOG_ELEMENT_API`, gated to `@lynx-js/react` >= 0.111.2) first,
  driving lynx-devtool to dump + analyze both threads, manual
  instrumentation only as a fallback for older runtimes
- snapshotPatch opcode decoding and per-error playbooks
- Wired into the reactlynx plugin; evals + trigger evals included
@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 941124a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@lynx-js/skill-reactlynx-snapshot-debugging Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Skill Evals

Eval definitions: 11/11 valid.
Task eval score: 83.3 / 100 with skill vs 23.0 / 100 without skill (Δ +60.3) across 10 skill suites.
Trigger eval score: 85.1 / 100 across 10 skill suites.

Skill With skill Without skill Δ Trigger
lynx-debug-info-remapping 100.0 (5/5) 40.0 (2/5) +60.0 75.0 (6/8)
lynx-devtool 100.0 (4/4) 50.0 (2/4) +50.0 87.5 (7/8)
lynx-trace-analysis 100.0 (5/5) 40.0 (2/5) +60.0 87.5 (7/8)
lynx-trace-record 100.0 (5/5) 0.0 (0/5) +100.0 75.0 (6/8)
lynx-typescript 80.0 (4/5) 40.0 (2/5) +40.0 88.9 (8/9)
lynx-ui 33.3 (1/3) 0.0 (0/3) +33.3 81.3 (13/16)
reactlynx-best-practices 100.0 (5/5) 40.0 (2/5) +60.0 91.7 (11/12)
reactlynx-snapshot-debugging 60.0 (3/5) 20.0 (1/5) +40.0 77.8 (7/9)
rspeedy-bundle-size 100.0 (3/3) 0.0 (0/3) +100.0 86.4 (19/22)
vanilla-lynx 60.0 (3/5) 0.0 (0/5) +60.0 100.0 (8/8)

Workflow run

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