Skip to content

Fix compile-progress file permission policy violation - #71947

Merged
pelikhan merged 1 commit into
mainfrom
copilot/fix-health-issues
Oct 25, 2026
Merged

pelikhan merged 1 commit into
mainfrom
copilot/fix-health-issues

Conversation

Copilot AI commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

AW health investigation identified a compiler permission-policy violation failing CGO. This patch addresses that regression; fleet health remains unverified.

  • Compiler: Replace raw 0o600 with constants.FilePermSensitive when writing MCP compile-progress snapshots, preserving owner-only permissions.
  • Remaining health gap: The spec audit remains blocked by integrity-filtered issue results; integrity controls are unchanged.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Fix compiler permission-policy regression found during health check Fix compile-progress file permission policy violation Oct 25, 2026
Copilot AI requested a review from pelikhan October 25, 2026 20:25
@pelikhan
pelikhan marked this pull request as ready for review October 25, 2026 20:25
Copilot AI max review requested due to automatic review settings October 25, 2026 20:25
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · gpt56 · ~5 AIC · ⌖ ~6 AIC · ⊞ 14.8K · ◷

Generated by Ponytail Reviewer for #71947

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · opus55 · ~12 AIC · ⌖ ~33 AIC · ◇ ~3 AIC · ⊞ 1.9K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · sonnet50 · ~15 AIC · ⌖ ~15 AIC · ◇ ~7 AIC · ⊞ 12.6K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.FilePermSensitive resolves to 0o600, so file permissions on the compile-progress snapshot are unchanged — purely a policy-compliance fix, no behavior change.
  • Existing coverage: TestMCPCompileProgressSnapshot in pkg/cli/mcp_timeout_test.go already exercises writeMCPCompileProgress end-to-end, and TestPermissionConstantsValues pins the constant's value, so no new regression test is needed.
  • Confirmed locally: go build ./pkg/cli/... ./pkg/constants/... succeeds and TestNoRawOctalPermissionLiteralsInOSCalls now 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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/constants and replaces raw 0o600 with constants.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

@pelikhan
pelikhan merged commit 9f68f49 into main Oct 25, 2026
113 of 128 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.93.6

@github-actions
github-actions Bot deleted the copilot/fix-health-issues branch November 2, 2026 02:02

@mustafasaleh3999-creator mustafasaleh3999-creator 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.

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.

4 participants