Skip to content

feat: give Pro healer context of merged Core PRs - #69

Open
Svitlana-Dykun wants to merge 2 commits into
mainfrom
cursor/healer-core-merged-prs-f2bb
Open

Svitlana-Dykun wants to merge 2 commits into
mainfrom
cursor/healer-core-merged-prs-f2bb

Conversation

@Svitlana-Dykun

@Svitlana-Dykun Svitlana-Dykun commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pro nightly/PR healer could see Pro infrastructure and Pro history, but not merged Core PRs — so it often treated intentional Core behaviour changes as races and "fixed" them with waits.

This change lives in the shared healer (elementor-editor-github-actions), not in Pro. Pro already calls these reusable workflows; no Pro-repo change is required beyond picking up this SHA/ref.

What changed

  • Collect recent Core merges near the evidence Core SHA (hint-ranked by test title / artifact dirs), with a recent-merge fallback when the SHA is unknown
  • Dispatch for Pro: attach elementor/elementor as a second read-only repo, pass evidence Core SHA/branch, inject Related Core merges into the prompt
  • Skill / Pro profile: before classifying race vs drift vs bug, explore Core merges — escalate (product bug) or hand off (baseline drift) when Core behaviour changed; never paper over with a wait; still only commit under tests/playwright/ in Pro
  • Hardening: validate Core SHA / owner-name / PR number before gh api path interpolation (addresses Wiz SAST medium); Prettier clean

Important limit

The healer still cannot change Core (or Pro product) behaviour. Netanel's "proper fix might be the behaviour" maps to product-bug escalation (or baseline-drift handoff), not to opening a Core fix PR.

Test plan

  • npm test in actions/playwright-test-healer (365 passing)
  • Prettier / eslint on touched files
  • After merge, next Pro nightly healer dispatch includes Evidence Core + Related Core merges in the agent prompt
  • Spot-check a Pro heal where a recent Core PR touches the failing module — agent should consider escalate/handoff before a wait
Open in Web Open in Cursor 

✨ PR Description

1. Problem & Context

The Pro healer often confuses intentional Core behavior changes with race conditions, leading to incorrect test "fixes" (adding waits) instead of escalating as product bugs. This PR provides the agent with context on recently merged Core PRs to improve classification accuracy.

2. What Changed (Where)

File Change
collect-related-core-prs.js New script to fetch and score Core PRs based on test hints.
dispatch-cloud-agent.js Integrates Core PR context and attaches Core repo as read-only.
.github/workflows/*.yml Passes HEAL_CORE_SHA and GH_TOKEN to the dispatch process.
profiles/pro.json Adds relatedCoreRepo and updated agent instructions.
SKILL.md Guidance on using Core merges to distinguish races from bugs.
tests/*.test.js Comprehensive unit tests for PR collection and prompt building.

3. How It Works

dispatch-cloud-agent.js calls collectRelatedCorePrs, which identifies related changes via two paths: walking the commit history starting at the evidence Core SHA or falling back to a 14-day search API query. PRs are scored by matching tokens from the test name and directory paths against PR titles and filenames. The resulting metadata and the Core repository URL are injected into the agent's prompt and environment to enable read-only exploration.

4. Risks

  • API Rate Limiting: Frequent calls to GitHub API for PR files/commits could throttle the agent; mitigated by MAX_PRS and MAX_FILES_PER_PR limits.
  • Prompt Noise: Too many unrelated PRs could distract the agent; mitigated by keyword-based scoring and truncation.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

When healing Pro, attach elementor/elementor as read-only context, list
recent Core merges near the evidence SHA, and teach the skill that an
intentional Core behaviour change is not a race — escalate or hand off
instead of papering over with a wait.

Co-authored-by: Svitlana-Dykun <Svitlana-Dykun@users.noreply.github.com>
@wiz-9a149474ff

wiz-9a149474ff Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Medium
Software Management Finding Software Management Findings -
Total 1 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

Unblocks Lint, and rejects non-SHA / malformed owner-name inputs before
they are interpolated into GitHub API paths (likely Wiz SAST medium).

Co-authored-by: Svitlana-Dykun <Svitlana-Dykun@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants