Skip to content

Proposal: opt-in ESLint rules for effect names and computation boundaries - #10

Closed
jdeurt wants to merge 1 commit into
mainfrom
proposal/effect-boundaries
Closed

jdeurt wants to merge 1 commit into
mainfrom
proposal/effect-boundaries

Conversation

@jdeurt

@jdeurt jdeurt commented Oct 20, 2026

Copy link
Copy Markdown
Owner

This proposal adds two optional Engineering ESLint rules for reviewing effect boundaries. A helper that reads files, sends a request, or mutates its input can otherwise look like a pure transformation. Both rules remain disabled by default in the shared configuration.

  • jdeurt/name-effects checks a configurable whole-word effect vocabulary after finding explicit I/O or input/module/instance writes.
  • jdeurt/separate-effects identifies narrow computation-name contracts and returned arithmetic candidates alongside those effects.
  • Both diagnostics identify evidence and ask for a valid refactor or a specific suppression with a meaningful explanation. There are no automatic fixes.

The detector intentionally misses arbitrary calls, aliases, mutator methods, captured function-local state, anonymous/object callbacks, and transitive effects. Async and closure creation alone do not establish effects. Lifecycle names allow orchestration without listing every secondary effect.

The source starts from freshly fetched main at d563ff4e6c514984df8349b23dd5a6b1e21bdff2. The modules are included in both generated client packages. Existing strict lint/TypeScript rules and default rule activation are unchanged. Generated files remain ignored. No new dependency or permanent regression test was added; one existing test fixture now copies the additional packaging input.

Empirical evaluation

All tracked JS/TS files were scanned with identical defaults in temporary read-only comparisons. No comparison repository sources, branches, hooks, settings, or dependencies were changed.

Repository Files / lines Initial diagnostics Final diagnostics
jdeurt/agents 35 / 4,605 39 19
jdeurt/codex-pocket 189 / 17,970 99 38
jdeurt/opencodex 5,546 / 1,645,075 7,805 2,256

All complete scans had zero parse/configuration errors. Final findings are all naming findings; the real-source trial produced zero separation findings. Temporary positive fixtures validate that signal, but this trial does not demonstrate its usefulness on real mixed functions.

Source review drove generic changes for fixed callback contracts, local cursor mutation, lifecycle names, computation-prefix ambiguity, and omitted standard operation words. In a systematic 24-item OpenCodex production sample, five clear vocabulary false positives were removed. Four useful naming reviews and fifteen ambiguous findings remained. This is not a measured low false-positive rate, and it does not justify automatic rollout.

See the policy and limitations and revision-pinned evaluation report for examples, review classifications, configuration, misses, and reproduction instructions. The report does not reproduce private source code.

Validation

  • 67 temporary evaluations passed, covering React handlers/hooks, local mutation, shadowing, import aliases, unknown calls, naming/configuration, arithmetic boundaries, and specific suppression.
  • Existing suite: 14 passed, 0 failed.
  • Lint with zero warnings, strict type checking, formatting, import validation, build, generated-output consistency, and publication dry-run passed.
  • Codex and Claude bundle smoke tests verified byte-identical modules/docs, executable rule behavior, and disabled defaults.

Proposal for review only. Do not merge automatically or enable across consumers without a separately reviewed scoped trial.

@jdeurt jdeurt closed this Oct 20, 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