Skip to content

Preserve the who cache after partial pull request reads - #14

Open
jishnuvenugopal wants to merge 2 commits into
ashhart:mainfrom
jishnuvenugopal:fix/partial-traffic-cache
Open

jishnuvenugopal wants to merge 2 commits into
ashhart:mainfrom
jishnuvenugopal:fix/partial-traffic-cache

Conversation

@jishnuvenugopal

@jishnuvenugopal jishnuvenugopal commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Thank you, @ashhart, for keeping time-limited refreshes out of the who cache in 8c2f6af. This extends that protection to partial peer-file reads while preserving publication/cache separation.

What this changes

board and ordinary overlap can receive a partial file list for a peer and still overwrite .git/atc/traffic.json. A later who can then report no PR for an omitted file while returning complete: true.

Both writers now skip the cache write if any other-author PR being cached has a partial file read. Complete refreshes still update it; own PRs stay excluded, and publication-only checks still never write this cache.

  • Issue: n/a; report and fix are together here.
  • Stacked on: 04fe862 (0.9.3), two commits. Integration checked against c8787cc (0.9.6).
  • The second commit only gives the cache assertions explicit imports in tests/publicationScope.test.js, keeping them working after the upstream fixture extraction. No application behavior changes in that follow-up.

Verified outcome

Partial refreshes preserve the earlier cache and its timestamp. With no valid earlier cache, who reports pullFilesUnavailable instead. Regressions inspect cache bytes and call who, including mixed-peer orderings.

The retained observation can still omit newly opened PRs and expires after 30 minutes. A standing partial peer can keep who unavailable repository-wide after expiry. Invalid-path handling and read budgets are unchanged. No replay rule, command, field, enum, config key, or dependency changes.

Checks

Head: 9256ef8a3a90ad0d05660068df4fd6b0f26e0749.

  • Exact head, local macOS ARM64/Node 24.9.0: npm run check — 411 passed, no failures or skips.
  • Native integration with 0.9.6: npm run check — 473 passed, no failures or skips.
  • PR CI 43067608420: all six Ubuntu/macOS/Windows × Node 22.16/24 jobs passed. It tested merge 25a285e, with parents c8787cc and 9256ef8; its tree matches the locally tested integration. The macOS/Node 22.16 log explicitly reports 473 passed, no failures or skips.
  • Exact-head package dry run passed; focused Node 22.16 tests passed 38/38.

Reproduce the red result without modifying the checkout:

proof=$(mktemp -d)
git archive 9256ef8a3a90ad0d05660068df4fd6b0f26e0749 | tar -xf - -C "$proof"
git diff 04fe8622011053ca17febd4ef3ea175a5719c3ae 9256ef8a3a90ad0d05660068df4fd6b0f26e0749 -- src | git -C "$proof" apply -R
(cd "$proof" && node --test --test-concurrency=1 tests/pullFileCache.test.js)

Expected: 23 assertion failures and 5 passing controls; all 28 cache tests pass with the fix.

Receipt and limits

Tests use fake GitHub and disposable local repositories; no live GitHub writes are needed. Local qualification used macOS ARM64 and Apple Git 2.50.1. Git 2.38, sustained operation, and real agent-client operation remain unverified. Exchange/cloud changes: n/a.

  • Regressions fail before and pass after the fix.
  • Publication cache isolation is preserved and tested.
  • New-head PR CI passes the complete six-job matrix.
  • No changelog, version, dependency, private-data, machine-specific path, or attribution-trailer changes.

@jishnuvenugopal
jishnuvenugopal marked this pull request as ready for review November 11, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant