Skip to content

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

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

chore: deploy Set it Free Loop (review tier, v2.0.0)#222
HemSoft wants to merge 4 commits into
mainfrom
sfl/tier-review

Conversation

@HemSoft

@HemSoft HemSoft commented Aug 1, 2026

Copy link
Copy Markdown
Owner

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), adding a label-triggered PR review that runs security, correctness, and quality passes, posts inline findings, submits a consolidated review, and publishes an approval check. Also adds the SFL badge and metadata, pins workflow actions, and treats lock files as generated.

  • New Features

    • Adds sfl-pr-review workflow (trigger: sfl-review; inline findings; one consolidated review; SFL Reviewer Approval check; auto-removes sfl-review after run).
    • Pins github/gh-aw-actions/setup@v0.84.1 via .github/aw/actions-lock.json, adds compiled lock workflow .yml, and marks lock workflows as generated and merge=ours via .gitattributes.
    • Adds SFL badge to README.md and sfl.json manifest with version, tier, components, and engine policy.
  • Migration

    • Run .\deployment\governance\setup-labels.ps1 -Owner <org> -Repo <repo> if labels are not configured.
    • Verify compile: gh aw compile .github/workflows/sfl-pr-review.md.
    • Add the sfl-review label to a test PR to validate output.
    • Review sfl.json in the repo root.

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

Review in cubic

Note

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

  • Adds a GitHub Actions workflow sfl-pr-review.lock.yml that runs an agentic PR review triggered by the sfl-review label command, using moonshotai/kimi-k3 via OpenRouter.
  • Adds a workflow spec sfl-pr-review.md defining the Copilot engine configuration, GitHub tool integration, and review/approval policies.
  • Adds sfl.json as a metadata manifest capturing version, deployment timestamp, source SHA, and engine policy.
  • Updates README.md with a dynamic SFL badge reading the version from sfl.json and linking to the Set it Free Loop repository.

Macroscope summarized 4995062.

Source: HemSoft/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 activated by the sfl-review label.
    • Reviews assess security, correctness, reliability, and maintainability, with consolidated findings and approval or change-request results.
    • Added automated check publication and review-label cleanup after processing.
    • Added a dynamically updated project version badge to the README.
  • Configuration
    • Added project governance, review, and AI engine settings for the automated workflow.
    • Added safeguards for secure, controlled review execution.
    • Added pinned workflow actions and execution metadata for consistent processing.

Walkthrough

Adds SFL configuration and review instructions plus a generated GitHub Actions workflow. The workflow gates labeled pull requests, runs a Copilot review, processes artifacts, and publishes bounded review and check results.

Changes

SFL pull request review automation

Layer / File(s) Summary
Review configuration and workflow contract
sfl.json, .github/workflows/sfl-pr-review.md, .github/aw/actions-lock.json, .gitattributes, README.md
Defines SFL metadata, Copilot and OpenRouter settings, review requirements, the pinned setup action, generated-file attributes, and README markers.
Activation and eligibility gates
.github/workflows/sfl-pr-review.lock.yml
Triggers on the sfl-review label and validates pull request eligibility, team membership, credits, lock files, secrets, and prompt inputs.
Review execution and artifact collection
.github/workflows/sfl-pr-review.lock.yml
Checks out the pull request, configures authentication and isolation, runs the Copilot agent, collects usage data, and uploads review artifacts.
Result handling and safe publication
.github/workflows/sfl-pr-review.lock.yml
Aggregates workflow results and applies bounded check, comment, review, and issue-reporting outputs.

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

Suggested labels: feature

Poem

Poem

A rabbit guards the review gate,
Copilot checks each change and state.
Safe outputs hop through the stream,
Checks and comments complete the dream.
Then carrots mark the workflow green.

🚥 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 identifies the deployment of Set it Free Loop version 2.0.0 at the review tier.
Description check ✅ Passed The description directly explains the Set it Free Loop deployment, workflow components, configuration, and merge prerequisites.
✨ 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.

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

@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: 4

🤖 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 @.gitattributes:
- Line 1: Configure the repository-local Git merge driver before relying on the
merge=ours attribute for workflow lock files, using merge.ours.driver=true, and
document the required setup step; otherwise replace merge=ours with an approach
that preserves the intended lock-file merge behavior. Leave
linguist-generated=true unchanged.

In @.github/workflows/sfl-pr-review.md:
- Around line 51-52: Convert the two provenance lines at the top of the workflow
Markdown file from Markdown headings into HTML comments, matching the existing
`<!-- sfl: ... -->` convention, while preserving their text and placement before
the intended `# SFL Review` heading.
- Around line 116-126: Update the finding policy in the review instructions so
inline comments are capped at 20 total, prioritizing findings by severity from
Critical through Low. Ensure the consolidated review body reports how many
findings were omitted when the cap is exceeded, while preserving the exact
severity prefixes and one-thread-per-posted-finding behavior.

In `@sfl.json`:
- Around line 15-23: Add SFL_APP_PRIVATE_KEY to the requiredSecretsAnyOf array
for the sfl-pr-review configuration, keeping the existing profile, provider,
model, and effort settings unchanged.
🪄 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: a7470c55-a025-4e3d-81d5-c5452bea9d65

📥 Commits

Reviewing files that changed from the base of the PR and between 789ae86 and 670a586.

📒 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

Comment thread .gitattributes
@@ -0,0 +1 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours No newline at end of file

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

🧩 Analysis chain

🌐 Web query:

gitattributes merge=ours requires configuring merge driver git config merge.ours.driver true

💡 Result:

Yes, using the merge=ours attribute in a.gitattributes file requires you to define a custom merge driver in your Git configuration [1][2][3]. Git does not have a built-in merge driver named "ours" that can be automatically triggered by the merge attribute, so you must define one yourself [2][3]. To set this up: 1. Define the custom driver in your git configuration: git config merge.ours.driver true This command configures a driver named "ours" that runs the shell command true [1][4]. Since the true command always exits with a success status (0) and does not modify the file, Git treats the current file version in your working tree as the successfully merged result [1][3][4]. 2. Assign the attribute to your files in.gitattributes: filename.ext merge=ours Technical Caveats and Limitations: - Driver Invocation: The custom merge driver is only invoked when Git identifies a merge conflict (a "non-trivial" merge) for that specific file [2][3][5]. If a file has not been modified on the other branch, or if Git can perform the merge automatically without conflicts, the driver will not be called [2][3][6]. - High-level Conflicts: This method addresses low-level content conflicts [5]. It will not resolve "tree" or "high-level" conflicts, such as when one branch deletes a file while the other branch modifies it [5]. - Configuration Scope: You can use --global to apply this to all your repositories, or omit it to restrict the configuration to the current repository [1][2][3]. Some users prefer to define the driver explicitly in their.git/config using a section like [merge "ours"] driver = true to ensure consistent behavior [3][7].

Citations:


🌐 Web query:

Git documentation merge attributes merge-driver merge.x.driver not built-in

💡 Result:

Git does not include a built-in merge driver named "merge.x.driver". The configuration merge.<name>.driver is a template used to define custom merge drivers in your Git configuration files (such as .git/config or ~/.gitconfig) [1][2][3]. The <name> placeholder should be replaced by a unique identifier of your choosing [4][3]. To set up a custom merge driver, follow these two steps: 1. Define the driver in your Git configuration: Use the git config command or manually edit your configuration file to define the driver's name, command, and optional recursive behavior [1][5][3]. Replace my-custom-driver with your chosen identifier: git config merge.my-custom-driver.name "A custom merge driver" git config merge.my-custom-driver.driver "path/to/your-script.sh %O %A %B" The %O, %A, and %B tokens are automatically replaced by Git with the temporary file paths for the ancestor, current, and incoming versions of the file, respectively [1][2][3]. 2. Assign the driver to specific files via.gitattributes: Tell Git which files should use your custom driver by adding an entry to your .gitattributes file [1][4][5]: *.ext merge=my-custom-driver When a merge occurs, Git will invoke the command specified in your configuration for any files matching the pattern in .gitattributes [1][4]. The script is expected to overwrite the file at %A with the merge result and exit with a status of 0 for a clean merge, or non-zero if conflicts remain [1][2].

Citations:


🌐 Web query:

"built-in merge strategy" "built-in merge driver" git-mergeours.gitattributes

💡 Result:

In Git, merge strategies and merge drivers serve distinct roles, and the merge=ours attribute relies on a custom driver configuration rather than a built-in strategy [1][2]. Merge Strategies vs. Merge Drivers A merge strategy (e.g., recursive, octopus, ours) operates at the commit level to determine how to combine entire branches [3][4]. It is responsible for selecting the base commit and the parent commits [1][2]. A merge driver (also called a low-level merge driver) operates at the file level [1]. It is only invoked during a merge when Git determines that a specific file has been modified in both branches relative to the common ancestor [5][6]. If a file is unchanged in one branch, or if Git can perform a fast-forward, the merge driver is typically not invoked at all [5][6][4]. Merge=ours in.gitattributes The merge=ours attribute is not a built-in feature of Git by default [6][7]. To use it, you must define a custom merge driver named ours in your Git configuration [8][9]. This is typically done by running: git config --global merge.ours.driver true Once configured, assigning merge=ours to files in a.gitattributes file tells Git to use this driver when a file-level conflict occurs [8]. The driver simply does nothing (the true command returns a zero exit status), effectively leaving the file in your current branch ("ours") as it is [6][8]. Important Limitations 1. Triggering: The driver is only triggered when both branches have modified the file [5][9]. If only one branch modified the file, Git may simply accept that change, bypassing your merge driver entirely [5][6]. 2. Not a Strategy: This is a driver, not a merge strategy [5]. It cannot be used with the git merge -s command. The git merge -s ours strategy is an entirely different mechanism that merges entire branches by completely ignoring all changes from the incoming branch [7]. Summary of Key Terms * Merge Strategy: Chosen via git merge -s; determines how to reconcile commit history [3]. * Merge Driver: Triggered by.gitattributes when a file has content conflicts; handles the resolution of those specific files [1][2]. * git-merge-ours: This refers to the implementation of the -s ours strategy, which is distinct from the user-defined merge driver named "ours" used in.gitattributes [4][7].

Citations:


Configure the ours merge driver before using merge=ours.

merge=ours in .gitattributes does not invoke the branch-level git merge -s ours strategy. Git must find a configured low-level merge driver named ours; otherwise it ignores the attribute and falls back to normal three-way merge behavior. Add the repository-local config:

git config merge.ours.driver true

Document this setup step, or avoid merge=ours and regenerate the lock files after merges. linguist-generated=true needs no change.

🤖 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, Configure the repository-local Git merge driver
before relying on the merge=ours attribute for workflow lock files, using
merge.ours.driver=true, and document the required setup step; otherwise replace
merge=ours with an approach that preserves the intended lock-file merge
behavior. Leave linguist-generated=true unchanged.

Comment thread .github/workflows/sfl-pr-review.md Outdated
Comment on lines +51 to +52
# Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@380fe0edc7a87cfc7b31233a955b37df0223a3a8
# To upgrade: re-run deploy-workflow.ps1 at the desired SHA

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

Lines 51-52 render as Markdown headings, not comments.

A leading # in Markdown creates an H1 heading. These two provenance lines therefore become headings. The lock file imports this file into the agent prompt at runtime (.github/workflows/sfl-pr-review.lock.yml line 317), so the agent receives a spurious H1 before the intended # SFL Review heading at line 75. markdownlint also reports MD022 on both lines.

Use HTML comments, consistent with the <!-- sfl: ... --> block below.

📝 Proposed fix
-# Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@380fe0edc7a87cfc7b31233a955b37df0223a3a8
-# To upgrade: re-run deploy-workflow.ps1 at the desired SHA
+<!-- Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@380fe0edc7a87cfc7b31233a955b37df0223a3a8 -->
+<!-- To upgrade: re-run deploy-workflow.ps1 at the desired SHA -->
📝 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
# Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@380fe0edc7a87cfc7b31233a955b37df0223a3a8
# To upgrade: re-run deploy-workflow.ps1 at the desired SHA
<!-- Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@380fe0edc7a87cfc7b31233a955b37df0223a3a8 -->
<!-- To upgrade: re-run deploy-workflow.ps1 at the desired SHA -->
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 51-51: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 52-52: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)

🤖 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 51 - 52, Convert the two
provenance lines at the top of the workflow Markdown file from Markdown headings
into HTML comments, matching the existing `<!-- sfl: ... -->` convention, while
preserving their text and placement before the intended `# SFL Review` heading.

Source: Linters/SAST tools

Comment on lines +116 to +126
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

The finding policy does not account for the 20-comment cap.

create-pull-request-review-comment allows a maximum of 20 comments (line 38, and .github/workflows/sfl-pr-review.lock.yml line 545). The prompt instructs the agent to create exactly one inline thread per finding, with no upper bound. If the agent produces more than 20 findings, the safe-output handler drops the excess. The severity counts in the consolidated review body then disagree with the posted inline threads, and a dropped Critical finding is invisible to the author.

Instruct the agent to post at most 20 inline threads, to prioritize by severity, and to state any dropped-finding count in the review body.

📝 Proposed prompt addition
 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.
+
+Post at most 20 inline threads. If the findings exceed 20, post the 20 highest
+severity findings and report the number of omitted findings in the review body.
📝 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
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.
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.
Post at most 20 inline threads. If the findings exceed 20, post the 20 highest
severity findings and report the number of omitted 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 116 - 126, Update the
finding policy in the review instructions so inline comments are capped at 20
total, prioritizing findings by severity from Critical through Low. Ensure the
consolidated review body reports how many findings were omitted when the cap is
exceeded, while preserving the exact severity prefixes and
one-thread-per-posted-finding behavior.

Comment thread sfl.json

@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: 670a58612f

ℹ️ 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".

Comment on lines +3 to +6
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.

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 Record the review workflow in the changelog

This introduces a repository-wide development and review process but leaves the current Unreleased changelog unchanged, so the documented development history no longer reflects the deployed automation. Add an entry under the Unreleased Developer Experience subsection describing the label-triggered reviewer.

AGENTS.md reference: AGENTS.md:L54-L55

Useful? React with 👍 / 👎.

Comment thread .gitattributes
@@ -0,0 +1 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours No newline at end of file

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 Configure the merge driver before selecting it

When two branches both regenerate a workflow lock file, ours is interpreted as a custom low-level merge driver, but this repository neither defines merge.ours.driver nor documents the required Git configuration. With the repository as committed, Git performs its normal merge and still reports conflicts instead of retaining the generated lock file; configure the driver for contributors or remove the ineffective attribute.

Useful? React with 👍 / 👎.

HemSoft added 2 commits August 1, 2026 18:35
Source: HemSoft/set-it-free-loop@358e255
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/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.

@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: 1

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.lock.yml (1)

61-75: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Workflow name and run-name carry a deployment provenance string.

The value "Deployed from: HemSoft/set-it-free-loop/deployment/workflows/sfl-pr-review.md@358e25578515d4b1ed46cacb686624897720cdab" becomes the display name in the Actions UI. The same value propagates to GH_AW_WORKFLOW_NAME in the conclusion job (Lines 1248, 1269, 1287, 1302, 1317) and the safe-outputs job (Line 1725). Handlers such as handle_noop_message.cjs, missing_tool.cjs, and handle_agent_failure.cjs use that value in issue titles and report bodies. Users will see the commit SHA and source path in issue titles.

Set a readable name in the source workflow .github/workflows/sfl-pr-review.md and keep the provenance in the description or a comment. Recompile the lock file afterwards; do not edit the lock file directly.

