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
feat: add upstream_fix: marker convention with --audit-fixes command
Introduces a strategy for handling bug fixes to upstream code:
**`upstream_fix:` convention:**
- Tag in marker description distinguishes temporary bug fixes from
permanent feature additions
- Before each upstream merge, run `--audit-fixes` to review which
fixes we're carrying and whether upstream has shipped their own
**`--audit-fixes` flag on analyze.ts:**
- Lists all `upstream_fix:` markers with file locations and descriptions
- Prints merge review checklist
**Retagged 3 existing upstream bug fixes:**
- `locale.ts` — days/hours duration swap
- `command/index.ts` — placeholder lexicographic sort
- `home.tsx` — beginner UI race condition
**Code review fixes from #546:**
- Guard `--downstream` without `--model` (returns error instead of
silently running full project build)
- Remove unused `condition` field from `Suggestion` interface
- Add test for `--downstream` error case
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: script/upstream/README.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,6 +222,44 @@ When we modify upstream files (not fully custom ones), we wrap our changes with
222
222
223
223
These help during conflict resolution — you can see exactly what we changed vs upstream code. The `analyze.ts` script audits for unclosed marker blocks.
224
224
225
+
### Upstream Bug Fixes (`upstream_fix:` tag)
226
+
227
+
When fixing a **bug in upstream code** (not adding a feature), use the `upstream_fix:` tag in the marker description:
228
+
229
+
```typescript
230
+
// altimate_change start — upstream_fix: days/hours calculation were swapped
**Why this matters:** Regular `altimate_change` markers protect features we added — they're permanent. But upstream bug fixes are **temporary**: once upstream ships their own fix, we should drop our marker and accept theirs.
237
+
238
+
Without the `upstream_fix:` tag:
239
+
- If upstream fixes the same bug, the merge creates a conflict (good — forces review)
240
+
- But the reviewer doesn't know our change was a bug fix vs a feature, so they may keep both
241
+
242
+
With the `upstream_fix:` tag:
243
+
- Before each merge, run `--audit-fixes` to see all bug fixes we're carrying
244
+
- During conflict resolution, reviewers know to check "did upstream fix this?" and can safely drop our version
245
+
- After merge, any remaining `upstream_fix:` markers represent bugs upstream hasn't fixed yet
246
+
247
+
**When to use which:**
248
+
249
+
| Scenario | Marker |
250
+
|----------|--------|
251
+
| New feature/custom code |`// altimate_change start — description`|
0 commit comments