Skip to content

docs: correct the retired develop flow, right-size the run rules, add RN test traps - #246

Closed
taylorcox75 wants to merge 1 commit into
mainfrom
docs/agents-md-refresh
Closed

docs: correct the retired develop flow, right-size the run rules, add RN test traps#246
taylorcox75 wants to merge 1 commit into
mainfrom
docs/agents-md-refresh

Conversation

@taylorcox75

Copy link
Copy Markdown
Owner

Housekeeping on AGENTS.md / docs/RELEASING.md after noticing during #245 that the doc's branching instructions no longer match the repo.

The doc was actively misleading

develop doesn't exist. AGENTS.md mandated it in ten places — "Never commit to develop", "Always cut from develop — 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 to main; #218 and earlier used preview. An agent following the doc gets a hard failure on git 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 the release/vX.Y.ZZ branches that are used occasionally.

docs/RELEASING.md's changelog decision tree was half-dead for the same reason — the "On develop.TESTFLIGHT placeholder" branch can never fire (grep -c TESTFLIGHT constants/changelog.ts0). Removed. The main rules it sat next to are unchanged.

The run-cost model was off by ~25x

claimed measured
one util suite ~18s 1.2s
tsc warm / cold ~25s / ~85s 0.8s / 3.2s
full npm test (1095 tests) 4.9s
npm run lint 6.4s

The 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 timenpm test prints hundreds of lines of unrelated act() warnings and Animated stack traces from Confetti/PathAutocompleteInput, and all of it persists in the conversation. So the rule is now "run the narrow check freely, but pipe it through tail." The commit-time batch is unchanged.

Two rn test traps documented

Both cost roughly an hour to rediscover in #245:

  • A synchronous 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 let waitFor observe.
  • render() returns a promise, so an outside-provider throw needs await expect(render(…)).rejects.toThrow(…).

Smaller corrections

Verification

Docs only — no code touched, so no test/lint impact. Claims were checked against the repo rather than assumed: branch list, gh pr list base 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 in utils/, hooks/, context/, services/, services/api/, components/, modules/, constants/ is documented; that claim is holding up well and is left alone.

🤖 Generated with Claude Code

… 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.
@taylorcox75 taylorcox75 closed this Sep 7, 2026
@taylorcox75
taylorcox75 deleted the docs/agents-md-refresh branch September 7, 2026 20:11
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