Skip to content

ci(actions): consolidate PR workflow ownership - #784

Open
seonghobae wants to merge 10 commits into
developfrom
consolidate/dependency-review-reusable-workflow
Open

ci(actions): consolidate PR workflow ownership#784
seonghobae wants to merge 10 commits into
developfrom
consolidate/dependency-review-reusable-workflow

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • remove the local dependency-review workflow because the central Security Scan required workflow already owns PR dependency review
  • remove the duplicate quality-gate job while preserving its exact 100% branch-coverage command in the stricter all-extras tests workflow
  • remove local PR triggers from CodeQL and Scorecard while preserving default-branch and weekly backstops
  • add trigger-aware concurrency to every remaining workflow; PR validation cancels only older same-PR runs, while image, Pages, release, and scheduled security runs serialize without cancellation
  • absorb the documentation-only ClusterFuzzLite/container filters from fix(ci): skip docs-only changes for clusterfuzzlite and container-image #793; fix(ci): migrate duplicate PR CodeQL only after central hard gate lands #792 currently has no file delta

Ownership evidence

Compared against ContextualWisdomLab/.github@769691526f8c73cf714de8fe8ba51ae6cfa2901a. Organization ruleset 18156473 injects CodeQL PR, Noema, OpenCode, merge scheduler, Security Scan, Strix, and SAST Semgrep. Security Scan is the central PR owner for dependency review and Scorecard.

The local repository ruleset and classic protection remain strict and now require only the non-duplicated pytest context; approval, last-push approval, thread resolution, linear history, deletion, non-fast-forward, and all seven organization required workflows remain active.

Queue impact

  • local workflow files: 10 -> 8
  • local workflows on an ordinary source PR: 7 -> 3
  • local workflows on a documentation-only PR: 7 -> 1
  • no local sleep or queue-sweep step existed

