Repository navigation
fix: prevent co-author parsing from stalling GitHub previews - #152115
Conversation
Remove overlapping whitespace/name repetition from GitHub preview co-author parsing and confine trailers to one JavaScript text line. Malformed names split across CR, LF, or Unicode line separators no longer create faces. Preserve valid noreply trailers, whitespace, case-folded deduplication, co-author counts, avatar order/limits, and public-repository identity checks. Extend the existing preview fixture while retaining its 300 KiB message case. Validation: 70 preview and registered-handler tests; full changed-file checks; clean managed P0-P2 review. The extended regression fails on the original code with eight co-authors instead of four. A bounded synthetic probe through the real preview owner on local Node v26.8.2 reduced the 64 KiB malformed-trailer case from 1986.185 ms wall / 1926.412 ms thread CPU to 17.452 ms / 17.350 ms. Every independent child stayed under a two-second supervisor deadline. This is not production timing or attribution of the separately observed Team heartbeat delay.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 18, 2026, 4:24 PM ET / 20:24 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR bounds GitHub co-author trailer parsing to one line, prevents excessive backtracking, and extends the existing regression fixture. Merge readiness⛔ Blocked before merge - 2 items remain The fix remains necessary: current main and v2026.9.4 retain the problematic expression. No introduced correctness defect was found, and the new screenshots address the earlier missing visual comparison. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway loads GitHub pull-request metadata and commit messages for Control UI hovercards. Co-author parsing turns valid noreply trailers into a bounded list of contributor avatars and a total count. flowchart LR
A[GitHub link hover] --> B[Gateway preview request]
B --> C[GitHub metadata and commits]
C --> D[Line-bounded trailer parsing]
D --> E[Deduplicated contributors]
E --> F[Avatars and hovercard count]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests -13. Total -12 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the repair in the existing preview parser, preserving its bounded contributor display and existing identity checks. Do we have a high-confidence way to reproduce the issue? Yes, from source: a malformed trailer with a long whitespace run triggers overlapping scans, and a line break can connect unrelated text to a noreply address. The supplied loader measurements support this mechanism; no runtime reproduction was executed during this review. Is this the best way to solve the issue? Yes. Removing the overlapping repetition and bounding the name to one line repairs the existing owner without adding another parser, configuration option, or compatibility path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 47c4fbcb20d2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
The inspected synthetic before/after screenshots have been attached and verified in the originating task conversation. The same images are embedded in this PR body and their rendering was verified. Both destinations satisfy the screenshot delivery requirement noted in the review; the captures demonstrate the false co-author badge correction, while the separate loader probe supports the parsing performance claim. |
|
Merged via squash.
|
…49075-c1-control-repair * commit 'dc5b321b5f89f9cf0e704ee202ea3059fb1ce63d': (79 commits) fix: start background context maintenance after durable turns (#151936) fix(models): avoid ambient state reads during prepared selection (#152119) feat: recover abandoned Crabbox source staging (#152006) chore(ui): refresh control ui locales (#152098) fix(ui): keep cloud startup prompts and progress in chat (#152024) fix: report completed subprocess cleanup after cancellation (#152107) perf(reply): reuse normalized inbound text (#152110) fix(cron): paused future one-shots disappear after Run now (#152126) perf(sessions): reuse rows and skip discarded terminal labels (#152109) fix(ui): keep keyboard-focused automation controls clear of sticky actions (#152135) fix(ui): load remote images in compact activity previews (#152045) refactor(health): skip unused verbose account projection (#152108) fix: restore dashboard test limits and SQLite test compilation (#152089) test(qa-lab): stabilize timeout recovery delivery proof (#152100) fix: probe SQLite when Node denies worker threads (#152075) perf(gateway): keep GitHub co-author trailer scans linear (#152115) fix(media): report CLI models with missing command or args (#151969) refactor: remove retired runtime code and duplicate helpers (#151973) perf(plugins): combine runtime and tool call scopes (#152101) test(memory): seed restart fixtures with the Gateway stopped (#152038) ...
…pr-149282-proof-20260918 * commit 'dfa48c256f0853268c6b42cbe09fc1338d7d24ea': test(qa-lab): stabilize timeout recovery delivery proof (#152100) fix: probe SQLite when Node denies worker threads (#152075) perf(gateway): keep GitHub co-author trailer scans linear (#152115) fix(media): report CLI models with missing command or args (#151969) refactor: remove retired runtime code and duplicate helpers (#151973) perf(plugins): combine runtime and tool call scopes (#152101) test(memory): seed restart fixtures with the Gateway stopped (#152038) perf(gateway): avoid session list stalls on broad updates (#152074) fix: preserve model failure causes and worker fallback runtime (#152028) perf(logging): reduce Gateway hot-path info log volume (#152080) improve(gateway): reduce duplicate worker data fetched from SQLite (#151878) improve: format messages with many links faster (#152112) perf(cron): avoid unused SQL binding in config projections (#152029) fix: explain cloud worker startup failures (#152043) refactor(discord): share Markdown edit projection (#149214) refactor(media): remove unreachable geometry metadata backfills (#149272) chore(autoreview): sync mirror to agent-skills a7e91e1 (#152039) fix(ui): restore sidebar and chat test collection (#152099)
…52115) Remove overlapping whitespace/name repetition from GitHub preview co-author parsing and confine trailers to one JavaScript text line. Malformed names split across CR, LF, or Unicode line separators no longer create faces. Preserve valid noreply trailers, whitespace, case-folded deduplication, co-author counts, avatar order/limits, and public-repository identity checks. Extend the existing preview fixture while retaining its 300 KiB message case. Validation: 70 preview and registered-handler tests; full changed-file checks; clean managed P0-P2 review. The extended regression fails on the original code with eight co-authors instead of four. A bounded synthetic probe through the real preview owner on local Node v26.8.2 reduced the 64 KiB malformed-trailer case from 1986.185 ms wall / 1926.412 ms thread CPU to 17.452 ms / 17.350 ms. Every independent child stayed under a two-second supervisor deadline. This is not production timing or attribution of the separately observed Team heartbeat delay.
What Problem This Solves
GitHub pull-request previews can stall the Gateway while parsing malformed co-author trailers with long whitespace runs. The same parser can incorrectly turn text on a later line into a co-author.
User Impact
Malformed commit trailers no longer cause repeated synchronous rescanning or false co-author faces. Valid GitHub noreply trailers keep the same deduplication, count, and three-face display limit.
Why This Change Was Made
Use one name scan bounded to a single line, removing the overlapping whitespace repetition. Keep the existing preview loader, response limits, identity checks, and avatar handling. The existing co-author fixture now covers all four JavaScript line separators and horizontal whitespace while retaining its large-page and deduplication checks.
Related: #132275.
Evidence
These are local synthetic measurements, not deployed latency measurements or attribution of a particular production stall. The synthetic renderer comparison below replays the retained count/login outcomes using the existing optional-avatar fallback; it does not query a live Gateway.
Before: the malformed trailer creates a false co-author badge.
After: the badge is absent.