Skip to content

triage: exempt anchored non-triage commands from the Triage gate - #980

Merged
LSantha merged 2 commits into
masterfrom
opencode/issue866-20261120193910
Nov 21, 2026
Merged

LSantha merged 2 commits into
masterfrom
opencode/issue866-20261120193910

Conversation

@LSantha

@LSantha LSantha commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Done.

Closes #866

github run

Assisted-by: opencode/beam-free
@LSantha

LSantha commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

/oc review

You are reviewing a pull request for the automated pipeline. Your final line must be exactly one of:
Verdict: approve
Verdict: request-changes

Post this verdict as an ordinary COMMENT on the pull request (a native GitHub review is not usable here: the PR is authored by the maintainer, so GitHub blocks self-approval).

Immediately after the Verdict line, add one more line naming the model that produced this review, copied verbatim from the model your runtime reports (never invented):
Assisted-by:

A reviewer makes no commit, so this comment is the only place its model can be recorded; mergePR folds it into the merge commit as Reviewed-by. Use "Verdict: request-changes" if the PR needs code changes. Use "Verdict: approve" only if the PR is correct and ready for the next phase.

@LSantha

LSantha commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Review - PR #980 (issue #866)

Reviewed d9f44a2 against issue #866. The gate fix is correct, the two body gates are provably mutually exclusive, and the acceptance criteria are met.

Verification

  • node --test .github/scripts/tests/*.test.js: 315/315 pass (10 in triage-trigger.test.js, 9 in opencode-trigger.test.js).
  • triage.yml parses as valid YAML. I evaluated its job if: and opencode.yml's gate as booleans against the exported predicates across anchored/embedded/session-link/quoting bodies: zero mismatches, and the two gates never both fire.
  • The ticket-runner and auto-triage publishers post an anchored /oc triage issue #N command, which still satisfies the narrowed gate.
  • CI on d9f44a2: build, test, boot32, boot64 pass. git diff --check clean; both new files are US-ASCII.

Correctness

  • isAnchoredNonTriage is the exact mirror of the workflow's !(startsWith(body, '/oc ') && !startsWith(body, '/oc triage')). A genuine /oc triage command (anchored or embedded) still fires; an anchored /oc review or /oc fix quoting /oc triage no longer does (the factory: triage.yml still uses a broad contains for the triage verb, so a quoting prompt starts a second run #866 repro), while opencode keeps that run.
  • The session-link exclusion and the author-association gate are unchanged, and the opencode side's embedded-triage exclusion is unchanged, so the two gates are mutually exclusive.
  • The wiring test pins the new clause in triage.yml:19-20, matching the opencode.yml test shape.

Nits (non-blocking)

  • 🟢 PR title, commit subject and body are all Done., so the squash would land as #866 - Done. (#980) with body Done. / Closes #866. Please retitle (e.g. #866 - triage: exempt anchored non-triage triggers from the Triage gate) and add a Summary/Testing section before the human approval; the merge subject is derived from the PR title and the fallback body from the PR body.
  • 🟢 triage-trigger.js exports isAnchoredTriage and isAnchoredExcluded; neither is used or tested. Drop them or pin them.
  • 🟢 both workflows agree on the same body only asserts "not both"; asserting the expected winner per body would make the name stronger.

Verdict: approve
Assisted-by: opencode/deepseek-v4.1-flash-free

@LSantha

LSantha commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Review posted on PR #980: #980 (comment)

The gate change is correct and mutually exclusive with the opencode gate; 315/315 node tests pass and CI is green. Only nits remain (PR title/body is Done., plus two unused exports in triage-trigger.js).

Verdict: approve
Assisted-by: opencode/deepseek-v4.1-flash-free

github run

@LSantha LSantha added the agent/done The agent finished successfully; PR opened or comment posted. label Nov 20, 2026
@LSantha

LSantha commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Agent review passed. Awaiting human approval via native GitHub PR Review UI, or /oc approve on the PR.

@LSantha

LSantha commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

/oc fix Address review feedback on PR #980. Verified independently - 315/315 node tests pass on this branch and both trigger predicates are mutually exclusive across the anchored / embedded / session-link matrix, so the fix itself is correct. Address exactly these four items, then push and re-run the full node test suite:

  1. .github/scripts/triage-trigger.js exports four unused helpers. isAnchoredTriage, isAnchoredExcluded, isAnchoredNonExcluded and isOpencodeTrigger have no references outside their own definition; the tests import opencode-trigger.js directly for those. Export only isTriageTrigger and isAnchoredNonTriage.

  2. isAnchoredExcluded: isAnchoredNonTriage inverts the meaning of "excluded". In opencode-trigger.js isAnchoredNonExcluded means "anchored and not approve/triage"; here it means "anchored and not triage" - two near-identical names with opposite meanings, in the two files that exist specifically to stay in step. Drop the alias (it is unused too).

  3. Retitle the PR and the commit subject. The merge path squashes using the PR title, so merging as-is puts a literal Done. on master. Use a subject naming the defect, e.g. "triage: exempt anchored non-triage commands from the Triage gate". Amend or add a commit so the final squashed title is that subject, not Done..

  4. The doc block in triage-trigger.js explains the triage semantics but omits the two cases the new tests exercise: an embedded /oc triage still starts Triage, and an anchored /oc approve runs nothing.

Keep it minimal: no reformatting, match the existing JS style of the file, US-ASCII only. Do not weaken the existing tests; they must stay green at 315/315.

@LSantha LSantha changed the title Done. triage: exempt anchored non-triage commands from the Triage gate Nov 21, 2026
@LSantha

LSantha commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

Done. 315/315 node tests pass. PR #980 retitled.

github run

@LSantha

LSantha commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

/oc approve

@LSantha
LSantha merged commit da7b6e0 into master Nov 21, 2026
5 checks passed
@LSantha
LSantha deleted the opencode/issue866-20261120193910 branch November 21, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/done The agent finished successfully; PR opened or comment posted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

factory: triage.yml still uses a broad contains for the triage verb, so a quoting prompt starts a second run

1 participant