Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

merge=ours needs a driver definition in every clone.

Git has no built-in merge driver named ours. The attribute only takes effect when the repository configuration defines it:

git config merge.ours.driver true

Git configuration is not distributed with a clone. Without this command, Git reports the driver as missing and falls back to the default text merge, so .github/workflows/*.lock.yml still produces conflicts. Document the command in the contributor setup, or run it from deploy-workflow.ps1. If keeping the local file on merge is not required, drop merge=ours and keep only linguist-generated=true.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitattributes at line 1, Define the custom Git merge driver used by the
.github/workflows/*.lock.yml attribute in contributor setup or
deploy-workflow.ps1 by configuring merge.ours.driver to true; alternatively
remove merge=ours from .gitattributes if preserving the local file is
unnecessary, leaving linguist-generated=true.

9 changes: 9 additions & 0 deletions .github/aw/actions-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"entries": {
"github/gh-aw-actions/setup@v0.83.4": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.83.4",
"sha": "e89c65e17eb281bbd5ff2ff9e9199a03e96654c7"
}
}
}
1,813 changes: 1,813 additions & 0 deletions .github/workflows/sfl-pr-review.lock.yml

Large diffs are not rendered by default.

184 changes: 184 additions & 0 deletions .github/workflows/sfl-pr-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
---
description: |
Standalone full-spectrum pull request review triggered by the sfl-review
label. Performs security, correctness and reliability, and quality and
maintainability passes, posts one inline thread per finding, submits a
consolidated review, and publishes the SFL Reviewer Approval check.

on:
pull_request:
types: [labeled]
names: [sfl-review]

permissions:
contents: read
pull-requests: read

engine:
id: codex
env:
OPENAI_BASE_URL: https://openrouter.ai/api/v1
OPENAI_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}

model: moonshotai/kimi-k3?effort=high

network:
allowed:
- openrouter.ai

tools:
github:
toolsets: [pull_requests, repos]
github-app:
client-id: ${{ vars.SFL_APP_CLIENT_ID }}
private-key: ${{ secrets.SFL_APP_PRIVATE_KEY }}

safe-outputs:
github-app:
client-id: ${{ vars.SFL_APP_CLIENT_ID }}
private-key: ${{ secrets.SFL_APP_PRIVATE_KEY }}
create-pull-request-review-comment:
side: RIGHT
max: 20
submit-pull-request-review:
allowed-events: [APPROVE, REQUEST_CHANGES]
supersede-older-reviews: true
footer: always
create-check-run:
max: 1
name: "SFL Reviewer Approval"
remove-labels:
allowed: [sfl-review]
max: 1
target: triggering
---
# Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@235a0df0c70fded4982e8763223e7c9936242215
# To upgrade: re-run deploy-workflow.ps1 at the desired SHA

<!-- sfl:
status: active
version: "1.0.0"
category: review
risk-class: trivial
target-labels: [sfl-review]
outcome-definition: |
The triggering pull request receives a current-head structured review,
one inline thread per finding, and an SFL Reviewer Approval check.
acceptance-criteria:
- The sfl-review label triggers exactly one current-head review run
- The trigger label is removed through App-authenticated safe outputs
- Security, correctness/reliability, and quality/maintainability are reviewed
- Every finding is an inline thread classified Critical, High, Medium, or Low
- The review body reports the run ID, head SHA, verdict, and severity counts
- Critical or High findings fail the approval check and request changes
- Medium or Low findings do not fail the approval check
- Zero findings produce an approving review and successful approval check
source-repo: HemSoft/set-it-free-loop
-->

# SFL Review - Full-Spectrum Pull Request Review

Review only the pull request that triggered this workflow. The reviewed commit
must be `${{ github.event.pull_request.head.sha }}` and the SFL run ID is
`${{ github.run_id }}`.
Comment on lines +87 to +89

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Revalidate the PR head before publishing the review

When a commit is pushed after the labeled event but before this long-running review finishes, this fixed event SHA becomes stale, and no new run is triggered because the workflow listens only for labeling. The workflow can therefore publish a verdict for an obsolete revision while claiming a current-head review; fetch the PR head again immediately before producing safe outputs and abort or retrigger if it differs from the event SHA.

Useful? React with 👍 / 👎.


Use the GitHub pull request tools to read the triggering PR, its changed files,
and the complete diff. Before creating comments, list existing review comments
and unresolved threads on the current head so you do not repeat a finding.

## Required review passes

Perform all three evidence-based passes independently before producing output.

1. **Security**
- Injection, unsafe command or path construction, XSS, SSRF, and deserialization
- Authentication, authorization, privilege boundaries, and secret exposure
- Dependency, workflow, and supply-chain risks
2. **Correctness and Reliability**
- Logic errors, regressions, incorrect assumptions, null and boundary cases
- Error handling, races, resource leaks, data loss, and compatibility
- Whether tests cover every meaningful new or changed behavior
3. **Quality and Maintainability**
- Excessive complexity, duplication, coupling, unclear ownership, and dead code
- Type safety, performance regressions, operational risk, and repository conventions
- Whether the implementation is the smallest complete and defensible change

## Finding policy

Classify every finding into exactly one severity:

- **CRITICAL** - exploitable security issue, data loss, production crash,
public API break, race, or deadlock
- **HIGH** - serious correctness, authorization, reliability, or operational defect
- **MEDIUM** - material bug avenue, missing logic-branch tests, performance
regression, or maintainability problem
- **LOW** - actionable improvement with concrete value and low implementation risk

Do not report style preferences, speculative concerns, or findings without
specific evidence from the changed code.

For each finding, call `create-pull-request-review-comment` on the most precise
changed line. The comment body must begin with one of these exact prefixes:

- `**CRITICAL Finding**`
- `**HIGH Finding**`
- `**MEDIUM Finding**`
- `**LOW Finding**`

After the prefix, state the defect, impact, evidence, and a concrete fix.
Create exactly one inline thread per finding. If there are no findings, create
no inline comments.

## Approval policy

Count all inline findings by severity.

- If any Critical or High finding exists, submit `REQUEST_CHANGES` and create
the `SFL Reviewer Approval` check with conclusion `failure`.
- If only Medium or Low findings exist, submit `APPROVE` and create the check
with conclusion `success`.
- If no findings exist, submit `APPROVE` and create the check with conclusion
`success`.

Submit exactly one consolidated review with this body:

```markdown
## SFL Full-Spectrum Review

SFL run ID: ${{ github.run_id }}
Head SHA: ${{ github.event.pull_request.head.sha }}
Verdict: APPROVE

| Severity | Count |
| --- | ---: |
| Critical | 0 |
| High | 0 |
| Medium | 0 |
| Low | 0 |

### Review passes

- Security: complete
- Correctness and Reliability: complete
- Quality and Maintainability: complete

### Summary

Concise evidence-based summary of the review result.
```

Replace the verdict and counts with the actual result. Use
`Verdict: CHANGES_REQUESTED` when Critical or High findings exist.

Create exactly one check run named `SFL Reviewer Approval` with:

- `title`: `SFL full-spectrum review complete`
- `summary`: the verdict, head SHA, run ID, and severity counts
- `conclusion`: the approval-policy result above

After requesting the consolidated review and check run, call `remove-labels`
for `sfl-review` on the triggering pull request. This must be the final safe
output request so the label can be applied again for a later re-review.

Do not modify code, branches, or pull request metadata. The only permitted
label change is removing `sfl-review` through the configured safe output.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# PE-Bot (Performance Engineering Bot)
[License information to be added]
[![Set it Free Loop](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FHemSoft%2Fpe-bot%2Fmain%2Fsfl.json&query=%24.version&prefix=v&label=Set%20it%20Free%20Loop&color=FFD700&style=flat&logo=githubactions&logoColor=white)](https://github.com/HemSoft/set-it-free-loop)
<!-- SFL_BADGE: auto-updated by deploy-workflow.ps1 -->
# PE-Bot (Performance Engineering Bot)
Comment on lines +2 to +5

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the duplicated title and the stray license placeholder.

The badge insertion misplaced two lines. Line 2 repeats the license placeholder that already exists under ## License on line 30. Line 5 repeats the H1 from line 1, which is what markdownlint MD024 reports. The rendered README shows a license sentence above the badge and two identical titles.

Keep the title once, then the badge and its marker.

📝 Proposed fix
 # PE-Bot (Performance Engineering Bot)
-[License information to be added]
+
 [![Set it Free Loop](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FHemSoft%2Fpe-bot%2Fmain%2Fsfl.json&query=%24.version&prefix=v&label=Set%20it%20Free%20Loop&color=FFD700&style=flat&logo=githubactions&logoColor=white)](https://github.com/HemSoft/set-it-free-loop)
 <!-- SFL_BADGE: auto-updated by deploy-workflow.ps1 -->
-# PE-Bot (Performance Engineering Bot)

The generator deploy-workflow.ps1 produced this layout, so fix the template as well to prevent the same result on the next deploy.

🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 5-5: Multiple headings with the same content

(MD024, no-duplicate-heading)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 2 - 5, Remove the stray license placeholder and
duplicated H1 from the README’s badge section, leaving the existing title
followed by the badge and its marker. Update the corresponding layout in
deploy-workflow.ps1 so future badge generation preserves this ordering without
reintroducing either line.

Source: Linters/SAST tools


A specialized bot designed to assist with performance engineering tasks. This tool helps automate performance testing, analysis, and reporting processes.

Expand Down
32 changes: 32 additions & 0 deletions sfl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "2.0.0",
"deployedAt": "2026-08-02T01:36:28Z",
"tier": "review",
"source": "HemSoft/set-it-free-loop",
"sourceSha": "235a0df0c70fded4982e8763223e7c9936242215",
"components": [
"governance",
"labels",
"sfl-pr-review"
],
"enginePolicy": {
"defaultProfile": "codex-gpt-55-high",
"workflows": [
{
"name": "sfl-pr-review",
"profile": "openrouter-kimi-k3-high",
"provider": "codex",
"model": "moonshotai/kimi-k3",
"effort": "high",
"renderedModel": "moonshotai/kimi-k3?effort=high",
"requiredSecretsAnyOf": [
"OPENROUTER_API_KEY"
],
"environment": {
"OPENAI_BASE_URL": "https://openrouter.ai/api/v1",
"OPENAI_API_KEY": "${{ secrets.OPENROUTER_API_KEY }}"
}
}
]
}
}