Skip to content

chore: enhance fuselage script with link-all and unlink-all options for batch processing#40701

Merged
tassoevan merged 3 commits into
developfrom
chore/fuselage-script
Jun 2, 2026
Merged

chore: enhance fuselage script with link-all and unlink-all options for batch processing#40701
tassoevan merged 3 commits into
developfrom
chore/fuselage-script

Conversation

@tassoevan
Copy link
Copy Markdown
Member

@tassoevan tassoevan commented May 26, 2026

Proposed changes (including videos or screenshots)

It adds convenience options for link and unlink all Fuselage packages from a sibling repository.

Issue(s)

Steps to test or reproduce

Further comments

Task: ARCH-2160

Summary by CodeRabbit

  • New Features

    • Added link-all and unlink-all actions to discover and operate on all local fuselage packages in a single command.
    • Command now errors if no local packages are found to prevent no-op runs.
  • Documentation

    • Help output updated with descriptions, accepted action values, and usage examples for linking/unlinking all packages.

@tassoevan tassoevan added this to the 8.6.0 milestone May 26, 2026
@tassoevan tassoevan requested a review from a team May 26, 2026 19:26
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented May 26, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

⚠️ No Changeset found

Latest commit: 4f0c1b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tassoevan
Copy link
Copy Markdown
Member Author

/jira ARCH-2113

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

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: 3955ba1b-2d3d-45d2-8d04-26c028901301

📥 Commits

Reviewing files that changed from the base of the PR and between cc72885 and 4f0c1b1.

📒 Files selected for processing (1)
  • fuselage.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • fuselage.sh
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: 🚀 Notify external services - draft
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check

Walkthrough

Extended fuselage.sh with link-all and unlink-all actions to batch-symlink all local packages. Help text documents the new options with examples. Runtime validation accepts these actions, discovers packages under ../fuselage/packages, errors if none are found, and rewrites them to link/unlink with a semicolon-separated package list.

Batch linking for fuselage packages

Layer / File(s) Summary
Help text and documentation for new actions
fuselage.sh
Help output lists link-all and unlink-all as valid -a/--action options with corrected wording, and adds usage examples showing yarn fuselage -a link-all and yarn fuselage -a unlink-all for batch symlinking all local packages.
Action validation and package discovery
fuselage.sh
Action validation now accepts link-all and unlink-all; when selected, the script checks that ../fuselage/packages exists, discovers all package directories inside, errors if none are found, and converts the action to link or unlink while populating packages with the discovered semicolon-separated list.

🎯 2 (Simple) | ⏱️ ~8 minutes

type: feature

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant fuselage_sh
  participant fuselage_packages_dir
  participant package_list
  User->>fuselage_sh: run yarn fuselage -a link-all
  fuselage_sh->>fuselage_packages_dir: check ../fuselage/packages exists
  fuselage_packages_dir-->>fuselage_sh: return package directories
  fuselage_sh->>package_list: build semicolon-separated list
  fuselage_sh->>fuselage_sh: rewrite action to 'link' and set packages
  fuselage_sh->>User: proceed with link action
Loading
🚥 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 accurately describes the main change: adding link-all and unlink-all options to the fuselage script for batch processing. It is specific, clear, and directly related to the primary modifications in the changeset.
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.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • ARCH-2160: Request failed with status code 401

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.

@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label May 26, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
fuselage.sh (1)

84-103: ⚡ Quick win

Consider clarifying the error message about repository location.

The error message at line 87 states "Make sure the fuselage repository is available at the project root," but the path ../fuselage/packages indicates a sibling directory (one level up, then into fuselage). The message could be more precise about the expected location.

📝 Suggested clarification
     if [[ ! -d "../fuselage/packages" ]]; then
         echo "Could not find ../fuselage/packages"
-        echo "Make sure the fuselage repository is available at the project root"
+        echo "Make sure the fuselage repository is cloned as a sibling directory"
         exit 1
     fi
🤖 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 `@fuselage.sh` around lines 84 - 103, The error message about repository
location is vague: update the echo text in the fuselage.sh branch that checks
../fuselage/packages (the block that computes packages and sets action to
"link"/"unlink") to state the exact expected path (e.g., "../fuselage/packages"
or "a sibling directory named 'fuselage' one level up") so users know to place
the fuselage repo at ../fuselage relative to the current project; modify the
echo that currently reads "Make sure the fuselage repository is available at the
project root" to a clearer sentence referencing "../fuselage/packages" or
equivalent phrasing.
🤖 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 `@fuselage.sh`:
- Line 10: Fix the typo in the help/usage string for the undo|unlink command:
replace "symbolic li nk" with "symbolic link" in the fuselage.sh help text
associated with the undo|unlink description so the displayed help reads "Removes
the symbolic link for the fuselage package".
- Around line 11-12: The help text for link-all and unlink-all mentions
./fuselage/packages but the runtime check uses ../fuselage/packages; make them
consistent by updating the help string to reference ../fuselage/packages (or
change the runtime check to ./fuselage/packages if you intend the repo to be in
the current directory). Locate the help block that documents "link-all" and
"unlink-all" and the path validation that references "../fuselage/packages" and
ensure both use the same path string so users and the code match.

