Skip to content

fix: prevent co-author parsing from stalling GitHub previews - #152115

Merged
steipete merged 1 commit into
mainfrom
codex/github-preview-linear-trailers-01a0a39d
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/github-preview-linear-trailers-01a0a39d

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

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

  • 70 focused preview-loader and registered-handler tests passed. The extended fixture fails on the original source with eight co-authors instead of four.
  • All selected changed-file checks and independent P0–P2 review passed.
  • A bounded synthetic probe exercised the actual preview loader with injected HTTP responses on local Node v26.8.2. Each case had a two-second child deadline after module import. For a malformed 64 KiB trailer, thread CPU fell from 1,926.412 ms to 17.350 ms; wall time fell from 1,986.185 ms to 17.452 ms. All original and candidate children settled, with 127,613 bytes of prepared JSON fixtures per phase.

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.

Before: false co-author badge

After: the badge is absent.

After: no co-author badge

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.
@steipete steipete self-assigned this Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Sep 18, 2026
@steipete
steipete marked this pull request as ready for review September 18, 2026 19:54
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 18, 2026, 4:24 PM ET / 20:24 UTC (Revision 2).

ClawSweeper review

What this changes

The 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
Reviewed head: 933b39bb8e867751ba43549f681b5dca3d130854

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, well-supported parser repair with meaningful regression coverage and clearly scoped synthetic evidence.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor runtime gate does not apply. Actual-loader synthetic measurements support the parser improvement, and inspected renderer captures show the badge correction; neither is represented as deployed evidence. The separate originating-chat screenshot delivery requirement remains.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor runtime gate does not apply. Actual-loader synthetic measurements support the parser improvement, and inspected renderer captures show the badge correction; neither is represented as deployed evidence. The separate originating-chat screenshot delivery requirement remains.
Evidence reviewed 7 items Introduced parser repair: The pinned merge-base-to-head diff replaces overlapping whitespace/name repetitions with one name scan excluding all four JavaScript line separators. Account-id and login bounds remain unchanged.
Current-main necessity: Fetched main still contains the overlapping whitespace expression and permits the name scan to cross lines; the central repair is not already implemented.
Latest-release check: The same original expression is present in v2026.9.4; its peeled commit identity was separately verified.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Resolve merge risk (P1) - The review snapshot does not establish that the before/after screenshots were delivered and rendered in the originating chat, as required before landing.
  • Complete next step (P2) - Confirm that the inspected before/after screenshots are attached and render in the originating chat, completing the repository's two-destination screenshot gate.
Agent review details

Security

None.

PR surface

Source +1, Tests -13. Total -12 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 1 +1
Tests 1 13 26 -13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 15 27 -12

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the repair in the existing preview parser, preserving its bounded contributor display and existing identity checks.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This focused repair prevents malformed GitHub commit trailers from delaying previews and displaying false co-authors.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies this as maintainer-authored, so the external-contributor runtime gate does not apply. Actual-loader synthetic measurements support the parser improvement, and inspected renderer captures show the badge correction; neither is represented as deployed evidence. The separate originating-chat screenshot delivery requirement remains.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The supplied repository state identifies this as maintainer-authored, so the external-contributor runtime gate does not apply. Actual-loader synthetic measurements support the parser improvement, and inspected renderer captures show the badge correction; neither is represented as deployed evidence. The separate originating-chat screenshot delivery requirement remains.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm the inspected before/after screenshots are attached and render in the originating chat.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-18T19:54:00.978Z sha 933b39b :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 18, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

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.

@steipete
steipete merged commit f953dbd into main Sep 18, 2026
286 checks passed
@steipete
steipete deleted the codex/github-preview-linear-trailers-01a0a39d branch September 18, 2026 20:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 18, 2026
…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)
  ...
vincentkoc added a commit that referenced this pull request Sep 18, 2026
…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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant