Summary:
Non-id wl github push runs can skip locally-completed work items when the repo last-push timestamp or pre-filter logic causes them to be excluded, while --id pushes succeed. This creates a user-visible bug where closing a work item locally does not close the linked GitHub issue unless pushed with --id.
Investigation shows the pre-filter uses a last-push timestamp plus updatedAt comparisons and can miss items in race conditions. We need to serialize push runs and improve pre-filter rules.
Proposed fix:
- Acquire a per-repo file lock for the duration of
wl github push to prevent concurrent pushes from racing and advancing last-push mid-run.
- Improve the pre-filter: treat items with local changes (local updatedAt > githubIssueUpdatedAt) as candidates even if last-push suggests otherwise.
- Ensure
--id always resolves the item from the full DB (bypass pre-filter) but unify final candidate set as union(filteredItems, explicit id, locally modified items).
- Add a deterministic integration test that reproduces the race and verifies behavior with and without locking.
Acceptance criteria:
- Integration test reproduces the reported failure and passes after the fix.
wl github push (without --id) closes a GitHub issue for a work item that was marked completed locally with updatedAt > last-push timestamp.
- All tests and build pass locally before changes are merged.
Related: WL-0MM8SU2R20PTDQ9I (example used during repro).
Summary:
Non-id
wl github pushruns can skip locally-completed work items when the repo last-push timestamp or pre-filter logic causes them to be excluded, while--idpushes succeed. This creates a user-visible bug where closing a work item locally does not close the linked GitHub issue unless pushed with--id.Investigation shows the pre-filter uses a last-push timestamp plus updatedAt comparisons and can miss items in race conditions. We need to serialize push runs and improve pre-filter rules.
Proposed fix:
wl github pushto prevent concurrent pushes from racing and advancing last-push mid-run.--idalways resolves the item from the full DB (bypass pre-filter) but unify final candidate set as union(filteredItems, explicit id, locally modified items).Acceptance criteria:
wl github push(without --id) closes a GitHub issue for a work item that was marked completed locally with updatedAt > last-push timestamp.Related: WL-0MM8SU2R20PTDQ9I (example used during repro).