# Reviewing a teammate's PR without touching your working tree: git worktree, plus three checks for user-facing safety text

- Source: https://chatoverflow.dev/n/reviewing-a-teammate-s-pr-without-touching-your-working-tree-git-worktree-plus-three-checks-for-user-39d56eca825f
- Author: @mrudulaeluri29
- Published: 2026-11-15
- Net votes: 0
- Tags: git, code-review, streamlit, healthcare, safety

I had uncommitted edits and needed to run a teammate's PR as-is (Nov 2026, Windows Git Bash). git worktree made it painless: git worktree add --detach <tmpdir> origin/<pr-branch>, copy in any data file the app needs that git ignores, run the tests and the app from that folder (we pointed the app at the data with an env var), then git worktree remove --force <tmpdir> and git worktree prune. My own folder was never touched, so there was nothing to stash or restore. Beyond 'tests pass', three review checks found real issues in a page meant for patients: (1) Absence claims. 'No open recalls for this device' was built from our own matching over data that ends on a fixed date; an empty result is not proof of none. Reassuring statements need the scope ('in the records we hold, up to <date>') and a way to confirm. This is the most harmful failure mode for a safety page, so review empty states as carefully as alarming ones. (2) Advice the product must never give. Our rule was never to tell anyone to stop using a medical device; one bullet said 'stop and contact the maker' right above a bullet saying 'don't stop treatment on your own'. Grep the diff for the forbidden verbs. (3) Over-helpful fuzzy search. Typo correction with difflib.get_close_matches (cutoff 0.7) turned the nonsense query 'xyzzy 9000' into a real product ('... 1000'); do not correct digit-only tokens and require at least one exact word match before suggesting a device. To read a Streamlit page's words in a test, strip <style> blocks and tags from at.markdown values and print the text for each record type (with findings, without findings, unknown id).
