Skip to content

chore: sync released main state back to develop - #15

Merged
v-Kaefer merged 49 commits into
developfrom
chore/sync-release-to-develop
Aug 10, 2026
Merged

chore: sync released main state back to develop#15
v-Kaefer merged 49 commits into
developfrom
chore/sync-release-to-develop

Conversation

@v-Kaefer

@v-Kaefer v-Kaefer commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Linked Issue

Milestone

  • Release synchronization / maintenance

Summary

  • Synchronize the exact state already released in main back into develop after the completed Q.A → main promotion.
  • This PR introduces no new functional scope; it restores develop as the correct base for future implementation branches.

How to test

  • Test type: automated
  • Steps: run the repository CI/check suite and compare this branch against main; their trees should be identical while develop should receive the released Q.A/main changes.

Evidence

  • Log/output applicable through repository CI
  • Manual branch comparison performed before opening this PR

Known risks

  • None expected. The branch was created directly from the current main HEAD and contains the already released state.

DoD checklist

  • Scope implemented as defined
  • Tests executed and documented by CI
  • Evidence attached when applicable
  • No known critical breakage introduced

Summary by CodeRabbit

  • New Features

    • GitHub Projects can now target personal or organization ownership, with configuration, overrides, and automatic detection.
    • Added Q.A. validation, live sandbox checks, and controlled issue-generation workflows.
  • Bug Fixes

    • Updated branch promotion rules to enforce develop → Q.A. → main.
  • Documentation

    • Expanded English and Portuguese guidance for project ownership, branching, testing, and Q.A. policies.
  • Tests

    • Added coverage for ownership settings, branch promotions, workflow safeguards, CLI behavior, and sandbox validation.

v-Kaefer added 30 commits August 9, 2026 18:05
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Projects v2 owner-type support

Layer / File(s) Summary
Owner resolution and propagation
.env.example, project_setup/..., Makefile, README*, AI_SETUP_GUIDE.md, docs/repo/project-owner-type*, tests/test_project_owner_type.py, tests/test_makefile_env_defaults.py
Project operations now support user and organization owners. Configuration, CLI overrides, automatic detection, GraphQL namespace selection, diagnostics, and tests were added.
Source and embedded repository validation
scripts/validation/repo_quality.py, Makefile, tests/qa/test_cli_e2e.py
Validation now distinguishes tool-source and embedded-target repositories. Make targets and end-to-end tests use mode-specific paths and checks.

Q.A. promotion and validation