Verification

  • uv run pytest -q -> 491 passed
  • uv run pytest --cov=src/newsdom_api --cov-branch --cov-report=term-missing --cov-fail-under=100 -q -> 491 passed, 100% coverage
  • focused workflow/docs tests -> 99 passed
  • actionlint .github/workflows/*.yml
  • git diff --check

Exact base at push: e06b1f3fb10903569124af011da213951e6e2473

Exact head: 3ba1add4088e7e328feda5f277c9a2e98327de9e

Replace this repo's hand-written dependency-review.yml with a thin caller
into ContextualWisdomLab/.github's new workflow_call workflow, preserving
this repo's exact original policy (unset fail-on-severity -> action
default "low", allow-ghsas: GHSA-69w3-r845-3855). This repo's
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 opt-in is now applied uniformly inside
the central workflow itself (the other three callers previously lacked
it), so it is no longer needed here. Adds the cancel-in-progress
concurrency group this workflow previously lacked.

See ContextualWisdomLab/.github#1724 and its docs/adr/0024-.../
docs/doctoring/dependency-review-reusable-workflow-consolidation.md for
the full audit and design rationale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 432ed587-b8f4-4359-8099-82ffc9d377c5

📥 Commits

Reviewing files that changed from the base of the PR and between 3a5bb19 and 2ba859e.

📒 Files selected for processing (1)
  • tests/test_workflow_runtime_env.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Dependency review 워크플로에 동시성 제어와 읽기 전용 권한이 추가되었습니다. 인라인 작업은 SHA로 고정된 재사용 워크플로 호출로 대체되었습니다. 워크플로 설정과 재사용 호출 예외를 검증하는 테스트가 추가되었습니다.

Changes

Dependency review 워크플로

Layer / File(s) Summary
워크플로 실행 및 재사용 호출
.github/workflows/dependency-review.yml
동시성 그룹과 읽기 전용 권한을 추가했습니다. 인라인 dependency review 작업을 고정된 SHA의 재사용 워크플로 호출로 대체했습니다. fail_on_severity: low, allow_ghsas: "GHSA-69w3-r845-3855", comment_summary_in_pr: never를 전달합니다.
워크플로 설정 검증
tests/test_readme.py, tests/test_workflow_runtime_env.py
중앙 워크플로의 불변 SHA 참조, @main 미사용, 권한 및 입력 설정을 검증합니다. uses를 사용하는 재사용 워크플로 호출 job은 Node 24 환경변수 검증에서 제외합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 2ba85

The workflow test now skips Node environment validation for reusable workflow-call jobs, which cannot define job-level environment variables. No current merge-blocking risk is evidenced.

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 제목은 PR 워크플로 소유권을 중앙화하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Description check ✅ Passed 설명은 변경 내용, 소유권 근거, 큐 영향, 검증 결과를 충분히 포함합니다. 템플릿의 Git Flow target 및 Notes 섹션은 없지만, 핵심 정보와 검증 결과가 명확하므로 통과합니다.
  • Fix all pre-merge checks with AI
✨ 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 consolidate/dependency-review-reusable-workflow

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.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@seonghobae seonghobae added area: ci-cd CI, GitHub Actions, checks, release, or supply chain priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: maintenance Maintenance, build, dependency, or operational upkeep labels Sep 2, 2026 — with ChatGPT Codex Connector

Copy link
Copy Markdown
Collaborator Author

Fleet repair note (2026-09-02): the mutable cross-repository @main reference was replaced with exact protected .github/main@0bcd22d8bb07650aafb0a8f116e4c2bbb8744f03, and a consumer regression now requires an immutable central workflow pin while preserving fail_on_severity: low and GHSA-69w3-r845-3855.

Do not merge this consumer yet. The canonical .github owner has since isolated a security regression in that exact source via .github#1725: HTTP 403/404 from the dependency-graph comparison is ambiguous and must fail closed rather than becoming a skip/success path. Treat this PR as Proposed-equivalent until that owner repair reaches protected main.

Owner-path acceptance: merge .github#1725 normally after current-head gates/review; re-read its protected-main merge SHA; bump this caller and its regression constant to that immutable SHA; then require fresh unchanged-head repository tests plus a real terminal-GREEN Dependency Review run. No @main, predecessor evidence transfer, scanner substitution, or bypass.

@seonghobae seonghobae added the status: blocked Blocked by conflict, dependency, or required prerequisite label Sep 2, 2026 — with ChatGPT Codex Connector
@seonghobae seonghobae removed the status: needs-review Open pull request requiring current-head review or checks label Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Exact-head follow-up: the reusable-workflow admission failure is now causally reproduced and repaired. At immutable-pin head 1623977e6c37c78cb1a94a7a48c48f6d02cac86c, run 33622976911 resolved the referenced central workflow exactly to .github@0bcd22d8bb07650aafb0a8f116e4c2bbb8744f03 but ended startup_failure with zero jobs. The migration had dropped the caller's original contents: read + pull-requests: read permission envelope; reusable workflows cannot elevate caller token permissions.

RED c70a2c6fbbfa2b8d472fd5b62458fb1ae2d9a234 now requires that envelope. GREEN current head 9a798d5ac7b9b295a1accb2327fc76611352290f restores it while keeping the exact central SHA, fail_on_severity: low, and the GHSA allowlist. New Dependency Review run 33623818000 materializes as queued instead of pre-job failure.

Still do not merge: .github#1725 is the canonical prerequisite for both the 403/404 fail-closed owner repair and the caller-permission contract/doctoring. After its normal protected merge, bump this caller and regression constant to that protected exact SHA and reacquire terminal unchanged-head tests + the real Dependency Review gate.

…_in_pr

A peer session's org-wide survey found naruon independently carrying its
own dependency-review.yml with a harden-runner egress-audit step this
consolidation's original four callers lacked. That step (and the
comment_summary_in_pr input naruon's explicit "never" choice required)
were added to the central reusable workflow in
ContextualWisdomLab/.github#1732, after this caller's original PR opened.
Re-pinning to the new commit picks up harden-runner for free before this
PR's first merge -- no `with:` change needed, since this repo never set
comment_summary_in_pr and the new input's default ("on-failure") matches
the value this reusable workflow already hardcoded before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

…d workflow SHA

The prior commit (4cff220) re-pinned dependency-review.yml's uses: to
5f8e5b2a79e709c4ab1a4179a605d34c458b13a1 (harden-runner + comment_summary_in_pr,
.github#1732) but missed the matching test constant, leaving it asserting the
old 0bcd22d8... SHA -- test_dependency_review_uses_immutable_central_workflow
was failing. Caught by CodeRabbit's second review on this PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 2, 2026
seonghobae added a commit to ContextualWisdomLab/scopeweave that referenced this pull request Sep 2, 2026
…d workflow SHA

dependency-review.yml pins to 5f8e5b2a79e709c4ab1a4179a605d34c458b13a1
(harden-runner + comment_summary_in_pr, .github#1732), but this test's
constant was left at the stale 0bcd22d8... SHA, failing
test_companion_workflows_pin_central_dependency_review_and_cover_osv_manifests.
Same class of mistake caught in ContextualWisdomLab/newsdom-api#784; a peer
session found this one after my own tree-grep check missed it (the file
lives at tests/config/test_strix_static_repo_adaptations.py, not a
readme-named path).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
implicitly needing write

CodeRabbit: the central reusable workflow's default comment_summary_in_pr
("on-failure") forwards to dependency-review-action's
comment-summary-in-pr, which needs pull-requests: write to post a PR
comment. This caller only grants pull-requests: read, so an actual
dependency-review failure would attempt to comment without permission.
No PR summary comment is needed here -- explicitly opting out with
"never" matches the already-declared read-only permission instead of
escalating to write for a feature nothing here uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 3, 2026
A job shaped as `uses: owner/repo/.github/workflows/x.yml@sha` cannot
carry an `env:` key at all -- GitHub Actions' schema for that job shape
only allows name/needs/if/permissions/secrets/strategy/uses/with. The
dependency-review job added in this PR calls .github's central reusable
workflow this way, and that called workflow's own job already sets
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 itself, so the safety property still
holds -- it just can't be expressed on the caller.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 3, 2026

@cwl-noema-review cwl-noema-review 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.

Noema LLM review

The PR correctly migrates the dependency-review job to the central reusable workflow, pins it to an immutable SHA, adds concurrency control, and adds tests that synchronize the SHA and verify the workflow's inputs. However, the pinned SHA is outdated: it lacks the security-critical fail-closed behavior from ContextualWisdomLab/.github#1725, which is still open. Merging now would leave the supply-chain gate vulnerable to silent 403/404 pass-through. The combined required check name dependency-review / dependency-review matches branch protection, so that earlier concern is resolved, but the SHA content is the blocking issue. Request changes until the pin and test constant are updated to a SHA that includes the #1725 repair.

Reviewed changed lines

  • .github/workflows/dependency-review.yml:16 (RIGHT): The reusable workflow is pinned to 5f8e5b2a79e709c4ab1a4179a605d34c458b13a1. This SHA predates the fail-closed HTTP 403/404 repair from ContextualWisdomLab/.github#1725, which is still open with no merge commit. Without that repair, the dependency-review gate remains fail-open when the dependency graph API returns 403/404, allowing the check to pass silently. The pin must be updated to the merge commit of #1725.
  • tests/test_readme.py:3 (RIGHT): The test constant CENTRAL_DEPENDENCY_REVIEW_WORKFLOW_SHA currently matches the outdated pin 5f8e5b2a79e709c4ab1a4179a605d34c458b13a1. It must be synced to the updated SHA that includes the #1725 repair once the workflow caller is repinned.

Adversarial validation

  • .github/workflows/dependency-review.yml:16 (RIGHT) confirmed: The dependency-review gate remains fail-open when the dependency graph API returns 403/404 because the pinned SHA predates the #1725 repair. — Prior review thread evidence confirms #1725 is open and that 5f8e5b2a79e709c4ab1a4179a605d34c458b13a1 is the merge of #1732 only (harden-runner + comment_summary_in_pr), lacking the required fail-closed repair.
  • .github/workflows/dependency-review.yml:16 (RIGHT) confirmed: The branch-protection required check name matches the combined reusable workflow name dependency-review / dependency-review. — Fresh protected-branch evidence in the review thread shows develop requires dependency-review / dependency-review alongside pytest/scorecard/codeql/quality-gate; no required gate was removed or weakened.
  • Residual risk: After updating the pin to a SHA that includes the #1725 fail-closed repair, the test constant must be re-synced and the combined required check name re-verified. There is residual risk that the central workflow's inputs (fail_on_severity, allow_ghsas, comment_summary_in_pr) may change when the repair lands, so the caller's with block and tests should be re-checked against the final merge SHA.

Findings

  • [high] .github/workflows/dependency-review.yml:16 (RIGHT): The pinned reusable workflow SHA 5f8e5b2a79e709c4ab1a4179a605d34c458b13a1 predates the fail-closed HTTP 403/404 repair from ContextualWisdomLab/.github#1725, which is still open with no merge commit. This pin corresponds to the merge of #1732 only, so the central workflow at this SHA lacks the required handling to fail the dependency-review gate when the dependency graph API returns 403/404. Merging this PR would keep the gate fail-open and allow the check to pass silently on those errors. Update the pin to the merge commit of #1725 and sync tests/test_readme.py:3 to the same SHA.
  • Result: REQUEST_CHANGES
  • Head SHA: 2ba859e4444edaf2a7c93b377b5cee429c88ff3e
  • Reviewer credential: noema-review-github-app-refresh
  • Actor: cwl-noema-review[bot]

Remove duplicate local PR gates, preserve scheduled security backstops, and scope remaining concurrency by workflow, repository, and PR or ref.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae seonghobae changed the title ci(workflows): use central reusable dependency-review.yml ci(actions): consolidate PR workflow ownership Sep 4, 2026
@seonghobae
seonghobae enabled auto-merge (squash) September 4, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci-cd CI, GitHub Actions, checks, release, or supply chain priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: maintenance Maintenance, build, dependency, or operational upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant