Skip to content

ci(peer): gate routed review on authorized interactive responses - #241

Merged
timerloggedout-spec merged 1 commit into
masterfrom
manus/interactive-peer-gate
Aug 18, 2026
Merged

timerloggedout-spec merged 1 commit into
masterfrom
manus/interactive-peer-gate

Conversation

@timerloggedout-spec

Copy link
Copy Markdown
Owner

Summary

This replaces the previous “any peer activity or timeout” handoff with a SHA-bound peer-response contract. Provider-owned checkboxes and buttons are now recorded as pending operator actions rather than copied into relay comments or treated as reviewer completion.

The peer gate now observes CodeRabbit, Qodo, and Devin responses, records the current provider state in one idempotently updated comment, and only releases the routed second-pass workflow when every configured required provider has completion evidence for the live PR head SHA. gemini-after-peers additionally rejects a stale head SHA and any state other than responses_collected / ready: true.

The new docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md runbook defines the restricted acknowledgement protocol for a separately authorized Operator Action Executor. It explicitly prohibits copying browser cookies or treating refTemplates, Actions caches, or a broad Actions token as UI-control authority.

Behavioral changes

  • A CodeRabbit Trigger review checkbox becomes pending_operator_action until a permitted operator/agent acknowledges the exact source control.
  • An acknowledgement becomes action_acknowledged, but does not release second pass.
  • A matching provider comment, review, or current-SHA completed check becomes provider_completed.
  • Timeout/pending/missing/stale state now blocks second pass instead of releasing it.
  • Top-level Qodo PR comments are part of response ingestion.

Validation

  • Parsed both changed workflow YAML files with PyYAML.
  • Syntax-checked every embedded actions/github-script block with Node.js.
  • Ran git diff --check.

Security boundary

No browser cookies, session exports, or provider credentials are read, moved, logged, cached, or added to the repository. This change records the request and waits for external operator/provider evidence; it does not select a provider UI control itself.

Agent-Identity: Manus

Task-Ref: interactive-peer-gate
Signed-off-by: Manus <manus@manus.im>
@blocksorg

blocksorg Bot commented Aug 18, 2026

Copy link
Copy Markdown

Mention Blocks like a regular teammate with your question or request:

@blocks review this pull request
@blocks make the following changes ...
@blocks create an issue from what was mentioned in the following comment ...
@blocks explain the following code ...
@blocks are there any security or performance concerns?

Run @blocks /help for more information.

Workspace settings | Disable this message

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel

vercel Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
termux-monorepo Ready Ready Preview, v0 Aug 18, 2026 8:03pm

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: adb9b037-b69f-410f-98d8-9e1e3b4f0c24


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

context_key: pr-241-manusinteractive-peer-gate
@jules Auto-resolve (heyVern lane / GHA agent-review-auto-jules) — do not wait for a human ping.
New work-context pr-241-manusinteractive-peer-gate — create session if none exists, then prefer continue thereafter.
Bot feedback from coderabbitai[bot] on PR #241 (branch manus/interactive-peer-gate).

Feedback excerpt

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: skip review by coderabbit.ai -->

> [!IMPORTANT]
> - [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> 🔍 Trigger review
> 
> This repository does not receive automatic reviews because it has fewer than 10 stars.
> 
> <details>
> <summary>⚙️ Run configuration</summary>
> 
> **Configuration used**: Path: .coderabbit.yaml
> 
> **Review profile**: ASSERTIVE
> 
> **Plan**: Pro Plus
> 
> **Run ID**: `adb9b037-b69f-410f-98d8-9e1e3b4f0c24`
> 
> </details>

<!-- end of auto-generated comment: skip review by coderabbit.ai -->

<!-- tips_start -->

---

Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=timerloggedout-spec/termux-monorepo&utm_content=241)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20cod

