Repository navigation
fix(ci): thread transfer report ignores pull requests from other repositories - #3
Open
polylane[bot] wants to merge 1 commit into
Open
polylane[bot] wants to merge 1 commit into
polylane[bot] wants to merge 1 commit into
Conversation
Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: Thread Transfer Report fails on PRs that also have an upstream pull request
The Thread Transfer Report job failed whenever a pull request's head commit was also proposed to the upstream repository. The publisher read the first pull request in the CI run payload without checking which repository owned it, so it asked this repository for a number that does not exist there and stopped before updating the report comment. It now keeps only the pull requests that belong to this repository.
flowchart TD A["CI run payload: pull_requests"] --> B{"base repo is this repository?"} B -->|"no: upstream PR 22428"| C["observed before fix: lookup PR 22428 in uuid-rocks/t3code"] C --> D["404, job fails, comment not updated"] B -->|"yes: this repository's PR 2"| E["proposed fix: lookup PR 2"] E --> F["report comment updated on PR 2"]Why this fix
The failing run's payload lists two pull requests for head commit c7474ab: upstream pingdotgg#22428 first, this repository's #2 second. The publisher used the first entry against this repository and the API answered 404. Earlier runs succeeded and updated the comment on #2, so #2 is the intended target, and the job's token cannot write to the upstream repository. Keeping only entries whose base repository is this one lets the existing commit-association lookup resolve the right pull request.
Fix walkthrough
Watch the fix explained (1:26). Recorded for commit
283cf48cf3d7ad851e6e510b3bd1baa49f2dbd83.Out of scope
Causal chain
2 files changed (+124/-1)
.github/scripts/thread-transfer-report.cjs: modified, +18/-1.github/scripts/thread-transfer-report.test.cjs: modified, +106/-0Repository lint:
pnpm run lint(declared in package.json) fails over the whole repository (the declared target takes no file arguments), so the failure is not attributed to this change and did not block it; run it before merging.Lint output
file:///root/.local/share/pnpm/.tools/pnpm/11.10.0/node_modules/pnpm/dist/pnpm.mjs:40380:23) at callBoundExeca (file:///root/.local/share/pnpm/.tools/pnpm/11.10.0/node_modules/pnpm/dist/pnpm.mjs:42908:23) at boundExeca (file:///root/.local/share/pnpm/.tools/pnpm/11.10.0/node_modules/pnpm/dist/pnpm.mjs:42885:49) at sync (file:///root/.local/share/pnpm/.tools/pnpm/11.10.0/node_modules/pnpm/dist/pnpm.mjs:43040:14) at runPnpmCli (file:///root/.local/share/pnpm/.tools/pnpm/11.10.0/node_modules/pnpm/dist/pnpm.mjs:247665:5) at runDepsStatusCheck (file:///root/.local/share/pnpm/.tools/pnpm/11.10.0/node_modules/pnpm/dist/pnpm.mjs:249406:7) <--- Last few GCs ---> [1689:0x39e18000] 108219 ms: Scavenge 2003.7 (2018.7) -> 1998.7 (2018.7) MB, pooled: 0 MB, 6.20 / 0.01 ms (average mu = 0.327, current mu = 0.323) task; [1689:0x39e18000] 109552 ms: Mark-Compact (reduce) 2009.3 (2022.7) -> 1980.1 (1987.6) MB, pooled: 0 MB, 95.33 / 0.01 ms (+ 978.0 ms in 248 steps since start of marking, biggest step 13.0 ms, walltime since start of marking 1332 ms) (average mu = 0.349, FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace ----- 1: 0x942e80 [node] 2: 0x75f71e node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node] 3: 0xc98c20 [node] 4: 0xc98d0f [node] 5: 0xf3c5e5 [node] 6: 0xf3c612 [node] 7: 0xf3c90a [node] 8: 0xf4d60a [node] 9: 0xf519b0 [node] 10: 0x19ef441 [node]Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.