Skip to content

Internalize Space.toAction and RondelState.withoutPendingMove#155

Merged
bartul merged 1 commit into
masterfrom
refactor/internalize-cross-file-helpers
Jun 6, 2026
Merged

Internalize Space.toAction and RondelState.withoutPendingMove#155
bartul merged 1 commit into
masterfrom
refactor/internalize-cross-file-helpers

Conversation

@bartul

@bartul bartul commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Narrow Space.toAction and RondelState.withoutPendingMove to val internal. Both helpers are consumed exclusively by sibling files inside the Imperium assembly (Rondel/Movement.fs, Rondel/Invoices.fs) — no consumer in Imperium.Web, Imperium.Terminal, or the test project.
  • Matches the existing cross-file helper pattern (e.g. Space.distance, RondelBillingId.create).
  • Updates the AGENTS.md example list to mention the two new entries.

No behavior changes; purely a public-surface narrowing.

Test plan

  • dotnet fantomas . — 0 reformatted, 0 errored
  • dotnet build Imperium.slnx — 0 warnings, 0 errors
  • dotnet test — 161 passed, 0 failed
  • dotnet run --no-build --project tests/Imperium.UnitTests/Imperium.UnitTests.fsproj -- --render-spec-markdown — renders successfully

Summary by CodeRabbit

  • Documentation

    • Updated internal API guidance with expanded examples of assembly-internal helper function declarations.
  • Refactor

    • Adjusted visibility modifiers for internal helper functions to assembly-internal scope.

Both helpers are only consumed by sibling files inside the Imperium
assembly (Rondel/Movement.fs and Rondel/Invoices.fs). Narrowing them to
`val internal` follows the existing pattern for cross-file helpers
(e.g. Space.distance, RondelBillingId.create) and removes them from the
public surface without altering behavior.

AGENTS.md example list updated to mention the two new entries.
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3a328063-5fd6-4203-aa2c-d79be45ddafe

📥 Commits

Reviewing files that changed from the base of the PR and between 5f88ccf and 2cbb06d.

📒 Files selected for processing (3)
  • AGENTS.md
  • src/Imperium/Rondel/State.fsi
  • src/Imperium/Rondel/Types.fsi

📝 Walkthrough

Walkthrough

This PR restricts the public API surface by marking two helper functions as assembly-internal. Space.toAction and RondelState.withoutPendingMove are changed from public to internal visibility in their F# signature files, and AGENTS.md documentation is updated to list these functions as examples of the assembly-internal helper pattern.

Changes

Assembly-internal helper visibility

Layer / File(s) Summary
Assembly-internal helper visibility guidance and implementation
AGENTS.md, src/Imperium/Rondel/Types.fsi, src/Imperium/Rondel/State.fsi
AGENTS.md documents the pattern of declaring assembly-internal helpers with val internal ... in .fsi files. Space.toAction in Types.fsi and RondelState.withoutPendingMove in State.fsi are marked internal, restricting their visibility while keeping their signatures unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Two helpers slip behind the veil,
From public sight they now curtail,
With internal marks so neat and small,
The guidance grows—oh, best of all!
Assembly-bound, they quietly hide,
While AGENTS.md beams with pride. 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: internalizing two helper functions (Space.toAction and RondelState.withoutPendingMove) to reduce their visibility, which is precisely what the changeset accomplishes across three files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/internalize-cross-file-helpers

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.

@bartul bartul merged commit 3fd698f into master Jun 6, 2026
5 checks passed
@bartul bartul deleted the refactor/internalize-cross-file-helpers branch June 6, 2026 17:42
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