Skip to content

🧹 Skip permissions.json write when only timestamp changed#7071

Merged
tas50 merged 1 commit intomainfrom
fix/permissions-skip-timestamp-only-changes
Mar 31, 2026
Merged

🧹 Skip permissions.json write when only timestamp changed#7071
tas50 merged 1 commit intomainfrom
fix/permissions-skip-timestamp-only-changes

Conversation

@tas50
Copy link
Copy Markdown
Member

@tas50 tas50 commented Mar 31, 2026

Summary

  • Permissions tool now compares the existing .permissions.json content (ignoring generated_at) before writing
  • If only the timestamp differs, the file is left untouched and the tool prints (unchanged)
  • Eliminates noisy diffs caused by provider rebuilds when no permissions actually changed

Test plan

  • go run providers-sdk/v1/util/permissions/permissions.go providers/aws prints (unchanged) and produces no diff when permissions haven't changed
  • Verify a real permission change (e.g., adding an API call) still updates the file

🤖 Generated with Claude Code

The permissions tool regenerates on every provider build, and the
timestamp comes from the latest git commit. This causes a dirty diff
even when no permissions actually changed. Compare the existing file
content (ignoring generated_at) before writing to avoid noise.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@mondoo-code-review mondoo-code-review bot left a comment

Choose a reason for hiding this comment

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

Permissions manifest regeneration no longer produces spurious file changes when only the timestamp differs.

@github-actions
Copy link
Copy Markdown
Contributor

Test Results

5 741 tests  ±0   5 737 ✅ ±0   2m 22s ⏱️ +18s
  425 suites ±0       4 💤 ±0 
   33 files   ±0       0 ❌ ±0 

Results for commit 3f59920. ± Comparison against base commit b0bccb5.

@tas50 tas50 merged commit dc89acd into main Mar 31, 2026
22 checks passed
@tas50 tas50 deleted the fix/permissions-skip-timestamp-only-changes branch March 31, 2026 05:13
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant