Skip to content

fix: automation staleness - #3241

Open
mateolafalce wants to merge 2 commits into
modelcontextprotocol:mainfrom
mateolafalce:fix/sep-automation-staleness-summary
Open

fix: automation staleness#3241
mateolafalce wants to merge 2 commits into
modelcontextprotocol:mainfrom
mateolafalce:fix/sep-automation-staleness-summary

Conversation

@mateolafalce

Copy link
Copy Markdown

Fix SEP automation summaries by preserving the original staleness analysis after an action is executed and awaiting summary updates before processing completes.

Motivation and Context

Staleness actions can modify an SEP—for example, by adding a bot comment—which changes its latest activity. Re-analyzing the SEP afterward could therefore produce different staleness data and omit or misrepresent successful actions in the final summary.

This change reuses the analysis that triggered the action, ensuring summaries retain the original activity age, ping target, and close decision. It also waits for asynchronous summary updates before returning.

How Has This Been Tested?

Ran the complete SEP automation unit test suite:

npm test

All 7 test files and 41 tests passed.

Added regression tests covering:

  • Successful stale-author pings appearing in the returned summary.
  • Dormant summaries preserving the original close decision.
  • Staleness analysis being performed only once.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

The processor now carries the original StaleAnalysis alongside the action result instead of invoking the analyzer again after the action. This also avoids an unnecessary second GitHub comments lookup.

mateolafalce and others added 2 commits August 14, 2026 09:49
Reuse the original staleness analysis when recording successful actions and wait for summary updates before returning.

Co-authored-by: Michael <265398295+lafalce-assistant@users.noreply.github.com>
@mateolafalce
mateolafalce requested a review from a team as a code owner August 14, 2026 14:45
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