chore(lint): enforce flatMapIgnoredParamToAndThen#25089

merged1
lint-rules/mapSomeToAsSome
lint-rules/flatMapIgnoredParamToAndThen
opened2d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 2d ago

Promote flatMapIgnoredParamToAndThen to an error. Use Effect.andThen when sequencing does not use the preceding success value.

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 · 25 successful · 13 skipped
Some checks failed

Failing1

39f5ea6
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—1—8✅

Baseline: unavailable · PR result: 39f5ea6 · 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: Needs Human Approval

Macroscope's review found this PR requires human approval — Although much of the PR is mechanical lint enforcement, it also changes production event-store compaction and adds guest-sharing telemetry. The compaction change alters persisted data retention and replay behavior, so the aggregate change warrants human validation.

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

Added 1 commit

  • chore(lint): enforce flatMapIgnoredParamToAndThen39f5ea6
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 cc8fa5444f2afe5f241de6d69eafb93638119ca4 and 39f5ea66ef61f7a2be25eadee2a69b51adf48db1.

External image Files selected for processing: 4
  • apps/server/src/mcp/McpToolAccess.ts
  • apps/server/src/telemetry/AnalyticsService.ts
  • packages/provider-acp/src/server/AcpSessionRuntime.ts
  • tsconfig.base.json

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

Walkthrough

Three Effect sequences now use Effect.andThen instead of Effect.flatMap. The TypeScript configuration enables the flatMapIgnoredParamToAndThen diagnostic at error severity.

Changes: Effect sequencing consistency

Layer / File(s)Summary
Replace ignored-parameter flatMap calls
apps/server/src/mcp/McpToolAccess.ts, apps/server/src/telemetry/AnalyticsService.ts, packages/provider-acp/src/server/AcpSessionRuntime.ts, tsconfig.base.json
Three call sites use Effect.andThen for sequencing. The TypeScript configuration sets the corresponding language-service diagnostic to error.

Priority: External image Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: maria-rcks, t3dotgg

Merge Risk: External image Minimal · up to 39f5e

The localized lint enforcement changes have no identified current-head merge risk.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description states the change and scope, but it does not provide the required Problem, Change, Scope and approval, and Verification sections. It also lacks a linked issue or approval rationale and…Add the required section headings. State the problem and expected behavior. Explain the change and why each call site is included. Provide the issue or maintainer approval, or explain why this focused configuration change qualifies for an e…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title clearly identifies the main change: enforcing the flatMapIgnoredParamToAndThen rule.
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: Description check

Explanation

The description states the change and scope, but it does not provide the required Problem, Change, Scope and approval, and Verification sections. It also lacks a linked issue or approval rationale and specific focused test results.

Resolution

Add the required section headings. State the problem and expected behavior. Explain the change and why each call site is included. Provide the issue or maintainer approval, or explain why this focused configuration change qualifies for an exemption. List the focused checks performed, their observed results, and any pending checks.

Finishing Touches
📝 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.