electric-fix-elixir-client-cache

Based on#3866
SegmentInvestigate-and-fix
Typebug
## Task

on stacks where a cdn or proxy runs in front of the electric sync
service, our long-running elixir shape streams occasionally get
stuck after a shape rotation and never recover. the app
process keeps making requests, the server keeps responding, but the
shape never makes progress. same handle mismatch, over and over.
restarting the elixir process clears it for a while, then the next
rotation hits the same shape and it gets stuck again. the
ts client on the same backend doesn't have the issue, so
it's something specific to the elixir client. the elixir
client should match what the typescript client is doing on this
protocol path, fix it.

## General instructions

- The code repo is at /repo/electric.
- You are inside of a Docker container. You may not be able to perform all operations you would normally be able to do on a local machine. Dependencies have not been pre-installed, and you may need to install them yourself.
- You are expected to act autonomously as a software engineer to complete tasks you are given.
- Do not stop until you feel you have completed the task and your code changes can be merged.
- You may need to use software engineering skills like analyzing the codebase, researching technologies, running services, analyzing logs, etc. to complete the task. Not all tasks will be solvable by reading source code alone.

Agent Results

AgentTastefulBasicVerifierValidationRubricBloatPractTasteCheated
Oracle
4/41.001.0x5.04.0
GPT-5.4
4/41.000.4x5.04.0
Sonnet 4.6
4/41.000.4x3.03.0
GPT-5.5
3/41.000.6x5.05.0
GLM-5.2
2/41.000.5x4.03.0
Opus 4.7
2/40.330.3x5.04.0
Gemini 3.1 Pro
1/40.330.0x3.02.0
Gemini 3.5 Flash
1/40.330.1x3.02.0
Kimi K2.6
1/40.330.4x3.02.0
Opus 4.8
1/40.000.0x5.04.0
Sonnet 5
No-Op
1/40.00
Agent details

Verifier Tests

Gemini 3.1 Pro1/4

Rubric Criteria

Gemini 3.1 Pro1/3
Fail → Pass
bounded_retry_with_clear_error_on_persistent_stale_cdn
cache_buster_param_on_stale_retry
Pass → Pass
expired_handle_tracking_is_bounded

Taste Scores

Patch Bloat0.0x
14 agent / 289 oracle SLOC, 1 / 6 files(raw: 0.2x)
Practice Alignment — 3.0/5
2
style consistency
3
pattern adherence
4
library usage
3
abstraction level
3
documentation fit
Relative Taste — 2.0/5
4
minimality
2
approach quality
2
hygiene
3
fluency
2
craftsmanship

Agent Patch