Instructions

  1. Address open review disposition / threads (CodeRabbit, Devin, Copilot). Ignore pure analysis-chain dumps.
  2. Prefer minimal diffs; preserve Sentinel 0o600/0o700 if those files are touched.
  3. Push commits to branch manus/interactive-peer-gate. Do not retarget away from the PR base without cause.
  4. If conflicts with base exist, resolve them.
  5. Skip pure nits only if they conflict with security/gates; otherwise apply autofixes.
  6. Non-empty diff required — empty commits are rejected.
    Monikers: docs/ops/AGENT-MONIKERS.md
    Agent: Grok (archW1z) orchestration · Profile: https://x.com/grok
    Signed-off-by: Grok (OPERATOR) session-auto-jules / context_key=pr-241-manusinteractive-peer-gate

@gitar-bot

gitar-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Gate second-pass review on SHA-bound peer responses

🐞 Bug fix ✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Requires live-SHA completion evidence from every configured provider before second-pass review.
• Records interactive controls and authorized acknowledgements without treating either as provider
 completion.
• Documents the restricted operator procedure and credential boundary for provider-owned UI actions.
Diagram

stateDiagram-v2
  direction TD
  state "Pending Action" as pending
  state "Action Acknowledged" as acknowledged
  state "Awaiting Response" as awaiting
  state "Provider Completed" as completed
  state "Responses Collected" as collected
  state "Contract Validation" as contract
  state "Second Pass" as secondpass
  state "Review Blocked" as blocked
  pending --> acknowledged: authorized acknowledgement
  acknowledged --> completed: provider evidence
  awaiting --> completed: comment review or check
  completed --> collected: all required providers
  collected --> contract: ready true
  contract --> secondpass: live SHA matches
  contract --> blocked: stale SHA
  pending --> blocked: timeout or missing action
  awaiting --> blocked: timeout or missing evidence
Loading
High-Level Assessment

The SHA-bound evidence contract is the appropriate approach because provider-owned controls lack a supported automation API. The prior activity-or-timeout handoff could release prematurely, while browser automation or cookie transfer would violate the required credential boundary; separating authorized operator action from independently observed provider completion preserves both security and auditability.

Files changed (3) +349 / -205

Enhancement (1) +279 / -201
peer-review-orchestrator.ymlCollect and publish verified provider response states +279/-201

Collect and publish verified provider response states

• Reworks orchestration into a SHA-bound state collector triggered by PR, issue-comment, review, and review-comment activity. It observes provider controls, validates authorized acknowledgements, ingests comments, reviews, review comments, and checks, then idempotently publishes one state comment without directly triggering provider UI actions.

.github/workflows/peer-review-orchestrator.yml

Bug fix (1) +22 / -4
gemini-after-peers.ymlEnforce the live-SHA peer response contract +22/-4

Enforce the live-SHA peer response contract

• Rejects stale workflow-run SHAs and replaces the legacy readiness marker with the versioned peer-response state comment. Second-pass review now requires 'responses_collected' and 'ready: true' for the current PR head.

.github/workflows/gemini-after-peers.yml

Documentation (1) +48 / -0
OPERATOR_INTERACTIVE_ACTIONS.mdDocument authorized interactive provider actions +48/-0

Document authorized interactive provider actions

• Defines responsibilities, acknowledgement format, state meanings, and the procedure for acting on provider-owned controls. It explicitly prohibits cookie transfer, stale-SHA actions, unauthorized identities, and treating acknowledgements as completion.

docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md

Copy link
Copy Markdown
Owner Author

OPERATOR: PR #241 is based on current master 21d4be18. Hygiene gate ✅. Waiting on collect-peer-responses + Vercel. Prefer merge once green (peer-gate + interactive contract is P0 hygiene). GitLab non-blocking.

Next: if peer collect succeeds and no required checks fail → merge via OPERATOR path.

@timerloggedout-spec
timerloggedout-spec merged commit 8fea5c6 into master Aug 18, 2026
10 of 12 checks passed
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (6) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Response runs cannot release gate 🐞 Bug ≡ Correctness
Description
Provider comments, reviews, and acknowledgements start orchestrator runs that can publish
responses_collected, but gemini-after-peers rejects every workflow_run whose source event is
not pull_request. These events also cancel the original PR-triggered run through shared
concurrency, so the final response commonly leaves the second pass permanently blocked.
Code

.github/workflows/peer-review-orchestrator.yml[R16-19]

+  issue_comment:
+    types: [created, edited]
+  pull_request_review:
+    types: [submitted, edited, dismissed]
Relevance

●●● Strong

Recent accepted precedents flag cancellation and concurrency grouping across independent workflow
events as correctness defects.

PR-#31
PR-#193

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The orchestrator now runs for three response event families and treats provider/operator events as
relevant, then computes and publishes readiness in that run. The downstream job still requires
workflow_run.event == 'pull_request', while concurrency groups all those runs by PR and cancels
the prior run.

.github/workflows/peer-review-orchestrator.yml[13-24]
.github/workflows/peer-review-orchestrator.yml[89-100]
.github/workflows/peer-review-orchestrator.yml[241-264]
.github/workflows/gemini-after-peers.yml[16-20]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The orchestrator can become ready from comment or review events, but the downstream workflow only accepts pull-request-originated runs. Shared per-PR concurrency also cancels the original eligible run when those response events arrive.

## Issue Context
Ensure a successful run that ingests the final provider response can trigger the second pass while retaining same-repository, live-head, and authenticated-state validation.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[16-24]
- .github/workflows/gemini-after-peers.yml[16-20]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Historical comments satisfy new SHA 🐞 Bug ≡ Correctness
Description
deliveredProvider accepts provider comments using only updated_at against a baseline derived
from the commit timestamp, without binding the comment to the current head. An old comment edited
during the cycle—or one newer than an old authored/committed head—therefore completes the provider
for a new SHA.
Code

.github/workflows/peer-review-orchestrator.yml[R198-202]

+              const afterCycle = item => new Date(item.updated_at || item.submitted_at || item.created_at || 0).getTime() >= startedAt;
+              const sourceComments = [...evidence.comments, ...evidence.reviewComments];
+              const comment = sourceComments.find(item =>
+                providerFor(item.user?.login) === provider && afterCycle(item) && !isControlOnly(item.body)
+              );
Relevance

●●● Strong

PR #93 accepted preventing stale prior-cycle peer activity from satisfying the current head’s gate.

PR-#93

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workflow derives startedAt from author/committer metadata and subtracts one minute. Comments
are then accepted solely by provider identity, mutable updated_at, and body classification,
whereas reviews explicitly require commit_id === headSha; this recreates the historical
stale-activity pattern previously fixed in this workflow.

.github/workflows/peer-review-orchestrator.yml[114-124]
.github/workflows/peer-review-orchestrator.yml[197-209]
PR-#93

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Historical provider comments can be accepted as completion for a new head because the predicate uses mutable comment timestamps and a commit-metadata baseline rather than evidence tied to when the head became active.

## Issue Context
Persist or derive a trustworthy current-head activation boundary and require explicit current-SHA/cycle evidence where supported. Do not let editing an old comment move it into the current cycle.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[119-124]
- .github/workflows/peer-review-orchestrator.yml[197-209]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Historical controls acknowledge new cycles 🐞 Bug ≡ Correctness
Description
controlEntries scans every provider comment without a timestamp, SHA, or cycle restriction, and
any previously selected checkbox makes that provider acknowledged for the current cycle. A control
selected for an earlier head can consequently authorize completion evidence for the new head.
Code

.github/workflows/peer-review-orchestrator.yml[R157-160]

+            function controlEntries(comments) {
+              const controls = [];
+              for (const comment of comments) {
+                const provider = providerFor(comment.user?.login);
Relevance

●●● Strong

PR #93 accepted filtering peer evidence by current-head timing, directly matching stale historical
activity across cycles.

PR-#93

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
All PR comments are supplied to controlEntries, which records no cycle or SHA. Current provider
state then uses providerControls.some(control => control.selected) directly, allowing a historical
selected checkbox to set acknowledged and unlock delivery acceptance.

.github/workflows/peer-review-orchestrator.yml[126-132]
.github/workflows/peer-review-orchestrator.yml[157-174]
.github/workflows/peer-review-orchestrator.yml[225-238]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Interactive controls from historical provider comments are reused in every new head cycle, including their selected state.

## Issue Context
Only controls demonstrably associated with the active head/cycle should affect acknowledgment. Published controls should also include the binding information used for validation.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[157-174]
- .github/workflows/peer-review-orchestrator.yml[225-239]
- .github/workflows/peer-review-orchestrator.yml[255-267]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View high (2)
4. Provider usernames are spoofable 🐞 Bug ⛨ Security
Description
providerFor authenticates providers through a substring in the login, so an ordinary account named
like coderabbit-helper or qodo-reviewer is accepted as that provider. Such accounts can submit
completion comments or recognized controls and satisfy required-provider state during a PR-triggered
collection run.
Code

.github/workflows/peer-review-orchestrator.yml[R64-68]

+            function providerFor(login) {
+              const value = (login || '').toLowerCase();
+              if (value.includes('coderabbit')) return 'coderabbit';
+              if (value.includes('qodo')) return 'qodo';
+              if (value.includes('devin')) return 'devin';
Relevance

●●● Strong

PR #193 accepted tightening unanchored bot substring detection because it misclassifies ordinary
human identities.

PR-#193

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The same substring-based function classifies event authors, controls, and delivery comments. A
matching login therefore reaches provider_completed, which is the sole condition used to declare
the gate complete.

.github/workflows/peer-review-orchestrator.yml[64-72]
.github/workflows/peer-review-orchestrator.yml[89-99]
.github/workflows/peer-review-orchestrator.yml[197-203]
.github/workflows/peer-review-orchestrator.yml[225-242]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Provider identity is inferred from an arbitrary substring of an unauthenticated username, allowing lookalike accounts to produce trusted evidence.

## Issue Context
Use an explicit allowlist of exact provider bot/app identities and, where available, validate bot/app metadata rather than display-login text.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[64-72]
- .github/workflows/peer-review-orchestrator.yml[157-171]
- .github/workflows/peer-review-orchestrator.yml[197-215]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Acknowledgements lack executor authorization 🐞 Bug ⛨ Security
Description
acknowledgedControls accepts every OWNER, MEMBER, or COLLABORATOR rather than a separately
authorized executor, and it does not validate the required action against an allowlist. Any
repository collaborator can therefore acknowledge a control and unlock already-observed provider
evidence despite not being authorized to perform the UI action.
Code

.github/workflows/peer-review-orchestrator.yml[R177-182]

+            function acknowledgedControls(comments, controls) {
+              const authorizedAssociations = new Set(['OWNER', 'MEMBER', 'COLLABORATOR']);
+              return comments.filter(comment => {
+                if (!comment.body?.includes(operatorAckMarker)) return false;
+                if (!authorizedAssociations.has(comment.author_association)) return false;
+                return comment.body.includes(`cycle_id: ${cycleId}`);
Relevance

●● Moderate

The runbook supports stricter executor and action validation, but history only weakly addresses
broad association-based authorization.

PR-#212

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The code checks only broad author_association, marker, cycle, and substring matches for
provider/control; it never checks a named executor identity or the action field. The runbook
separately requires a named approved operator profile and an allowlisted action, so the
implementation does not enforce its stated security boundary.

.github/workflows/peer-review-orchestrator.yml[177-190]
docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md[17-33]
docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md[44-48]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The acknowledgement parser equates broad repository association with authorization to execute provider UI actions and ignores the declared action value.

## Issue Context
Validate the exact actor against a configured executor allowlist and parse exact structured fields, including an allowlisted provider/action/control tuple. Reject ambiguous, duplicate, missing, or unauthorized fields.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[177-190]
- docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md[17-33]
- docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md[44-48]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

6. State comments are unauthenticated 🐞 Bug ⛨ Security
Description
gemini-after-peers trusts the newest comment containing a public marker, current SHA,
responses_collected, and ready: true without checking its author or expected cycle. A commenter
who posts or edits such a comment after the legitimate state update can win the ordering race and
release the second pass without provider completion.
Code

.github/workflows/gemini-after-peers.yml[R75-79]

+            const stateComment = comments
+              .filter(c =>
+                c.body &&
+                c.body.includes('<!-- agent-peer-response-state:v2 -->') &&
+                c.body.includes(`head_sha: ${headSha}`)
Relevance

● Weak

PR #93 rejected the same workflow’s marker-authorship guard; team accepted SHA filtering without
requiring comment author authentication.

PR-#93

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The resolver filters only on marker and SHA and then trusts parsed state fields from the newest
update. The publishing workflow itself restricts updates to github-actions[bot] and includes a
cycle ID, demonstrating both authenticity fields are available but omitted from downstream
validation.

.github/workflows/gemini-after-peers.yml[75-88]
.github/workflows/peer-review-orchestrator.yml[283-292]
.github/workflows/peer-review-orchestrator.yml[319-330]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The downstream gate parses authoritative state from any PR comment, allowing user-authored comments to impersonate the orchestrator state format.

## Issue Context
Require the expected GitHub Actions bot/app identity and exact cycle ID derived from the PR number and full current head SHA. Prefer validating a machine-owned artifact or run output if available.

## Fix Focus Areas
- .github/workflows/gemini-after-peers.yml[75-88]
- .github/workflows/peer-review-orchestrator.yml[283-292]
- .github/workflows/peer-review-orchestrator.yml[319-330]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 11 rules
Review mode: ⚖️ Balanced: Downgraded extended -> standard: change is below the extended eligibility bar (hunks 3/18, lines 554/200; both must reach the floor). Router rationale: This security-sensitive CI control-plane change adds substantial, intertwined event, authorization, SHA-binding, provider-evidence, and downstream-gating logic across workflows, creating multiple independent easy-to-miss failure modes.

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +16 to +19
issue_comment:
types: [created, edited]
pull_request_review:
types: [submitted, edited, dismissed]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Response runs cannot release gate 🐞 Bug ≡ Correctness

Provider comments, reviews, and acknowledgements start orchestrator runs that can publish
responses_collected, but gemini-after-peers rejects every workflow_run whose source event is
not pull_request. These events also cancel the original PR-triggered run through shared
concurrency, so the final response commonly leaves the second pass permanently blocked.
Agent Prompt
## Issue description
The orchestrator can become ready from comment or review events, but the downstream workflow only accepts pull-request-originated runs. Shared per-PR concurrency also cancels the original eligible run when those response events arrive.

## Issue Context
Ensure a successful run that ingests the final provider response can trigger the second pass while retaining same-repository, live-head, and authenticated-state validation.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[16-24]
- .github/workflows/gemini-after-peers.yml[16-20]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +198 to +202
const afterCycle = item => new Date(item.updated_at || item.submitted_at || item.created_at || 0).getTime() >= startedAt;
const sourceComments = [...evidence.comments, ...evidence.reviewComments];
const comment = sourceComments.find(item =>
providerFor(item.user?.login) === provider && afterCycle(item) && !isControlOnly(item.body)
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Historical comments satisfy new sha 🐞 Bug ≡ Correctness

deliveredProvider accepts provider comments using only updated_at against a baseline derived
from the commit timestamp, without binding the comment to the current head. An old comment edited
during the cycle—or one newer than an old authored/committed head—therefore completes the provider
for a new SHA.
Agent Prompt
## Issue description
Historical provider comments can be accepted as completion for a new head because the predicate uses mutable comment timestamps and a commit-metadata baseline rather than evidence tied to when the head became active.

## Issue Context
Persist or derive a trustworthy current-head activation boundary and require explicit current-SHA/cycle evidence where supported. Do not let editing an old comment move it into the current cycle.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[119-124]
- .github/workflows/peer-review-orchestrator.yml[197-209]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +157 to +160
function controlEntries(comments) {
const controls = [];
for (const comment of comments) {
const provider = providerFor(comment.user?.login);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Historical controls acknowledge new cycles 🐞 Bug ≡ Correctness

controlEntries scans every provider comment without a timestamp, SHA, or cycle restriction, and
any previously selected checkbox makes that provider acknowledged for the current cycle. A control
selected for an earlier head can consequently authorize completion evidence for the new head.
Agent Prompt
## Issue description
Interactive controls from historical provider comments are reused in every new head cycle, including their selected state.

## Issue Context
Only controls demonstrably associated with the active head/cycle should affect acknowledgment. Published controls should also include the binding information used for validation.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[157-174]
- .github/workflows/peer-review-orchestrator.yml[225-239]
- .github/workflows/peer-review-orchestrator.yml[255-267]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +64 to +68
function providerFor(login) {
const value = (login || '').toLowerCase();
if (value.includes('coderabbit')) return 'coderabbit';
if (value.includes('qodo')) return 'qodo';
if (value.includes('devin')) return 'devin';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

4. Provider usernames are spoofable 🐞 Bug ⛨ Security

providerFor authenticates providers through a substring in the login, so an ordinary account named
like coderabbit-helper or qodo-reviewer is accepted as that provider. Such accounts can submit
completion comments or recognized controls and satisfy required-provider state during a PR-triggered
collection run.
Agent Prompt
## Issue description
Provider identity is inferred from an arbitrary substring of an unauthenticated username, allowing lookalike accounts to produce trusted evidence.

## Issue Context
Use an explicit allowlist of exact provider bot/app identities and, where available, validate bot/app metadata rather than display-login text.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[64-72]
- .github/workflows/peer-review-orchestrator.yml[157-171]
- .github/workflows/peer-review-orchestrator.yml[197-215]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +177 to +182
function acknowledgedControls(comments, controls) {
const authorizedAssociations = new Set(['OWNER', 'MEMBER', 'COLLABORATOR']);
return comments.filter(comment => {
if (!comment.body?.includes(operatorAckMarker)) return false;
if (!authorizedAssociations.has(comment.author_association)) return false;
return comment.body.includes(`cycle_id: ${cycleId}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

5. Acknowledgements lack executor authorization 🐞 Bug ⛨ Security

acknowledgedControls accepts every OWNER, MEMBER, or COLLABORATOR rather than a separately
authorized executor, and it does not validate the required action against an allowlist. Any
repository collaborator can therefore acknowledge a control and unlock already-observed provider
evidence despite not being authorized to perform the UI action.
Agent Prompt
## Issue description
The acknowledgement parser equates broad repository association with authorization to execute provider UI actions and ignores the declared action value.

## Issue Context
Validate the exact actor against a configured executor allowlist and parse exact structured fields, including an allowlisted provider/action/control tuple. Reject ambiguous, duplicate, missing, or unauthorized fields.

## Fix Focus Areas
- .github/workflows/peer-review-orchestrator.yml[177-190]
- docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md[17-33]
- docs/ops/OPERATOR_INTERACTIVE_ACTIONS.md[44-48]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

timerloggedout-spec added a commit that referenced this pull request Aug 18, 2026
Focused follow-up to #241. Distinguishes provider UI controls from substantive review feedback so CodeRabbit/Qodo control notices do not summon Jules. Extends recognition to edited provider comments, tightens trusted bot logins, and advances peer-orchestrator to event-driven verified second-pass dispatch.

Validation: YAML + Node syntax checks, classifier tests, git diff --check against master. Hygiene gates green; Vercel rate-limit and GitLab mirror status are external non-blockers.
timerloggedout-spec added a commit that referenced this pull request Sep 14, 2026
…estrator.yml bug origin (PR #241 / Manus agent); confirm pr-production-ledger.yml unrelated
timerloggedout-spec added a commit that referenced this pull request Sep 15, 2026
…comment-loop incident

* docs(process): add retroactive automation-review lesson from PR #390 comment-loop incident

Adds a new section to the evidence-led-monorepo-ops skill documenting the
root cause of the PR #390 / issue #507 comment-loop incident and proposing
a lightweight periodic retroactive review cadence for automation
misbehavior patterns (comment loops, redundant CI, spurious re-triggers),
so these are proactively sampled for instead of only reacted to via
auto-filed overflow issues.

No workflow files under .github/workflows/** were modified; this is a
docs-only change. Diagnosis was read-only (no edits to PR #390 or issue
#507).

* docs(process): add verified attribution addendum for peer-review-orchestrator.yml bug origin (PR #241 / Manus agent); confirm pr-production-ledger.yml unrelated

This branch was successfully deployed

1 active deployment
Preview — 94bb347b Deployed Aug 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants