Repository navigation
Fix compile-progress file permission policy violation - #71947
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Review: no blocking issues
The change correctly replaces the raw permission literal with constants.FilePermSensitive, which preserves the existing 0600 behavior and aligns the write with the repository permission policy. I found no actionable correctness or security regressions in the changed lines.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs to this one-line permission-policy fix.
This is a minimal, mechanical correction: it swaps a raw 0o600 literal for constants.FilePermSensitive in writeMCPCompileProgress, which satisfies the repo's static-analysis guard (TestNoRawOctalPermissionLiteralsInOSCalls in pkg/constants/permissions_policy_test.go) that bans raw octal permission literals in non-test os.* calls.
📋 Verification
constants.FilePermSensitiveresolves to0o600, so file permissions on the compile-progress snapshot are unchanged — purely a policy-compliance fix, no behavior change.- Existing coverage:
TestMCPCompileProgressSnapshotinpkg/cli/mcp_timeout_test.goalready exerciseswriteMCPCompileProgressend-to-end, andTestPermissionConstantsValuespins the constant's value, so no new regression test is needed. - Confirmed locally:
go build ./pkg/cli/... ./pkg/constants/...succeeds andTestNoRawOctalPermissionLiteralsInOSCallsnow passes.
Positive Highlights
- ✅ Root cause addressed directly (the literal itself), not a workaround.
- ✅ Scoped to the single violating line; no unrelated changes.
No actionable issues found — approving.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · ~18 AIC · ⌖ ~15 AIC · ⊞ 10.2K
Comment /matt to run again
There was a problem hiding this comment.
🟢 Approval recommended
The constant has the same value and compatible type, satisfying the existing permission policy without changing behavior.
No open issues 🎉
What changed in this PR
Fixes gh-aw’s permission-policy violation when writing MCP compile-progress snapshots, without changing runtime permissions.
Changes:
- Imports
pkg/constantsand replaces raw0o600withconstants.FilePermSensitive, preserving owner-only read/write access.
| File | Description |
|---|---|
pkg/cli/compile_pipeline.go |
Uses the shared sensitive-file permission constant for compile-progress snapshots. |
Review effort: Max
|
🎉 This pull request is included in a new release. Release: |
AW health investigation identified a compiler permission-policy violation failing CGO. This patch addresses that regression; fleet health remains unverified.
0o600withconstants.FilePermSensitivewhen writing MCP compile-progress snapshots, preserving owner-only permissions.