Repository navigation
fix(onboarding): show the native boot pool failure reason (U8-2360) #2158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Eli Bosley (elibosley)
wants to merge
4
commits into
main
Choose a base branch
from
codex/u8-2360-onboarding-storage-reasons
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+146
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b46f7f3
chore(review): forecast native onboarding command reasons (U8-2360)
elibosley 60af65f
fix(onboarding): explain native boot pool refusals (U8-2360)
elibosley cee9cad
fix(onboarding): distinguish interrupted boot transfer from preflight…
elibosley 8a2649c
chore(review): record final synchronous storage review (U8-2360)
elibosley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
.limetech/ai-review-markers/codex-u8-2360-onboarding-storage-reasons-8f54c2fa86a1.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "disposition": "PATCH", | ||
| "forecast_commit": "b46f7f3d59cb56c3fa0c69297b43842f3df278b7", | ||
| "reviewed_sha": "cee9cad88b7be35ebc330506254d1c0016fda56a", | ||
| "schema": "limetech.ai-review-marker.v2", | ||
| "stage": "final", | ||
| "unresolved_proportionality_findings": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| /** Only a known native result for the command submitted may enter onboarding output. */ | ||
| export class StorageCommandError extends Error { | ||
| static fromReply( | ||
| commands: Record<string, unknown>, | ||
| result: unknown, | ||
| slot: unknown | ||
| ): StorageCommandError | undefined { | ||
| const pool = commands.poolName; | ||
| const target = | ||
| typeof pool === 'string' && /^[a-z][a-z0-9_-]{0,39}$/.test(pool) | ||
| ? `pool "${pool}"` | ||
| : 'the selected pool'; | ||
|
|
||
| if (commands.cmdCreatePool === 'apply') { | ||
| switch (result) { | ||
| case 'create-pool-storage-active': | ||
| return new StorageCommandError(`Stop storage before creating ${target}.`); | ||
| case 'create-pool-invalid': | ||
| return new StorageCommandError(`Check the name and slot count for ${target}.`); | ||
| case 'create-pool-failed': | ||
| return new StorageCommandError( | ||
| `Could not create ${target}. Check the boot device and pool configuration.` | ||
| ); | ||
| case 'create-pool-refresh-failed': | ||
| return new StorageCommandError( | ||
| `Storage could not refresh after creating ${target}. Reload Storage and check the pool before retrying.` | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| if (commands.cmdMakeBootable === 'apply') { | ||
| const device = | ||
| typeof slot === 'string' && /^(0|[1-9]\d{0,3})$/.test(slot) && Number(slot) <= 4094 | ||
| ? `${target} (storage slot ${slot})` | ||
| : target; | ||
| switch (result) { | ||
| case 'make-bootable-storage-active': | ||
| return new StorageCommandError(`Stop storage before making ${device} bootable.`); | ||
| case 'make-bootable-invalid': | ||
| return new StorageCommandError( | ||
| `Check the boot pool and reserved size for ${device}.` | ||
| ); | ||
| case 'make-bootable-ineligible': | ||
| return new StorageCommandError( | ||
| `Check boot eligibility and the assigned drives for ${device}.` | ||
| ); | ||
| case 'make-bootable-size': | ||
| return new StorageCommandError( | ||
| `Check the reserved boot size and available drive space for ${device}.` | ||
| ); | ||
| case 'make-bootable-target-missing': | ||
| return new StorageCommandError( | ||
| `The selected drive for ${device} disappeared before boot setup began. Check its connection and assignment.` | ||
| ); | ||
| case 'make-bootable-partial': | ||
| return new StorageCommandError( | ||
| `Boot setup may have changed a drive in ${device}. Check the drive partitions, boot pool and pending transfer before retrying.` | ||
| ); | ||
| case 'make-bootable-transfer-pending': | ||
| return new StorageCommandError( | ||
| `A boot transfer is already pending. Check the existing boot setup before changing ${device}.` | ||
| ); | ||
| case 'make-bootable-refresh-failed': | ||
| return new StorageCommandError( | ||
| `Storage could not refresh after boot setup for ${device}. Reload Storage and check the boot configuration before retrying.` | ||
| ); | ||
| case 'make-bootable-failed': | ||
| return new StorageCommandError( | ||
| `Boot setup did not finish for ${device}. Check the drives and boot configuration before retrying.` | ||
| ); | ||
| } | ||
| } | ||
| return undefined; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When onboarding uses a valid name containing
.or~(for example,fast.pool), this allowlist rejects it even thoughCreateInternalBootPoolInputexplicitly permits those characters atonboarding.model.ts:295and the UI does likewise. Consequently every recognized native failure replaces the actual reviewed pool name with the generic “selected pool”; align this validation with the onboarding pool-name rules while retaining the length bound.Useful? React with 👍 / 👎.