Skip to content

chore: deploy Set it Free Loop (review tier, v2.0.0) - #1

Closed
HemSoft wants to merge 3 commits into
mainfrom
sfl/tier-review
Closed

HemSoft wants to merge 3 commits into
mainfrom
sfl/tier-review

Conversation

@HemSoft

@HemSoft HemSoft commented Aug 1, 2026 •

Copy link
Copy Markdown
Collaborator

Set it Free Loop — Deployment

Version: 2.0.0
Tier: review
Source SHA: 380fe0edc7a87cfc7b31233a955b37df0223a3a8
Engine policy: codex-gpt-55-high

Components deployed

  • labels
  • governance
  • sfl-pr-review

What is the Set it Free Loop?

The Set it Free Loop is a continuous
quality improvement operating model for software repositories. See the
CATALOG
for all available workflows.

Before merging

  • Run .\deployment\governance\setup-labels.ps1 -Owner <org> -Repo <repo> if labels are not yet configured
  • For each .md workflow: verify gh aw compile .github/workflows/<name>.md succeeds
  • Trigger a workflow manually to confirm output
  • Review sfl.json manifest in the repo root

Summary by cubic

Deploys the Set it Free Loop (review tier, v2.0.0) to add a label-triggered, full-spectrum PR review with an approval check, inline findings, and OpenRouter-backed evaluation via the copilot engine.

  • New Features

    • Adds sfl-pr-review workflow triggered by the sfl-review label. Runs security, correctness, and quality passes, posts inline threads, submits a consolidated review, creates the SFL Reviewer Approval check, and removes the label.
    • Includes compiled lock file and pins github/gh-aw-actions/setup@v0.84.1 via .github/aw/actions-lock.json.
    • Adds sfl.json and an SFL badge in README; maps sfl-pr-review to moonshotai/kimi-k3 through OpenRouter using the copilot provider; marks workflow lock files as generated in .gitattributes.
  • Migration

    • Set secrets: OPENROUTER_API_KEY, SFL_APP_PRIVATE_KEY; and var: SFL_APP_CLIENT_ID.
    • Configure labels: .\deployment\governance\setup-labels.ps1 -Owner <org> -Repo <repo>.
    • Compile the workflow: gh aw compile .github/workflows/sfl-pr-review.md, then add the sfl-review label to a PR to validate review output and check creation.

Written for commit e6d9293. Summary will update on new commits.

Review in cubic

Note

Deploy Set it Free Loop PR review workflow (review tier, v2.0.0)

  • Adds sfl-pr-review.md, an agentic workflow spec that triggers a full-spectrum PR review when a pull request is labeled sfl-review, using moonshotai/kimi-k3 via OpenRouter.
  • The compiled, pinned workflow sfl-pr-review.lock.yml runs jobs for membership checks, prompt generation, Copilot-driven review via MCP gateway, and safe-outputs application (inline comments, consolidated review, and a named check run).
  • Adds sfl.json with deployment metadata including version, tier, enabled components, and engine policy.
  • Updates .gitattributes to mark *.lock.yml workflow files as linguist-generated and resolve merges with the ours strategy.

Macroscope summarized e6d9293.

Source: hemsoft-dev/set-it-free-loop@380fe0e
Version: 2.0.0
Tier: review
Components: labels, governance, sfl-pr-review
Engine policy: codex-gpt-55-high

See https://github.com/HemSoft/set-it-free-loop for full documentation.
@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added automated pull request reviews covering security, correctness, reliability, and maintainability.
    • Reviews include severity-classified inline findings, consolidated feedback, and approval checks.
    • Added safeguards for usage limits, secure execution, and threat detection.
    • Reviews can be triggered with a pull request label and automatically clean up after completion.
  • Documentation
    • Added a dynamic project version badge to the README.
  • Chores
    • Added deployment metadata and locked workflow configuration for consistent review automation.
    • Updated the automated review tooling to its latest locked version.

Walkthrough

Added SFL deployment metadata and a generated GitHub Actions workflow. The workflow starts from the sfl-review label, runs Codex review, validates outputs, tracks usage, and publishes authenticated safe outputs.

Changes

SFL review automation

Layer / File(s) Summary
Workflow contract and deployment configuration
.github/aw/actions-lock.json, .github/workflows/sfl-pr-review.md, sfl.json, .gitattributes, README.md
Added SFL metadata, review requirements, pinned setup configuration, generated-file attributes, and a dynamic version badge.
Activation and Codex agent orchestration
.github/workflows/sfl-pr-review.lock.yml
Added label-triggered activation, access checks, validation, prompt construction, Codex execution, authentication, firewall isolation, output parsing, and usage artifact handling.
Detection, conclusion, and safe outputs
.github/workflows/sfl-pr-review.lock.yml
Added agent error detection, conclusion processing, daily credit tracking, and authenticated publishing of reviews, comments, checks, and reports.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant ActivationJob
  participant CodexAgentJob
  participant ConclusionJob
  participant SafeOutputsJob
  PullRequest->>ActivationJob: Add sfl-review label
  ActivationJob->>CodexAgentJob: Provide validated prompt and activation artifact
  CodexAgentJob->>ConclusionJob: Provide agent artifacts and usage data
  ConclusionJob->>SafeOutputsJob: Provide processed review results
  SafeOutputsJob->>PullRequest: Publish reviews, comments, checks, and reports
Loading

Suggested labels: feature

Poem

A rabbit reviews beneath moonlight bright,
Codex checks each change just right.
Safe results hop into the queue,
Usage and findings publish what is due.
SFL takes flight with a happy chew.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the deployment of Set it Free Loop review tier version 2.0.0.
Description check ✅ Passed The description directly explains the deployed workflows, configuration, version, tier, and required setup steps.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sfl/tier-review

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.

@macroscopeapp

macroscopeapp Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Needs human review

Unable to check for correctness in e6d9293. This PR deploys new CI/CD infrastructure for automated PR review with GitHub App credentials and AI integration. Several unresolved review comments identify operational concerns including missing secret declarations and potential stale-head race conditions. The scope and complexity of this workflow deployment warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@coderabbitai coderabbitai Bot added the feature label Aug 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c709298a4a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,180 @@
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Obtain permission before adding the Markdown workflow

This change creates a new .md file even though the repository explicitly prohibits creating any Markdown file without user permission. Obtain and document that permission, or deploy the workflow without adding this source file.

AGENTS.md reference: AGENTS.md:L18-L20

Useful? React with 👍 / 👎.

Comment thread .github/workflows/sfl-pr-review.md Outdated

on:
pull_request:
types: [labeled]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Revalidate the PR head before publishing approval

When commits are pushed after the sfl-review label starts this potentially long-running review, this workflow neither receives a synchronize event nor verifies that the PR head still equals the event SHA before publishing its review and approval check. The prompt therefore reviews the original ${{ github.event.pull_request.head.sha }} while the resulting approval can be stale or associated with a newer, unreviewed PR state; compare the live head to the event SHA immediately before safe outputs and abort or require relabeling if it changed.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai 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.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/sfl-pr-review.md (1)

102-181: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cap findings so the review stays complete.

The finding policy requires one inline thread per finding. create-pull-request-review-comment has max: 20 (line 38), and the compiled tool description enforces that cap (.github/workflows/sfl-pr-review.lock.yml line 553). If the agent identifies more than 20 findings, the extra inline threads are dropped, and the severity counts in the consolidated review body no longer match the posted threads.

Add explicit guidance for the over-cap case. For example: post the highest-severity findings first, and state the number of unreported findings in the review body.

🤖 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 around lines 102 - 181, Update the
finding and consolidated-review guidance in the workflow instructions to handle
more than 20 findings: prioritize posting the highest-severity findings within
the create-pull-request-review-comment limit, and report the number of
identified findings that were not posted in the consolidated review body while
keeping severity counts accurate.
🤖 Prompt for all review comments with 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.

Inline comments:
In @.github/workflows/sfl-pr-review.lock.yml:
- Around line 1461-1469: Report the duplicated awf-config.json write upstream in
gh-aw v0.83.4 and regenerate this workflow from the corrected source instead of
editing the generated lock file. Ensure the generated job retains only one
chroot configuration write and aligns with the agent job’s
patch_awf_chroot_config.cjs approach.
- Line 58: Add an explicit readable workflow name to the frontmatter of the
source workflow, using the existing workflow purpose, then run `gh aw compile`
to regenerate the corresponding lock file so its `name` and `run-name` no longer
use the deployment banner.
- Around line 405-408: Verify that the organization allows Copilot CLI usage
billed to the organization for the built-in token used by the agent and
detection jobs; if not, configure the COPILOT_GITHUB_TOKEN secret so the
existing Check for OAuth tokens fallback is used. Keep the copilot-requests:
write permission unchanged, as the actionlint warning for this documented scope
is expected.

In `@README.md`:
- Line 5: Remove the duplicate “Dashboard TUI” heading shown in the README diff,
preserving the existing heading at the top of the file so the document contains
only one heading with that text.

In `@sfl.json`:
- Around line 12-25: Update the sfl-pr-review workflow entry in enginePolicy to
declare its required GitHub App credential dependency in requiredSecretsAnyOf,
including SFL_APP_PRIVATE_KEY and SFL_APP_CLIENT_ID (or the manifest’s supported
equivalent for the variable), so deployment validates both values before token
minting.

---

Outside diff comments:
In @.github/workflows/sfl-pr-review.md:
- Around line 102-181: Update the finding and consolidated-review guidance in
the workflow instructions to handle more than 20 findings: prioritize posting
the highest-severity findings within the create-pull-request-review-comment
limit, and report the number of identified findings that were not posted in the
consolidated review body while keeping severity counts accurate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7d0b2226-18ef-453a-860f-1d13f7a9a517

📥 Commits

Reviewing files that changed from the base of the PR and between 75f89cf and c709298.

📒 Files selected for processing (6)
  • .gitattributes
  • .github/aw/actions-lock.json
  • .github/workflows/sfl-pr-review.lock.yml
  • .github/workflows/sfl-pr-review.md
  • README.md
  • sfl.json

# - ghcr.io/github/gh-aw-node@sha256:a8082161d7dceda14b68f32eb39d0eaa96b825d07f5895b096afab9d9e0c7748
# - ghcr.io/github/github-mcp-server:v1.7.0@sha256:c491ffdf6f4c85cb5397021bc655edb8ab825c6f5f568e7597d77a1bd7c4d308

name: "Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@380fe0edc7a87cfc7b31233a955b37df0223a3a8"

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 | 🟠 Major | ⚡ Quick win

Set a readable workflow name.

name and run-name both carry the deployment banner Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@380fe0e.... This string becomes the workflow title in the Actions UI and every run title. It also propagates into GH_AW_WORKFLOW_NAME for the noop handler (line 1205), the missing-tool issue (line 1244), the failure report (line 1274), and the safe-outputs job (line 1627). Failure issues and reports will therefore be titled with the deployment path instead of the workflow purpose.

The root cause is in the source file. .github/workflows/sfl-pr-review.md has no name in its frontmatter, so the compiler uses the first heading-like line, which is the deployment marker at line 51. Add an explicit name to the frontmatter and recompile.

🔧 Proposed change in the source `.md` frontmatter
 ---
+name: SFL Full-Spectrum PR Review
 description: |
   Standalone full-spectrum pull request review triggered by the sfl-review

Then run gh aw compile to regenerate the lock file.

Also applies to: 72-72

🤖 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.lock.yml at line 58, Add an explicit
readable workflow name to the frontmatter of the source workflow, using the
existing workflow purpose, then run `gh aw compile` to regenerate the
corresponding lock file so its `name` and `run-name` no longer use the
deployment banner.

Comment thread README.md

