Skip to content

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

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

chore: deploy Set it Free Loop (review tier, v2.0.0)#129
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) to enable full-spectrum PR reviews when the sfl-review label is applied. Adds the sfl-pr-review workflow, version manifest, and a README badge.

  • New Features

    • Adds .github/workflows/sfl-pr-review.md (with compiled .lock.yml) to run security, correctness/reliability, and quality/maintainability passes on labeled PRs, post inline findings, submit one consolidated review, create the “SFL Reviewer Approval” check, and remove sfl-review when done.
    • Adds sfl.json manifest (tier: review, v2.0.0) and a README SFL badge auto-updated from the manifest.
    • Locks action github/gh-aw-actions/setup@v0.84.1 in .github/aw/actions-lock.json.
    • Marks workflow lock files as generated in .gitattributes to prefer merge=ours.
  • Migration

    • Run .\deployment\governance\setup-labels.ps1 -Owner <org> -Repo <repo> to ensure labels exist.
    • Verify gh aw compile .github/workflows/sfl-pr-review.md succeeds and OPENROUTER_API_KEY is configured.
    • Manually trigger the workflow to confirm behavior.
    • Review sfl.json in repo root.

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

Review in cubic

Note

Deploy Set it Free Loop PR review workflow at review tier v2.0.0

  • Adds sfl-pr-review.md, an agentic workflow spec triggered by the sfl-review label command, which runs a Copilot agent using moonshotai/kimi-k3 via OpenRouter to perform full-spectrum PR reviews.
  • Adds the compiled, pinned sfl-pr-review.lock.yml workflow with jobs for activation, agent execution, safe-outputs processing, and conclusion.
  • Adds sfl.json exposing SFL metadata (version 2.0.0, tier review, engine policy) at the repo root, which powers a new dynamic badge in README.md.
  • Marks *.lock.yml workflow files as linguist-generated and sets merge strategy to ours in .gitattributes.

Macroscope summarized e1ccba1.

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 covering security, correctness, reliability, and maintainability.
    • Reviews can provide severity-based inline findings, consolidated approval decisions, and status checks.
    • Added configurable deployment settings for the review workflow.
  • Documentation

    • Added a Set it Free Loop badge to the README.
  • Chores

    • Added pinned workflow configuration and merge handling for generated automation files.

Walkthrough

Adds a label-triggered pull-request review workflow. It includes activation checks, isolated agent execution, constrained output processing, result publication, deployment metadata, and generated workflow locking.

Changes

Pull request review automation

Layer / File(s) Summary
Deployment contract and workflow definition
.github/workflows/sfl-pr-review.md, sfl.json, .github/aw/actions-lock.json, .gitattributes, README.md
Defines the review workflow, engine policy, pinned setup action, generated-file handling, and deployment markers.
Activation and runtime preparation
.github/workflows/sfl-pr-review.lock.yml
Adds label triggers, permissions, actor validation, concurrency, guardrails, prompt validation, repository setup, and activation artifacts.
Copilot review and threat detection
.github/workflows/sfl-pr-review.lock.yml
Runs isolated Copilot review with MCP access and safe-output validation. It records usage, logs, and result artifacts.
Result processing and publication
.github/workflows/sfl-pr-review.lock.yml
Aggregates agent, safe-output, and usage results. It handles incomplete outcomes and publishes reviews, checks, issues, labels, and artifacts.

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

Suggested labels: feature

Poem

A rabbit reviews beneath the moon,
Safe checks guide each workflow tune.
Threat detection watches the start,
Constrained outputs guard each part.
Locked files keep the process smart.

🚥 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 at review tier version 2.0.0.
Description check ✅ Passed The description accurately explains the deployed components, workflow behavior, version, migration steps, and pre-merge checks.
✨ 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

@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: 3a92b89567

ℹ️ 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 +77 to +79
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 }}`.

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 Refuse to review an obsolete PR head

When a commit is pushed after the sfl-review label starts this potentially long-running workflow, these instructions still force the agent to review the event-time SHA. Because sfl-pr-review.md subscribes only to the labeled event and never instructs the agent to revalidate the live head before publishing its review, check, and label removal, it can report a result for code that is no longer current. Re-fetch the PR head immediately before producing outputs and abort or retrigger when it differs from the reviewed SHA.

Useful? React with 👍 / 👎.

Comment thread README.md
Comment on lines +3 to +4
[![Set it Free Loop](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FHemSoft%2Fcodexbar-mac%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 -->

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 deployment in the changelog

This public badge and the associated review automation are introduced without updating the Unreleased section of CHANGELOG.md. The repository explicitly requires user-visible changes to be recorded in the same branch or PR and developer-experience changes to use their own heading, so add an entry describing this deployment.

AGENTS.md reference: AGENTS.md:L30-L33

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

🤖 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: Update the .github/workflows/*.lock.yml attribute rule to use a
declared built-in merge behavior such as binary instead of the undeclared
merge=ours driver, unless the repository explicitly configures and tests
merge.ours in every merge environment.

In @.github/workflows/sfl-pr-review.md:
- Around line 51-52: Add blank lines before the “Deployed from” marker, between
the “Deployed from” and “To upgrade” marker comments, and after the “To upgrade”
marker to satisfy markdownlint MD022.
- Around line 81-83: Update the approval-policy instructions in the workflow so
unresolved review findings on the current head are included in severity counts
even when duplicate comments are suppressed; alternatively, explicitly block
approval while any unresolved Critical or High finding remains. Ensure the
verdict logic defined near the existing review-comment and unresolved-thread
instructions cannot return APPROVE when prior unresolved findings still violate
the policy.
- Around line 28-35: Add ignore-if-missing: true to both github-app
configuration blocks under github-app and safe-outputs in the generated workflow
template, preserving the existing client-id and private-key mappings so missing
App credentials are tolerated before the activation guard handles fork PRs.
- Around line 36-38: Update the create-pull-request-review-comment configuration
to remove the max: 20 cap or raise it to a supported value that accommodates all
findings; ensure the corresponding safe-outputs lock configuration is updated
consistently, or explicitly report any findings omitted by the chosen cap in the
consolidated review.

In `@README.md`:
- Around line 3-5: Remove the duplicate “CodexBar for Mac” Markdown heading in
the README, keeping a single title positioned with the existing badge and
SFL_BADGE deployment marker so the document passes MD024.

In `@sfl.json`:
- Around line 21-22: Update the requiredSecretsAnyOf configuration in sfl.json
to declare SFL_APP_PRIVATE_KEY, matching the secret required by the lock
manifest and consumed by the workflow. Regenerate or update the generated SFL
metadata so it remains consistent with the lock file.
🪄 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: 59c81b97-a40a-4dcb-a2ea-f6d132987cce

📥 Commits

Reviewing files that changed from the base of the PR and between e54d6f5 and 3a92b89.

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

git config --show-origin --get-regexp '^merge\.ours\.' || true
git check-attr merge -- .github/workflows/sfl-pr-review.lock.yml

Repository: HemSoft/codexbar-mac

Length of output: 212


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== gitattributes =="
cat -n .gitattributes || true

echo
echo "== config merge.ours references =="
git config --show-origin --get-regexp '^merge\.ours\.' || true

echo
echo "== repo merge config entries =="
git config --show-origin --name-only | rg '(^|/)merge(\.|$)' || true

echo
echo "== workflow lock files =="
git ls-files .github/workflows '*lock*.y[l]m' '.*lock*.{yml,yaml}' || true

Repository: HemSoft/codexbar-mac

Length of output: 472


🌐 Web query:

gitattributes merge driver built-in merge theirs rename binary conflict documentation merge=ours merge builtin ours

💡 Result:

In Git, the merge attribute in.gitattributes allows you to specify how file-level merge conflicts are handled [1][2]. This is distinct from global merge strategies (like -s ours) and functions as a low-level merge driver invoked only when a file has conflicting changes on both sides of a merge [3][4]. Built-in Merge Drivers: Git provides several built-in merge drivers that can be referenced in.gitattributes: text: The standard 3-way merge driver used for ordinary text files, which marks conflicts with <<<<<<<, =======, and >>>>>>> [1]. binary: Takes the version from the current branch (ours) and marks the file as having conflicts. This is intended for files without defined merge semantics [1]. union: Attempts to keep lines from both versions. Custom Merge Drivers: To define custom behavior, you must first register a driver in your Git configuration (.git/config or.gitconfig) and then assign it to files in.gitattributes [2][5]. Example: "Ours" Strategy for Specific Files To automatically resolve conflicts by always preferring your local version (an "ours" approach for specific files), you can define a custom driver named ours: 1. Configure the driver: git config --global merge.ours.driver true 2. Assign it in.gitattributes: filename.ext merge=ours Setting the driver to true tells Git that the merge is always successful and to retain the current version [5]. Note that this custom driver is only invoked if both branches have modified the file [3][4]. If only one side changed the file, Git will automatically take that side's version regardless of the merge driver setting [3]. Important Distinctions: Merge Driver vs. Merge Strategy: The merge= attribute in.gitattributes defines a per-file driver [2]. This is separate from the -s ours or -X ours options used during a git merge command, which affect the entire merge operation [6][7][8]. Binary Files: Marking a file as binary in.gitattributes (via the binary macro, which sets -text -diff) prevents line-ending conversion and textual diffs, but it does not automatically define a custom merge driver unless specified [1][5]. Configuration Limitations: Merge driver definitions (the [merge "drivername"] sections in.git/config) are not tracked in the repository and must be configured on every machine that clones the repository [3][9]. To ensure consistency, teams often document these requirements or use automation [9][5].

Citations:


Do not rely on an undeclared merge=ours driver.

.gitattributes only names a low-level merge driver; it does not configure merge.ours.driver. Use a built-in driver such as binary/merge=binary for the generated lock file, or add and test the merge.ours driver in each merge environment.

🤖 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, Update the .github/workflows/*.lock.yml attribute
rule to use a declared built-in merge behavior such as binary instead of the
undeclared merge=ours driver, unless the repository explicitly configures and
tests merge.ours in every merge environment.

Comment on lines +28 to +35
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 }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Files:"
git ls-files | rg '(^|/)\.github/workflows/sfl-pr-review\.md|sfl-pr-review|github-app|auth|gh-aw|safe-outputs' || true

echo
echo "Target file excerpt:"
if [ -f .github/workflows/sfl-pr-review.md ]; then
  nl -ba .github/workflows/sfl-pr-review.md | sed -n '1,110p'
fi

echo
echo "Search gh-aw usage and ignore-if-missing:"
rg -n "gh-aw|github-app:|safe-outputs:|ignore-if-missing|activation|fork" .github README.md 2>/dev/null || true

Repository: HemSoft/codexbar-mac

Length of output: 304


🌐 Web query:

GitHub Actions gh-aw reference auth ignore-if-missing

💡 Result:

In the context of GitHub Agentic Workflows (gh-aw), "ignore-if-missing: true" is a configuration setting used in GitHub App authentication to allow a workflow to gracefully handle missing credentials [1][2]. By default, GitHub Agentic Workflows jobs will fail if the required GitHub App credentials (specifically client-id or private-key) are missing or resolve to empty strings [1][3]. This is common, for example, when App secrets are unavailable during fork pull request builds [1][2]. When you set "ignore-if-missing: true", the workflow skips the attempt to mint a token using the GitHub App [1][3]. Instead, it falls back to the standard non-App token chain: secrets.GH_AW_GITHUB_TOKEN or, if that is not set, secrets.GITHUB_TOKEN [1][2]. This setting can be used under the github-app configuration block (e.g., in safe-outputs or tools configuration) and applies consistently across token minting paths, including safe outputs, activation, pre-activation, and repository checkout [1][3][4]. The default behavior—failing if keys are missing—remains in effect if the field is omitted or explicitly set to false [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Target file excerpt:"
awk '{printf "%5d  %s\n", NR, $0}' .github/workflows/sfl-pr-review.md | sed -n '1,130p'

echo
echo "Search gh-aw usage and ignore-if-missing:"
rg -n "gh-aw|github-app:|safe-outputs:|ignore-if-missing|activation|fork-head|GH_AW_GITHUB_TOKEN|GITHUB_TOKEN" .github README.md 2>/dev/null || true

echo
echo "Lockfile excerpt:"
awk '{printf "%5d  %s\n", NR, $0} ' .github/workflows/sfl-pr-review.lock.yml | sed -n '1,160p'

Repository: HemSoft/codexbar-mac

Length of output: 50376


Defend fork PRs before App token minting.

The generated workflow only skips fork-head PRs in the activation guard, but both .github/workflows/sfl-pr-review.md App blocks lack ignore-if-missing: true. gh-aw fails when App credentials are missing or empty before that guard can drop fork PRs. Add ignore-if-missing: true to both blocks, or keep only a read-only fallback token behind the fork guard. If fork PRs are unsupported, state that in the acceptance criteria and define label cleanup.

🤖 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 28 - 35, Add
ignore-if-missing: true to both github-app configuration blocks under github-app
and safe-outputs in the generated workflow template, preserving the existing
client-id and private-key mappings so missing App credentials are tolerated
before the activation guard handles fork PRs.

Comment on lines +36 to +38
create-pull-request-review-comment:
side: RIGHT
max: 20

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Tracked workflow files:"
git ls-files '.github/workflows/*' | sed -n '1,120p'

echo
echo "Search for sfl-pr-review and gh-aw commands:"
rg -n "sfl-pr-review|gh-aw|create-pull-request-review-comment|max:|side:|findings|findings|report" .github/workflows/sfl-pr-review.md .github/workflows 2>/dev/null | sed -n '1,220p'

echo
if [ -f .github/workflows/sfl-pr-review.md ]; then
  wc -l .github/workflows/sfl-pr-review.md
  sed -n '1,160p' .github/workflows/sfl-pr-review.md | nl -ba
fi

Repository: HemSoft/codexbar-mac

Length of output: 42525


🌐 Web query:

github gh-aw reference safe outputs pull requests create-pull-request-review-comment max

💡 Result:

In GitHub Agentic Workflows (gh-aw), the create-pull-request-review-comment safe output allows for the creation of review comments on code lines [1][2][3]. The max parameter defines the maximum number of review comments that can be created per workflow run [1][4][5]. As of the current configuration, the default value for max is 10 [2][3][6]. While some documentation or schema files previously suggested a default of 1 [6], this has been clarified to match the runtime behavior of 10 [6]. You can configure this limit within your workflow's safe-outputs configuration block as follows [1][4][5]: safe-outputs: create-pull-request-review-comment: max: 3 # Example setting to override the default of 10 When using this output, you may also configure additional parameters such as: - side: Specifies the side of the diff ("LEFT" or "RIGHT", default: "RIGHT") [1][5]. - target: Defines the target PR for the comments ("triggering" by default, or "*" for all applicable PRs, or a specific PR number) [1][4]. - target-repo: Enables cross-repository commenting by specifying "owner/repo" [1][4].

Citations:


🌐 Web query:

site:github.com github/gh-aw-tools create_pull_request_review_comment max safeoutputs 20

💡 Result:

In GitHub Agentic Workflows (gh-aw), the create_pull_request_review_comment tool is a "safe-output" tool used to post review comments on specific lines of code within a pull request [1][2]. To use this tool, you must define it within the safe-outputs section of your workflow's configuration (usually in the workflow's frontmatter or configuration file) [1][3]. The max parameter controls the maximum number of review comments the agent is permitted to create during a single workflow run [1][4]. Example configuration: yaml safe-outputs: create-pull-request-review-comment: max: 20 # Specifies the limit (e.g., 20) side: "RIGHT" # Default side for the comment target: "triggering" # Default target PR Key usage details: - Default Limit: If not explicitly configured, the default maximum is typically 10 [1][2]. - Target Configuration: The target field determines which PR is commented on [3]. If target: "*" is configured, the agent must provide the pull_request_number in the tool call; otherwise, the comment will fail [1][5]. - Cross-Repository: For cross-repository comments, you can specify the repo (in owner/repo format) if it is listed in the allowed-repos configuration [1][3]. - Context Requirements: The tool requires a valid pull request context (e.g., pull_request or pull_request_target event) to function correctly [6]. If you encounter a "Tool does not exist" error despite proper configuration, ensure your workflow lock file is up to date and that the tool is correctly declared in the shared workflow components [4].

Citations:


🌐 Web query:

site:github.com/awf-ci/awf-tools create_pull_request_review_comment max: 20

💡 Result:

The matching GitHub documentation shows:

safe-outputs:
  create-pr-review-comment:
    max: 20

This configures up to 20 pull-request review comments. (github.github.com)

Citations:


Increase or remove the inline-review-comment cap.

safe-outputs caps create-pull-request-review-comment at 20, and the lock file encodes create_pull_request_review_comment(max:20) for this workflow. If a PR has more than 20 findings, the workflow cannot create one inline thread per finding as the policy requires. Use a higher supported cap, omit inline comment creation, or document and report omitted findings in the consolidated review.

🤖 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 36 - 38, Update the
create-pull-request-review-comment configuration to remove the max: 20 cap or
raise it to a supported value that accommodates all findings; ensure the
corresponding safe-outputs lock configuration is updated consistently, or
explicitly report any findings omitted by the chosen cap in the consolidated
review.

Comment thread .github/workflows/sfl-pr-review.md Outdated
Comment on lines +81 to +83
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.

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

MAJOR Finding: Carry unresolved findings into re-review verdicts.

The workflow suppresses duplicate comments after reading existing unresolved threads. The approval policy does not define whether those unresolved findings count. On a re-review, a prior Critical or High finding can have no new inline comment and still produce APPROVE. Include unresolved current-head findings in the severity counts, or block approval until they are resolved.

Also applies to: 130-137

🤖 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 81 - 83, Update the
approval-policy instructions in the workflow so unresolved review findings on
the current head are included in severity counts even when duplicate comments
are suppressed; alternatively, explicitly block approval while any unresolved
Critical or High finding remains. Ensure the verdict logic defined near the
existing review-comment and unresolved-thread instructions cannot return APPROVE
when prior unresolved findings still violate the policy.

Comment thread README.md
Comment on lines +3 to +5
[![Set it Free Loop](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2FHemSoft%2Fcodexbar-mac%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 -->
# CodexBar 🎚️ for Mac

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

LOW Finding: Remove the duplicate # CodexBar heading.

The opening contains the title at Line 1 and repeats it at Line 5. markdownlint-cli2 reports MD024. Keep one title around the badge and deployment marker.

🧰 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 3 - 5, Remove the duplicate “CodexBar for Mac”
Markdown heading in the README, keeping a single title positioned with the
existing badge and SFL_BADGE deployment marker so the document passes MD024.

Source: Linters/SAST tools

Comment thread sfl.json Outdated
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: 2

Caution

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

⚠️ Outside diff range comments (2)
.github/workflows/sfl-pr-review.lock.yml (2)

1469-1554: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

The detection setup steps run even when detection is skipped.

Setup Node.js, Install Codex CLI, Install AWF binary, Download container images, and Start MCP Gateway carry no condition. The Execute Codex CLI step at Line 1556 requires steps.detection_guard.outputs.run_detection == 'true'.

When the agent produces no safe outputs and no patch, the job still installs the Codex CLI and pulls four container images, then starts a gateway with an empty mcpServers map (Lines 1519-1520). This adds runner minutes to every such run.

This file is generated. Apply the guard in the gh-aw source and recompile.

🤖 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 1469 - 1554, Gate the
detection setup sequence on steps.detection_guard.outputs.run_detection ==
'true' so Setup Node.js, Install Codex CLI, Install AWF binary, Download
container images, and Start MCP Gateway only run when detection will execute.
Update the gh-aw source that generates this workflow, then recompile it so the
generated lock file preserves the same condition and the existing Execute Codex
CLI guard remains consistent.

1699-1704: 🩺 Stability & Availability | 🔵 Trivial

The sfl-review label survives agent or detection failure.

safe_outputs owns the remove_labels handler for sfl-review. The job condition requires needs.detection.result == 'success' and needs.agent.result != 'skipped'. If the agent job fails, or if threat detection concludes with failure, this job does not run and the label stays on the pull request.

The label then remains applied, so re-adding it produces no new labeled event. A maintainer must remove the label manually before the next review run. Consider documenting this recovery step, or adding label cleanup to the conclusion job, which already runs with always() and pull-requests: write.

🤖 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 1699 - 1704, Update
the workflow so the sfl-review label is removed even when the agent or detection
job fails, preferably by adding cleanup to the always-running conclusion job
with pull-request write permissions. Ensure the existing safe_outputs behavior
remains unchanged for successful runs and that failed runs cannot leave
sfl-review applied.
🤖 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 775-789: The GitHub MCP configuration uses the inconsistent
GH_AW_GITHUB_TOKEN variable in mcp_servers.github. Update this generated Codex
TOML entry to use the exported GITHUB_MCP_SERVER_TOKEN variable, or ensure
GH_AW_GITHUB_TOKEN is exposed in env_vars, so the GitHub MCP server receives a
valid token; keep the gateway and Codex authentication sources consistent.
- Line 61: Update the generated workflow derived from sfl-pr-review.md so its
name and run-name use the descriptive review workflow heading rather than the
deployment marker. Move the deployment marker in the source heading to a comment
or plain-text location, preserve the descriptive heading, and recompile the
workflow so GH_AW_WORKFLOW_NAME and GH_AW_SETUP_WORKFLOW_NAME reflect the review
workflow name.

---

Outside diff comments:
In @.github/workflows/sfl-pr-review.lock.yml:
- Around line 1469-1554: Gate the detection setup sequence on
steps.detection_guard.outputs.run_detection == 'true' so Setup Node.js, Install
Codex CLI, Install AWF binary, Download container images, and Start MCP Gateway
only run when detection will execute. Update the gh-aw source that generates
this workflow, then recompile it so the generated lock file preserves the same
condition and the existing Execute Codex CLI guard remains consistent.
- Around line 1699-1704: Update the workflow so the sfl-review label is removed
even when the agent or detection job fails, preferably by adding cleanup to the
always-running conclusion job with pull-request write permissions. Ensure the
existing safe_outputs behavior remains unchanged for successful runs and that
failed runs cannot leave sfl-review applied.
🪄 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: 2be91fb4-9cb7-4516-9ee4-ae43812da7c1

📥 Commits

Reviewing files that changed from the base of the PR and between 3a92b89 and a4b0988.

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

Comment thread .github/workflows/sfl-pr-review.lock.yml Outdated
Comment on lines +775 to +789
[mcp_servers.github]
user_agent = "deployed-from-hemsoft-set-it-free-loop-deployment-workflows-sfl-pr-reviewmd358e25578515d4b1ed46cacb686624897720cdab"
startup_timeout_sec = 120
tool_timeout_sec = 60
container = "ghcr.io/github/github-mcp-server:v1.7.0"
env = { "GITHUB_FEATURES" = "fields_param", "GITHUB_HOST" = "$GITHUB_SERVER_URL", "GITHUB_PERSONAL_ACCESS_TOKEN" = "$GH_AW_GITHUB_TOKEN", "GITHUB_READ_ONLY" = "1", "GITHUB_TOOLSETS" = "pull_requests,repos" }
env_vars = ["GITHUB_FEATURES", "GITHUB_HOST", "GITHUB_PERSONAL_ACCESS_TOKEN", "GITHUB_READ_ONLY", "GITHUB_TOOLSETS"]

[mcp_servers.safeoutputs]
container = "ghcr.io/github/gh-aw-node"
mounts = ["\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw", "${RUNNER_TEMP}/gh-aw/safeoutputs:${RUNNER_TEMP}/gh-aw/safeoutputs:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"]
args = ["-w", "$GITHUB_WORKSPACE"]
entrypoint = "sh"
entrypointArgs = ["-c", "sh ${RUNNER_TEMP}/gh-aw/safeoutputs/start_safe_outputs_mcp.sh"]
env_vars = ["DEBUG", "DEFAULT_BRANCH", "GH_AW_ASSETS_ALLOWED_EXTS", "GH_AW_ASSETS_BRANCH", "GH_AW_ASSETS_MAX_SIZE_KB", "GH_AW_MCP_LOG_DIR", "GH_AW_SAFE_OUTPUTS", "GH_AW_SAFE_OUTPUTS_CONFIG_PATH", "GH_AW_SAFE_OUTPUTS_TOOLS_PATH", "GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST", "GITHUB_REPOSITORY", "GITHUB_SHA", "GITHUB_TOKEN", "GITHUB_WORKSPACE", "RUNNER_TEMP"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check where GH_AW_GITHUB_TOKEN is defined in the agent job scope.
set -euo pipefail

rg -n 'GH_AW_GITHUB_TOKEN|GITHUB_MCP_SERVER_TOKEN' .github/workflows/sfl-pr-review.lock.yml

Repository: HemSoft/codexbar-mac

Length of output: 8039


🏁 Script executed:

#!/bin/bash
# Inspect the surrounding generated tool definitions and environment to determine how the GitHub MCP server credentials are wired.
set -euo pipefail
sed -n '720,815p' .github/workflows/sfl-pr-review.lock.yml

Repository: HemSoft/codexbar-mac

Length of output: 7437


🌐 Web query:

GitHub MCP Server environment variable GITHUB_PERSONAL_ACCESS_TOKEN

💡 Result:

The GitHub MCP server uses environment variables for authentication, specifically for providing a Personal Access Token (PAT) [1][2]. While GITHUB_PERSONAL_ACCESS_TOKEN has been the standard variable name [1][2], recent updates have introduced GITHUB_ACCESS_TOKEN as the preferred environment variable [3]. This change was made because the original name was misleadingly restrictive, implying only PATs were supported, when in fact OAuth tokens are also valid [3]. Key details regarding these environment variables include: 1. Precedence: When both variables are set, GITHUB_ACCESS_TOKEN takes precedence [3]. 2. Backward Compatibility: GITHUB_PERSONAL_ACCESS_TOKEN is maintained for backward compatibility [3]. 3. Authentication Behavior: Providing a PAT via these variables takes precedence over OAuth authentication methods [1][2][4]. 4. Usage: These variables are typically configured within the environment of the MCP server, such as in Docker configurations, CLI arguments, or IDE settings files [1][5][6]. When configuring the server, ensure that the token used has the appropriate scopes for the tasks you wish to perform [1][7]. It is recommended to use fine-grained PATs with the minimum necessary permissions [8][9]. For security, avoid hardcoding tokens in version control; use environment variables or secret management tools provided by your host environment [8][9].

Citations:


Make the GitHub MCP code path use an exported GitHub token variable.

The MCP Gateway JSON sets GITHUB_PERSONAL_ACCESS_TOKEN from exposed $GITHUB_MCP_SERVER_TOKEN, but the generated Codex TOML sets it to $GH_AW_GITHUB_TOKEN. If the Codex MCP server reads this TOML entry directly on this job, the token resolves to empty and GitHub MCP calls fail authentication. Either expose GH_AW_GITHUB_TOKEN here, point the Codex TOML at GITHUB_MCP_SERVER_TOKEN, or remove the inconsistent Codex TOML definition.

🤖 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 775 - 789, The GitHub
MCP configuration uses the inconsistent GH_AW_GITHUB_TOKEN variable in
mcp_servers.github. Update this generated Codex TOML entry to use the exported
GITHUB_MCP_SERVER_TOKEN variable, or ensure GH_AW_GITHUB_TOKEN is exposed in
env_vars, so the GitHub MCP server receives a valid token; keep the gateway and
Codex authentication sources 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.
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