Skip to content

feat(update): implement approved update flow - #56

Open
Cesar-M-Diaz wants to merge 2 commits into
cesar/update-flowfrom
cesar/update-flow-implementation
Open

feat(update): implement approved update flow#56
Cesar-M-Diaz wants to merge 2 commits into
cesar/update-flowfrom
cesar/update-flow-implementation

Conversation

@Cesar-M-Diaz

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39e700f0-8dbe-4c23-b4dc-9a288b5f8745

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

Comment @coderabbitai help to get the list of available commands.

? [path.resolve(configured)]
: [path.resolve(cacheBase, configured), path.resolve(path.dirname(configPath), configured)]
const selected = candidates.find((candidate) => isSameOrContained(candidate, cacheBase) && existsSync(candidate))
if (selected) return selected

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

return undefined here exits the loop on the first configured key whose candidates fail the containment/exists check, so a missed path never falls through to installPath or cachePath. That makes a valid later key unreachable when an earlier key resolves outside the cache base. Should be continue (and return only after the loop) so subsequent keys are still tried.


const timer = setTimeout(() => {
timedOut = true
child.kill('SIGTERM')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Killing only the direct child with SIGTERM/SIGKILL leaves any subprocesses it spawned (npm/node trees) running in their own process group, so the command can be reported as timed out while a grandchild keeps working in the background. Spawning detached and killing the whole group (process.kill(-pid, ...)) would avoid the orphaned subprocess.

const packageRoots: string[] = []
const hasUserCanonical = matching.some((entry) => entry.scope === 'user' && entry.canonical)
const hasProjectCanonical = matching.some((entry) => entry.scope === 'project' && entry.canonical)
const invalid = matching.find((entry) => !entry.canonical)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A single non-canonical Pi entry in any scope makes invalid truthy and downgrades the whole installation to unsupported, so a perfectly healthy canonical user (or project) scope can never be updated just because the other scope pins a git/pinned source. Treating each scope independently would let the healthy scope update instead of failing all of them.

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