Skip to content

Audit: upstream fixes silently lost in sync (v2026.2.25 → v2026.3.22, 32 gaps) #2406

@alexey-pelykh

Description

@alexey-pelykh

TL;DR

Retrospective systematic audit across all 9 sync batches (v2026.2.25 through v2026.3.22 — fork's full upstream sync history) identified 32 upstream fix commits whose new files exist at upstream/v2026.3.22 but never landed in fork main — the same pattern as #2362 (@tloncorp/apitlon-api.ts), fixed in #2402.

Filing as a single umbrella to (a) document the full scope discovered, (b) enable batch-porting when convenient, (c) track the known gaps explicitly so they don't re-accumulate. The INCLUDE Reconciliation Gate committed to HQ prevents this pattern for future batches.

Background

Sync to v2026.3.22 (PR #2400) missed the upstream fix ac850e815b that replaced @tloncorp/api git-dependency — the fix was in-range but its new file (extensions/tlon/src/tlon-api.ts) was silently reverted during D.3 build stabilization. Root cause analysis (memory record) revealed the "asymmetric revert-vs-extract split" anti-pattern: stabilization logic recorded only new-upstream-file deletions, not pre-existing-file reverts. Same pattern may exist in earlier batches.

Methodology

  1. Enumerate sync batches in fork main (git log --grep="^sync:") — 9 batches from v2026.2.25 to v2026.3.22.
  2. Extract upstream range from each sync commit's Upstream-range: trailer.
  3. Filter to fix: commits in each range (high-signal for user-impacting work).
  4. Find A-status files introduced by each fix commit — 551 across all batches.
  5. Filter candidates: file not in fork main, not classified as EXCLUDE*/EXCLUDE-GUT/EXCLUDE-STUB, not under an EXCLUDE directory rule — 55 candidates.
  6. Systematic validation: for each, check presence at upstream/v2026.3.22.
    • YES → real gap (fork missing what upstream currently has)
    • NO → correctly absent (upstream self-deleted within sync range)
  7. Semantic refinement: exclude paths under fork-gutted parent dirs that have no explicit rule (src/agents/pi-extensions/, extensions/qwen-portal-auth/ — dirs absent from fork entirely).

Result: 32 real gaps, 23 correctly-absent (20 upstream-self-deleted + 2 semantically gutted + 1 rebranded).

Validation artifacts: .tmp/systematic-validate-*/ (TSV + markdown). Audit scripts in HQ scripts/audit-lost-files.sh and scripts/audit-fix-commit-gaps.sh.

Findings — Full list (32 gaps → 27 real, 5 false positives moved below)

Updated 2026-04-19 during the hq B1–B10 cleanup pass. The audit methodology was hardened to filter files deleted by fork gut(*) commits (hq@fbdc14b) — 5 entries below are false positives architecturally gutted from the fork pre-B10. They've been moved to the § Rejected as false positives section and given EXCLUDE-GUT disposition rules (hq@b2e4633). Additional P3 test entries may also be fork-gutted area-related — still under triage (Step 3d).

🔴 Production files (4)

Sync batch Path Upstream fix Rationale
v2026.3.12 .npmignore 86a3149b2e — fix: harden windows npm runtime path Publish hardening (EXTRACT-classified)
v2026.3.12 extensions/mattermost/src/mattermost/reply-delivery.ts c965049dc6 — fix(mattermost): pass mediaLocalRoots through reply delivery (openclaw#44021) Adapter fix
v2026.3.22 extensions/msteams/src/webhook-timeouts.ts dbd26e49f1 — fix(test): reduce startup-heavy hotspot retention (openclaw#52381) Adapter perf
v2026.3.22 extensions/zalouser/src/zca-constants.ts 8d805a02fd — fix(zalouser): decouple tests from zca-js runtime Adapter decoupling

🟡 Test files (24)

Expand per-batch test list

v2026.2.25 (1):

  • src/browser/pw-tools-core.interactions.set-input-files.test.tsef326f5cd0 fix(browser): revalidate upload paths at use time

v2026.2.26: (0 — the shared.test.ts entry was a false positive, moved to the § Rejected section)

v2026.3.1 (2):

v2026.3.2 (3):

v2026.3.7 (1):

v2026.3.12 (2):

v2026.3.22 (15):

Rejected as false positives (27 — documented for audit trail)

Full per-candidate verdicts: see HQ .tmp/systematic-validate-*/systematic-report.md and full-results.tsv.

Execution plan

Recommended order (can be tackled batch-cherry-pick style or one at a time):

  1. Priority P1v2026.3.1 browser/output-atomic.ts + v2026.3.7 browser/session-tab-registry.ts (+test)REJECTED as false positives (fork-gutted by 1aae7daa00 — Playwright removal, pre-B10). See § Rejected section.
  2. Priority P2v2026.3.12 mattermost (reply-delivery.ts + test), v2026.3.22 msteams webhook-timeouts.ts, v2026.3.22 zalouser (zca-constants.ts + mocks) — channel-adapter fixes. 3 commits, ~5 files.
  3. Priority P3 — Remaining 23 test files + .npmignore — coverage catch-up. 23 commits. Batch cherry-pickable when convenient.

Each gap is independently cherry-pickable with git cherry-pick -x {commit} (pattern established in #2402). Expect minor adaptations (rebrand transforms, fork-divergent import paths).

Prevention going forward

Notes

  • This audit only covered fix: commits (higher signal). Non-fix commits (feat:, chore:, refactor:) in sync ranges may have additional lost files but are lower priority.
  • The v2026.3.22 sync's deferred-extracts list (1076 files) is separately tracked in HQ (upstream/b10-deferred-extracts-list.txt). Most are expected-deferred (fork-divergent EXTRACT); this audit surfaces the subset that shouldn't have been.

Closes the "lost upstream fixes" question from #2362 triage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions