Files
claude-desktop-debian/.github
Aaddrick 28882ea475 feat(triage): Phase 4 sub-PRs 3+4 — regression_of + edit-during-triage (#472)
* feat(triage): Phase 4 sub-PRs 3+4 — regression_of + edit-during-triage

Bundles the two remaining Phase 4 sub-phases. Both are small workflow
additions that build on infrastructure already in place: the Phase 1
input snapshot (updated_at captured at Stage 1) and the Phase 1
classify.json's regression_of field.

regression_of end-to-end (Stage 3b + Stage 4 + Stage 6)
- New step `Validate regression_of` between drift-check and fetch.
  Runs only when classify set regression_of to non-null.
- Validation: PR exists in this repo; PR is merged; PR's mergedAt
  precedes issue's createdAt. Any failure clears to null with a
  logged note and the issue proceeds as a regular bug.
- Valid regression → `gh pr diff` fetched (capped at 4000 lines) and
  inlined into the investigate prompt as primary context. Tells the
  investigator to start the search in the PR's changed files.
- Same diff inlined into the review prompt, wrapped as pipeline_data,
  so the reviewer can check whether findings land inside the named
  PR's changed files.
- Handles the spec's "cleared to null with logged note" requirement
  for upstream Electron PRs that aren't in this repo.

Edit-during-triage detection (Stage 8 post-processor)
- New step between 8a/8c post-processors and Apply labels. Runs for
  every variant.
- Re-fetches issue.updated_at live and compares against the Stage 1
  input_snapshot.updated_at.
- On mismatch: appends a `⚠ This issue was edited after triage
  began. ...` disclaimer to the rendered comment, pointing at
  input_snapshot.json as the audit trail.
- Catches inject-then-delete attacks (inject instructions, wait for
  bot, delete before a human reads) and honest mid-triage edits
  that would make the comment stale.

Step summary gains `regression_of validated` row.

With this PR, Phase 4 is complete: 8c enhancement-design, suspicious-
input tells, regression_of, edit-during-triage detection are all
live. All terminal paths (bug / enhancement / question / duplicate /
needs-info / not-actionable / suspicious) flow through the pipeline
end-to-end per spec.

Co-Authored-By: Claude <claude@anthropic.com>

* docs(triage): correct stale sort -u reference in date-compare comment

The comment above the ISO 8601 date check referenced `sort -u`,
which isn't used in the code. Rewrite to describe what the code
actually does: `[[ > ]]` on the raw timestamp strings, which is
valid because ISO 8601 sorts lexicographically as chronologically.
Also re-orient the prose around the invalid case (mergedAt AFTER
createdAt), matching the branch that the following `if` takes.

Co-Authored-By: Claude <claude@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
2026-04-20 23:41:48 -04:00
..