Skip to content

Fix #12665: omarchy-menu-file returns 0 files when ~/Pictures/~/Videos are symlinks (transco - #13018

Open
yashbijlani wants to merge 2 commits into
omacom:quattrofrom
yashbijlani:contrib/issue-12665-c0752e61
Open

yashbijlani wants to merge 2 commits into
omacom:quattrofrom
yashbijlani:contrib/issue-12665-c0752e61

Conversation

@yashbijlani

Copy link
Copy Markdown

Fixes #12665

Summary

Resolve issue: omarchy-menu-file returns 0 files when /Pictures//Videos are symlinks (transcode panel never opens)

Changes

  • bin/omarchy-menu-file
  • test/shell.d/menu-file-test.sh

Tests executed

  • bash test/shell.d/menu-file-test.sh → PASS (exit 0, 1.0s)

Only the change-relevant tests above were executed by the automated pipeline; the full repository suite was not run.

Environment

  • Ecosystem: python
  • Toolchain: python Python 3.12.14
  • Sandbox resource profile: small

Known limitations

  • None identified by the automated pipeline; maintainer review requested.

This PR was created with AI assistance (autonomous-contributor + OpenCode). Human review requested.

yashbijlani added a commit to yashbijlani/autonomous-contributor that referenced this pull request Sep 23, 2026
Extend the existing LangGraph workflow (no new orchestration, no second state
machine) with a deterministic PR/CI lifecycle on top of the verified push.

PR creation
- Publish flow: gate -> commit -> push -> verify remote ref -> create/reuse PR.
  A PR is never opened unless git ls-remote confirms the pushed branch at the
  expected commit.
- Dynamic head/base resolution: base is always the issue repository + default
  branch; fork pushes use <owner>:<branch> (owner from the configured push
  target / authenticated login, never hardcoded). Existing PRs are reused;
  repository PR templates are used and never overwritten.
- Lives behind the existing GitHub client; sandbox still never sees the token.

CI monitoring and classification
- github/ci.py normalizes statuses + check-runs into a stable shape, polls with
  bounded interval/wait/settle, and classifies failures deterministically:
  CODE/TEST/BUILD/UNKNOWN are repairable; DEPENDENCY/ENVIRONMENT are terminal
  environment states; RESOURCE/NETWORK/PERMISSION/CI_INFRASTRUCTURE/FLAKY never
  reach the coding agent (bounded, code-free retry for flaky/infra).
- A commit with zero checks is settled and recorded as CI_UNKNOWN, not hung.

CI repair
- agents/ci_repair.py + build_ci_repair_prompt: bounded repair in the same
  repository/sandbox, narrow local reproduction first, then the existing
  TEST -> REVIEW -> push-gate -> PUSH -> update-PR path. Repair history records
  parent/new SHA, reason, tests and review. The orchestrator owns the bound.

Lifecycle state, resume and observability
- Explicit JobStatus states (PR_*, CI_*, MERGE_READY) and persisted mode flags;
  resume_entry() maps persisted state to the right graph entry so an interrupted
  run continues without re-implementing or opening a second PR. The push gate
  now gates an already-committed branch on resume.
- New canonical events; observability/metrics.py + 'contributor metrics' for
  PR/CI rates. Never auto-merges: stops at MERGE_READY.

Tests: 317 passing, including a mocked end-to-end issue -> PR -> CI fail ->
repair -> CI pass -> MERGE_READY path, resume/reuse, classification, polling and
security-boundary coverage. Validated by a real PR (omacom/omarchy#13018).
@jandrusk

Copy link
Copy Markdown

Thanks for tackling the symlink media folders case (#12665).

Blocking: the comment says the goal is descending into starting-point symlinks (~/Videos → /mnt/...). That is find -H, not find -L.

  • -H follows symlinks given on the command line, then treats the rest normally.
  • -L follows every symlink under the tree, so a nested link inside Pictures/Videos can escape the library (still capped at 500 rows, but wrong search space / surprise paths).

The current tests only cover starting-point symlinks, which -H still passes.

Suggested change:

# Follow command-line symlinks only (~/Pictures -> /mnt/...), not nested links.
set +o pipefail
find -H "${find_args[@]}" 2>/dev/null | sort -rn | cut -f2- | head -n 500 |
  omarchy-cmd-select "$label" -- --width 800 --maxheight 500 "$@" || status=$?
set -o pipefail
exit "${status:-0}"

Also update the comment (-H, not -L) and add a test that a nested symlink under Pictures is not followed.

Happy to re-review once that lands.

@yashbijlani

Copy link
Copy Markdown
Author

Thanks for the detailed review! Fixed this in the latest commit.

Switched find -L to find -H so starting-point symlinks are followed without following nested symlinks.
Updated the comment to reflect the behavior.
Added a regression test covering nested symlinks and verified that it fails with -L and passes with -H.

The existing starting-point symlink behavior and 500-item cap are preserved. Happy to have you re-review it.

@jandrusk

Copy link
Copy Markdown

Re-reviewed. Switching to find -H along with the nested-symlink regression test addresses my earlier concern. LGTM, thanks!

@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for taking on #12665. Three open pull requests fix it: #12669 (opened 2026-09-20), this one (2026-09-23) and #13197 (2026-09-25). All three use find -H to fix the symlinked ~/Pictures / ~/Videos case, and I found nothing wrong with that part of this one, its exit-status handling, or its tests.

When fixes are this close, the oldest one keeps the credit, and a newer one wins only if it is clearly better. #12669 is the oldest, and it also covers more of the issue. head -n 500 here limits the number of rows but not their size in bytes. omarchy-menu-select passes every option to perl as a single argument, so 500 paths of about 270 bytes still go over the 128 KiB argument limit and the panel does not open. #12669 limits the total bytes as well and checks the encoded size in omarchy-menu-select. This pull request has nothing that #12669 is missing beyond test coverage, so nothing from it needs folding in.

This was a source review only: I compared the three diffs against quattro and ran nothing on a worker, because a fix that is not going to be merged does not need verifying. I (Claude Opus 5.5) did the review, and Codex Medium reviewed the three diffs separately. It also chose #12669, for the same byte-limit reason. Its independence is not guaranteed.

Choosing which fix lands is up to the maintainer, so this pull request is waiting on them. #13197 already has the ready label for the same bug.

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-menu-file returns 0 files when ~/Pictures/~/Videos are symlinks (transcode panel never opens)

3 participants