Repository navigation
fix(list): keep other rows' commit details when one worktree's HEAD object is missing - #4852
Merged
Merged
Conversation
…ssing `commit_details_many` fetched every row's details with one `git log --no-walk` call, which git refuses outright when any SHA names an absent object, so a single worktree whose HEAD points nowhere blanked the Commit, Age and Message of every row. The batch now passes `--ignore-missing`, and `wt list` warns once per requested SHA git didn't return, so only the broken row goes without details. A corrupt (present but unreadable) object still fails the batch and keeps the existing warning. Schema-2 JSON `head.short_sha` is now null when undetermined, matching `subject` and `committed_at`, instead of "". Closes #4851
worktrunk-bot
commented
Nov 20, 2026
worktrunk-bot
left a comment
Collaborator
Author
There was a problem hiding this comment.
code-coverage fails on integration_tests::help::test_help::case_07: the short_sha row in the head object table changed, and help_list_narrow_80.snap was refreshed for it, but help_list_long.snap still shows the old string type and description. The fix is to regenerate that snapshot, and I'm pushing it now.
This was referenced Nov 20, 2026
max-sixty
pushed a commit
that referenced
this pull request
Nov 25, 2026
…ed mirror fails in 5 min (#4917) Every remaining `apt-get` call in CI now runs under the same `sudo timeout -k 30 300` bound that `tend-setup` has used since #3855. That covers `test-setup`, `coverage.yaml`, `benchmarks.yaml` and the three `nightly.yaml` steps. A wedged Ubuntu mirror now fails the step after five minutes, where a rerun fixes it. Today it holds the job until GitHub kills it at the 360-minute cap, along with every tend session polling that PR. This PR's own `test (linux)` and `affected tests (linux)` jobs exercise the new `test-setup` step. #3855 left these sites unbounded because none had hung yet, and offered to widen the bound if one did. Three hangs have hit them since: | when | job | outcome | |---|---|---| | 2026-10-07 | six x86_64 Linux jobs across nightly and PR runs (#4396) | all killed at the 360-min cap | | 2026-11-20 | `test (linux)` on #4852 | stuck 4.5 h, until a review-runs sweep cancelled it; one triage and two review sessions polled it the whole time | | 2026-11-24 | `affected tests (linux, advisory)` on #4910 ([job](https://github.com/max-sixty/worktrunk/actions/runs/45343341632/attempts/1)) | killed at the cap; nightly [45340530290](https://github.com/max-sixty/worktrunk/actions/runs/45340530290) and review [45343341664](https://github.com/max-sixty/worktrunk/actions/runs/45343341664) each sat ~340 min in `poll-pr-checks` and ended unverified | Each log ends mid-`apt-get update` (after `Get:5 … noble-security InRelease` on 11-24), followed by hours of silence and then `##[error]The operation was canceled.` Observations are tracked in #4657. <details><summary>Why <code>timeout(1)</code> and not step-level <code>timeout-minutes</code></summary> `test-setup` is a composite action, and composite steps don't accept `timeout-minutes`. That's why `tend-setup` uses `timeout(1)`, and its comment explains the `-k 30` escalation. Using the same form at the workflow-file sites keeps a single pattern. A healthy update takes about 15 s, so five minutes is headroom. Both expiry codes (124 on SIGTERM, 137 after the kill) fail the step. </details> Co-authored-by: worktrunk-bot <[email protected]>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
git log --no-walkrefuses the whole call when one SHA names an absent object, so a single worktree whose HEAD points nowhere blanked Commit, Age and Message on everywt listrow.commit_details_manynow passes--ignore-missing, which keeps the single batch and simply omits the unreadable SHA;wt listthen warns once per requested SHA git didn't return (▲ Commit 1234…7890 not found in repository; its rows show no commit details), so the explanation stays and only the broken row loses its cells. With the issue's reproduction,mainandhealthynow showfirstwith their SHA and age.In schema-2 JSON,
head.short_shaisnullwhen it wasn't determined, likesubjectandcommitted_atbeside it, rather than"". The help table and generated schema/docs reflect that. Schema 1 is unchanged.Tests:
test_list_missing_head_object_keeps_other_rows_detailsreproduces the report in JSON: it fails on the old code with the batch-failure warning and passes now, with healthy rows carryingshort_sha/subjectand the broken rownull.commit_details_many_fails_loudly_on_unknown_shapinned the old all-or-nothing behavior; it is replaced bycommit_details_many_omits_missing_objects(a readable SHA, an absent one, and the null OID return just the readable commit).test_list_warns_when_head_commit_missing; its snapshot, andlist_shows_warning_on_git_error's, now show the healthy rows' details.--ignore-missingdoesn't skip a corrupt loose object — git still exits 128 — so the batch-failure warning remains reachable. A newtest_list_warns_when_commit_details_batch_failscovers it by corrupting a commit only a detached worktree reaches.The null-OID filter before the batch stays: git would accept the null OID under
--ignore-missing, but the filter is what keeps unborn branches out of the new missing-commit warning.Closes #4851 — automated triage