Skip to content

feat(refs): react-native-engineer — testing + error-handling (Level 2→3)#376

Merged
notque merged 1 commit intomainfrom
enrich/refs-2026-04-12
Apr 12, 2026
Merged

feat(refs): react-native-engineer — testing + error-handling (Level 2→3)#376
notque merged 1 commit intomainfrom
enrich/refs-2026-04-12

Conversation

@notque
Copy link
Copy Markdown
Owner

@notque notque commented Apr 12, 2026

Summary

  • Adds testing.md and error-handling.md to react-native-engineer/references/
  • Updates agent loading table with two new signal rows
  • Updates Error Handling section with routing hints for the new files
  • Level moves from 2 (Domain) → 3 (Deep): both new files include grep/rg detection commands

Targets Processed

Agent Before After New Files
react-native-engineer Level 2 Level 3 2

New Reference Files

testing.md (271 lines):

  • RNTL 12+ patterns: getByRole, waitFor, userEvent
  • jest-expo config for native module mocking via moduleNameMapper
  • AsyncStorage mock setup in jest.setup.ts
  • Anti-patterns: getByTestId, snapshot tests, per-file navigation mocks
  • Detection commands for all anti-patterns
  • Error-fix mappings for common jest/RNTL errors
  • Version notes: RNTL 12.0/12.4, Expo SDK 50, RN 0.73 New Architecture

error-handling.md (332 lines):

  • ErrorBoundary setup at screen and navigation root level
  • Sentry init sequence (must run before registerRootComponent)
  • Typed fetch error handling (network vs HTTP vs JSON parse errors)
  • Global unhandled promise rejection capture for Hermes
  • Anti-patterns: empty catch, console.error-only reporting, missing boundaries, unsafe API response access
  • Detection commands for all anti-patterns
  • Error-fix mappings for 6 common production crash patterns
  • Version notes: @sentry/react-native 5.0, React 18 startTransition, RN 0.71/0.73

Validation Gate

All three domain-specific test queries correctly resolved to the new references via loading table signal matching. Both files KEEP.

Test Plan

  • python3 scripts/audit-reference-depth.py --agent react-native-engineer --verbose shows Level 3
  • python3 scripts/validate-references.py --agent react-native-engineer passes structural checks
  • CI lint passes (no Python files modified)

…nces (Level 2→3)

Add two reference files covering gaps identified by audit:
- testing.md: RNTL 12+ patterns, jest-expo config, native module mocking,
  async assertion patterns, anti-patterns (testID queries, snapshots,
  per-file navigation mocks), error-fix mappings with detection commands
- error-handling.md: ErrorBoundary setup, Sentry init sequence, unhandled
  promise rejection capture, typed fetch error handling, anti-patterns
  (empty catch, console.error-only, missing boundaries), detection commands

Update agent loading table and error handling section to route to new files.
Detection commands in both files push aggregate level from 2 to 3.
@notque notque enabled auto-merge (squash) April 12, 2026 07:11
@notque notque merged commit b323a41 into main Apr 12, 2026
4 checks passed
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