🤖 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 around lines 61 - 75, Update the
source workflow’s name in .github/workflows/sfl-pr-review.md to a readable
user-facing title, while preserving the deployment provenance string in the
description or a comment. Then recompile the generated sfl-pr-review.lock.yml
through the project’s workflow generation process; do not modify the lock file
directly.
🤖 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:
- Line 356: Align the MCP tool configuration with the generated agent prompt:
update the GH_AW_MCP_CLI_SERVERS_LIST value to include the declared github MCP
tools (pull_requests and repos), or remove the github toolset from the
workflow/source if those tools should not be available. Keep the workflow’s
declared tools and prompt-listed tools consistent.

---

Outside diff comments:
In @.github/workflows/sfl-pr-review.lock.yml:
- Around line 61-75: Update the source workflow’s name in
.github/workflows/sfl-pr-review.md to a readable user-facing title, while
preserving the deployment provenance string in the description or a comment.
Then recompile the generated sfl-pr-review.lock.yml through the project’s
workflow generation process; do not modify the lock file directly.
🪄 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: f24f8795-b562-4ffa-b32c-41e774890e58

📥 Commits

Reviewing files that changed from the base of the PR and between 670a586 and 8424566.

📒 Files selected for processing (3)
  • .github/workflows/sfl-pr-review.lock.yml
  • .github/workflows/sfl-pr-review.md
  • sfl.json

GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools'

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: Trace how the GitHub MCP server token is supplied to the Codex agent.
set -euo pipefail

rg -n 'GH_AW_GITHUB_TOKEN|GITHUB_MCP_SERVER_TOKEN|GH_AW_MCP_CLI_SERVERS_LIST|mcp_servers.github' .github/workflows/sfl-pr-review.lock.yml
fd -H 'sfl-pr-review.md' -t f -p '.github' --exec rg -n -A6 'tools:|github:|toolsets' {}

Repository: HemSoft/codexbar-ios

Length of output: 8499


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow relevant sections =="
sed -n '32,40p;180,215p;340,385p;485,535p;730,815p;905,980p' .github/workflows/sfl-pr-review.lock.yml

echo "== source workflow relevant sections =="
sed -n '24,36p' .github/workflows/sfl-pr-review.md 2>/dev/null || true

echo "== references to safeoutputs/github prompts =="
rg -n 'github_mcp_tools_with_safeoutputs_prompt|safeoutputs --help|pull_requests|toolsets' .github/workflows/sfl-pr-review.lock.yml .github/workflows/sfl-pr-review.md 2>/dev/null || true

Repository: HemSoft/codexbar-ios

Length of output: 22697


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate substitute placeholder action =="
fd -H 'substitute' -t f -p '.github'
for f in $(fd 'substitute.*\.(cjs|js|ts)$' .github); do
  echo "== $f =="
  sed -n '1,220p' "$f"
done

echo "== locate config generation action =="
fd 'generate.*config|generate_mcp|start_mcp_gateway|substitute' .github/actions -t f | sed -n '1,120p'
for f in $(fd 'generate.*config|generate_mcp|start_mcp_gateway|interpolate_prompt|substitute' .github/actions -t f); do
  echo "== $f =="
  sed -n '1,240p' "$f"
done

Repository: HemSoft/codexbar-ios

Length of output: 342


🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files .github | sed -n '1,160p'
echo "== all placeholder/config/token env references =="
rg -n 'GH_AW_PROMPT|GH_AW_MCP_CONFIG|substitutePlaceholders|GITHUB_MCP_SERVER_TOKEN|GITHUB_PERSONAL_ACCESS_TOKEN|GH_AW_GITHUB_TOKEN' .github -g '*.*' || true

Repository: HemSoft/codexbar-ios

Length of output: 13063


🌐 Web query:

gh-aw-actions setup substitute_placeholders GH_AW_PROMPT replace tokens

💡 Result:

