Skip to content

ci: remove unneeded mafiahubservice build and bump xcode#203

Merged
Segfaultd merged 1 commit into
MafiaHub:developfrom
Kheartz:mhs_build_removal
Jun 14, 2026
Merged

ci: remove unneeded mafiahubservice build and bump xcode#203
Segfaultd merged 1 commit into
MafiaHub:developfrom
Kheartz:mhs_build_removal

Conversation

@Kheartz

@Kheartz Kheartz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Seems like recent PRs after #200 are currently failing due to absent cmake build target MafiaHubServices See #202 https://github.com/MafiaHub/Framework/actions/runs/27428394133 for example.

Since this is prebuilt, this doesn't seem like it needs to be a cmake target any longer?

Also other build fix:

  • Bumped macOS xcode to 26.3 to fix the std::jthread not found error

Summary by CodeRabbit

  • Chores

    • Updated CI/CD infrastructure: Upgraded Xcode version from 16.2.0 to 26.3 in build and services update workflows to enhance macOS build reliability and compatibility.
    • Optimized build pipeline execution: Removed intermediate build step to streamline the process, enabling test execution immediately after CMake configuration completes.
  • Tests

    • Removed obsolete unit test case from the JavaScript Events test module to clean up test suite.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Two CI workflow files are updated to use Xcode 26.3 instead of 16.2.0. The build-test.yml workflow also removes the Build MafiaHubServices step so RunFrameworkTests runs directly after CMake configuration. One unit test block (Events.emit blocks reserved events from JS) is deleted from the JS features test header.

Changes

CI Workflow and Test Cleanup

Layer / File(s) Summary
Xcode version bump and build step removal
.github/workflows/build-test.yml, .github/workflows/update_services.yml
Both workflow files update setup-xcode from 16.2.0 to 26.3. build-test.yml additionally removes the Build MafiaHubServices step so RunFrameworkTests runs immediately after the CMake configuration phase.
Remove reserved-event JS test
code/tests/modules/js_features_ut.h
Deletes the IT("Events.emit blocks reserved events from JS") test block, including all throw assertions and resource cleanup, leaving the file to continue with the Events.listenerCount returns correct count test.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop hop, the Xcode is new and bright,
Bumped to 26.3 overnight!
One build step gone, the pipeline flies,
A reserved-event test bids its goodbyes.
Less is more, says the rabbit with glee,
Cleaner CI for you and for me! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: removing the MafiaHubServices build step and bumping Xcode version, which aligns with the file modifications.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Kheartz Kheartz force-pushed the mhs_build_removal branch from 6b7e2bd to 015733e Compare June 13, 2026 15:11

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
code/framework/src/scripting/builtins/events.cpp (1)

708-777: ⚠️ Potential issue | 🟠 Major

Add reserved-event guard to Events.emitLocal to match emit/emitTo and the TS docs

  • types/core/events.d.ts states reserved events (e.g. resourceStart, resourceStop, resourceError, playerConnect, playerDisconnect, playerSpawn, serverStart, serverStop) “cannot be emitted from JS”; Events.emit and Events.emitTo enforce this via IsReservedEvent.
  • Events::EmitLocalCallback (lines 708-777) does not check IsReservedEvent(eventName), allowing JS to emit reserved framework events via emitLocal.
  • Add the same IsReservedEvent guard to EmitLocalCallback (or clarify in the TS docs that emitLocal intentionally allows reserved names).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@code/framework/src/scripting/builtins/events.cpp` around lines 708 - 777,
Events::EmitLocalCallback currently allows JS to emit framework reserved events;
add the same reserved-event guard used by Events::EmitCallback/EmitToCallback by
checking IsReservedEvent(eventName) after computing eventName (and before
collecting handlers) and throw a JS exception via isolate->ThrowException with a
clear message (same wording/behavior as Emit/EmitTo). Locate the check placement
inside Events::EmitLocalCallback (after std::string eventName = ...) and mirror
the existing pattern used in Emit/EmitTo to ensure reserved names like
resourceStart/playerConnect cannot be emitted from JS.
🧹 Nitpick comments (1)
.github/workflows/build-test.yml (1)

42-42: ⚡ Quick win

Xcode version inconsistency across workflows.

This workflow now uses Xcode 26.3, but update_services.yml still uses 16.2.0 (snippet 4, line 110). Consider whether both workflows should use the same Xcode version for consistency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build-test.yml at line 42, The build/test workflow shows
xcode-version: '26.3' while another workflow uses '16.2.0', causing
inconsistency; choose a single Xcode version and make the workflows consistent
by either (a) updating the xcode-version key where it's '26.3' to the agreed
version (or vice versa), or (b) extract a shared XCODE_VERSION variable
(repo-level or workflow-level) and reference it in all workflows so both the
xcode-version keys use the same value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build-test.yml:
- Line 42: The CI jobs are pinned to different Xcode versions: update the
xcode-version key in the update_services.yml workflow (the job that currently
uses xcode-version: '16.2.0') to match the build-test.yml pin (xcode-version:
'26.3') to avoid toolchain mismatches; if there's a deliberate reason to keep
the older toolchain, instead add a brief comment in update_services.yml
documenting why it must remain at '16.2.0' and the implications, but the
preferred change is to set xcode-version: '26.3' so both workflows use the same
version.

---

Outside diff comments:
In `@code/framework/src/scripting/builtins/events.cpp`:
- Around line 708-777: Events::EmitLocalCallback currently allows JS to emit
framework reserved events; add the same reserved-event guard used by
Events::EmitCallback/EmitToCallback by checking IsReservedEvent(eventName) after
computing eventName (and before collecting handlers) and throw a JS exception
via isolate->ThrowException with a clear message (same wording/behavior as
Emit/EmitTo). Locate the check placement inside Events::EmitLocalCallback (after
std::string eventName = ...) and mirror the existing pattern used in Emit/EmitTo
to ensure reserved names like resourceStart/playerConnect cannot be emitted from
JS.

---

Nitpick comments:
In @.github/workflows/build-test.yml:
- Line 42: The build/test workflow shows xcode-version: '26.3' while another
workflow uses '16.2.0', causing inconsistency; choose a single Xcode version and
make the workflows consistent by either (a) updating the xcode-version key where
it's '26.3' to the agreed version (or vice versa), or (b) extract a shared
XCODE_VERSION variable (repo-level or workflow-level) and reference it in all
workflows so both the xcode-version keys use the same value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b458da88-0220-466d-85eb-f1b8ade4c64b

📥 Commits

Reviewing files that changed from the base of the PR and between 6b7e2bd and 015733e.

📒 Files selected for processing (2)
  • .github/workflows/build-test.yml
  • code/framework/src/scripting/builtins/events.cpp

Comment thread .github/workflows/build-test.yml
@Kheartz Kheartz force-pushed the mhs_build_removal branch from 015733e to ded69a0 Compare June 13, 2026 15:24
@Kheartz Kheartz changed the title chore: remove failing MafiaHubServices build chore: fix various CI issues Jun 13, 2026
@Kheartz Kheartz changed the title chore: fix various CI issues chore: remove MafiaHubServices build and fix CI issues Jun 14, 2026
- Remove failing MafiaHubServices build step
- Bump macOS runner to Xcode 26.3 so libc++ provides std::jthread
  (used by Webserver); older Apple toolchains gated it behind
  -fexperimental-library
@Kheartz Kheartz force-pushed the mhs_build_removal branch from ded69a0 to 03e4c16 Compare June 14, 2026 16:33
@Kheartz Kheartz changed the title chore: remove MafiaHubServices build and fix CI issues ci: remove unneeded mafiahubservice build and bump xcode Jun 14, 2026
@Segfaultd Segfaultd merged commit 185b4db into MafiaHub:develop Jun 14, 2026
5 checks passed
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.

2 participants