-
Notifications
You must be signed in to change notification settings - Fork 1
chore(ci): Skeptic Gate + Evidence Gate (portable install) #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fc5d656
a8f41a8
63305bd
5ae8cda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,322 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: Evidence Gate | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # Portable install (scripts/gates/install-gates.sh): validates PR Evidence bundles. | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Upstream: jleechanorg/agent-orchestrator .github/workflows/evidence-gate.yml | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||
| types: [opened, synchronize, edited, reopened] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||||||||||||
| group: evidence-gate-${{ github.event.pull_request.number }} | ||||||||||||||||||||||||||||||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||||||||||
| pull-requests: read | ||||||||||||||||||||||||||||||||||||||||||||||||
| issues: read | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||||
| evidence-gate: | ||||||||||||||||||||||||||||||||||||||||||||||||
| name: Evidence Gate | ||||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||||||||
| # bd-fisn: Skip entirely when PR is merged or closed — a merged PR stops receiving | ||||||||||||||||||||||||||||||||||||||||||||||||
| # pull_request events so a stale failed check run cannot be overwritten. Instead of | ||||||||||||||||||||||||||||||||||||||||||||||||
| # leaving a permanent failure that blocks the PR from showing green, we exit 0. | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Evidence gate is a pre-merge gate; post-merge it has no function. | ||||||||||||||||||||||||||||||||||||||||||||||||
| if: github.event.pull_request.merged == false && github.event.action != 'closed' | ||||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4.1.1 | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Write PR body to temp file | ||||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||||
| PR_BODY: ${{ github.event.pull_request.body }} | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Use the PR body from the workflow context — available without auth scope | ||||||||||||||||||||||||||||||||||||||||||||||||
| # Skip gracefully if PR body is empty (valid GitHub state — no evidence bundle) | ||||||||||||||||||||||||||||||||||||||||||||||||
| printf '%s' "$PR_BODY" > "$RUNNER_TEMP/pr_body.txt" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Body fetched: ${#PR_BODY} chars" | ||||||||||||||||||||||||||||||||||||||||||||||||
| if [ ${#PR_BODY} -eq 0 ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "PR body is empty — treating as no evidence bundle (workflow skips)" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "found=false" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "skip=true" >> "$GITHUB_OUTPUT" | ||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Check for evidence bundle in PR body | ||||||||||||||||||||||||||||||||||||||||||||||||
| id: check | ||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||
| # If body was empty, skip was already set | ||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "${{ steps.check.outputs.skip }}" = "true" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Skipping — empty PR body" | ||||||||||||||||||||||||||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+45
to
+52
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Self-referencing step output that doesn't exist. Line 49 references The static analysis tool correctly flagged this: 🐛 Proposed fix: Add id to the previous step and reference it correctly - name: Write PR body to temp file
+ id: write_body
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
# Use the PR body from the workflow context — available without auth scope
# Skip gracefully if PR body is empty (valid GitHub state — no evidence bundle)
printf '%s' "$PR_BODY" > "$RUNNER_TEMP/pr_body.txt"
echo "Body fetched: ${`#PR_BODY`} chars"
if [ ${`#PR_BODY`} -eq 0 ]; then
echo "PR body is empty — treating as no evidence bundle (workflow skips)"
echo "found=false" >> "$GITHUB_OUTPUT"
echo "skip=true" >> "$GITHUB_OUTPUT"
fi
- name: Check for evidence bundle in PR body
id: check
run: |
# If body was empty, skip was already set
- if [ "${{ steps.check.outputs.skip }}" = "true" ]; then
+ if [ "${{ steps.write_body.outputs.skip }}" = "true" ]; then
echo "Skipping — empty PR body"
exit 0
fi🧰 Tools🪛 actionlint (1.7.11)[error] 47-47: property "check" is not defined in object type {} (expression) 🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skip outputs reference wrong step missing idLow Severity The "Write PR body to temp file" step (line 31) writes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Self-referencing step output makes skip logic unreachableMedium Severity The "Write PR body to temp file" step (no Additional Locations (1) |
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
+53
|
||||||||||||||||||||||||||||||||||||||||||||||||
| # Skip gracefully if PR body is empty (valid GitHub state — no evidence bundle) | |
| printf '%s' "$PR_BODY" > "$RUNNER_TEMP/pr_body.txt" | |
| echo "Body fetched: ${#PR_BODY} chars" | |
| if [ ${#PR_BODY} -eq 0 ]; then | |
| echo "PR body is empty — treating as no evidence bundle (workflow skips)" | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Check for evidence bundle in PR body | |
| id: check | |
| run: | | |
| # If body was empty, skip was already set | |
| if [ "${{ steps.check.outputs.skip }}" = "true" ]; then | |
| echo "Skipping — empty PR body" | |
| exit 0 | |
| fi | |
| printf '%s' "$PR_BODY" > "$RUNNER_TEMP/pr_body.txt" | |
| echo "Body fetched: ${#PR_BODY} chars" | |
| - name: Check for evidence bundle in PR body | |
| id: check | |
| run: | |
Copilot
AI
Apr 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow comments and error output reference “CLAUDE.md forms”, but this repository does not contain a CLAUDE.md. This is misleading for contributors trying to fix a failing evidence gate. Either add the referenced documentation file to the repo or update the wording to point at an existing doc (or just list the accepted claim classes without referencing a non-existent file).
Copilot
AI
Apr 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gh api is used to fetch PR comments when validating merge-gate evidence, but this step never sets GITHUB_TOKEN/GH_TOKEN in the environment. On GitHub-hosted runners, gh will fail to authenticate unless a token env var is provided. Add env: { GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} } (or GH_TOKEN: ${{ github.token }}) to this step (and any other steps invoking gh).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grep regex double-backslash won't match verdict text
High Severity
The grep -qiE pattern 'VERDICT:\\s*PASS|\\*\\*Result:\\s*PASS\\*\\*' uses doubled backslashes inside single quotes. In GNU ERE, \\ matches a literal backslash, so \\s* matches a backslash followed by zero or more s characters — not whitespace. The skeptic-gate comment outputs VERDICT: PASS (with a space), which this pattern will never match. Similarly, \\*\\* matches zero or more backslashes, not literal ** in markdown. The fallback check for merge-gate condition 7/7 is effectively dead code, causing false failures when the PR body doesn't contain the primary skeptic.*(verdict|gate).*pass pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for other references to skeptic-agent login format in the codebase
rg -n -C2 'skeptic-agent' --type yamlRepository: jleechanorg/mctrl_test
Length of output: 214
🌐 Web query:
What is the login format for GitHub App bots in API responses?
💡 Result:
The login format for GitHub App bots (app installations) in API responses, such as in issue authors or actors, is the app's slug (the URL-friendly name of the GitHub App). This is indicated in official docs where API schemas for fields like performed_via_github_app include the app object with a slug field, and login fields in user-like objects for apps reference the app identifier. When an app installation acts, the actor is attributed to the app itself using its slug as the login in responses like issues or events. For example, in REST API issue responses, the performed_via_github_app shows the app details, and the effective login for attribution is the app slug.
Citations:
- 1: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation
- 2: https://docs.github.com/en/rest/apps/installations
- 3: https://docs.github.com/rest/apps/apps
- 4: https://docs.github.com/en/rest/issues/issues
🌐 Web query:
GitHub App bot login format issue comments "app/skeptic-agent" vs "[bot]" suffix
💡 Result:
GitHub Apps and bot accounts display differently in issue comments. GitHub Apps (installed on repositories) typically appear as "[bot]" (e.g., "github-actions[bot]") when posting comments via installation access tokens. User accounts running GitHub Actions bots also use this [bot] suffix. The "app/skeptic-agent" format likely refers to the internal API representation in the performed_via_github_app field (where slug is "skeptic-agent"), not the visible author login. No sources confirm "app/" as a display format for comment authors; official docs show user.login as the app's slug with [bot] suffix. "Skeptic-agent" appears in AI agent/skill contexts, possibly a custom app name without public issues showing the format.
Citations:
- 1:
on.botsmatching is exact-string only and fails for<slug>vs<slug>[bot]GitHub App identities github/gh-aw#20030 - 2: https://github.com/marketplace/actions/bot-details
- 3: Comment author "github-actions" not recognized as author peter-evans/find-comment#171
- 4: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation
- 5: https://docs.github.com/en/rest/issues/comments
🌐 Web query:
GitHub Actions bot login format in API responses github-actions[bot]
💡 Result:
The GitHub Actions bot has the login "github-actions[bot]" in GitHub API responses. This is the username format used for commits and actions performed by GitHub Actions workflows. To access its details via the GitHub REST API, use the endpoint GET /users/github-actions%5Bbot%5D (URL-encoded [ as %5B and ] as %5D), which returns user information including id: 41898282, display name: "github-actions[bot]", and email format: "41898282+github-actions[bot]@users.noreply.github.com". This format ensures proper attribution with the correct avatar and bot indicator in GitHub's UI, such as commit histories and pull requests.
Citations:
- 1: https://github.com/marketplace/actions/bot-details
- 2: README: Suggest
user.emailto be41898282+github-actions[bot]@users.noreply.github.comactions/checkout#1707 - 3: Retrieving the app's bot user no longer works actions/create-github-app-token#172
Fix the app login format for skeptic-agent on line 272.
The check for .user.login == "app/skeptic-agent" is incorrect. GitHub App bot logins use the format <app-slug>[bot] (e.g., skeptic-agent[bot]), not app/<app-slug>. This condition will never match when the skeptic-agent bot posts comments. Change it to .user.login == "skeptic-agent[bot]" to align with the correct format used by GitHub Apps in API responses, consistent with how github-actions[bot] is already handled on line 273.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/evidence-gate.yml around lines 268 - 278, The check that
builds SKEPTIC_COMMENT filters comments by `.user.login == "app/skeptic-agent"`,
which never matches GitHub App bot usernames; update that predicate to
`.user.login == "skeptic-agent[bot]"` so it matches the app comment author
format used by the API (keep the rest of the jq filter, tests for the HTML
marker, and the github-actions[bot] branch unchanged).


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step output reference is self-referential and will never be set: within the step with
id: check, it readssteps.check.outputs.skip, but no prior step with idcheckhas produced that output. As written, the “empty PR body” skip path will not work (and this line will always evaluate to empty/false). Give the PR-body step anidand readsteps.<id>.outputs.skip, or remove the skip mechanism entirely and use a singlefound/missingpath.