Skip to content

fix(pull-request): preserve verified closing intent during description rewrites - #813

Merged
efraespada merged 1 commit into
developfrom
bugfix/803-pr-description-replacement-drops-closing-reference-while-approval-requires-its-text
Oct 30, 2026
Merged

efraespada merged 1 commit into
developfrom
bugfix/803-pr-description-replacement-drops-closing-reference-while-approval-requires-its-text

Conversation

@efraespada

@efraespada efraespada commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description replacement could remove a valid Closes reference when the model returned a false closing flag. The resulting body no longer satisfied approval's textual linkage check even when the managed issue relationship remained intact.

The description workflow now preserves explicit closing intent in the portion it replaces, bound to the same repository, distinct PR/issue identity and exact branch issue. A shared Markdown/source policy also replaces approval's anywhere-in-body regex. Code, quotes, comments, escaped/entity spellings, contextual mentions, unrelated references, staged Refs, missing body and temporary linkage metadata cannot authorize closing evidence. Strict response validation, output limits, stale head/base/body guards, protected paths and all approval evidence gates remain intact.

Closes #803.

Added 62 regression cases across pure reference policy, strict rendering, description modes/retries and the actual provider-bound publication/configuration/approval path. Controlled integration tests preserve configuration and native-relation snapshots, exercise protected-path/scope decisions and submit no native approval. Private consumer history was read only; no consumer execution or mutation is claimed. The already-installed commonmark 0.31.2 is classified as a bundled runtime dependency without changing its resolved version. No new query, permission or public setting.

Validation: 265 focused tests and 295 related regression tests pass. The new domain policy, presentation and description workflow reach 100% all metrics; local added-code auditing finds no missing statement or branch. Type, lint, specification/catalog, documentation and workflow validation pass. The mandatory full hook passes 812 suites / 15,413 tests (35 existing skips), build and lint. The installed npm archive passes CLI, typed Bugbot API and isolated local-web-session smoke checks; committed bundles validate. Fresh exact-head CI/native/Codecov and zero-active-finding review results remain required before merge.

…pproval-requires-its-text: preserve verified closing intent across description rewrites
@docs-page

docs-page Bot commented Oct 30, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/vypdev/copilot~813

Documentation is deployed and generated using docs.page

@vypbot vypbot added size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete. 100% Progress: 100% state:ai-processing labels Oct 30, 2026
@vypbot
vypbot self-requested a review October 30, 2026 18:18
@vypbot vypbot added this to vypdev Oct 30, 2026
@vypbot vypbot moved this to In Progress in vypdev Oct 30, 2026
@vypbot
vypbot changed the base branch from develop to master October 30, 2026 18:18
@vypbot
vypbot changed the base branch from master to develop October 30, 2026 18:18
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.17%. Comparing base (5b3664f) to head (06dbc7b).
⚠️ Report is 105 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #813      +/-   ##
===========================================
+ Coverage    94.50%   95.17%   +0.67%     
===========================================
  Files         1035     1104      +69     
  Lines        33299    36340    +3041     
  Branches      9824    10850    +1026     
===========================================
+ Hits         31468    34586    +3118     
+ Misses         699      673      -26     
+ Partials      1132     1081      -51     
Files with missing lines Coverage Δ
...olicies/pull_request_description_content_policy.ts 100.00% <100.00%> (ø)
...equest/update_pull_request_description_workflow.ts 100.00% <100.00%> (ø)
...y/pull_request/pull_request_approval_repository.ts 90.52% <100.00%> (+0.52%) ⬆️
src/domain/pull_request_closing_reference.ts 100.00% <100.00%> (ø)

... and 157 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vypbot vypbot 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.

Current status: All findings originating in this review are resolved.
Last reconciled on 06dbc7b. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit 06dbc7b was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • medium: CRLF line endings misclassify managed closing references — src/domain/pull_request_closing_reference.ts:26

@vypbot

vypbot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Bugbot: review complete

Current status: No active findings on 06dbc7b.

Pull request · Verified commit · Workflow run

@vypbot

vypbot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Copilot approval · Human review needed

Status: A protected workflow, policy, or trust-boundary file changed.
Completed: 1/1 observed checks succeeded; Bugbot complete.
Action required: Ask a human reviewer to decide.
Impact: No new approval is confirmed for this revision.
See checks

Technical evidence

Revision: 06dbc7bac748; base: c4bdfdb42d29; reason: protected-path.

@efraespada

Copy link
Copy Markdown
Member Author

/copilot recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

100% Progress: 100% size: XXL Indicates an extremely large task or issue that requires significant time and effort to complete. state:verified

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🐛🧑‍💻 - PR description replacement drops closing reference while approval requires its text

3 participants