Skip to content

refactor(effect-lsp)!: adopt effect-utils full-strict Effect-LSP gate (remove errors-only override) - #1410

Merged
schickling merged 3 commits into
mainfrom
schickling-assistant/2026-07-16-bd-capstone
Jul 19, 2026
Merged

refactor(effect-lsp)!: adopt effect-utils full-strict Effect-LSP gate (remove errors-only override)#1410
schickling merged 3 commits into
mainfrom
schickling-assistant/2026-07-16-bd-capstone

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

🔄 Rebased onto current main (2026-07-17)

Originally branched before #1397 merged. This branch has been rebased onto current main: the 3 duplicated effect-utils-bump precursor commits (now carried by main as the #1397 squash) were dropped, so the diff is now only this slice's burndown changes (110 files) and no longer conflicts. The pre-rebase file/line counts quoted below are historical.

Verification is via CI on this branch. The type-check job runs devenv tasks run ts:buildtsgo --build — the real Effect-LSP oracle (tsc/incremental ts:check do not run the plugin) — and lint (lint:full:with-megarepo-check) re-checks generated-file freshness.

Merge order: this capstone merges last (after #1407#1408#1409). It carries the union of all three slices' fixes plus the errors-only-override removal, so its type-check job runs under the full gate — that green check is the acceptance test for #1399. As the slices land, rebasing this branch onto main will shrink its diff toward just the override removal.

Problem

The effect-utils bump adopted @effect/language-service with effectDiagnosticsGate = { warnings: true, suggestions: true }, which fails tsgo --build on every Effect error, warning, and suggestion — not just errors. That surfaced ~406 pre-existing advisory diagnostics across the LiveStore tree, so the bump PR (#1397) shipped a temporary errors-only override in genie/repo.ts (flipping ignoreEffectWarningsInTscExitCode / ignoreEffectSuggestionsInTscExitCode to true) to keep the tree green while the burndown landed separately.

Approach

This is the capstone of the #811 Effect-LSP burndown. It:

  1. Integrates the three burndown branches (each cleared one rule-group while the gate was still advisory):
  2. Removes the errors-only override in genie/repo.ts so LiveStore inherits effect-utils' full effectDiagnosticsGate unchanged. The LiveStore-specific allowedDuplicatedPackages: ['@livestore/utils'] is folded into the base plugin config so it survives the override removal (otherwise 183 duplicatePackage diagnostics would return).
  3. Regenerates all 28 package tsconfigs via genie:run — every generated tsconfig now carries ignoreEffectWarningsInTscExitCode: false / ignoreEffectSuggestionsInTscExitCode: false (full gate) while keeping allowedDuplicatedPackages.

Merge conflict resolution

Two .test.ts files were touched by both bd-mechanical and bd-semantic; both were resolved preserving both independent fixes (and validated by the now-fatal gate building clean):

  • packages/@livestore/common/src/sync/syncstate.test.ts — kept mechanical's yield* Schema.encodeUnknownEffect(...).pipe(Effect.orDie) (schemaSyncInEffect) and semantic's jsonParse(jsonStringify(...)) helper (preferSchemaOverJson).
  • packages/@local/astro-twoslash-code/src/cli/snippets.watch.test.ts — kept mechanical's consolidated block-level }).pipe(Effect.orDie) and semantic's module-scoped jsonStringify helper.

Acceptance test (the point of this PR)

With the override removed and the full gate active:

  • tsgo --build --force tsconfig.dev.jsonbuilds all 32 projects, exits 0, zero Effect diagnostics.
  • devenv tasks run ts:checkgreen (exit 0).
  • devenv tasks run check:quickgreen (exit 0).

Every remaining Effect warning/suggestion is either fixed or carries a justified inline :off.

Justified :off exemptions (reviewer audit)

Carried in from the burndown branches; all inline-annotated with rationale:

anyUnknownInErrorContext (#1409 — dynamic dispatch / vendored fork / regression tests):

  • packages/@livestore/common-cf/src/do-rpc/server.ts — lines 88, 99, 135, 149, 172, 256 (Schema.toCodecJson on erased dynamic schemas / Rpc.Handler.handler dynamic dispatch; context provided at runtime)
  • packages/@livestore/livestore/src/effect/LiveStore.test.ts — lines 32, 40 (regression test Store.Tag: StoreContextId vs StoreTagClass R channel mismatch #1103 intentionally widens channels to unknown)
  • packages/@livestore/utils/src/effect/Subscribable.ts — line 49 (vendored fork; unknown is structural over generic A, E, R)

schemaNumber (#1408 — SQLite REAL columns legitimately store Infinity/NaN):

  • packages/@livestore/common/src/schema/state/sqlite/db-schema/dsl/field-defs.ts — line 268 (public DEFAULT codec must accept non-finite; Schema.Finite would wrongly reject)

preferSchemaOverJson (#1409 — committed/human-inspected JSON must stay indented; Schema's JSON codec emits compact):

  • scripts/src/commands/docs.ts — line 708
  • scripts/src/commands/release.ts — lines 188, 276
  • scripts/src/commands/update-deps.ts — line 289

Notes

  • Breaking-change marker (!) reflects the CI-contract change: warnings/suggestions now gate the build.
  • No pnpm-lock.yaml / repos/ changes.
  • Draft PR — no ready-flip / auto-merge.

🤖 Generated with Claude Code

Posted on behalf of @schickling
field value
agent_name 🌲 cl1-pine
agent_session_id b9f1f4a5-dd10-40f6-b25c-945e71e2007a
agent_tool Claude Code
agent_tool_version 2.1.206
agent_runtime Claude Code 2.1.206
agent_model claude-opus-4-8
runtime_profile /nix/store/1n76sy6i9y3ki3k4w04jksqvygw67sj0-coding-agent-runtime-profile/share/coding-agents/profile.json
skills_manifest /nix/store/jn6r0r7r59x3a525jch4pwzwykszqp60-agent-skills-corpus/share/agent-skills/manifest.json
worktree livestore/schickling/2026-07-17-refactor
machine dev3
tooling_profile dotfiles@4eac376

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR preview

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-fb829dc, pr-1410 2026-07-19 11:53 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-19 11:47 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-19 11:47 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-19 11:47 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-19 11:47 UTC
Report history

PR 1410 · 2026-07-19 11:58 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-fb829dc, pr-1410 2026-07-19 11:53 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-19 11:47 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-19 11:47 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-19 11:47 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-19 11:47 UTC

PR 1410 · 2026-07-19 08:57 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-62c7ced, pr-1410 2026-07-19 08:51 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-19 08:43 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-19 08:43 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-19 08:43 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-19 08:43 UTC

PR 1410 · 2026-07-18 20:11 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-265f015, pr-1410 2026-07-18 20:05 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-18 19:55 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-18 19:55 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-18 19:55 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-18 19:55 UTC

PR 1410 · 2026-07-18 10:43 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-9a03ded, pr-1410 2026-07-18 10:37 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-18 10:26 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-18 10:26 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-18 10:26 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-18 10:26 UTC

PR 1410 · 2026-07-18 10:04 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-bf29a10, pr-1410 2026-07-18 09:59 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-18 09:49 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-18 09:49 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-18 09:49 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-18 09:49 UTC

PR 1410 · 2026-07-18 08:37 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-431c740, pr-1410 2026-07-18 08:31 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-18 08:21 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-18 08:21 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-18 08:21 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-18 08:21 UTC

PR 1410 · 2026-07-17 15:56 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-7b08964, pr-1410 2026-07-17 15:48 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-17 15:31 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-17 15:31 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-17 15:31 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-17 15:31 UTC

PR 1410 · 2026-07-17 15:05 UTC

Subject Status Report Details Updated
LiveStore docs preview success Docs preview deployed (livestore-docs-dev) PR aliases: pr-1410-e33fdb6, pr-1410 2026-07-17 14:56 UTC
web-linearlite success web-linearlite deployed (preview) Worker: example-web-linearlite-preview.livestore.workers.dev 2026-07-17 14:44 UTC
web-todomvc success web-todomvc deployed (preview) Worker: example-web-todomvc-preview.livestore.workers.dev 2026-07-17 14:44 UTC
web-todomvc-script success web-todomvc-script deployed (preview) Worker: example-web-todomvc-script-preview.livestore.workers.dev 2026-07-17 14:44 UTC
web-todomvc-sync-cf success web-todomvc-sync-cf deployed (preview) Worker: example-web-todomvc-sync-cf-preview.livestore.workers.dev 2026-07-17 14:44 UTC

PR 1410 · 2026-07-17 14:03 UTC

No previews were published for this commit.

PR 1410 · 2026-07-15 22:41 UTC

No previews were published for this commit.

@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-07-15-bump-effect-utils branch from ddb58d5 to 9e9847a Compare July 16, 2026 15:04
Base automatically changed from schickling-assistant/2026-07-15-bump-effect-utils to main July 17, 2026 12:19
@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-07-16-bd-capstone branch from 67072cd to 047818b Compare July 17, 2026 13:32
@schickling-assistant
schickling-assistant marked this pull request as ready for review July 17, 2026 15:57
@schickling

Copy link
Copy Markdown
Collaborator

@codex

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5aba317e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/@livestore/utils-dev/src/node/DockerCompose/DockerCompose.ts Outdated
Comment thread packages/@livestore/common/src/util.ts Outdated
@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-07-16-bd-capstone branch 5 times, most recently from 0a810a6 to f29fa86 Compare July 18, 2026 19:44
schickling-assistant and others added 3 commits July 19, 2026 13:34
… (remove errors-only override)

Removes LiveStore's temporary errors-only Effect-LSP override in genie/repo.ts
so the inherited effect-utils effectDiagnosticsGate applies in full: Effect
errors, warnings, AND suggestions now all gate `tsgo --build`, not just errors.
The LiveStore-specific `allowedDuplicatedPackages: ['@livestore/utils']` is
folded into the base plugin config so it survives the override removal.

This is the capstone of the #811 Effect-LSP burndown; it lands on top of the
merged burndown work (#1407 mechanical, #1408 schema, #1409 semantic) which
cleared all pre-existing advisory diagnostics. Regenerated all 28 package
tsconfigs via genie so the full gate (ignoreEffectWarnings/Suggestions = false)
is reflected in the committed generated config.

Acceptance: `tsgo --build --force tsconfig.dev.json` builds all projects and
exits 0 with zero Effect diagnostics under the full gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNpusCebCSBEGLzCWnJfau
…e full gate in ClientSessionSyncProcessor test

The synthetic `Exit.fail(new Error(...))` in ClientSessionSyncProcessor's
shutdown test (added on main via #1439) is advisory under the errors-only gate
but fatal once this capstone removes the override. It's a throwaway test signal
fed to Scope.close, so a justified globalErrorInEffectFailure:off is the right
call — a tagged error adds no value here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNpusCebCSBEGLzCWnJfau
…Error under the full gate

The trusted-PR-snapshot flow added to scripts/src/commands/release.ts on main
via #1458 constructs global `new Error(...)` values in the Effect failure
channel (globalErrorInEffectFailure / globalErrorInEffectCatch). These are
advisory under the errors-only gate but fatal once this capstone removes the
override. Reroute the two validation failures and two tryPromise catch callbacks
through the file's existing `ReleaseError` tagged error (adding an optional
`cause` field so the wrapped filesystem errors survive), and drop the redundant
`Effect.fail` wrapper now that a yieldable error is yielded directly. Behavior-
neutral.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNpusCebCSBEGLzCWnJfau
@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-07-16-bd-capstone branch from 5a9edb1 to 9a4345d Compare July 19, 2026 11:37
@schickling
schickling enabled auto-merge (squash) July 19, 2026 14:02
@schickling
schickling merged commit adcf6b2 into main Jul 19, 2026
74 of 76 checks passed
@schickling
schickling deleted the schickling-assistant/2026-07-16-bd-capstone branch July 19, 2026 14:21
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.

2 participants