---

Nitpick comments:
In `@fuselage.sh`:
- Around line 84-103: The error message about repository location is vague:
update the echo text in the fuselage.sh branch that checks ../fuselage/packages
(the block that computes packages and sets action to "link"/"unlink") to state
the exact expected path (e.g., "../fuselage/packages" or "a sibling directory
named 'fuselage' one level up") so users know to place the fuselage repo at
../fuselage relative to the current project; modify the echo that currently
reads "Make sure the fuselage repository is available at the project root" to a
clearer sentence referencing "../fuselage/packages" or equivalent phrasing.
🪄 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: d6359771-b175-4504-bef2-0f5dc17d9431

📥 Commits

Reviewing files that changed from the base of the PR and between 7af134c and 65aa322.

📒 Files selected for processing (1)
  • fuselage.sh
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
🔇 Additional comments (1)
fuselage.sh (1)

40-45: LGTM!

Comment thread fuselage.sh Outdated
Comment thread fuselage.sh Outdated
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread fuselage.sh Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.75%. Comparing base (67b0a18) to head (4f0c1b1).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #40701      +/-   ##
===========================================
- Coverage    69.82%   69.75%   -0.07%     
===========================================
  Files         3327     3327              
  Lines       123134   123134              
  Branches     21915    22010      +95     
===========================================
- Hits         85979    85898      -81     
- Misses       33810    33877      +67     
- Partials      3345     3359      +14     
Flag Coverage Δ
e2e 59.32% <ø> (-0.10%) ⬇️
e2e-api 46.18% <ø> (-0.06%) ⬇️
unit 70.49% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

ggazzo
ggazzo previously approved these changes May 27, 2026
Copy link
Copy Markdown

@hacktron-app hacktron-app Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 3 files

Severity Count
🟡 Medium 2
🟢 Low 1
Comments Outside Diff (3)

🟢 Low: User Enumeration via 2FA Email Code Request Timing Attack (Timing)

Location: apps/meteor/app/api/server/v1/users.ts:673-1612

The users.2fa.sendEmailCode endpoint allows an attacker to verify the existence of users by observing the response. Although the endpoint returns a success status regardless of whether the user exists, the underlying logic performs a database lookup (Users.findOneByEmailAddress or Users.findOneByUsername). An attacker can potentially use this to enumerate valid usernames or emails by measuring response times or observing other side-channel indicators, as the server performs a database operation for valid identifiers but not for invalid ones. This is a common pattern for user enumeration.


🟡 Medium: Insecure Direct Object Reference in Push Token Assignment

Location: apps/meteor/app/push/server/methods.ts:31

The 'raix:push-setuser' Meteor method allows any authenticated user to update the 'userId' field of an arbitrary 'PushToken' document to their own 'userId'. By providing the '_id' of a push token belonging to another user, an attacker can reassign that token to their own account. This could lead to information disclosure if push notifications or associated metadata contain sensitive information intended for the original owner of the token. The method fails to verify if the 'PushToken' document currently belongs to the caller.


🟡 Medium: Unauthorized User Addition in Discussion Creation

Location: apps/meteor/app/discussion/server/methods/createDiscussion.ts:89

The createDiscussion method allows users to create discussions in rooms they have access to. However, the createRoom function is called with invitedUsers derived from the replied message owner and the users parameter passed by the caller. While the createDiscussion method checks if the caller has permission to start a discussion, it does not explicitly verify if the current user has permission to add the specified users to the new room, potentially allowing an attacker to force-add users to a private discussion room they shouldn't be in.

View full scan results

@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Jun 2, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 2, 2026
@tassoevan tassoevan enabled auto-merge June 2, 2026 16:32
tassoevan and others added 2 commits June 2, 2026 13:34
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@coderabbitai coderabbitai Bot removed the type: feature Pull requests that introduces new feature label Jun 2, 2026
@tassoevan tassoevan force-pushed the chore/fuselage-script branch from cc72885 to 4f0c1b1 Compare June 2, 2026 16:35
@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label Jun 2, 2026
@tassoevan tassoevan added this pull request to the merge queue Jun 2, 2026
Merged via the queue into develop with commit da1de5f Jun 2, 2026
82 of 84 checks passed
@tassoevan tassoevan deleted the chore/fuselage-script branch June 2, 2026 18:32
gabriellsh pushed a commit that referenced this pull request Jun 3, 2026
…or batch processing (#40701)

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: feature Pull requests that introduces new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants