Skip to content

fix(projects): grow the disk via upgrade-instance --volume-size; stop update --storage-size - #315

Merged
Fermionic-Lyu merged 2 commits into
mainfrom
devin/1792812661-volume-size
Oct 24, 2026
Merged

Fermionic-Lyu merged 2 commits into
mainfrom
devin/1792812661-volume-size

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

insforge projects update --storage-size 20 sent PUT /projects/v1/:id {storageDiskSize} and printed Project "…" updated., but that endpoint only saves a number in the database and never resizes the EBS volume. A customer was told their disk grew when it hadn't. projects upgrade-instance couldn't set volumeSizeGiB either, so the CLI had no working way to grow a disk.

  • projects upgrade-instance [instanceType] --volume-size <gib>: the instance type is now optional. At least one of the two is required. Sends { instanceType?, volumeSizeGiB? } to /projects/v1/:id/upgrade-instance. Prints Disk: 16 GiB → 20 GiB when the backend returns the previous size.
    insforge projects upgrade-instance --volume-size 20
    insforge projects upgrade-instance large --volume-size 40
    
  • projects update --storage-size is hidden from help and now fails before any API call with: projects update` cannot resize the disk. Use `insforge projects upgrade-instance --volume-size <gib>` instead. UpdateProjectBody no longer has storageDiskSize.
  • The risk-guard entry for projects upgrade-instance now describes a disk resize (online, can't shrink) as well as an instance change.

Companion backend fix: InsForge/insforge-cloud-backend (PUT rejects storageDiskSize; resize checks against the real EBS size).

Testing

New src/commands/projects/manage.test.ts covers the request bodies and validation. Full vitest run passes (844), and eslint and build are clean.

Link to Devin session: https://app.devin.ai/sessions/b542421259ea403d96c754cb278a4fb3
Open in Devin Desktop: https://app.devin.ai/desktop/session/b542421259ea403d96c754cb278a4fb3?variant=devin


Summary by cubic

Fixes the CLI's disk resizing so projects upgrade-instance --volume-size actually grows the EBS volume, and projects update --storage-size stops pretending it does. The old flag is hidden and fails before any API call, pointing users to the working command.

Changes

  • upgrade-instance accepts an optional [instanceType] and --volume-size (at least one required) and sends { instanceType?, volumeSizeGiB? } to the API.
  • It prints the old → new disk size when the backend returns the previous size.
  • update --storage-size is hidden and errors with a pointer to upgrade-instance --volume-size; UpdateProjectBody no longer carries storageDiskSize.
  • The risk guard for upgrade-instance now covers disk resize (online, can't shrink) along with instance changes.
  • New unit tests cover request bodies, validation (including fractional sizes), and the update --storage-size error path.

Written for commit 0800a84. Summary will update on new commits.

View guided diff Turn on auto-fix

… update --storage-size

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bcf21a49-b251-49d0-824d-5b1b476ff8f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous test gap is fixed, and no new blocking issue was found.

Summary

Adds disk growth through projects upgrade-instance --volume-size and rejects the old projects update --storage-size flag.

  • Project upgrades can grow a disk with or without an instance change.
  • The old disk-size flag now points users to the upgrade command.

No new actionable issues were found in the changes since the previous review.

Reviews (2) · Last reviewed commit: "fix(projects): drop the projects-get pro..." · Reviewed by Greptile

Comment thread src/commands/projects/manage.test.ts Outdated
…nstance

projects get shows no disk size, so pointing users at it to watch a resize
sends them nowhere. Also cover fractional --volume-size and fold the risk
entry back into a single object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Fermionic-Lyu

Copy link
Copy Markdown
Member

Self-review round, 0800a84:

  • Removed the "run insforge projects get to check progress" hint. projects get shows no disk size, and a volume-only resize sets no operation_status, so that command cannot show progress.
  • Volume-size validation now has a min-8 case and a fractional case.
  • Deleted: the hand-built UpgradeInstanceBody (JSON.stringify drops undefined keys), the instanceType !== undefined guard on the instance line (the backend returns both instance fields as undefined on a volume-only call), the redundant mockClear, the "update never sends storageDiskSize" test (it cannot fail on any changed line), and a narrating comment.
  • The risk-registry entry is a single object again.

Not in this repo: insforge-skills/skills/insforge-cli/SKILL.md still documents projects update --storage-size and upgrade-instance <type> without --volume-size.

@agent-zhang-beihai agent-zhang-beihai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed by Wang Miao

This PR is the right fix. The old projects update --storage-size saved a number to the database and told the user the disk had grown when it hadn't. It is now refused with a pointer to projects upgrade-instance --volume-size, which sends volumeSizeGiB to the endpoint that actually resizes the volume. I checked the new request body against insforge-cloud-backend and it matches. The response is handled correctly in both cases: when only the volume changes, the backend leaves the instance-type fields out, and when both change, the output is right too. The one problem is that the insforge-cli agent skill wasn't updated alongside the command. That skill still teaches the flag this PR turns into an error, and it never mentions the only working way to grow a disk. The repo's own rules ask for the two to change together, so I'm requesting changes.

The insforge-cli agent skill still teaches update --storage-size and has no --volume-size

important · judgement · conventions · src/commands/projects/manage.ts:81

DEVELOPMENT.md §3 says: "When you add, rename, or change the behavior of a user-facing CLI command, you almost certainly need to update the insforge-cli skill … open a PR in InsForge/agent-skills to update it in the same change set." There is no such PR; the repo redirects to InsForge/insforge-skills, and nothing there mentions volume-size. The skill the CLI installs for every agent (npx skills add insforge/agent-skills in src/lib/skills.ts:91) still says:

  • skills/insforge-cli/SKILL.md:148: projects update [--name] [--domain] [--storage-size <gib>]. After this PR, an agent that follows this line gets a hard error.
  • skills/insforge-cli/SKILL.md:151: projects upgrade-instance <type>. The type shows as required, and --volume-size isn't documented at all.

The error message points agents to the right command, so they can recover. But the flag this PR exists to provide stays invisible to the agents that use this CLI most. The fix is a companion skills PR that:

  • removes --storage-size from line 148;
  • marks [type] as optional on line 151;
  • documents --volume-size <gib>, which can only grow the disk and resizes it online.
Evidence

read-the-code: DEVELOPMENT.md:64-84, src/lib/skills.ts:91, InsForge/insforge-skills skills/insforge-cli/SKILL.md:148,151. I searched the insforge-skills PR list for volume-size and found nothing, and gh api repos/InsForge/agent-skills resolves to InsForge/insforge-skills. For the backend contract I read insforge-cloud-backend src/routes/project.routes.ts:104-115, src/controllers/project.controller.ts:1529-1588 and src/services/maintain/project-manipulator.service.ts (upgradeInstanceType and its success return).

@agent-zhang-beihai agent-zhang-beihai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed by Yang Dong

This correctly moves disk growth to upgrade-instance --volume-size and rejects the obsolete update flag. I would not merge it yet because the CLI’s auto-installed agent skill still teaches the incompatible command syntax, so users will receive commands this release rejects.

The auto-installed skill still teaches the command this change rejects

important · defect · correctness · src/commands/projects/manage.ts:81

create and link install the InsForge CLI skill, whose project-lifecycle section still recommends projects update --storage-size and documents upgrade-instance as requiring an instance type. After this release, agents following that installed skill will issue a command rejected at line 85 and will not know the new volume-only form; update the corresponding skill entries alongside this change as required by the repository’s synchronization rule.

Evidence

read-the-code — src/commands/projects/manage.ts:75-99, src/commands/projects/manage.ts:277-304, src/lib/skills.ts:88-99, DEVELOPMENT.md:62-78, InsForge/insforge-skills:skills/insforge-cli/SKILL.md:124-129

@Fermionic-Lyu

Copy link
Copy Markdown
Member

Wang Miao and Yang Dong both flagged the skill sync. The companion change is InsForge/insforge-skills PR 157. It removes --storage-size from projects update and documents upgrade-instance [type] [--volume-size <gib>] as optional-type, grow-only and online. It must merge after a CLI release ships this PR. Merged before that release, it would teach a flag the published CLI rejects as an unknown option. No code change in this PR for this finding.

@jwfing jwfing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM - approved.

@Fermionic-Lyu
Fermionic-Lyu merged commit d44a05b into main Oct 24, 2026
4 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.

3 participants