Skip to content

Run seidroid xreview from the released Go driver - #55

Open
bdchatham wants to merge 1 commit into
mainfrom
feat/xreview-go-driver
Open

Run seidroid xreview from the released Go driver#55
bdchatham wants to merge 1 commit into
mainfrom
feat/xreview-go-driver

Conversation

@bdchatham

Copy link
Copy Markdown
Contributor

seidroid-xreview.yml is gone from main, but sei-chain and platform still pin the
v0.0.15 commit that carries it. What they pin sets up a Python venv and exits at
command -v python3 >/dev/null || exit 1, so neither repo has been getting a review.
This restores the workflow with the review itself moved to sei-agent-driver.

What replaces what

The driver is installed from sei-protocol/sei-internal-skills, which is public, so
there is no credential and no GOPRIVATE. Four steps become two:

was now
sparse checkout of this repo for the driver source go install at a pinned version
python venv + httpx install gone
curl exchange at /oauth/token for a bearer gone; the driver mints its own
python -m driver the binary

Dropping the curl exchange also gets the token out of a step output, where every
later step in the job could read it. The driver takes the M2M client and mints
in-process.

One ref pins both

driver-version travels with the pinned uses: ref, so bumping a caller moves the
workflow and the binary together. The skew those callers are in today — a pinned
commit whose file no longer exists on main — is the failure this shape prevents.

The endpoint

platform clusters/dev/seigent/httproute.yaml routes seigent.dev.platform.sei.io
through the Istio https listener to the omnigent Service, so the job no longer has
to be inside the mesh. runs-on defaults to a hosted runner, which also removes the
pinned jq and gh bootstrap the ARC image needed because it ships neither.

XREVIEW_ALLOW_TOOLS

Set, and load-bearing. The driver declines every permission prompt it is not told to
accept, so without it the agent is refused the shell it reads the diff with and
reports on nothing. Matched on tool_name rather than policy_name, because this
deployment sends one policy name for every native permission request — allowing that
value would accept every tool call the agent asks for.

Kept as they were

The trusted-commenter guard, the whole-line command match, the per-PR concurrency
group, the sticky comment upsert, and gating the post on whether a verdict was
produced rather than on the exit code. Go is pinned rather than inherited from the
runner image, which only satisfies the module's floor by luck.

Callers

uci-ref is removed, since nothing is fetched from this repo any more. The two thin
callers drop that input when they bump their pinned ref. Nothing else changes for
them: they still pass OMNIGENT_M2M_CLIENT_SECRET and nothing else.

Verification

actionlint clean, and shellcheck clean over the extracted run blocks. go install of
the pinned version was confirmed to work with no credentials in the environment.

🤖 Generated with Claude Code

Restores the reusable workflow, which was removed from main while sei-chain and
platform still pin the v0.0.15 commit that carries it. What they pin runs a Python
driver that dies at `command -v python3` on the runner, so nothing has been
reviewing.

The review is now sei-agent-driver, installed from
sei-protocol/sei-internal-skills, which is public, so there is no credential and no
GOPRIVATE. That replaces four steps with two: the sparse checkout of this repo, the
python venv and httpx install, and the curl exchange for a bearer all go away. The
driver mints its own bearer from the M2M client, so the token never lands in a step
output where every later step in the job can read it.

driver-version pins the CLI and travels with the `uses:` ref, so one ref fixes both
the workflow and the binary rather than letting them skew -- which is the failure
these callers are in today.

The server is reachable over https at its gateway hostname, so the job no longer
has to be in-cluster and runs-on defaults to a hosted runner.

XREVIEW_ALLOW_TOOLS is set, without which the driver declines every permission
prompt, the agent is refused the shell it reads the diff with, and the review reports
on nothing. Matched on tool_name rather than policy_name, because the deployment
sends one policy name for every native request.

The guard, the per-PR concurrency and the sticky upsert are kept as they were. Go is
pinned rather than taken from the runner image, which only satisfies the module's
floor by luck.

Callers must drop the now-removed uci-ref input when they bump.

Verified with actionlint and shellcheck.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Uses M2M secrets and pull-requests: write to run an external agent with an explicit tool allowlist; scope is CI automation rather than app auth, but misconfiguration could widen agent permissions or leak credentials via logs.

Overview
Re-adds the reusable seidroid-xreview workflow so comment seidroid xreview on a PR can run an agentic review again, after callers were pinned to a commit whose old Python-based workflow no longer worked.

The review path is replaced: instead of sparse checkout, Python venv, and in-job OAuth curl, the job go installs pinned sei-agent-driver from public sei-internal-skills, calls sei-agent-driver xreview, and lets the driver mint omnigent tokens in-process. Callers pin driver-version with the same uses: ref (no uci-ref). Default runs-on is ubuntu-latest with omnigent at https://seigent.dev.platform.sei.io.

Unchanged behavior is preserved: trusted-commenter guard, whole-line command match, per-PR concurrency with cancel-in-progress, XREVIEW_ALLOW_TOOLS: Bash,Read, verdict posting gated on non-empty verdict.md (not exit code), and sticky upsert via the HTML marker comment.

Reviewed by Cursor Bugbot for commit e2e93ea. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e2e93ea. Configure here.

else
echo "verdict_produced=false" >> "$GITHUB_OUTPUT"
echo "::error::driver produced no verdict (exit $rc)"
exit "$rc"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No-verdict path exits success

Medium Severity

When the driver writes no verdict and exits 0, the else branch still runs exit "$rc", so the Review step succeeds after emitting ::error::. The job goes green with no sticky comment, which hides a failed review behind a successful run.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e2e93ea. Configure here.

id="$(gh api "repos/$REPO/issues/$PR/comments" --paginate \
--jq "map(select(.body | startswith(\"$MARKER\"))) | .[0].id // empty")"
if [ -n "$id" ]; then
gh api -X PATCH "repos/$REPO/issues/comments/$id" -f body="$body" >/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sticky match ignores comment author

Low Severity

The sticky upsert selects any issue comment whose body starts with the marker, then always PATCHes that id. If that comment belongs to another user, the API rejects the edit and the step never falls back to POST, so the verdict is never published.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e2e93ea. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant