Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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.84.1": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.84.1",
"sha": "029204130cb73f6ba684e56428c7f3e9319b708c"
Comment on lines +3 to +6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Resolve the pinned tag to a commit SHA in github/gh-aw.
set -euo pipefail

gh api repos/github/gh-aw/git/ref/tags/v0.84.1 --jq '.object' || true
gh api repos/github/gh-aw/commits/029204130cb73f6ba684e56428c7f3e9319b708c --jq '.sha' || true

Repository: HemSoft/pe-bot

Length of output: 577


Update the stale pins for github/gh-aw-actions/setup@v0.84.1.

v0.84.1 points to ccf88b8a317e2409b40d87e0df29e6978de0f9c5, but the lock entries pin 029204130cb73f6ba684e56428c7f3e9319b708c, which no longer resolves. Update .github/aw/actions-lock.json and the matching workflow lock entries to the current commit or a new pinned tag.

🤖 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 @.github/aw/actions-lock.json around lines 3 - 6, Update the
github/gh-aw-actions/setup@v0.84.1 lock entry and every matching workflow lock
entry to a valid current commit or pinned tag, replacing the stale
029204130cb73f6ba684e56428c7f3e9319b708c SHA while preserving the existing
repository and version references.

}
}
}
1,483 changes: 1,483 additions & 0 deletions .github/workflows/sfl-pr-review.lock.yml

Large diffs are not rendered by default.

185 changes: 185 additions & 0 deletions .github/workflows/sfl-pr-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
---
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:
label_command:
name: sfl-review
events: [pull_request]
remove_label: true

permissions:
contents: read
pull-requests: read

models:
default-ai-credits-pricing:
input: 3
output: 15

engine:
id: copilot
env:
COPILOT_PROVIDER_BASE_URL: https://openrouter.ai/api/v1
COPILOT_PROVIDER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
COPILOT_PROVIDER_TYPE: openai
COPILOT_PROVIDER_WIRE_API: responses
COPILOT_MODEL: moonshotai/kimi-k3

model: moonshotai/kimi-k3

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:
threat-detection: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Reconsider threat-detection: false for a check that can gate merges.

The agent reads untrusted pull request content, including the diff and existing comments. The workflow then creates the SFL Reviewer Approval check run and submits APPROVE or REQUEST_CHANGES. If a pull request author embeds instructions in the diff, the agent can be steered to report zero findings and set the check conclusion to success. If that check becomes a required status check, the injection bypasses the review gate. Threat detection is disabled, so no separate pass inspects the agent output for this case.

Enable threat-detection, or keep the SFL Reviewer Approval check out of branch protection.

🤖 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 @.github/workflows/sfl-pr-review.md at line 46, Update the workflow
configuration around the threat-detection setting so threat detection is enabled
for the merge-gating SFL Reviewer Approval check; alternatively, ensure that
check is not used as a required branch-protection status. Prefer enabling threat
detection while preserving the existing review workflow behavior.

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"
---
# Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@78483bbf7edf0a4f8d3bf2f68e58678da36044ae
# 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 consumed during authorized activation
- 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

Do not modify code, branches, pull request labels, or pull request metadata.
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
36 changes: 36 additions & 0 deletions sfl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": "2.0.0",
"deployedAt": "2026-08-02T04:53:07Z",
"tier": "review",
"source": "HemSoft/set-it-free-loop",
"sourceSha": "78483bbf7edf0a4f8d3bf2f68e58678da36044ae",
"components": [
"governance",
"labels",
"sfl-pr-review"
],
"enginePolicy": {
"defaultProfile": "codex-gpt-55-high",
"workflows": [
{
"name": "sfl-pr-review",
"profile": "openrouter-kimi-k3-high",
"provider": "copilot",
"model": "moonshotai/kimi-k3",
"effort": null,
"renderedModel": "moonshotai/kimi-k3",
Comment on lines +17 to +21

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check every place the model and effort are rendered.
set -euo pipefail

rg -n 'kimi-k3|effort|renderedModel|openrouter-kimi' --glob '!node_modules' .

Repository: HemSoft/pe-bot

Length of output: 426


🏁 Script executed:

#!/bin/bash
# Description: Inspect the relevant configuration snippets and any nearby metadata/comments.
set -euo pipefail

printf '--- sfl.json ---\n'
cat -n sfl.json

printf '\n--- workflow referenced lock excerpt ---\n'
if [ -f .github/workflows/sfl-pr-review.lock.yml ]; then
  sed -n '870,900p' .github/workflows/sfl-pr-review.lock.yml | cat -n
fi

printf '\n--- repository files containing model or profile references ---\n'
rg -n 'moonshotai/kimi|COPILOT_MODEL|profile|renderedModel|effort=' --glob '!node_modules' . || true

Repository: HemSoft/pe-bot

Length of output: 243


🏁 Script executed:

#!/bin/bash
# Description: Inspect the relevant configuration snippets and any nearby metadata/comments.
set -euo pipefail

printf '%s\n' '--- sfl.json ---'
cat -n sfl.json

printf '%s\n' ''
printf '%s\n' '--- workflow referenced lock excerpt ---'
if [ -f .github/workflows/sfl-pr-review.lock.yml ]; then
  sed -n '870,900p' .github/workflows/sfl-pr-review.lock.yml | cat -n
fi

printf '%s\n' ''
printf '%s\n' '--- repository files containing model or profile references ---'
rg -n 'moonshotai/kimi|COPILOT_MODEL|profile|renderedModel|effort=' --glob '!node_modules' . || true

Repository: HemSoft/pe-bot

Length of output: 5295


Ensure the Kimi model matches the intended effort setting.

openrouter-kimi-k3-high has effort: null, renderedModel: moonshotai/kimi-k3, and COPILOT_MODEL: moonshotai/kimi-k3. If effort=high is required, add it to effort/renderedModel and the generated lock; otherwise update the profile name and documentation.

🤖 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 `@sfl.json` around lines 17 - 21, Align the openrouter-kimi-k3-high profile
with its intended effort setting: if high effort is required, set the profile’s
effort and renderedModel values accordingly and regenerate the associated lock
entry, including the COPILOT_MODEL value; otherwise rename the profile to
reflect its null effort and update the related documentation.

"requiredSecretsAnyOf": [
"OPENROUTER_API_KEY"
],
"arguments": [],
"environment": {
"COPILOT_PROVIDER_BASE_URL": "https://openrouter.ai/api/v1",
"COPILOT_PROVIDER_API_KEY": "${{ secrets.OPENROUTER_API_KEY }}",
"COPILOT_PROVIDER_TYPE": "openai",
"COPILOT_PROVIDER_WIRE_API": "responses",
"COPILOT_MODEL": "moonshotai/kimi-k3"
}
}
]
}
}