Skip to content

feat(papercuts): seed a worktree from a report so a fixer can reproduce it on real data #31

Description

@nohat

Part of #22. Wave 3. Blocked on #24. Also blocked on deciding where feat/ios-repro-harness lands.

Problem

Fixing #17 needed a manual recipe (documented in docs/fork/defect-resolution.md, "iPad and mobile"): snapshot the database with VACUUM INTO, export a thread, start the dev server with a replay file, run Metro, pair, open the thread. Every fixer re-derives it, and a papercut already names the thread. Agents fix bounded bugs with a reproduction far more often than from prose, and a failing test is worth more than a hypothesis.

What the code shows

  • The replay harness (scripts/ios-repro/) exists only on the branch feat/ios-repro-harness, not on fork/prod.
  • AGENTS.md ("Test data") already specifies how to seed a worktree from real data: VACUUM INTO into the worktree's .t3/userdata, copy in, never symlink, never write back.

Plan

  1. t3 papercuts repro <id> --worktree <path>: seeds <path>/.t3/userdata from a read-only VACUUM INTO of the prod database, copies the report's record and trace slice into <path>/.t3/papercut-<id>/, and prints the dev command and the thread route for the report's thread.
  2. For iPad and iPhone reports, also prints the replay steps from the harness (once it is on fork/prod).
  3. Refuses a destination that is the live home or contains a symlink. Copy in, never out.

Acceptance

Surfaces

CLI and scripts. Mobile reproduction continues to depend on #4 (instrumentable simulator).

Related

#22, #4, #24, #32.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions