Skip to content

Exit cleanly when the update log is missing - #11217

Open
Bartok9 wants to merge 4 commits into
omacom:quattrofrom
Bartok9:fix/analyze-logs-missing-file
Open

Bartok9 wants to merge 4 commits into
omacom:quattrofrom
Bartok9:fix/analyze-logs-missing-file

Conversation

@Bartok9

@Bartok9 Bartok9 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Why

omarchy update analyze logs is a standalone command. When /tmp/omarchy-update.log does not exist (fresh boot, never updated this session), the script greps it anyway and dumps:

grep: /tmp/omarchy-update.log: No such file or directory

Fixes #11204.

What

Check the log exists first. Print No update log found; nothing to analyze. and exit 0. Existing initramfs checks are unchanged.

Proof

test/shell.d/update-analyze-logs-test.sh covers missing file, failed initramfs, and successful initramfs.

Does not ping maintainers.

@johnpippett johnpippett left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With no /tmp/omarchy-update.log, the command prints No update log found; nothing to analyze. and returns status 0. It writes no error output.

Source commit: cee7e3d4a61c445c6b53a852192737eb54c5db64.
Comparison base: 8ea51516390320f8e768808b230098e67bdaa82c.

Codex did the local tests on Arch Linux with Bash 5.3.15 and Bubblewrap 0.11.2.
The test environment had read-only source, temporary user files, and no access to the desktop or network.

The comparison included 22 command cases and five test-suite executions. Each command gave the expected output and exit status. All five executions of the test suites returned status 0.

The cases included direct execution and command-line interface (CLI) routing.
Other cases used missing or empty logs, unrelated output, and successful or failed initramfs messages.
The direct cases used the production path. The added upstream test uses a substitute path.
The update-status and update-sequence tests used substitute commands. An independent execution gave the same results.

With an unreadable log, the command prints Permission denied and returns status 0 on both revisions. This behavior is outside the missing-file correction.

These results do not include a system update, an initramfs operation, the full shell suite, or graphical acceptance tests.

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at cee7e3d, and the fix works: on an Omarchy worker with no /tmp/omarchy-update.log, quattro prints grep: /tmp/omarchy-update.log: No such file or directory, this branch prints No update log found; nothing to analyze. and exits 0, and taking the existence check back out brings the grep error back. omarchy update analyze logs through the router gives the same clean message, and with a log at the real path the initramfs warning still fires.

Tests ran on the worker, on this head and on it merged into current quattro (it merges cleanly): the new update-analyze-logs-test.sh passes, and fails against quattro's script as it should; update-sequence, update-lock and update-disk-space pass. ./test/cli fails one test, vscode generated theme references current theme file, which fails the same way on quattro without this change. The diff is proportionate: five lines for the fix plus a test.

This review is Claude Opus 5.5's alone. The second opinion, Codex Medium, did not run: today's review budget was already spent, so nobody has checked this reading of it.

Nothing is left for you. It waits on a second review and then on the maintainer.

@Bartok9

Bartok9 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the worker check. Leaving the branch as-is at cee7e3d — missing-log path exits 0, initramfs checks unchanged, and the unrelated vscode theme failure is on quattro too. Happy to wait on the second review.

@Bartok9
Bartok9 force-pushed the fix/analyze-logs-missing-file branch from cee7e3d to b0f7d01 Compare October 25, 2026 21:27
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge, with no outstanding findings.

Summary

The PR makes omarchy update analyze logs finish cleanly when its log is missing.

  • The update-log check prints a clear message when its log is missing.

No new actionable issues were found.

Reviews (2) · Last reviewed commit: "Describe how the analyze-logs test isola..." · Reviewed by Greptile

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 26, 2026
omarchybot and others added 2 commits November 1, 2026 03:59
The base branch's AGENTS.md asks for a full conditional rather than an exit in one branch that leaves the rest unreachable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment said the test points TMPDIR away, which it never does; the sed copy is what keeps the host's log out of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at b31ec29 after the rebase onto current quattro. Your two commits carry the same patches as cee7e3d, and the fix still works.

I pushed two small commits on top:

  • a101550 turns the early exit 0 into an if/elif. quattro's AGENTS.md asks for a full conditional rather than an exit in one branch that leaves the rest unreachable. The behaviour and the message are unchanged.
  • b31ec29 corrects the test comment Greptile flagged. It said the test points TMPDIR away, which it never does. The sed copy is what keeps the host's log out of the test.

Checked on an Omarchy worker, with this head merged into quattro d367a56. With no /tmp/omarchy-update.log, quattro prints the raw grep error. This head prints No update log found; nothing to analyze. and exits 0, and taking the guard back out brings the error back. omarchy update analyze logs through the router gives the clean message too. A banner-only log still warns, and a successful or unrelated log stays quiet. The new test passes, and its first case fails against quattro's script. update-sequence, update-lock, update-disk-space and ./test/cli all pass; the vscode theme failure from last time is gone. CI is green.

The second opinion came from Codex Medium and muse-wonder (pi, thinking high). Both reviewed this head and found nothing; they read my brief, so their agreement is not guaranteed independent. They were also asked to compare this with the other open pull requests that guard the missing log as part of other fixes: #13937, #14062, #15683 and #17012. Both said this one, the oldest, is the fix for #11204. Those four change the same lines of bin/omarchy-update-analyze-logs, and #14062 adds a test with the same file name, so whichever lands second will need a rebase. That is for the maintainer to sequence.

Nothing is left for you; it waits on the maintainer.

omarchybot added a commit to kvnloo/omarchy that referenced this pull request Nov 18, 2026
The private transcript fix does not need to silence a missing legacy log. Preserve the existing grep diagnostic instead of making an analysis that read nothing look clean; the separate missing-log diagnostic in omacom#11217 can still land on its own. Remove a redundant move in the analyzer fixture.

Co-Authored-By: GPT-6 High <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy update analyze logs fails with a raw grep error when the update log doesn't exist

4 participants