You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 53723fb
Browse filesBrowse the repository at this point in the historyBrowse files
Document preferring an upstream fix over a local workaround
Add guidance to AGENTS.md for handling failures that look like known
upstream bugs: verify the fix at the source, prefer the smallest installable
version bump over a workaround, treat upgrades as revertible hypotheses, and
comment any unavoidable workaround with its removal condition.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvxEaPhyEq2HCZ6XFjEAde
Copy file name to clipboardExpand all lines: AGENTS.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,27 @@ See the [README.md](README.md#packages) for detailed descriptions of each packag
36
36
- On Claude Code on the web, `.claude/hooks/session-start.sh` performs the above automatically (selecting the `.nvmrc` version via nvm) at session start.
37
37
-**Native (iOS/Android) builds are not part of the default bootstrap.**`npm run bootstrap` and the native `bootstrap` scripts compile artifacts that require the Android NDK / Apple toolchains, which are absent on a generic Linux worker. Focus on the Node.js tooling packages; pass an explicit target (e.g. `npx ferric --apple`) only when the corresponding SDK is installed.
38
38
39
+
## Prefer an upstream fix over a local workaround
40
+
41
+
When a build/runtime failure looks like a known upstream bug, before writing a
42
+
patch or workaround:
43
+
44
+
1. Find where the fix actually landed and **verify at the source** — the
45
+
changelog, lockfile, or the dependency's own manifest/podspec for a *specific
46
+
installable version*, not the version list and not a related package's
47
+
timeline (a fork or platform variant may carry a fix on a line its upstream
48
+
never did).
49
+
2. If an installable version within our constraints contains the fix, prefer the
50
+
**smallest** bump that includes it (patch > minor > major) over a workaround.
51
+
3. Treat the upgrade as a hypothesis under test: say so, and be ready to revert —
52
+
every upgrade adds new unknown-bug surface. If it doesn't fix the issue, throw
53
+
it away rather than stacking a workaround on top of it.
54
+
4. If the bump is more than a patch, or widens scope/risk, check with me before
55
+
committing to it.
56
+
5. If no fixed version is reachable, a workaround is fine — but comment it with
57
+
the exact condition that makes it removable (e.g. "remove once dep ships
58
+
fmt ≥ 12.1"), and if you write that condition, verify it isn't already met.
59
+
39
60
## Critical Build Dependencies
40
61
41
62
-**Custom Hermes**: Currently depends on a patched Hermes with Node-API support (see [facebook/hermes#1377](https://github.com/facebook/hermes/pull/1377))
0 commit comments