Skip to content

Commit f4c8325

Browse files
docs: addendum — PR #20 over #17, synthetic SHA replay anti-pattern
1 parent f848a9f commit f4c8325

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

docs/2026-07-28-AgentsView+Periscope-Fresh.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,104 @@ with correct ancestry.
206206
```bash
207207
python .agent/tools/recall.py "agentsview periscope fresh replay modernization ancestry"
208208
```
209+
210+
---
211+
212+
## Addendum (2026-07-29): decision — PR #20 over PR #17; preserve bad example
213+
214+
**Status:** decided
215+
**PR #17:** closed, not merged — [`cursor/agentsview-modernization-3way-f559`](https://github.com/diazMelgarejo/periscope/tree/cursor/agentsview-modernization-3way-f559) **preserved** as a permanent **what-not-to-do** reference
216+
**PR #20:** chosen integration path — [`cursor/agentsview-purified-onto-kenn-f559`](https://github.com/diazMelgarejo/periscope/pull/20)
217+
218+
### What led to this decision
219+
220+
PR #17 had the **correct product tree** at its tip but **wrong replay ancestry**: it
221+
re-imported ~769 upstream AgentsView commits as **synthetic SHAs** from ancient
222+
merge-base `5f9e809f`, instead of inheriting original `kenn-io/agentsview` commits
223+
and layering only Periscope-unique work on top.
224+
225+
That made GitHub's three-dot diff unreadable and hid the real integration story behind
226+
replay noise — even though `git cherry` showed only **9 truly Periscope-unique**
227+
commits above upstream `#1283`.
228+
229+
PR #20 applies the purified model:
230+
231+
1. **Base:** original upstream SHAs (`kenn-io/agentsview` @ `6c3317ad`, #1283)
232+
2. **Top:** only the **9 Periscope-unique commits** (cherry-picked, not replayed)
233+
3. **Tree:** byte-identical to PR #17 tip after push-safe test fixture alignment
234+
235+
### Comparison table — why PR #20 wins
236+
237+
| Metric | PR #17 `agentsview-modernization-3way-f559` | PR #20 `agentsview-purified-onto-kenn-f559` |
238+
|--------|---------------------------------------------|---------------------------------------------|
239+
| **Decision** | ❌ Close — do not merge | ✅ Integration candidate |
240+
| **Upstream ancestry** | ~769 replayed commits (synthetic SHAs) | **0** — inherits real `kenn-io` SHAs |
241+
| **Periscope-only commits** | 9 (buried in replay stack) | **9** (visible on tip) |
242+
| **Merge-base with `merged`** | `5f9e809f` (ancient) | `6c3317ad` (#1283 — recent shared upstream) |
243+
| **Three-dot PR diff vs `merged`** | 2,169 files / 769 commits | **816 files / 9 commits** |
244+
| **Tree vs modernization tip** | reference tip | **byte-identical** |
245+
| **Branch fate** | **Preserved** — bad-example museum | Active integration line |
246+
| **Reviewability** | Graph noise drowns Periscope delta | Periscope delta is the PR |
247+
248+
Symmetric tree diff vs `merged` remains large (~2k files) on both — that is honest
249+
modernization size. PR #20 fixes **ancestry and review shape**, not product scope.
250+
251+
### Policy: never synthesize SHAs (except security expunge)
252+
253+
**Default rule:** do **not** replay upstream history under new commit SHAs when
254+
original upstream commits already exist on the canonical remote (`kenn-io/agentsview`,
255+
`origin/agentsview`).
256+
257+
| Allowed | Forbidden |
258+
|---------|-----------|
259+
| Cherry-pick **Periscope-unique** commits onto real upstream tip | Re-cherry-pick or replay hundreds of upstream commits with new SHAs |
260+
| Path-scoped replay onto fresh integration base | Full upstream lineage re-import for "freshness" |
261+
| `read-tree` / tree graft for integrative harmonization | Synthetic SHA stacks that mimic upstream for convenience |
262+
| History rewrite **only** for security/safety expunge | Synthetic SHAs to make PR graphs "look simpler" without tree need |
263+
264+
**Permitted SHA synthesis / history rewrite — security and safety only:**
265+
266+
- Leaked identities, workspaces, or doxxing content
267+
- Access keys, API keys, passwords, tokens in history
268+
- Workstation paths or other sensitive literals in tracked blobs
269+
- GitHub push-protection blocks (rotate fixture keys, then expunge or filter-branch)
270+
271+
`47ca74c` is the instructive edge case: on `merged` it survives as the **original
272+
Wes SHA**; on the bad replay branch it reappears as `22cf1394` with identical `%T`
273+
but **wrong SHA** — proof that replay duplicates history without adding value.
274+
275+
### Preserved bad-example branch
276+
277+
`cursor/agentsview-modernization-3way-f559` stays on GitHub **undeleted** as the
278+
canonical **anti-pattern** for:
279+
280+
- upstream replay instead of upstream inheritance
281+
- synthetic SHA stacks
282+
- PR diffs that explode because merge-base is ancient
283+
284+
Do not delete or force-update this branch except for security expunge.
285+
286+
### Cross-repo curriculum
287+
288+
| Location | Entry |
289+
|----------|-------|
290+
| Perpetua-Tools | `.agent/memory/working/PERISCOPE_MODERNIZATION_PURIFIED_INTEGRATION_2026-07-29.md` |
291+
| orama AFRP | `bin/orama-system/afrp/failure-modes.md` § Failure Mode 8 |
292+
| orama CIDF | `bin/orama-system/cidf/references/integrative-editing-examples.md` §10 |
293+
| orama git skill | `bin/orama-system/skills/git-history-surgery/references/path-scoped-pr-replay-reference-card.md` § worked example PR #17 vs #20 |
294+
| orama git skill | `bin/orama-system/skills/git-history-surgery/SKILL.md` decision flow §11 |
295+
296+
### Mental model (purified path)
297+
298+
```mermaid
299+
flowchart TD
300+
K["kenn-io/agentsview @ 6c3317ad<br/>original upstream SHAs (#1283)"]
301+
P9["+ 9 Periscope-unique commits<br/>(cherry-pick, not replay)"]
302+
TIP["PR #20 tip<br/>byte-identical tree to modernization-3way"]
303+
BAD["PR #17 modernization-3way<br/>769 synthetic upstream SHAs ❌"]
304+
M["origin/merged<br/>integrative line"]
305+
K --> P9 --> TIP
306+
BAD -.->|"same tree, wrong ancestry"| TIP
307+
TIP --> PR["PR #20 vs merged<br/>816 files / 9 commits"]
308+
M --> PR
309+
```

0 commit comments

Comments
 (0)