Skip to content

ci(maestro): block unvalidated forks and activate path selection - #1633

Open
haasonsaas wants to merge 1 commit into
mainfrom
devin/1795101723-maestro-fork-status
Open

haasonsaas wants to merge 1 commit into
mainfrom
devin/1795101723-maestro-fork-status

Conversation

@haasonsaas

@haasonsaas haasonsaas commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Merge blocker

Do not merge this revision: review identified that fork-specific commit statuses are SHA-wide and can also block a trusted PR using the same commit. Jonathan authorized fixing genuine review defects, but replacing the status with a same-named workflow check is not a demonstrated fix: checks also attach to commits, and required status checks ignore workflow/event identity. A safe PR-specific gating design remains unresolved within the workflow-only/no-gate-change scope. Hosted validation is also incomplete: 13 jobs were queued without assigned maestro-owned-ci runners in run 44558699637.

Problem

Fork pull requests currently skip the required maestro-ci job, which GitHub treats as success without validation. The public-owned workflow also has not activated the path selection already merged in dx-corp/mono#24115.

Summary

  • Extend the existing trusted-base pull_request_target provenance workflow to publish a failure commit status named maestro-ci, described as not validated, on the current fork head and current test merge commit. It never checks out a tree, executes fork code, or consumes PR artifacts. API calls and mergeability retries are bounded; errors fail the reporter.
  • Keep the executed trusted summary named maestro-ci; rename only the unexecuted fork check to maestro-ci-not-validated so a skipped-success check cannot substitute for the required fork status. Existing trusted-head guards and runner routing are unchanged. Reporter permissions are isolated to pull-requests: read and statuses: write; the existing provenance job keeps its previous effective permissions at job scope.
  • Activate the merged selector and fail-closed summary for rust-tests, jetbrains-plugin, and native-release. Unknown or incomplete inputs select full checks; non-PR coverage is unchanged. Activate the already-merged head/branch concurrency grouping from dx-corp/mono#24096, retaining PR-only cancellation and satisfying the currently projected concurrency contract.

GitHub documents that a required name shared by a check and commit status requires both to pass, and that test-merge statuses take precedence over head statuses: required status troubleshooting. The reporter writes no success status, leaves same-repository PRs to actual validation, rejects stale heads, and treats a deleted fork repository as untrusted.

Ownership and rollout

Only four destination-owned .github/workflows/ files change. The selector script is already present through the protected source projection. No mirrored source, action pins, runner variables, rulesets, required contexts, branch protection, mirror ownership, or environment blueprint changes. Both the false-pass fix and path-filter activation land atomically; no flag is appropriate for correcting false validation.

Validation

  • node --test scripts/check-ci-concurrency.test.mjs: 33 passed.
  • node --test .github/workflows/fork-status-reporter.test.mjs: 11 passed; executes the actual inline reporter against a mocked GitHub transport, including head/merge failures, stale events, API errors, malformed input, deleted repositories, and bounded unknown mergeability.
  • node --test .github/workflows/source-provenance-link.test.mjs: 13 passed.
  • node --test .github/workflows/check-maestro-ci-path-selection-contract.test.mjs: 8 passed, including a real Git contributor-runbook-only change through the actual selector and actual terminal summary (all three targets skipped, summary succeeds).
  • bash scripts/run-ci-tooling.sh: passed, including zizmor, workflow footgun guardrails, shell tooling, selector tests, public workflow contract, and release contracts. Two Mono-root-only tests are explicitly skipped in this public checkout.
  • Actionlint on both edited YAML workflows and git diff --check: passed.

No Rust code changed; no local workspace builds or verification receipts were run. The latency suite is not present in this public checkout.

Evidence limits

The historical baseline remains run 44389685715: 91m18s full cycle, 66m37s summed execution across the six concrete target jobs. The docs-only fixture reduces those six target jobs to zero; this is selection evidence, not measured runtime savings. Live after timing and a real fork status/merge-blocking observation remain unverified until deployment and an eligible event. No live workflow was manually dispatched.

The visible release ruleset requires maestro-ci from GitHub Actions (integration 15368). Main's full classic protection configuration could not be read (403); no protection changes are included. The generic required-check coverage helper treats dynamic display names literally if invoked on this public worktree; it is not currently invoked there by the active watchdog, and was not weakened or opted out.

Checklist

  • Affected workflow lint and contract tests passed.
  • No touched runtime packages require a build.
  • No staged flag: false-pass correction and approved CI demand cuts.
  • Hosted checks and post-merge live fork observation.

No-Issue: Implements the owner's approved fork-status correction and activation of the merged CI demand cuts.
Flag: none -- false-pass correction and CI-only execution selection, with unchanged product behavior.

Change-Origin: agent
Agent-Contributor: role=implementation; harness=devin
Human-Edited: false
Human-Reviewed: false


Product Engineer opened this PR for Jonathan
Implemented in session Select Maestro CI checks by changed paths
Review with Devin · Open in Devin Desktop


Co-Authored-By: Jonathan Haas <jonathan@0xHaas.com>
@haasonsaas
haasonsaas requested review from a team as code owners November 19, 2026 15:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T15:48:59.951300Z 161d1ae PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

Devin Review

Comment thread .github/workflows/maestro-ci.yml Resolved

@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: 161d1aed98

ℹ️ 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 +322 to +323
publish_failure(repository, current_sha)
print("Published the blocking not-validated status on the current fork head.")

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 Avoid poisoning shared commits with fork-specific failures

If someone opens a fork PR whose head is the exact commit used by a same-repository PR, this writes a repository-wide maestro-ci failure onto that shared SHA, even if trusted CI already validated it. Commit statuses are not scoped to a PR, and the same-repository path above never clears this status; rerunning the trusted summary only produces a check-run. GitHub documents that a required check and commit status sharing a name must both pass, so this can block head-based required-check evaluations for trusted work until the failure is explicitly replaced or the SHA changes. Enforce the fork-specific denial through a PR workflow check rather than an unconditional failure on a potentially shared commit, or reconcile the status when trusted validation exists.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Confirmed. A fork-specific failure must not be written to a SHA also used by trusted work. Merely switching to a failing pull_request_target job is not a demonstrated isolation fix: check runs are also commit-associated, and pull_requests metadata is not a documented required-check isolation boundary. GitHub's ruleset troubleshooting documentation says required status checks do not take workflow or event identity into account. This revision remains held and this thread remains unresolved while a PR-specific gating design is evaluated; no change will execute fork code, weaken required checks, or clear a failure with an unearned success.

References: https://docs.github.com/en/rest/checks/runs and https://docs.github.com/en/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/troubleshooting-rules

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

This branch has not been deployed

No deployments
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.

1 participant