You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] A reports write that finds its content already committed leaves an unpushed commit behind #1277
updateReports runs a write callback under the reports lock, commits the files it names, and pushes. A callback that returns null makes the update answer already-present without pushing. When an earlier attempt committed the same content and its push failed, that commit stays in the local reports checkout. It reaches origin only with the next write that names files.
Several writers return null when their content is already in the checkout, so a retry after a failed push reports success and leaves the commit unpushed:
bootstrap.ts (~302): member registration returns null when members/<user>.yaml exists.
init.ts (~1455, ~2017): the same check during init.
hook-handlers.ts (~618, ~828): votes sync returns null when nothing new is staged.
team-push.ts (~1115): the auto-report write returns null when it wrote no files, so its pushIfUnchanged: true option never takes effect.
session save --push had the same problem. The #1084 work fixed it by always naming the summary file, and made an empty files: [] write go through the unpushed-commit check in commitAndPushAt.
Expected
A writer whose content is already committed but not on origin pushes that commit, and reports published once origin has it.
Suggested fix
Return { files: [], message } instead of null from those callbacks when the content is already there. An empty write now pushes a commit an earlier attempt left. Keep null for callbacks that only read under the lock (session pull, the run snapshot reads), which must never push.
Activity