git diff --name-only --no-renames b49106e83..HEAD
.changeset/patch-fix-copilot-byok-env-handling.md
pkg/workflow/pi_byok_env_passthrough_integration_test.go
pkg/workflow/pi_engine.go
pkg/workflow/pi_engine_test.go
Post-apply verification: 4 file(s) actually modified
##[error]SECURITY: Post-apply file-protection check failed. The patch applied files that were not detected by the pre-apply parser: pkg/workflow/pi_byok_env_passthrough_integration_test.go, pkg/workflow/pi_engine.go, pkg/workflow/pi_engine_test.go. This may indicate a patch-parser bypass attempt. Aborting push.
git reset --hard b49106e838fabdc40d01836e3f28df007e856938
✗ Message 1 (push_to_pull_request_branch) failed: SECURITY: Post-apply file-protection check failed ...
Problem statement
safe_outputsjob (Process Safe Outputs), the pre-apply patch parser detected only 1 changed file (.changeset/...md), but applying the bundle modified 4 files.push_to_pull_request_branch, discarding a legitimately-authored changeset commit.agent_job_conclusion: success); only the safe-output push failed — a false positive in the security guard.Affected workflow & run
safe_outputs/ Process Safe Outputscopilot/remove-strict-false-and-fix-env-support(PR push)Evidence
Process Safe Outputs log tail
The pre-apply parser saw only
.changeset/patch-fix-copilot-byok-env-handling.md; the post-applygit diff --name-onlycorrectly saw all 4 files.Probable root cause
Proposed remediation
git apply --numstat/git diff --name-onlyagainst the bundle) so both sides see an identical file set..changeset/*.mdplus ≥3 source files must pass the file-protection check and push successfully.Success criteria / verification
SECURITY: Post-apply file-protection check failed.References: §28171955821
Related to #39884