In the context of the gh-aw project, substitute_placeholders.cjs is an internal JavaScript utility used within GitHub Actions workflows to replace specific placeholder patterns in prompt files with environment variable values at runtime [1][2]. The substitution process typically works as follows: 1. Placeholder Pattern: The system uses the pattern GH_AW_* (e.g., GH_AW_GITHUB_WORKSPACE) to represent placeholders within prompt templates [1][2]. 2. Runtime Replacement: The substitute_placeholders.cjs script is executed within a GitHub Actions step (often using actions/github-script) to scan a specified file and replace these placeholders with the values mapped from the provided environment variables [3][1][2][4]. 3. Workflow Implementation: Workflows configure this step by setting the GH_AW_PROMPT environment variable to the path of the prompt file, and providing a mapping of substitutions (variable names to their actual runtime values) when calling the substitutePlaceholders function [5][4]. Key technical details include: - Global Initialization: It is critical that setupGlobals is called before requiring substitute_placeholders.cjs to ensure GitHub Actions APIs (like core, github, context) are available to the script [3][4]. - Validation: The system includes validation steps (such as validate_prompt_placeholders.sh) to ensure that all GH_AW_* placeholders are successfully replaced before the prompt is used by the agent [5][2]. - Not to be confused with the popular community action cschleiden/replace-tokens, which is a general-purpose GitHub Action used for replacing tokens (often with prefixes like #{) in generic files [6][7]. The gh-aw implementation is a specialized, internal component of the gh-aw workflow pipeline [8].

Citations:


🌐 Web query:

site:github.com github gh-aw-actions substitute_placeholders.cjs

💡 Result:

substitute_placeholders.cjs is a utility script used within the GitHub Agentic Workflows (gh-aw) project to perform safe, in-place string substitution within files [1][2]. Key details regarding this script include: Purpose and Security: It was implemented to replace the use of the shell utility envsubst in GitHub Actions workflows [2]. By performing substitution via a JavaScript function (typically executed within an actions/github-script step), the project avoids common vulnerabilities associated with shell expansion and template injection when processing untrusted data [2]. Functionality: The script takes a file path and an object of substitutions as input [1]. It reads the target file, replaces occurrences of placeholders (formatted as KEY) with the corresponding values from the substitutions object, and writes the updated content back to the file [1]. It includes logic to handle null or undefined values safely, preventing them from being rendered as strings like "null" or "undefined" [1][3]. Integration in gh-aw: - Location: The script is part of the internal logic for compiled Agentic Workflows [1][4]. While it may appear in source paths like pkg/workflow/js/ or actions/setup/js/, it is ultimately utilized by GitHub Actions generated by the gh-aw compiler [2][5]. - Initialization: It relies on proper initialization of GitHub Actions globals (such as core) to function correctly, often requiring a setupGlobals call before it is invoked [5]. - Maintenance: It is actively maintained as part of the gh-aw infrastructure, undergoing periodic refactoring (such as the addition of JSDoc annotations, TypeScript checks, and improved diagnostic logging) to enhance maintainability and debugging [3][5]. Users of the gh-aw CLI should not modify these generated files manually; instead, the lifecycle of these scripts is managed automatically by the gh-aw compiler [6][7]. Reference to this script within a GitHub Actions workflow is typically handled by the underlying gh-aw-actions repository [8][6].

Citations:


🌐 Web query:

github gh-aw-actions setup substitute_placeholders.cjs process.env include only substitutions null undefined

💡 Result:

The substitute_placeholders.cjs script, used in the github/gh-aw repository, is a utility designed to safely perform template substitution within GitHub Actions, replacing unsafe shell-based envsubst to prevent template injection [1]. Regarding the handling of null and undefined values during substitution, the script explicitly ensures these values do not result in literal "null" or "undefined" strings in the output [2][3]. Key technical details include: - Behavior: When processing the substitutions object, the script iterates through each entry and converts null or undefined values into an empty string ("") before performing the replacement [2][3]. - Implementation: This is achieved via a null check (idiomatically implemented in recent versions as value == null ? "" : value) [3]. - Context: It is commonly used within actions/github-script steps in workflow files, where specific environment variables (retrieved via process.env) are passed into the substitutions object to populate placeholders (e.g., GH_AW_VARIABLE) defined in markdown templates [4][5]. By design, this pattern ensures that even if an environment variable is unset (undefined) or explicitly set to null, the resulting template maintains clean output rather than corrupted text [2].

Citations:


🌐 Web query:

github gh-aw-actions setup substitute_placeholders.cjs raw

💡 Result:

The file substitute_placeholders.cjs is a JavaScript utility script used within the github/gh-aw repository to safely perform string interpolation in workflow files [1][2]. It was introduced to replace unsafe shell-based substitutions (like envsubst) and prevent template injection vulnerabilities [2]. Key details about the script: - Purpose: It reads a file, searches for placeholders defined in the format KEY, replaces them with provided values, and writes the updated content back to the file [1]. - Implementation: The script exports a function that accepts an object containing the file path and a dictionary of substitutions [1]. Recent improvements include adding JSDoc type annotations, TS checks, and better integration with GitHub Actions globals via a shim [3][4]. - Usage in Workflows: It is typically invoked within a GitHub Actions workflow using actions/github-script [4][5]. Workflows often prepare a template file (e.g., a markdown prompt) containing PLACEHOLDER tokens and then use this script to inject environment variables or other dynamic data safely [6][5]. - Lifecycle: The file is managed in the actions/setup/js/ directory and is copied by setup.sh to the runner's temporary directory ($RUNNER_TEMP/gh-aw/actions/) at runtime, making it accessible for subsequent steps in a workflow [7].

Citations:


Align the GitHub MCP tool supply with the agent prompt.

The workflow declares github with pull_requests, repos, while the generated prompt only lists safeoutputs MCP CLIs. Either expose the GitHub MCP tools in the listed MCP CLIs or remove the GitHub toolset from the source/workflow if the review should not call them.

🤖 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 356, Align the MCP tool
configuration with the generated agent prompt: update the
GH_AW_MCP_CLI_SERVERS_LIST value to include the declared github MCP tools
(pull_requests and repos), or remove the github toolset from the workflow/source
if those tools should not be available. Keep the workflow’s declared tools and
prompt-listed tools consistent.

Source: HemSoft/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.

@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: 1

🤖 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.md:
- Line 185: Narrow the prohibition in the workflow instructions by replacing
“pull request metadata” with the specific fields the agent must not edit: title,
body, assignees, milestone, and agent-owned or approved labels. Explicitly allow
review comments, the consolidated review, and the “SFL Reviewer Approval” check
as required outputs, while retaining the existing restrictions on code,
branches, and other unauthorized changes.
🪄 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: 9669f3da-fa73-4c66-9480-1349add8a8f8

📥 Commits

Reviewing files that changed from the base of the PR and between 8424566 and 4995062.

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

- `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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -u

rg -n -C3 \
  'create-pull-request-review-comment|submit_pull_request_review|create_check_run|remove_trigger_label|Do not modify' \
  .github/workflows/sfl-pr-review.md .github/workflows/sfl-pr-review.lock.yml || true

Repository: HemSoft/codexbar-ios

Length of output: 8559


🏁 Script executed:

#!/bin/bash
set -u

echo "== workflow outline =="
wc -l .github/workflows/sfl-pr-review.md .github/workflows/sfl-pr-review.lock.yml

echo
echo "== relevant sfl-pr-review.md sections =="
sed -n '1,230p' .github/workflows/sfl-pr-review.md

echo
echo "== safe output prompt sections in lock.yml =="
sed -n '300,317p' .github/workflows/sfl-pr-review.lock.yml
sed -n '576,630p' .github/workflows/sfl-pr-review.lock.yml

Repository: HemSoft/codexbar-ios

Length of output: 10116


🌐 Web query:

GitHub Apps pull-requests read permission submit_review labels remove_label can not assign review labels

💡 Result:

To perform operations like submitting reviews or managing labels on pull requests via a GitHub App, you must configure the appropriate repository permissions. If your GitHub App cannot perform these actions, it is likely due to insufficient or misconfigured permissions [1]. For managing labels on a pull request, you must have 'Issues' permission set to 'Read & write' [2][3]. Even though pull requests are distinct, label management is handled under the 'Issues' permission scope in the GitHub API [2][4]. With 'Read & write' access to Issues, your app can add, remove, and list labels on both issues and pull requests [3][5]. For submitting reviews (e.g., approving or commenting on a pull request), you must have 'Pull requests' permission set to 'Read & write' [3]. This permission allows the app to perform operations such as creating reviews, dismissing reviews, and managing requested reviewers [3]. If your app currently only has 'Read-only' access to these scopes, it will be unable to modify labels or submit reviews [1]. To troubleshoot, verify the following: 1. Ensure the app has the 'Issues' permission set to 'Read & write' to manage labels [3]. 2. Ensure the app has the 'Pull requests' permission set to 'Read & write' to submit reviews [3]. 3. Check the X-Accepted-GitHub-Permissions header in the response from the GitHub API, which will explicitly list the permissions required for the specific endpoint you are attempting to call [6][7].

Citations:


🌐 Web query:

GitHub REST API submit a pull request review permissions required pull_requests write Issues permission labels

💡 Result:

To submit a pull request review via the GitHub REST API, you generally need the "pull-requests: write" permission [1][2]. Key technical details: 1. Permission Syntax: When configuring permissions for GitHub Actions workflows or defining scopes for fine-grained personal access tokens (PATs) and GitHub Apps, the correct permission name is "pull-requests" (using a hyphen, not an underscore) [3][2]. Using "pull_requests" (with an underscore) in YAML configuration files will cause a syntax error [3]. 2. Endpoint Requirements: The specific endpoint used for creating or submitting reviews is located under the Pull Request Reviews REST API [4][5]. Fine-grained tokens must be granted "pull-requests: write" access to interact with these resources [1][2]. 3. Troubleshooting: If you receive a "Resource not accessible" error, you can check the "X-Accepted-GitHub-Permissions" header in the API response [6][7]. This header explicitly lists the permissions required to access the specific endpoint you are calling [7]. 4. Contextual Access: Note that the "Issues" permission is distinct and is not typically used for submitting pull request reviews, though some API operations related to issue labels or comments may require "issues: write" [3]. Always verify the specific documentation page for the endpoint you are targeting, as requirements can vary based on the action performed [6][8].

Citations:


🌐 Web query:

GitHub Issues permission pull request labels remove_label GitHub App pull-requests read

💡 Result:

To remove a label from a pull request using a GitHub App, the app requires write-level permission for issues [1][2][3]. Although pull requests are a distinct feature on GitHub, they are treated as issues for many management actions, including managing labels, assignees, and milestones [1][4][3]. Consequently, the REST API endpoints for label operations are located within the Issues section of the documentation [1][3]. Key Technical Details: - Required Permission: Your GitHub App must be granted 'Issues: write' access [1][2]. A 'pull-requests: read' permission is insufficient for modifying labels [5][6]. - API Endpoint: The operation to remove a single label uses the 'DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}' endpoint [1][3]. - Permission Troubleshooting: If your app encounters a 'Resource not accessible' error, check the 'X-Accepted-GitHub-Permissions' header in the API response, which explicitly states the permissions required for that specific endpoint [5][6]. - Common Pitfall: Ensure your permission configuration uses the correct syntax 'issues: write' (with a hyphen where applicable in workflow files, though the permission name is 'issues') [7]. While 'pull-requests' permissions are available, they do not cover label management for pull requests [1][2].

Citations:


Narrow the prohibition on pull-request metadata.

The workflow runs with only pull-requests: read, so label removal, review submission, and check runs are still limited by permissions regardless of this wording. Replace the broad “pull request metadata” prohibition with the specific metadata fields that should not be edited, such as title, body, assignees, milestone, and labels owned/approved by the agent. Explicitly list review comments, the consolidated review, and the SFL Reviewer Approval check as required safe outputs so the agent is not blocked from producing them.

🤖 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 185, Narrow the prohibition in
the workflow instructions by replacing “pull request metadata” with the specific
fields the agent must not edit: title, body, assignees, milestone, and
agent-owned or approved labels. Explicitly allow review comments, the
consolidated review, and the “SFL Reviewer Approval” check as required outputs,
while retaining the existing restrictions on code, branches, and other
unauthorized changes.

@HemSoft

HemSoft commented Aug 16, 2026

Copy link
Copy Markdown
Owner 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