Skip to content

feat(studio-server): Civ7TunerSession — Effect-scoped owner of the shared tuner connection + backoff gate#1655

Merged
mateicanavra merged 1 commit into
mainfrom
design/tuner-effect-session
Jun 12, 2026
Merged

feat(studio-server): Civ7TunerSession — Effect-scoped owner of the shared tuner connection + backoff gate#1655
mateicanavra merged 1 commit into
mainfrom
design/tuner-effect-session

Conversation

@mateicanavra

Copy link
Copy Markdown
Owner

Layer.scoped + acquireRelease around ONE Civ7DirectControlSession (lazy
connect, self-healing, listenerId-multiplexed); release = graceful FIN on
runtime.dispose(). use(run) gates on the session's consecutive
response-timeout counter: past the threshold (4) reads fail fast with
typed Civ7TunerBackoffError for one cooldown (15s), half-open after,
reset on success — connection-refused stays un-gated so readiness keeps
reporting fast. Civ7TunerClient routes every tuner read through the
shared session (savedConfigurations is filesystem-only and bypasses it).
StudioRpcHandle gains tuner.{session,health} ports + dispose() — nothing
closed the runtime scope before, so finalizers never ran.

Also dedupes effect to 3.21.3 across the workspace (the app/control-orpc
pinned 3.21.2 → mixed-runtime warning).

Gates: studio-server tsc + build; studio app tsc + 204 tests (3 new pins:
one shared connection + FIN on dispose, gate fail-fast/half-open/reset,
wedge-suspicion health).

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

@github-actions

Copy link
Copy Markdown

Railway preview (MapGen Studio): not provisioned for this PR.

Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.

  • To force a preview for this PR: add label railway-preview
  • To suppress a preview: add label no-railway-preview

Debug: {"isClosed":false,"isFork":false,"suppress":false,"force":false,"isTopOfStack":false,"hasToken":true,"draft":false}

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mateicanavra
mateicanavra force-pushed the design/tuner-effect-session branch from 5b758bf to e9a8435 Compare June 12, 2026 20:44
@mateicanavra
mateicanavra force-pushed the design/tuner-session-seam branch 2 times, most recently from bffb13b to 3ce8eec Compare June 12, 2026 22:30
@mateicanavra
mateicanavra force-pushed the design/tuner-effect-session branch 2 times, most recently from c0d8bde to f58e2f6 Compare June 12, 2026 22:44
This was referenced Jun 12, 2026

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jun 12, 10:46 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 12, 10:47 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 12, 10:47 PM UTC: @mateicanavra merged this pull request with Graphite.

@mateicanavra
mateicanavra changed the base branch from design/tuner-session-seam to graphite-base/1655 June 12, 2026 22:46
@mateicanavra
mateicanavra changed the base branch from graphite-base/1655 to main June 12, 2026 22:46
…ared tuner connection + backoff gate

Layer.scoped + acquireRelease around ONE Civ7DirectControlSession (lazy
connect, self-healing, listenerId-multiplexed); release = graceful FIN on
runtime.dispose(). use(run) gates on the session's consecutive
response-timeout counter: past the threshold (4) reads fail fast with
typed Civ7TunerBackoffError for one cooldown (15s), half-open after,
reset on success — connection-refused stays un-gated so readiness keeps
reporting fast. Civ7TunerClient routes every tuner read through the
shared session (savedConfigurations is filesystem-only and bypasses it).
StudioRpcHandle gains tuner.{session,health} ports + dispose() — nothing
closed the runtime scope before, so finalizers never ran.

Also dedupes effect to 3.21.3 across the workspace (the app/control-orpc
pinned 3.21.2 → mixed-runtime warning).

Gates: studio-server tsc + build; studio app tsc + 204 tests (3 new pins:
one shared connection + FIN on dispose, gate fail-fast/half-open/reset,
wedge-suspicion health).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mateicanavra
mateicanavra force-pushed the design/tuner-effect-session branch from f58e2f6 to 1796ee0 Compare June 12, 2026 22:46
@mateicanavra
mateicanavra merged commit 224cc81 into main Jun 12, 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