Skip to content

Sharpen the develop-staleness check to a direction-aware content diff#236

Merged
ptr727 merged 1 commit into
developfrom
docs/staleness-check-phrasing
Jul 3, 2026
Merged

Sharpen the develop-staleness check to a direction-aware content diff#236
ptr727 merged 1 commit into
developfrom
docs/staleness-check-phrasing

Conversation

@ptr727

@ptr727 ptr727 commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Refines the develop-staleness guidance added in #233. Driving that promotion (#235) exposed that the git log origin/develop..origin/main form is noisy in this repo's bots-target-both model.

Why

Running git log origin/develop..origin/main on a clean, current develop returned ~50 commits - all routine promotion merges and main-direct dependabot/codegen commits whose content develop already carries via its own parallel bot PRs (even --no-merges --cherry-pick --right-only still lists them, since parallel bumps have different patch-ids). It cannot cheaply distinguish "develop is missing a main-only fix" from that expected topology noise.

What changed

Use a content diff that reflects final tree state, read directionally:

  • git diff origin/main origin/develop - hunks it would remove are content on main that develop lacks (real staleness); hunks it adds are develop's normal unpromoted work.

This also resolves the original Copilot objection to a plain git diff (that non-empty != stale): the fix is to read the diff's direction, not its emptiness.

Verified on #235: for a clean develop, this diff was exactly the doc files develop adds - no main-only content - which is the correct "not stale" reading.

Issue-closing keywords omitted (targets develop); no issue to close.

Copilot AI review requested due to automatic review settings July 3, 2026 17:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refines AGENTS.md guidance for detecting when develop is stale relative to main, switching from a commit-history-based check to a direction-aware content diff that better matches this repo’s “bots target both branches” topology.

Changes:

  • Replace the git log origin/develop..origin/main staleness check with a directional git diff origin/main origin/develop content check.
  • Document how to interpret the diff output so “main-only” content stands out from normal “develop-ahead” work.

Comment thread AGENTS.md Outdated
Replace the `git log origin/develop..origin/main` staleness check with a
direction-aware `git diff origin/main origin/develop`. In the bots-target-both
model a commit-log check is noisy: it lists routine promotion merges and
main-direct bot commits whose content develop already carries via its own
parallel bot PRs. A content diff reflects final tree state instead - hunks it
would remove are main-only content develop lacks (real staleness); hunks it adds
are develop's normal unpromoted work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ptr727 ptr727 force-pushed the docs/staleness-check-phrasing branch from 2301e69 to baa40e9 Compare July 3, 2026 17:17
@ptr727 ptr727 requested a review from Copilot July 3, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@ptr727 ptr727 merged commit acc4760 into develop Jul 3, 2026
11 checks passed
@ptr727 ptr727 deleted the docs/staleness-check-phrasing branch July 3, 2026 17:20
ptr727 added a commit that referenced this pull request Jul 3, 2026
Follow-up to #236, addressing a Copilot point raised on promotion PR
#237: describing `-` lines as "real staleness" and `+` lines as "just"
unpromoted work overstates what `git diff origin/main origin/develop`
proves.

## Why
A hunk where `develop` merely *modified* the same code shows both a `-`
(main's old form) and a `+` (develop's new form) - that is normal
unpromoted work, not staleness. Calling every `-` line "real staleness"
is inaccurate.

## What changed
Reframe `-` lines as **main-only differences to inspect** for staleness,
and note that a `-`/`+` pair in one hunk is usually just `develop`'s own
modification; a `-` line with **no** corresponding `develop`-side
replacement is the stronger staleness signal.

Targets `develop`; promotion PR #237 will carry it to `main`.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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