fix(rep60): adopt protected current-revision controller - #154
Open
litroc wants to merge 1 commit into
Open
Conversation
Shared-Assets-Source-SHA: edec7c2d3c4ef73373408fdbb44c3dd5e9112676 Shared-Assets-Source-Run: 32177576480 Shared-Assets-Sync-App-ID: 4351516
There was a problem hiding this comment.
Pull request overview
Task profile (LIT-GEN-GDR-GOV-30)
- Work item: Review protected “current-revision” rollout (REP-60 / MLX-90) and local no-AI-egress adjustments
- Risk: high (changes to required PR gates, protected workflows, and review provenance)
- Smallest sufficient approach: focused diff + targeted repo inspection (workflows/scripts only)
- Escalation condition: any ambiguity about event/ref invariants for
pull_request_targetgates or inability to prove fail-closed behavior
This PR replaces the prior automation-oriented Copilot review gate with a protected “current-revision” controller and shifts local tooling to deterministic, no-AI-egress evidence collection. It also adds a protected rerun helper and an exact-revision materializer script used by the protected release-bot workflow.
Changes:
- Add a protected exact-revision materializer to (re)generate and bind immutable review inputs for MLX-90 verification.
- Update local
lit-push-readyevidence flow to prohibit local AI execution while preserving deterministic guardrails and recording the policy in evidence. - Replace/adjust GitHub Actions gates to a protected
pull_request_target“current revision review” controller plus a protected rerun helper and refreshed rerun trigger logic.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/materialize-exact-revision-review.py |
New materializer to fetch/derive exact-review diff + immutable metadata and bind protected assets into an input hash. |
scripts/lit-push-ready.py |
Removes local agent reviews; enforces “no local AI egress” while still materializing deterministic review workspace and writing/verifying evidence. |
.lit/push-ready.json |
Disables local Copilot/Codex agents and updates the remote-only Copilot gate job name reference. |
.github/workflows/release-bot-exact-head-review.yml |
Renames/publishes “Current revision review” check and tightens check-run provenance filtering. |
.github/workflows/current-revision-rerun.yml |
New protected helper to rerun the verifier exactly once after a neutral PASS is present. |
.github/workflows/copilot-review.yml |
Canonical protected pull_request_target current-revision gate: requests Copilot review (for applicable PRs), verifies policy, and publishes a bound neutral result. |
.github/workflows/copilot-review-refresh.yml |
Updates the refresh job to target pull_request_target runs and tightens actor/reviewer attribution checks. |
Suppressed comments (1)
.github/workflows/copilot-review.yml:852
- Same issue as above: TRUSTED_WORKFLOW_REF is validated only against refs/heads/develop. Any pull_request_target run for a PR whose base is main will report workflow_ref
@refs/heads/mainand fail this publish step.
test "${DEFAULT_BRANCH}" = develop
test "${TRUSTED_WORKFLOW_REF}" = \
"${REPOSITORY}/.github/workflows/copilot-review.yml@refs/heads/${DEFAULT_BRANCH}"
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+68
to
+70
| test "${DEFAULT_BRANCH}" = develop | ||
| test "${TRUSTED_WORKFLOW_REF}" = \ | ||
| "${REPOSITORY}/.github/workflows/copilot-review.yml@refs/heads/${DEFAULT_BRANCH}" |
Comment on lines
+186
to
193
| if [ "${marker_exists}" = true ]; then | ||
| echo "Recorded request no longer has a pending or completed exact-head review; requesting again." | ||
| fi | ||
| gh api --method POST "${requested_reviewers_url}" -f "reviewers[]=${reviewer}" | ||
| if [ "${marker_exists}" = false ]; then | ||
| gh api --method POST "repos/${REPOSITORY}/issues/${PR_NUMBER}/comments" \ | ||
| -f body="<!-- mlx90-copilot-request head=${EXPECTED_HEAD} -->Copilot review request accepted for finalized head ${EXPECTED_HEAD}." >/dev/null | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human-authored protected rollout replacing automation PR #153. Preserves exact automation head e3486b5; pipeline review only, with no local AI review.