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(backups): detect empty pm-stack day dirs (#3869) by dezren39 · Pull Request #7866 · 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 6 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: ❌ FailedThis 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds a new watchdog validation to detect “empty” fresh pm-stack day directories (directory exists but expected pm-stack-<date>.tar.zst archive is missing), and extends the test suite to cover the new scenarios.
Changes:
HOME and validate absent-root, empty-fresh-day, archive-present, and stale-only day-directory scenarios.| File | Description |
|---|---|
| nixos/home/laptop-backups-watchdog.sh | Implements the new pm-stack day-dir selection and required archive check. |
| nixos/home/laptop-backups-watchdog.test.sh | Adds scratch HOME usage and new test cases for pm-stack root/day/archive behavior. |
Review effort: Lite
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| TODAY="$(date +%F)" | ||
| PM_STACK_ROOT="$HOME_DIR/backups/pm-stack" | ||
| YESTERDAY="$(date -d '1 day ago' +%F)" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Accepted and fixed in the follow-up commit on this branch: the test now captures one TEST_EPOCH at the pm-stack scenario start and derives TODAY, YESTERDAY, and STALE_DAY (and the stale dir mtime) from it, so a midnight rollover mid-run cannot make the scenarios disagree about the current day. Full watchdog test suite passes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| rmdir "$PM_STACK_ROOT/$TODAY" | ||
| rm -f "$PM_STACK_ROOT/$YESTERDAY/pm-stack-$YESTERDAY.tar.zst" | ||
| rmdir "$PM_STACK_ROOT/$YESTERDAY" | ||
| STALE_DAY="$(date -d '48 hours ago' +%F)" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Accepted and fixed in the follow-up commit on this branch: the test now captures one TEST_EPOCH at the pm-stack scenario start and derives TODAY, YESTERDAY, and STALE_DAY (and the stale dir mtime) from it, so a midnight rollover mid-run cannot make the scenarios disagree about the current day. Full watchdog test suite passes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| PM_STACK_ROOT="$HOME/backups/pm-stack" | ||
| if [ -d "$PM_STACK_ROOT" ]; then | ||
| newest_pm_stack_day="" | ||
| for day_dir in "$PM_STACK_ROOT"/*/; do | ||
| [ -d "$day_dir" ] || continue |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Accepted and fixed in the follow-up commit on this branch: the pm-stack day-dir loop now runs under shopt -s nullglob (restored with shopt -u after the loop), so an unmatched glob expands to nothing instead of relying on the [ -d ] guard to filter the literal pattern. Full watchdog test suite passes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ne epoch Addresses Copilot review on PR #7866: the day-dir glob now runs under nullglob instead of relying on the [ -d ] guard to catch the literal unmatched pattern, and the watchdog tests derive TODAY/YESTERDAY/ STALE_DAY from a single captured TEST_EPOCH so a midnight rollover mid-run cannot make the scenarios disagree about the current day.
e96cfcf to
f4c7e2a
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
agent-note:v1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
AUDIT-7 Lane 4 review: the PR adds the empty-day watchdog check and test, but does not implement the source issue's literal target-resolution requirement. #3869's completion note says hardcoded names remain and the failure path does not document an actual container list; Lane 4 marked |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
AUDIT-7 Lane 4 review: the empty-day watchdog alarm and drill landed, but #3869's written target-resolution criterion (label/project resolution or a failure log with the actual container list) is not evidenced by this PR or its completion note. Marked |
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.
There was an error while loading. Please reload this page.