Commit Graph

2 Commits (a5501a787d341134201e04f2a3b4d2881b51a171)

Author SHA1 Message Date
Gud Boi a5501a787d Explain the IB broadcast test's cursor ownership
Piker 4af885d9 originally described a concurrent cache hit.
The test opens two nested contexts in a single Trio task and
stubs `maybe_open_context()` to return one retained channel.

Deats,
- Trace the cache miss to the raw channel and each hit to a separate
  `BroadcastReceiver` with its own buffer. Identify the root
  broadcast receiver as `LinkedTaskChannel._broadcaster`.
  Each `chan.subscribe()` yields a child sharing its buffer.
- Explain why the stub checks the requested factory and key.
- Explain the subscriber counts after each exit. The stub keeps
  `chan._broadcaster` while the two callers unsubscribe.
  The second quote checks that the outer cursor still works.
- Type the fixture, channel payloads and context-manager yields.
  Preserve the original assertions and their order.

(this patch was generated in some part by `Codex` using
`GPT-6` (`OpenAI`))
2026-12-02 16:49:10 -05:00
Gud Boi a4d83e2a36 Restore shared IB quote ownership on the landing pin
Two consumers of one IB contract can race for the same tick
when the first owns the raw quote channel. Restore the
symbol-keyed channel from piker 4af885d9 (INUSE eb0514c3).
The feed hunk has the same patch ID as the original.

Deats,
- Keep one upstream subscription until the last caller exits.
  Each caller gets its own child from `chan.subscribe()`.
- Restore the original broadcast test under `tests/providers/`.
  Its contents match the original blob byte for byte.

Why revisit the backout,
- Piker 635314c7 first replayed the patch. Piker 72d0bdad
  backed it out after quote restart could kill the actor on
  Tractor b64c89f0. Retain that commit's restart regression.
- Piker cb5e81d4 advanced the lock to Tractor 8fe574c1.
  The feed-reuse slice already uses that revision.

Original-piker-commit: 4af885d90f
Prompt-IO: ai/prompt-io/opencode/20260813T230744Z_ddac3553_prompt_io.md

(this original patch was generated in some part by `opencode`
using `gpt-5.6-sol` (`openai`))
(this commit msg was generated in some part by `Codex` using
`GPT-6` (`OpenAI`))
2026-12-02 15:40:42 -05:00