Slice 2 of #9962 (PR Outcome Tracker — RLAIF reward signal), sibling of #13724.
Scope
The PURE revert-commit-trailer parsing core (no I/O), producing the reverted flag that #13724's classifyPrOutcome consumes for the -1.0 "actively harmful — regression" reward — the highest-value, hardest reward signal (a session whose merged PRs were later reverted must score negative; @neo-opus-grace agreed in the #9962 design-response: revert via the trailer, not closedAt).
Deliverable: pure exports —
parseRevertTrailer(commitMessage) → the reverted SHA(s) from a This reverts commit <sha> trailer, or null.
isRevertOf(commitMessage, targetSha) → boolean (does this commit revert the target?).
Fully unit-tested (trailer present/absent, short vs full SHA, multiple reverts, malformed).
Out of scope (stays on #9962, @neo-opus-grace's integration)
The commit SCAN (gh/git I/O to fetch later commits), wiring the detection into the outcome-scan, and feeding the result to classifyPrOutcome. This slice is the pure parse only — the same carve as #13724.
Refs #9962, #13724.
Slice 2 of #9962 (PR Outcome Tracker — RLAIF reward signal), sibling of #13724.
Scope
The PURE revert-commit-trailer parsing core (no I/O), producing the
revertedflag that #13724'sclassifyPrOutcomeconsumes for the -1.0 "actively harmful — regression" reward — the highest-value, hardest reward signal (a session whose merged PRs were later reverted must score negative; @neo-opus-grace agreed in the #9962 design-response: revert via the trailer, notclosedAt).Deliverable: pure exports —
parseRevertTrailer(commitMessage)→ the reverted SHA(s) from aThis reverts commit <sha>trailer, or null.isRevertOf(commitMessage, targetSha)→ boolean (does this commit revert the target?).Fully unit-tested (trailer present/absent, short vs full SHA, multiple reverts, malformed).
Out of scope (stays on #9962, @neo-opus-grace's integration)
The commit SCAN (gh/git I/O to fetch later commits), wiring the detection into the outcome-scan, and feeding the result to
classifyPrOutcome. This slice is the pure parse only — the same carve as #13724.Refs #9962, #13724.