feat(triage): classify fix availability across main, RC, and stable releases (#1097) - #1144
Draft
danielgap wants to merge 9 commits into
Draft
feat(triage): classify fix availability across main, RC, and stable releases (#1097)#1144danielgap wants to merge 9 commits into
danielgap wants to merge 9 commits into
Conversation
…tion (Gentleman-Programming#1095) Extend the client-failure table with ensure-label, remove-label, and update-comment failures: EnsureLabel failure must prevent add-label, RemoveIssueLabel failure must leave the anchored comment untouched, and UpdateComment must fail on both the candidate-update and no-candidates reconciliation paths, each with its exact expected call log.
…age --repo fallback Address both CodeRabbit findings from the 2026-09-10 review round: - rejectDeleteHelpTarget now also rejects the literal "help" target, so "engram delete project help" can never cascade-delete a project named "help"; covered by TestCmdDeleteRejectsLiteralHelpTargets (session and project subtests seed records named "help" and assert usage routing with rows intact). - The triage-duplicates usage text now states that --repo is optional when GITHUB_REPOSITORY (OWNER/NAME) is set.
…eleases (Gentleman-Programming#1097) Deterministic fix-availability classification for confirmed canonical issue matches, stacked on the Gentleman-Programming#1095 triage package. Evidence contract: a fix is inferred only from timeline cross-referenced PRs that are proven merged (merge commit SHA required); issue prose and non-merged PRs never count. Tags and commit reachability come through the compare API with pinned contained statuses; any error, cap exhaustion, or budget limit degrades to conservative ambiguous and never fails the run. Classification covers unresolved, reachable from main, earliest containing SemVer prerelease, and earliest containing stable release, with per-channel unions across multiple fix commits and backports. The reporter's version is parsed from the bug form's Engram Version field: reports older than the earliest stable fix get the minimum fixed version, same-or-newer reports route as possible regressions instead of silent consolidation, and main-only or RC fixes are stated as not yet generally available. The classifier is pure and table-tested; Run gains an optional FixSource dependency that is nil by default and byte-identical to the previous behavior, and the triage-duplicates command gains a default-off --fix-availability flag.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked Issue
Closes #1097
🏷️ PR Type
type:feature— New feature(label request:
type:feature, I am pull-only so a maintainer needs to apply it)📝 Summary
ambiguousverdict and never fails the run.📂 Changes
internal/triage/fixavail.goFixEvidenceSource, self-contained SemVer tag parsing, pureClassifyFixAvailability, boundedCollectFixEvidence, reporter-version extractioninternal/triage/fixavail_test.gointernal/triage/rest.goRESTClientimplementsFixEvidenceSource:MergedFixPRs,ListTags,CommitContainedIn(compare statuses pinned)internal/triage/rest_test.gointernal/triage/triage.goOptions.FixSource; Run classifies accepted candidates; evidence failures never fail the runinternal/triage/comment.gorenderFixAvailability: one availability line plus one routing line per classified matchinternal/triage/score.goMatch.Fixoptional fieldinternal/triage/run_test.goTestRunFixAvailabilityWiring: nil-source byte-identical baseline, rendering, conservative degradationcmd/engram/triage.go--fix-availabilityflag with injectable sourcecmd/engram/triage_test.go🧪 Test Plan
go test ./...(clean, under umask 022 due to the known pre-existing socket-test environment sensitivity)go test -tags e2e ./internal/server/...Manual: nil
FixSourceproven byte-identical to the pre-change renderer output (wiring test plus an out-of-tree baseline comparison of 714ef68 vs this tree).🤖 Automated Checks
Run automatically; the
type:*label check needs a maintainer to applytype:feature.✅ Contributor Checklist
Closes #1097)type:*label to this PR (requested:type:feature, maintainer-side)go test ./...go test -tags e2e ./internal/server/...Co-Authored-Bytrailers in commits💬 Notes for Reviewers
Chain context
Stacked on #1107 (the triage package this builds on), which targets
mainfrom a fork branch, so this PR cannot target the parent branch directly and also targetsmain. Until #1107 merges, the Changes tab shows the union of both; review this PR as commit90b874band the file table above. Draft on purpose: it flips to ready as soon as #1107 lands, at which point the diff collapses to just this work unit.Closes #1097takes effect on merge.Size note
+2027/−7 with roughly two thirds being new tests. One honest slicing pass found no split that lands independently: the classifier, its REST evidence source, and the wiring are one cohesive unit and the tests must stay with the unit they verify. Recommend accepting as
size:exception; review focus isfixavail.go(classifier conservativeness),rest.go(timeline decoding, compare status pinning), andcomment.go(wording).Verification provenance
TDD evidence plus an independent read-only verification pass (9/9 acceptance criteria mapped to code and tests, 4 behavioral spot-checks, zero blockers). The native four-lens review could not run this round: the START consent seam looped with instantly-expiring bindings (gentle-pi#748, recurrence documented there); it will be re-run once that defect is fixed.
Known conservative limitations (deliberate)
main; other defaults degrade every compare to ambiguous.