fix(opencode): allow repeated ADR supersession #243

Merged
jwilger merged 1 commit from fix/issue-221-repeated-adr-supersession into main 2026-05-18 07:50:36 -07:00
Owner

Summary

  • Allow ADR supersession targets in the accepted-family states Accepted, Superseded, and Partially superseded.
  • Preserve existing supersession metadata and append new Superseded By notes when accepting later ADRs.
  • Add focused coverage for accepting a later ADR that supersedes an already partially superseded ADR.

Closes #221.

Verification

  • node --test --experimental-strip-types .opencode/plugins/auto-review-discipline-adr.test.ts
  • node --test --experimental-strip-types .opencode/plugins/auto-review-discipline-adr.test.ts .opencode/plugins/auto-review-context.test.ts tests/opencode-rgr-task-gate.test.mjs
  • just ci

Notes

This changes an opencode plugin; running opencode sessions need to be restarted before the updated tool behavior is loaded.

## Summary - Allow ADR supersession targets in the accepted-family states `Accepted`, `Superseded`, and `Partially superseded`. - Preserve existing supersession metadata and append new `Superseded By` notes when accepting later ADRs. - Add focused coverage for accepting a later ADR that supersedes an already partially superseded ADR. Closes #221. ## Verification - `node --test --experimental-strip-types .opencode/plugins/auto-review-discipline-adr.test.ts` - `node --test --experimental-strip-types .opencode/plugins/auto-review-discipline-adr.test.ts .opencode/plugins/auto-review-context.test.ts tests/opencode-rgr-task-gate.test.mjs` - `just ci` ## Notes This changes an opencode plugin; running opencode sessions need to be restarted before the updated tool behavior is loaded.
fix(opencode): allow repeated ADR supersession
All checks were successful
CI / Format check (pull_request) Successful in 6s
CI / Clippy (pull_request) Successful in 40s
CI / Dependency policy (pull_request) Successful in 10s
CI / Test (pull_request) Successful in 51s
CI / Build (pull_request) Successful in 32s
CI / Request auto_review semantic review (pull_request) Successful in 1s
CI / Build PR artifacts (no token) (pull_request) Successful in 2s
auto_review auto_review: 1 warning
6a7248b8e0
auto-review left a comment

The PR enhances the ADR supersession logic to allow repeated supersession and updates the test suite to cover these changes. The changes appear safe to merge, but ensure the logic aligns with the intended ADR lifecycle.

Walkthrough

  • .opencode/plugins/auto-review-discipline-adr.test.ts:

    • Added a new test to verify that supersession notes are appended correctly to partially superseded ADRs.
    • The test ensures that the ADR status is updated to 'Accepted' and that the supersession notes are correctly appended.
  • .opencode/plugins/auto-review-discipline.ts:

    • Introduced appendSupersededBy function to handle appending supersession notes and updating ADR status.
    • Modified requireAcceptedSupersedes to allow ADRs in 'Accepted', 'Superseded', and 'Partially superseded' states to be superseded.
    • Updated the logic to append new supersession notes while preserving existing metadata.
The PR enhances the ADR supersession logic to allow repeated supersession and updates the test suite to cover these changes. The changes appear safe to merge, but ensure the logic aligns with the intended ADR lifecycle. ## Walkthrough - **.opencode/plugins/auto-review-discipline-adr.test.ts**: - Added a new test to verify that supersession notes are appended correctly to partially superseded ADRs. - The test ensures that the ADR status is updated to 'Accepted' and that the supersession notes are correctly appended. - **.opencode/plugins/auto-review-discipline.ts**: - Introduced `appendSupersededBy` function to handle appending supersession notes and updating ADR status. - Modified `requireAcceptedSupersedes` to allow ADRs in 'Accepted', 'Superseded', and 'Partially superseded' states to be superseded. - Updated the logic to append new supersession notes while preserving existing metadata.
Owner

🟡 Warning: The function appendSupersededBy modifies the ADR status to 'Superseded' if it is 'Accepted'. Ensure this logic aligns with the intended ADR lifecycle and does not inadvertently alter ADRs that should remain 'Accepted'.

🟡 **Warning:** The function `appendSupersededBy` modifies the ADR status to 'Superseded' if it is 'Accepted'. Ensure this logic aligns with the intended ADR lifecycle and does not inadvertently alter ADRs that should remain 'Accepted'.
jwilger marked this conversation as resolved
jwilger deleted branch fix/issue-221-repeated-adr-supersession 2026-05-18 07:50:36 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Slipstream/auto_review!243
No description provided.