Skip to content

Conversation

@maxrantil
Copy link
Owner

Summary

Fixes startup failures in test workflows that call reusable workflows from maxrantil/.github repository.

Problem

The following workflows were failing with startup_failure:

  • test-protect-master.yml (on push to master)
  • test-reusable-workflows.yml (on PR and push to master)

Root Cause: Permission mismatch between calling workflows and reusable workflows.

  • Reusable workflows require pull-requests: read permission
  • Calling workflows only granted pull-requests: none (default)

Solution

Added explicit permissions block to both workflow files:

permissions:
  pull-requests: read
  contents: read

Changes

  • .github/workflows/test-protect-master.yml: Add permissions block
  • .github/workflows/test-reusable-workflows.yml: Add permissions block

Testing

  • ✅ Pre-commit hooks passed
  • ✅ YAML syntax validation passed
  • ⏳ CI will validate the permission fix works

References

Add pull-requests:read and contents:read permissions to workflows
that call reusable workflows from maxrantil/.github repository.

This resolves startup failures caused by permission mismatches where
reusable workflows require pull-requests:read but calling workflows
only granted pull-requests:none.

Fixes workflows:
- test-protect-master.yml (startup_failure on push to master)
- test-reusable-workflows.yml (startup_failure on PR and push)
@maxrantil maxrantil merged commit 56bdff4 into master Nov 4, 2025
10 checks passed
@maxrantil maxrantil deleted the fix/workflow-permissions branch November 4, 2025 19:57
maxrantil added a commit that referenced this pull request Nov 5, 2025
Session summary:
- Issue #61: Automated rollback script (merged, security hardened)
- PR #68: Workflow permissions fix (merged, all CI healthy)
- 2 PRs merged, 1 issue closed
- All tests passing, all CI workflows healthy

Ready for next session: review open issues and select priority
maxrantil added a commit that referenced this pull request Nov 5, 2025
* docs: complete session handoff for issue #61 and workflow fixes

Session summary:
- Issue #61: Automated rollback script (merged, security hardened)
- PR #68: Workflow permissions fix (merged, all CI healthy)
- 2 PRs merged, 1 issue closed
- All tests passing, all CI workflows healthy

Ready for next session: review open issues and select priority

* feat: add GitHub Actions caching for shfmt binary

Add caching to the shfmt job in shell-quality workflow to avoid
downloading the binary on every CI run.

Changes:
- Cache shfmt binary at ~/.local/bin/shfmt using actions/cache@v4
- Make installation conditional on cache miss
- Move binary to user directory (no sudo required)
- Add ~/.local/bin to PATH for shfmt availability

Benefits:
- Save 10-15 seconds per CI run on cache hit
- Reduce bandwidth usage
- Download only when shfmt version changes

Resolves #62

* docs: complete session handoff for issue #62

Update SESSION_HANDOVER.md with Issue #62 completion status:
- CI optimization implementation complete
- PR #69 created (draft) with all CI checks passing
- Caching functionality verified in workflow logs
- Next session options clearly defined
- Previous session archived in collapsible section

Resolves session handoff requirement per project guidelines
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.

2 participants