|
| 1 | +## 2026-06-23 — E-OGAR-API-EDIT-PULL-FIRST — API-based file edits MUST pull-then-splice; uploading pre-edited local files regresses upstream main |
| 2 | + |
| 3 | +**Status:** FINDING (caught in OGAR #126 CI failure mid-PR-life). |
| 4 | + |
| 5 | +When network 403s block direct git push to OGAR, the fallback is PyGithub's |
| 6 | +`update_file()` API. The trap: if the locally-edited file was based on a |
| 7 | +*stale* checkout of OGAR main (e.g. `/tmp/ogar-work` at `ac4b4162` while |
| 8 | +remote main is at `a3574bdf`), then the API upload *overwrites* the upstream |
| 9 | +changes between the two commits — silently regressing entries that landed |
| 10 | +between them. |
| 11 | + |
| 12 | +In OGAR #126, my initial uploads were against `/tmp/ogar-work@ac4b4162` (pre- |
| 13 | +Anatomy + pre-Automation). The OGAR main had landed PRs #112-#125 in between, |
| 14 | +adding the Anatomy domain (`anatomical_structure`/`skeleton`/`bone`/`joint`) |
| 15 | +and the Automation domain. My uploads regressed those entries. CI fired on |
| 16 | +`ogar-fma-skeleton` referencing `ogar_vocab::class_ids::BONE` which was |
| 17 | +present on main but absent from my upload. |
| 18 | + |
| 19 | +**Fix:** for every API-based file edit, **pull `main`'s current content FIRST** |
| 20 | +(via `r.get_contents(path, ref="main")`), apply only the targeted deltas via |
| 21 | +string-anchor splicing, and upload the result. Never upload a locally-prepared |
| 22 | +file when the working tree might be stale. |
| 23 | + |
| 24 | +**Cross-ref:** sibling pattern to `E-OGAR-AUTH-MIRROR-DRIFT` (lance-graph |
| 25 | +#595 / #596 / #597) — both are about cross-repo edit-time drift. That one |
| 26 | +was "mirror lags ALL"; this one is "API-edit lags upstream main." The |
| 27 | +discipline is the same: pull-first, edit-narrow, push-thin. |
| 28 | + |
| 29 | +**Source-of-finding:** OGAR #126 CI failure 2026-06-23 (`ogar-fma-skeleton` |
| 30 | +referencing `class_ids::BONE`). |
| 31 | + |
1 | 32 | ## 2026-06-24 — E-CLASSID-FMA-PATIENT-COLLISION — `CLASSID_FMA = 0x0901` aliased OGAR `patient`; retargeted to the Anatomy domain `0x0A01` |
2 | 33 |
|
3 | 34 | **Status:** FINDING + FIX (2026-06-24). Surfaced by OGAR's NodeGuid canon audit |
|
0 commit comments