docs: correct the retired develop flow, right-size the run rules, add RN test traps - #246
Closed
taylorcox75 wants to merge 1 commit into
Closed
docs: correct the retired develop flow, right-size the run rules, add RN test traps#246taylorcox75 wants to merge 1 commit into
taylorcox75 wants to merge 1 commit into
Conversation
… RN test traps
AGENTS.md had drifted from the repo in ways that actively misled agents:
- **`develop` is gone.** The doc mandated it in ten places ("Never commit to
develop", "Always cut from develop — there is no hotfix exception",
`gh pr create --base develop`), but no such branch exists locally or on
origin, and no PR has ever targeted it. Everything since #219 goes straight
to main (#218 and earlier used preview). An agent following the doc would
have `git switch develop` fail outright. Rewritten around main, with an
explicit note that develop/preview are retired so the next reader doesn't
re-derive it, plus the release/vX.Y.ZZ branch that does get used.
- **docs/RELEASING.md's changelog tree was half-dead** for the same reason —
the "On develop → .TESTFLIGHT placeholder" branch can never fire
(`grep -c TESTFLIGHT constants/changelog.ts` is 0). Removed; the main-branch
rules it kept are unchanged.
The run-cost model was off by ~25x, which was buying caution nobody needed:
one suite ~18s claimed → 1.2s actual; tsc 25s warm / 85s cold → 0.8s / 3.2s
full npm test 4.9s (1095 tests); lint 6.4s; whole batch ~12s
The three-tier "exactly three moments to run anything" ceremony was therefore
discouraging verification to save ~12 seconds. Replaced with the constraint
that actually binds — context, not wall time, since npm test dumps hundreds of
lines of unrelated act()/Animated noise. New rule: run the narrow check freely,
pipe it through tail. Commit-time batch is unchanged.
Also added two rn-project test traps that each cost about an hour to rediscover:
a synchronous act(() => ...) around a promise-returning call silently swallows
the state update (looks exactly like a product bug), and render() returns a
promise so an outside-provider throw needs .rejects.toThrow.
Smaller corrections: the Alert deviations list was missing ConfirmModal itself
(nine calls across eight files, not eight); File Index gains
SkeletonTorrentDetail and notes ServerContext.isReconnecting and how
TorrentContext's recovery flag is cleared.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Housekeeping on
AGENTS.md/docs/RELEASING.mdafter noticing during #245 that the doc's branching instructions no longer match the repo.The doc was actively misleading
developdoesn't exist. AGENTS.md mandated it in ten places — "Never commit todevelop", "Always cut fromdevelop— there is no hotfix exception",gh pr create --base develop. There's no such branch locally or on origin, and no PR has ever targeted it. Everything since #219 goes straight tomain; #218 and earlier usedpreview. An agent following the doc gets a hard failure ongit switch develop, or opens a PR against a nonexistent base.Rewritten around
main, with an explicit "develop and preview are retired" note so the next reader doesn't have to re-derive it, and a row for therelease/vX.Y.ZZbranches that are used occasionally.docs/RELEASING.md's changelog decision tree was half-dead for the same reason — the "Ondevelop→.TESTFLIGHTplaceholder" branch can never fire (grep -c TESTFLIGHT constants/changelog.ts→0). Removed. Themainrules it sat next to are unchanged.The run-cost model was off by ~25x
tscwarm / coldnpm test(1095 tests)npm run lintThe doc built a three-tier ceremony ("exactly three moments to run anything, and no others") around what is a ~12 second batch — so it was discouraging verification to save almost nothing. It had a real cost: in #245 I followed "mid-task → run nothing" and shipped tests that failed in ways a one-second run would have caught immediately.
The constraint that actually binds is context, not wall time —
npm testprints hundreds of lines of unrelatedact()warnings and Animated stack traces fromConfetti/PathAutocompleteInput, and all of it persists in the conversation. So the rule is now "run the narrow check freely, but pipe it throughtail." The commit-time batch is unchanged.Two
rntest traps documentedBoth cost roughly an hour to rediscover in #245:
act(() => …)around a promise-returning call silently swallows the state update — the component never re-renders, no warning, and it looks exactly like a product bug. Call it bare and letwaitForobserve.render()returns a promise, so an outside-provider throw needsawait expect(render(…)).rejects.toThrow(…).Smaller corrections
ConfirmModalitself — it's nine calls across eight files, not eight.SkeletonTorrentDetail;ServerContextentry documentsisReconnecting, andTorrentContextdocuments how the recovery flag is cleared (both from Fix reconnect UI after a long background (skeleton instead of stale data + auth toast) #245).Verification
Docs only — no code touched, so no test/lint impact. Claims were checked against the repo rather than assumed: branch list,
gh pr listbase branches, workflow triggers,grep -c TESTFLIGHT, the Alert call sites, and the timings above were each measured. I also verified the File Index is 100% complete — every file inutils/,hooks/,context/,services/,services/api/,components/,modules/,constants/is documented; that claim is holding up well and is left alone.🤖 Generated with Claude Code