Skip to content

refactor(static_semantics): delete orphaned SourceKind flat enum (#331)#349

Merged
dowdiness merged 1 commit into
mainfrom
refactor/delete-source-kind-331
Jun 14, 2026
Merged

refactor(static_semantics): delete orphaned SourceKind flat enum (#331)#349
dowdiness merged 1 commit into
mainfrom
refactor/delete-source-kind-331

Conversation

@dowdiness

Copy link
Copy Markdown
Owner

Summary

  • Deletes SourceKind enum from static_semantics/strictness.mbt — zero consumers confirmed via moon ide find-references and grep across all .mbt/.mbti files
  • Also removes the now-unused @debug dependency import from pkg.generated.mbti

Motivation

SourceKind was added as a placeholder for the preparation-boundary design but no code ever read it. Keeping it would mean maintaining a growing variant list through future refactors with no benefit. Per the demand-driven deletion principle: delete now, re-add as a payload-carrying enum (DirectEval(CallerFacts), FunctionConstructor(ParamStrings), …) when the first real consumer arrives.

Test plan

  • moon check — clean
  • moon test -p static_semantics — 22/22 passed
  • moon info.mbti regenerated
  • moon fmt — no formatting changes
  • git diff --stat — only strictness.mbt and pkg.generated.mbti changed (30 deletions, 0 additions)

🤖 Generated with Claude Code

Zero consumers — grep and moon ide find-references return only the
definition site and pkg.generated.mbti. Delete now; re-add as a
payload-carrying enum (DirectEval(CallerFacts), etc.) when the first
real consumer arrives.

Also removes the now-unused @debug import from pkg.generated.mbti.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dowdiness, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 35 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c50d624c-a791-41b0-b9c0-7fef36a094bd

📥 Commits

Reviewing files that changed from the base of the PR and between 3b65563 and 34a7446.

📒 Files selected for processing (2)
  • static_semantics/pkg.generated.mbti
  • static_semantics/strictness.mbt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/delete-source-kind-331

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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

pub fn has_use_strict(stmts : Array[@ast.Stmt]) -> Bool {

P2 Badge Preserve the exported SourceKind API

This removes SourceKind even though it was declared pub(all) and appeared in the generated package interface, so downstream packages that import dowdiness/js_engine/static_semantics can compile against this enum even if repo-local rg/moon ide find-references finds no consumers. For a refactor-only deletion, this breaks published API users that mention SourceKind without providing a replacement or deprecation path.

ℹ️ 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".

@dowdiness dowdiness merged commit 6e92940 into main Jun 14, 2026
13 checks passed
@dowdiness dowdiness deleted the refactor/delete-source-kind-331 branch June 14, 2026 11:09
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