electric-feat-sync-service-start

Based on#4077
SegmentDesign-and-build
Typefeature
## Task

Let's make the admin conn pool available the moment the manager has its connection options
so that nothing has to open a short-lived connection (esp the lock-breaker that recovers abandoned advisory locks).
The pool that serves bulk shape-snapshot reads should keep its
current timing after lock acquisition.

## User stories / requirements

- While the connection manager is waiting for the advisory lock, the admin connection pool should already be up and serving queries. A caller that asks the connection manager for the admin pool's name during the lock-waiting phase gets back a registered, queryable pool.
- When the advisory lock is held by an abandoned session whose replication slot is inactive, the connection manager's lock-breaker recovery detects the inactive slot, terminates the holding backend, and the replication client then acquires the lock and proceeds. The breaker behavior must be preserved end-to-end (from the caller's view, the lock-acquisition event eventually fires).
- With an active replication slot in place (i.e. slot is not abandoned) the lock-breaker recovery shouldn't terminate the backend holding the lock. So when the lock-breaker recovery runs while a real replication client holds the lock and its slot is active, the holding backend is not terminated and the replication client process is still alive.

## 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
3/31.001.0x5.04.0
Gemini 3.1 Pro
3/31.000.8x3.03.0
GPT-5.5
3/31.000.5x3.03.0
Opus 4.7
3/31.000.5x3.03.0
Gemini 3.5 Flash
3/30.670.5x2.02.0
GLM-5.2
3/30.670.7x2.02.0
GPT-5.4
3/31.000.6x3.02.0
Kimi K2.6
3/31.000.4x3.02.0
Opus 4.8
3/30.670.5x4.02.0
Sonnet 5
3/31.000.6x3.02.0
Sonnet 4.6
2/30.670.4x3.02.0
No-Op
2/30.67
Agent details

Verifier Tests

Gemini 3.1 Pro0/0

Validation Stories

Gemini 3.1 Pro3/3

Rubric Criteria

Gemini 3.1 Pro3/3
Fail → Pass
lock_breaker_uses_admin_pool_no_dedicated_process
Pass → Pass
admin_pool_uses_replication_credentials
snapshot_pool_starts_after_replication_client_configured

Taste Scores

Patch Bloat0.8x
297 agent / 352 oracle SLOC, 2 / 3 files(raw: 1.8x)
Practice Alignment — 3.0/5
3
style consistency
3
pattern adherence
4
library usage
3
abstraction level
3
documentation fit
Relative Taste — 3.0/5
4
minimality
4
approach quality
3
hygiene
3
fluency
3
craftsmanship

Agent Patch