chore(lint): enforce provideLayerSucceedToProvideService#25090

merged2
lint-rules/flatMapIgnoredParamToAndThen
lint-rules/provideLayerSucceedToProvideService
opened4d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

Promote provideLayerSucceedToProvideService to an error. Provide an existing service directly instead of wrapping it in a temporary successful layer.

This PR changes only this rule and its existing call sites. Each changed rule has its own PR.

Validation: the original full stack passed its local checks. This rule is now in the mechanical landing batch ahead of held changes; updated batch checks and CI are running.

Model: GPT-6.1 Sol. Harness: Codex.

Checks

1 failing · 24 successful · 14 skipped
Some checks failed

Failing1

8aacb8a
Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—5.0 KiB—6.8 KiB✅
CodexThread snapshot wire—3.8 KiB—4.9 KiB✅
CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
CodexLive turn WebSocket decoded—20.9 KiB—29.3 KiB✅
CodexLive turn messages—2—8✅
ClaudeTotal thread wire—5.0 KiB—6.8 KiB✅
ClaudeThread snapshot wire—3.8 KiB—4.9 KiB✅
ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
ClaudeLive turn WebSocket decoded—21.2 KiB—29.3 KiB✅
ClaudeLive turn messages—2—8✅

Baseline: unavailable · PR result: 8aacb8a · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Approvability

Verdict: Approved at 8aacb8a

Macroscope's review found this PR approvable — This PR strengthens an existing lint diagnostic and updates two test-only service setup call sites to comply with it. The changes are small, mechanical, and limited to static-analysis configuration and test harnesses, with no production behavior change.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

Added 2 commits

  • chore(lint): enforce flatMapIgnoredParamToAndThen39f5ea6
  • chore(lint): enforce provideLayerSucceedToProvideService8aacb8a
Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 39f5ea66ef61f7a2be25eadee2a69b51adf48db1 and 8aacb8afd28ced1caf767f62689ad426a5c3b19d.

External image Files selected for processing: 3
  • infra/relay/src/previewTunnelSweep.test.ts
  • packages/provider-core/src/server/snapshotProbe.test.ts
  • tsconfig.base.json

Limit details: You’ve used all 10 included reviews currently available.

Walkthrough

The TypeScript configuration now reports a diagnostic for Layer.succeed-to-Effect.provideService usage as an error. Two test helpers now provide services directly with Effect.provideService.

Changes: Effect service provisioning

Layer / File(s)Summary
Enable and apply direct service provisioning
tsconfig.base.json, infra/relay/src/previewTunnelSweep.test.ts, packages/provider-core/src/server/snapshotProbe.test.ts
The configuration sets the provideLayerSucceedToProvideService diagnostic to error. The two tests now use Effect.provideService to provide their services.

Priority: External image Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: t3dotgg

Merge Risk: External image Minimal · up to 8aacb

No actionable merge-blocking risk was identified in the reviewed changes.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description states the purpose (promote provideLayerSucceedToProvideService to an error and provide services directly) and scope (this rule and its existing call sites only, with each rule in its …Add a Problem section that explains why the rule should become an error. Add a Change section that describes the tsconfig.base.json rule update and the two test call-site changes. Add a Scope and approval section that links the triaged issu…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title "chore(lint): enforce provideLayerSucceedToProvideService" is a conventional commit title that names the main change: the lint rule is promoted to an error. The changeset enables that rule i…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "chore(lint): enforce provideLayerSucceedToProvideService" is a conventional commit title that names the main change: the lint rule is promoted to an error. The changeset enables that rule in tsconfig.base.json and updates two test call sites to use Effect.provideService instead of Layer.succeed with Effect.provide. The title is specific and matches the changeset.

Full details: Description check

Explanation

The description states the purpose (promote provideLayerSucceedToProvideService to an error and provide services directly) and scope (this rule and its existing call sites only, with each rule in its own PR). It fills the Problem and Change intent only loosely, and omits the Problem, Scope and approval, and Verification sections of the template. It gives no tests or checks run for this specific change; the validation line refers to a batch of earlier checks, and the note on the model used is present. The description lacks a reference to an approved issue or discussion covering the scope, and the Verification section does not describe focused results for the changed behavior.

Resolution

Add a Problem section that explains why the rule should become an error. Add a Change section that describes the tsconfig.base.json rule update and the two test call-site changes. Add a Scope and approval section that links the triaged issue or maintainer-approved discussion, or explains why this focused configuration change qualifies without one. Replace the generic validation line in the Verification section with the focused tests or checks run for these two test files and the rule, with observed results. State anything not checked, such as the pending final test rerun and CI. Keep the model and harness note at the end.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.