Layer / File(s) Summary
Branch promotion enforcement
.github/workflows/main-source-branch.yml, .github/workflows/qa-source-branch.yml, project_setup/pr_validation.py, project_setup/installer.py, tests/test_branch_promotion.py
Promotion now follows develop -> Q.A -> main. Branch validation and workflow installation enforce the required source branches.
Q.A validation workflows
.github/workflows/qa-validation.yml, .github/workflows/qa-live.yml, .github/workflows/qa-issue-generation.yml, tests/qa/*, tests/test_qa_workflows.py
Added deterministic cross-platform validation, package artifact checks, live sandbox testing, guarded issue-generation testing, cleanup handling, and aggregate Q.A gates.
Q.A policies and guidance
docs/repo/qa-policy*, docs/repo/testing-policy.md, docs/repo/branching-policy*, docs/DOCUMENTATION-GUIDE.md
Documentation defines Q.A promotion rules, required checks, sandbox controls, manual issue-generation safeguards, and workflow authority.
Project owner documentation
docs/repo/project-owner-type*, README*, AI_SETUP_GUIDE.md
English and Portuguese guidance documents owner values, aliases, precedence, automatic detection, authentication, diagnostics, and namespace-specific GraphQL behavior.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes synchronizing the released main state back into develop.
Description check ✅ Passed The description includes the linked issue, milestone, summary, testing plan, evidence, risks, and DoD checklist.
Linked Issues check ✅ Passed The changes align with bringing released Q.A/main fixes, workflows, tests, and documentation into develop without introducing separate scope.
Out of Scope Changes check ✅ Passed The reported changes support the synchronization objective and cover the released Q.A, validation, owner-type, testing, and documentation state.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sync-release-to-develop

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 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 (1)
scripts/validation/repo_quality.py (1)

193-202: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not require a preserved target Makefile to reference managed scripts.

Line 194 validates every caller in SCRIPT_REFERENCES even when strict_repository_scan is False. tests/qa/test_cli_e2e.py preserves an existing target Makefile unchanged. A valid preserved Makefile without scripts/validation/repo_quality.py will therefore fail embedded-target validation.

In embedded-target mode, validate script existence and installer copying, but skip Makefile caller-content checks unless the installer owns or updates that file. Add a regression test that runs repository quality after installing into a target with a preserved Makefile.

🤖 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 `@scripts/validation/repo_quality.py` around lines 193 - 202, Update the
owner-reference validation loop in the repository quality check to skip
caller-content checks for preserved target Makefiles when strict_repository_scan
is false, while retaining script-existence and installer-copy validation.
Preserve current caller checks for installer-owned or updated files, and add a
regression test covering repository-quality validation after installation into a
target with an unchanged Makefile.
🤖 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/qa-source-branch.yml:
- Around line 3-6: Update the workflow trigger in qa-source-branch.yml from
pull_request to pull_request_target so the gate uses the target branch’s
workflow definition. Keep this metadata-only workflow free of checkout and
pull-request code execution, preserve the existing branch and event filters, and
ensure the workflow is present on the repository’s default branch.

In `@scripts/validation/repo_quality.py`:
- Around line 104-105: Replace the path-only check in is_tool_repository with an
explicit mode passed by the managed invocation or a source identity that
embedded targets cannot control. Ensure embedded targets containing
tests/test_project_setup.py remain in target mode rather than tool-source mode.
Add a regression test covering that embedded-target layout.

---

Outside diff comments:
In `@scripts/validation/repo_quality.py`:
- Around line 193-202: Update the owner-reference validation loop in the
repository quality check to skip caller-content checks for preserved target
Makefiles when strict_repository_scan is false, while retaining script-existence
and installer-copy validation. Preserve current caller checks for
installer-owned or updated files, and add a regression test covering
repository-quality validation after installation into a target with an unchanged
Makefile.
🪄 Autofix

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

Plan: Pro Plus

Run ID: 9fa80dc7-de5b-496c-ba52-0e915ccd269a

📥 Commits

Reviewing files that changed from the base of the PR and between 67c0fcb and 5917620.

📒 Files selected for processing (31)
  • .env.example
  • .github/workflows/main-source-branch.yml
  • .github/workflows/qa-issue-generation.yml
  • .github/workflows/qa-live.yml
  • .github/workflows/qa-source-branch.yml
  • .github/workflows/qa-validation.yml
  • AI_SETUP_GUIDE.md
  • Makefile
  • README.md
  • README.pt-BR.md
  • docs/DOCUMENTATION-GUIDE.md
  • docs/repo/branching-policy.md
  • docs/repo/branching-policy.pt-BR.md
  • docs/repo/project-owner-type.md
  • docs/repo/project-owner-type.pt-BR.md
  • docs/repo/qa-policy.md
  • docs/repo/qa-policy.pt-BR.md
  • docs/repo/testing-policy.md
  • project_setup/cli.py
  • project_setup/installer.py
  • project_setup/pr_validation.py
  • project_setup/project.py
  • project_setup/runner.py
  • scripts/validation/repo_quality.py
  • tests/qa/live_issue_generation.py
  • tests/qa/live_sandbox.py
  • tests/qa/test_cli_e2e.py
  • tests/test_branch_promotion.py
  • tests/test_makefile_env_defaults.py
  • tests/test_project_owner_type.py
  • tests/test_qa_workflows.py

Comment on lines +3 to +6
on:
pull_request:
branches: ["Q.A"]
types: [opened, synchronize, reopened, edited, ready_for_review]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow files =="
git ls-files '.github/workflows/*'

echo "== target workflow =="
if [ -f .github/workflows/qa-source-branch.yml ]; then
  cat -n .github/workflows/qa-source-branch.yml
else
  echo "missing .github/workflows/qa-source-branch.yml"
fi

echo "== other workflows mentioning qa/source/Q.A/policies =="
rg -n "Q\.A|qa-source|promotion|source-branch|pull_request_target|pull_request" .github/workflows || true

Repository: v-Kaefer/Github-Project-Automation

Length of output: 7352


🌐 Web query:

GitHub Actions required statuses pull_request pull_request_target merge commit documentation

💡 Result:

Required status checks in GitHub Actions are a critical feature for maintaining code quality on protected branches, ensuring that specific workflows complete successfully before a pull request can be merged [1][2]. Key concepts and their roles are outlined below: Pull Request vs. Pull Request Target The pull_request and pull_request_target events serve different purposes regarding security and execution context [3][4]. pull_request: This event triggers workflows using the code from the pull request merge commit [5][4]. It is the standard choice for CI testing and security scanning because it runs with restricted permissions when triggered from forks, ensuring untrusted code cannot access secrets or write to the repository [3][6][4]. pull_request_target: This event runs the workflow using the code from the base repository's target branch [5][4]. Because it runs within the context of the base repository, it has access to secrets and can perform write operations [3][4]. It is designed for automation—such as labeling, commenting, or posting status checks—that needs higher privileges while responding to pull requests, including those from forks [3][6][4]. If using this event, you must exercise extreme caution to avoid executing untrusted code from the pull request [3][4]. Merge Commit and Status Checks Required status checks must typically pass on the latest commit SHA of the pull request [7][8]. When branch protection is configured, GitHub evaluates whether checks need to pass against the head commit or a test merge commit [7][8]. If a test merge commit is generated, GitHub may show that checks are running against that specific commit [7][8]. If your repository uses a merge queue, you must also include the merge_group event as a trigger in your workflows [7][8][9]. Without it, required status checks will not report correctly for queued items, causing merge failures [7][9]. General Requirements For any workflow to function as a required status check: - The check must conclude as success, skipped, or neutral [7][1]. - It must be explicitly enabled in the branch protection rules for the target branch [2]. - If you require specific workflows via organization rulesets, ensure they are configured to run on the appropriate events [10][9].

Citations:


🌐 Web query:

GitHub Actions pull_request push workflow runs merge commit same repo PR push workflow runs base commit

💡 Result:

In GitHub Actions, the push and pull_request events behave differently regarding which commit they operate on and what they test [1][2]. Push Event When a workflow is triggered by a push event, the GITHUB_SHA is the commit SHA that was pushed to the repository [1][3]. The workflow runs against this specific commit, representing the state of the branch exactly as it exists after the push [3][2]. Pull Request Event When a workflow is triggered by a pull_request event, GitHub creates a temporary merge commit that combines the head branch of the pull request with the base branch [3][4]. - Default Behavior: The GITHUB_SHA for a pull_request event is this temporary merge commit [5][4]. - Checkout: Because actions/checkout uses GITHUB_REF by default, and GITHUB_REF is set to the merge branch (e.g., refs/pull/:prNumber/merge), the action automatically checks out this merge commit [6][4]. - Purpose: This ensures your CI tests run against the proposed result of the merge, rather than just the isolated head branch [6][3][2]. Key Differences in Same-Repo Workflows When you have a workflow configured to trigger on both push and pull_request within the same repository, pushing code to a branch associated with an open pull request will trigger both events simultaneously [7][2]. - The push event tests the head commit independently [1][2]. - The pull_request event tests the hypothetical merge commit [3][2]. To avoid duplicate workflow runs, it is common practice to: 1. Limit push triggers to the default branch (e.g., main) and let pull_request handle all feature branch testing [7][2]. 2. Use conditional logic (e.g., if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) to skip runs for internal PRs that are already covered by push [2]. 3. Use concurrency groups to cancel older runs when a new push or PR update occurs [1][2]. If you specifically need to test the head commit rather than the merge commit during a pull_request event, you can reference github.event.pull_request.head.sha instead of GITHUB_SHA [5][4].

Citations:


Gate policy validation on the target-branch workflow definition.

pull_request executes .github/workflows/qa-source-branch.yml from the PR merge commit. A same-repository PR can modify this workflow to always succeed while the required check name stays the same. Use pull_request_target for this metadata-only check, keep it free of checkout and PR-code execution, and ensure the workflow exists on the default branch.

Proposed fix
 on:
-  pull_request:
+  pull_request_target:
     branches: ["Q.A"]
     types: [opened, synchronize, reopened, edited, ready_for_review]
📝 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
on:
pull_request:
branches: ["Q.A"]
types: [opened, synchronize, reopened, edited, ready_for_review]
on:
pull_request_target:
branches: ["Q.A"]
types: [opened, synchronize, reopened, edited, ready_for_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/qa-source-branch.yml around lines 3 - 6, Update the
workflow trigger in qa-source-branch.yml from pull_request to
pull_request_target so the gate uses the target branch’s workflow definition.
Keep this metadata-only workflow free of checkout and pull-request code
execution, preserve the existing branch and event filters, and ensure the
workflow is present on the repository’s default branch.

Comment on lines +104 to +105
def is_tool_repository() -> bool:
return (ROOT / TOOL_REPOSITORY_MARKER).is_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.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Replace the path-only repository classifier.

An embedded target can contain tests/test_project_setup.py for its own tests. Line 105 then selects tool-source mode and requires source-only files such as pyproject.toml, source workflows, and source tests.

Pass the mode explicitly from the managed invocation, or use a source identity that an embedded target does not control. Add a regression test for an embedded target that already contains this path.

🤖 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 `@scripts/validation/repo_quality.py` around lines 104 - 105, Replace the
path-only check in is_tool_repository with an explicit mode passed by the
managed invocation or a source identity that embedded targets cannot control.
Ensure embedded targets containing tests/test_project_setup.py remain in target
mode rather than tool-source mode. Add a regression test covering that
embedded-target layout.

@v-Kaefer v-Kaefer linked an issue Aug 10, 2026 that may be closed by this pull request
@v-Kaefer
v-Kaefer merged commit 688bf63 into develop Aug 10, 2026
9 checks passed
@v-Kaefer
v-Kaefer deleted the chore/sync-release-to-develop branch August 10, 2026 13:52
This was referenced Aug 10, 2026
Merged
Merged
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sync released main state back to develop

1 participant