GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: log evaluated commit in run-switch and warn when HEAD moves during build (#3817) by dezren39 · Pull Request #7362 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 minutes. View limit details
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d81a94e9f
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # Capture the evaluated source state before the build starts. The flake | ||
| # is evaluated from src_dir at invocation time; that commit — not | ||
| # whatever HEAD is when the long build finishes — is what lands. | ||
| eval_commit=$(git -C "${src_dir}" rev-parse HEAD 2>/dev/null || printf 'unknown') |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Bind the recorded commit to the source actually evaluated
If HEAD advances after this capture but before Nix reads the source—for example, while sudo waits for a password—the rebuild can evaluate the newer tree, but EVALUATED_COMMIT and the final warning incorrectly assert that the older commit was activated. Line 76 still passes the mutable flake path; the Nix manual specifies that without ref or rev, “files are fetched directly from the local path”. Snapshot/pin the source used by the rebuild, or obtain its actual evaluated revision rather than treating this pre-build observation as authoritative.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| lock_file=${RUN_SWITCH_LOCK_FILE:-"${home}/.run-switch.lock"} | ||
| log_dir=${RUN_SWITCH_LOG_DIR:-"${home}"} | ||
| flake=${RUN_SWITCH_FLAKE:-"${home}/code#amd"} | ||
| src_dir=${RUN_SWITCH_SRC:-"${home}/code"} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Monitor the repository selected by the flake override
When an existing caller sets RUN_SWITCH_FLAKE to another checkout without also setting the newly introduced RUN_SWITCH_SRC, the rebuild uses that checkout but the metadata and HEAD-movement guard inspect ${HOME}/code. Consequently, a successful switch can report an unrelated commit and miss changes to the actual source. The Nix manual defines direct path references as selecting the flake at that path. Derive the monitored source from the selected flake, or validate that the two settings agree instead of silently defaulting to a different repository.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
run-switch.sh: overlapping switches snapshot stale trees and land surprise generations (gen 524, 2026-11-01, explained)
There was an error while loading. Please reload this page.