Skip to content

Say what a gather costs on the line after it - #35

Merged
CNSeniorious000 merged 2 commits into
mainfrom
gather-costs-the-next-line
Aug 31, 2026
Merged

Say what a gather costs on the line after it#35
CNSeniorious000 merged 2 commits into
mainfrom
gather-costs-the-next-line

Conversation

@CNSeniorious000

@CNSeniorious000 CNSeniorious000 commented Aug 31, 2026

Copy link
Copy Markdown
Owner

The asyncio.gather bullet says how to overlap calls and stops there. Combined with "the LAST expression is echoed back to you … reaching for it first keeps cells short", the cheapest reading is: fan out, then echo the list.

Which is what gpt-5.6-terra does, in cell after cell:

res = await asyncio.gather(
  mcp.legal_search.search_statutes(keyword='民事诉讼', limit=100),
  mcp.legal_search.search_cases(keyword='借款', limit=100),
  ...
)
res

One line is short, and it pastes back five full answers.

-- Independent calls may overlap with `asyncio.gather`. Sequence dependent work with plain `await`.
+- Independent calls may overlap with `asyncio.gather`. Sequence dependent work with plain `await`. A gather hands back every answer in FULL, so the line AFTER it decides what the batch costs: end on what you pulled out of `res`, never on `res` itself.

The rule goes here rather than in the return-channel bullet because this is where the fan-out decision is made, and res is the name the model actually binds.

Measured — 4/4 tasks, 3 arms, all complete

Carried with #27, #30 and #36 as one arm. gpt-5.6-terra, band 2K–20K. Dump rate = share of cells surfacing ≥ 90% of what they consumed; median ratio in brackets.

task baseline #27+#30 + this and #36
private_lending_33d 80.5% (1.006) 50.0% (0.613) 13.3% (0.225)
hsa_medical_bill_liquidity_guard_30d 72.7% (1.180) 29.2% (0.039) 24.5% (0.013)
broadcast_exam_posture_breathing_32d 9.1% (0.302) 38.2% (0.479) 3.6% (0.022)
food_safety_dispute_33d 44.7% (0.345) 100.0% (1.018) 12.5% (0.069)
pooled 47.3% (79/167) 43.7% (69/158) 15.1% (21/139)
comparison z p
baseline vs #27+#30 +0.66 0.51
baseline vs this arm +5.98 < 1e-6
#27+#30 vs this arm +5.34 < 1e-6

Important

#27 + #30 alone win two tasks and lose two — a wash. This arm wins 4/4, including both tasks where that pair regressed, and every median ratio lands under 0.25. broadcast_exam is the one to check: baseline was already fine there at 9.1%, #27 + #30 took it to 38.2%, this arm takes it to 3.6% — below glm-5.3's 4.8% on the same task.

For reference on the same band: macaron-v1-venti 5.5% pooled and glm-5.3 4.8% / 1.8%. Both already reduce without any of this; gpt-5.6-terra was the only one of the three that did not.

Note

Attribution between this and #36 is not separated — they were measured together, and the arm does not carry #34.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @CNSeniorious000, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 4 days and 17 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@CNSeniorious000
CNSeniorious000 merged commit 32f9de3 into main Aug 31, 2026
15 checks passed
@CNSeniorious000
CNSeniorious000 deleted the gather-costs-the-next-line branch August 31, 2026 06:33
Repository owner deleted a comment from chatgpt-codex-connector Bot Sep 1, 2026
Repository owner deleted a comment from coderabbitai Bot Sep 1, 2026
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