Skip to content

feat(sessions): fill the place of a session row on first read - #1852

Merged
igorjs merged 1 commit into
mainfrom
feat/issue-536-s6c-place-backfill
Nov 15, 2026
Merged

igorjs merged 1 commit into
mainfrom
feat/issue-536-s6c-place-backfill

Conversation

@igorjs

@igorjs igorjs commented Nov 15, 2026

Copy link
Copy Markdown
Member

Summary

S6c of #536 (rest of WU-7): the write-back of gather also stores cwd, repo, worktree and convention for a row whose cwd is null, when the newest usage event has an existing place. The PR columns and the place columns go in one UPDATE. The place fills only while the stored cwd is empty, so a place that a hook wrote during the gh call stays. It also runs on a None lookup and inside the 300 second cache window.

Notes for reviewers

  • Plan deviation: the plan row "no place and Merged: one lookup, pr_kind = merged" cannot hold. A lookup needs a directory, and the plan says a missing place skips the lookup. The test expects zero lookups and a null pr_kind.
  • A row that gets a cwd now takes part in crash marking of its directory. That is the design intent of the backfill.
  • A hook-made minimal row whose cwd the backfill filled before the one-shot import runs keeps the hook started_at. Narrow, left as is.
  • 5 lens reviews; fixed an overwrite race, git isolation in the fixture, an independent repo assertion and a gone-place row.

Refs #536

When a row has no cwd and the newest usage event has an existing place, the
same UPDATE that stores the looked-up pull request also stores cwd, repo,
worktree and convention. The place columns fill only while the stored cwd is
empty, so a place that a hook wrote in the meantime stays.

Refs #536

Signed-off-by: igorjs <2278164+igorjs@users.noreply.github.com>
@igorjs
igorjs enabled auto-merge November 15, 2026 09:07
@igorjs
igorjs added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 246f0ea Nov 15, 2026
30 checks passed
@igorjs
igorjs deleted the feat/issue-536-s6c-place-backfill branch November 15, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant