Skip to content

fix(rules): document --since-on-squash-merge failure in refresh-world-model rule#3896

Merged
AceHack merged 1 commit into
mainfrom
otto-cli-rule-since-squash-merge-2026-05-16-1517z
May 16, 2026
Merged

fix(rules): document --since-on-squash-merge failure in refresh-world-model rule#3896
AceHack merged 1 commit into
mainfrom
otto-cli-rule-since-squash-merge-2026-05-16-1517z

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 16, 2026

Substantive rule extension capturing today's 15:14Z empirical observation: `git log origin/main --since="N min ago"` is the wrong query for recent merges.

Empirical anchor

PR #3894 merged at 15:11Z. At 15:14Z:

Root cause

Squash-merge collapses N commits authored hours/days ago into one commit. The squashed commit's committer-date matches the merge time, but its author-date (the field `--since` filters on) is preserved from the original authoring time. PRs squashed from older branches drop out of recent `--since` windows even though they just landed on main.

Mitigation

Prefer `git log origin/main | head -N` for recent-merge queries. The `head` form sorts by topological / log order which IS merge-recency-correct. If a date filter is required, use `--committer-date-order` paired with explicit committer-date filtering.

Composes with

The local-ref-staleness pattern (`unable to update local ref` wedge) documented elsewhere in the rule. Both fail in the same direction — make recent activity invisible to naive queries. Verification: `git ls-remote origin main` returns ground-truth SHA regardless of local ref state.

…-model rule

Empirical anchor 2026-05-16T15:14Z: PR #3894 merged at 15:11Z
was invisible to `git log origin/main --since="20 min ago"`
because squash-merge preserves the original commit-date
(author-date), not merge-date. `--since` filters on author-
date and drops PRs squashed from older branches.

Mitigation: prefer `git log origin/main | head -N` over
`--since="X min ago"` for recent-merge queries.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 16, 2026 15:24
@AceHack AceHack enabled auto-merge (squash) May 16, 2026 15:24
@AceHack AceHack merged commit ed462b3 into main May 16, 2026
27 checks passed
@AceHack AceHack deleted the otto-cli-rule-since-squash-merge-2026-05-16-1517z branch May 16, 2026 15:26
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 39dd02f394

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


### `git log --since="N min ago"` is the wrong query for recent main merges

Empirical anchor 2026-05-16T15:14Z: a squash-merged PR (e.g., #3894 merged at 15:11Z) was invisible to `git log origin/main --since="20 min ago"` even though `git log origin/main | head -3` correctly showed it at the top. Root cause: `--since` filters on **commit date** (preserved from original authoring), not **merge date**. A squash-merge collapses N commits authored hours/days ago into one commit whose `committer-date` may match the merge but whose `author-date` (used by `--since`) is the original authoring time. PRs squashed from older branches drop out of "recent" `--since` windows even though they just landed.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct incorrect git log --since semantics

This section documents a false root cause: it says --since uses author date, but git rev-list/git log commit limiting is based on commit timestamp, and --author-date-order vs --date-order only changes ordering, not which commits pass the filter. In practice, a commit with an old author date but recent committer date is still returned by --since, so this guidance can mislead triage by blaming squash merges instead of the actual stale-ref/fetch issue and cause operators to distrust valid date-window queries.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the refresh-world-model-poll-pr-gate rule to document an observed failure mode where git log origin/main --since="N min ago" can miss recently squash-merged PRs, and to recommend safer “recent activity” queries during world-model refresh.

Changes:

  • Adds a new rule section explaining why git log --since=... can hide recent squash merges.
  • Recommends using git log origin/main | head -N (and related verification cues) for recent-merge checks.
Comments suppressed due to low confidence (2)

.claude/rules/refresh-world-model-poll-pr-gate.md:43

  • P1: The explanation mixes terms in a way that’s internally inconsistent: it says --since filters on “commit date” and then later says --since uses author-date. In Git, “commit date” is often interpreted as the committer timestamp (CommitDate), so this wording can mislead readers. Suggest rewording to consistently use “author date” vs “committer date” (and optionally point to git log --pretty=fuller fields) to make the claim unambiguous.
Empirical anchor 2026-05-16T15:14Z: a squash-merged PR (e.g., #3894 merged at 15:11Z) was invisible to `git log origin/main --since="20 min ago"` even though `git log origin/main | head -3` correctly showed it at the top. Root cause: `--since` filters on **commit date** (preserved from original authoring), not **merge date**. A squash-merge collapses N commits authored hours/days ago into one commit whose `committer-date` may match the merge but whose `author-date` (used by `--since`) is the original authoring time. PRs squashed from older branches drop out of "recent" `--since` windows even though they just landed.

.claude/rules/refresh-world-model-poll-pr-gate.md:44

  • P1: The mitigation suggests using --committer-date-order “paired with explicit author/committer date selection,” but --committer-date-order only affects ordering, not which timestamp --since/--until filters on. Please clarify what exact approach should be used when a time window is required (e.g., whether to filter by committer date explicitly and how), or drop this sentence to avoid prescribing a non-working/unclear command pattern.
**Mitigation**: prefer `git log origin/main | head -N` over `git log origin/main --since="N min ago"` when checking recent merges. The `head` form sorts by topological / log order which IS merge-recency-correct. If a date filter is required, use `--committer-date-order` paired with explicit author/committer date selection.

Comment on lines +40 to +44
### `git log --since="N min ago"` is the wrong query for recent main merges

Empirical anchor 2026-05-16T15:14Z: a squash-merged PR (e.g., #3894 merged at 15:11Z) was invisible to `git log origin/main --since="20 min ago"` even though `git log origin/main | head -3` correctly showed it at the top. Root cause: `--since` filters on **commit date** (preserved from original authoring), not **merge date**. A squash-merge collapses N commits authored hours/days ago into one commit whose `committer-date` may match the merge but whose `author-date` (used by `--since`) is the original authoring time. PRs squashed from older branches drop out of "recent" `--since` windows even though they just landed.

**Mitigation**: prefer `git log origin/main | head -N` over `git log origin/main --since="N min ago"` when checking recent merges. The `head` form sorts by topological / log order which IS merge-recency-correct. If a date filter is required, use `--committer-date-order` paired with explicit author/committer date selection.
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.

2 participants