[![Set it Free Loop](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FHemSoft%2Fdashboard-tui%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 -->
# Dashboard TUI

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 duplicate Dashboard TUI heading.

README.md already contains this heading at Line 1. Remove the added heading to satisfy MD024.

Proposed fix
 <!-- SFL_BADGE: auto-updated by deploy-workflow.ps1 -->
-# Dashboard TUI
🧰 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` at line 5, Remove the duplicate “Dashboard TUI” heading shown in
the README diff, preserving the existing heading at the top of the file so the
document contains only one heading with that text.

Source: Linters/SAST tools

Comment thread sfl.json
Comment on lines +12 to +25
"enginePolicy": {
"defaultProfile": "codex-gpt-55-high",
"workflows": [
{
"name": "sfl-pr-review",
"profile": "copilot-gpt-55-high",
"provider": "copilot",
"model": "gpt-5.5",
"effort": "high",
"renderedModel": "gpt-5.5?effort=high",
"requiredSecretsAnyOf": []
}
]
}

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 | 🟠 Major | ⚡ Quick win

Declare the App credentials that this workflow requires.

requiredSecretsAnyOf is empty. The deployed workflow depends on secrets.SFL_APP_PRIVATE_KEY and vars.SFL_APP_CLIENT_ID for GitHub App token minting in three jobs (.github/workflows/sfl-pr-review.lock.yml lines 505-506, 1084-1085, 1670-1671). If the secret or the variable is missing, token minting fails and no review, check run, or label removal is posted. The empty list removes any deploy-time gate on that dependency.

Add the required secret to the manifest, or confirm that the SFL deploy tooling validates App credentials by another path.

🔧 Proposed manifest change
         "renderedModel": "gpt-5.5?effort=high",
-        "requiredSecretsAnyOf": []
+        "requiredSecretsAnyOf": ["SFL_APP_PRIVATE_KEY"]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"enginePolicy": {
"defaultProfile": "codex-gpt-55-high",
"workflows": [
{
"name": "sfl-pr-review",
"profile": "copilot-gpt-55-high",
"provider": "copilot",
"model": "gpt-5.5",
"effort": "high",
"renderedModel": "gpt-5.5?effort=high",
"requiredSecretsAnyOf": []
}
]
}
"enginePolicy": {
"defaultProfile": "codex-gpt-55-high",
"workflows": [
{
"name": "sfl-pr-review",
"profile": "copilot-gpt-55-high",
"provider": "copilot",
"model": "gpt-5.5",
"effort": "high",
"renderedModel": "gpt-5.5?effort=high",
"requiredSecretsAnyOf": ["SFL_APP_PRIVATE_KEY"]
}
]
}
🤖 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 12 - 25, Update the sfl-pr-review workflow entry in
enginePolicy to declare its required GitHub App credential dependency in
requiredSecretsAnyOf, including SFL_APP_PRIVATE_KEY and SFL_APP_CLIENT_ID (or
the manifest’s supported equivalent for the variable), so deployment validates
both values before token minting.

HemSoft added 2 commits August 1, 2026 21:18
Source: hemsoft-dev/set-it-free-loop@235a0df
Version: 2.0.0
Tier: review
Components: labels, governance, sfl-pr-review
Engine policy: codex-gpt-55-high

See https://github.com/HemSoft/set-it-free-loop for full documentation.
Source: hemsoft-dev/set-it-free-loop@78483bb
Version: 2.0.0
Tier: review
Components: labels, governance, sfl-pr-review
Engine policy: codex-gpt-55-high

See https://github.com/HemSoft/set-it-free-loop for full documentation.
@HemSoft

HemSoft commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this v2.0.0 SFL rollout as superseded. HemSoft now uses v2.1.0-rc.9, and hs-buddy is the only approved HemSoft SFL validation repository. This old deployment should not be merged or refreshed.

@HemSoft HemSoft closed this Aug 16, 2026
@HemSoft
HemSoft deleted the sfl/tier-review branch August 16, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant