ci: gate node sync on a single approval#404
Conversation
GitHub strips masked secrets from job outputs, so propagating the App token via needs.prepare.outputs.token left sync-files with an empty token. Clone genlayer-node inside prepare instead and share the result as a node-source artifact, keeping the single-approval gate without crossing the secret boundary.
✅ Deploy Preview for genlayer-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow is optimized to clone the source repository once in the ChangesWorkflow Optimization: Single Clone with Artifact Sharing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 43 minutes and 33 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/sync-docs-from-node.yml:
- Around line 104-113: The sparse checkout is using cone mode
(sparse-checkout-cone-mode: true) but lists individual files in sparse-checkout,
which cone mode ignores; update either: 1) convert the six file entries
(configs/node/config.yaml.example, configs/node/asimov.yaml.example,
configs/node/bradbury.yaml.example, release/docker-compose.yaml,
release/alloy-config.river, release/greybox-setup-guide.md) into their
containing directories (e.g., configs/node/ and release/) so cone-mode works
with directory-level paths, or 2) disable cone mode by setting
sparse-checkout-cone-mode: false so the current exact file paths in
sparse-checkout are honored; adjust the sparse-checkout block and keep path:
source-repo unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cee0bba0-4736-41df-8e60-c498764011fc
📒 Files selected for processing (1)
.github/workflows/sync-docs-from-node.yml
Replace the broad docs/ entry with the three subdirs the sync-files matrix actually reads (changelog, api/rpc, api/ops). Trims the node-source artifact to only the files downstream jobs consume. Custom workflow_dispatch *_path inputs now require a matching update to this list.
Cone mode materializes all top-level files of any ancestor directory of a listed pattern, leaking siblings of the configs/node and release files we explicitly target. Non-cone mode honors each pattern as a literal path, keeping the node-source artifact strictly limited to the files sync-files actually consumes.
Description
Restores the goal of one reviewer approval per node-sync run without the broken token propagation introduced in 889b0e4.
That commit emitted the GitHub App token via
needs.prepare.outputs.token, but GitHub strips values registered as secrets when they cross job boundaries — everysync-filesmatrix job received an empty token and failed thegenlayer-nodecheckout withInput required and not supplied: token(see run 25329813918).This change clones
genlayer-nodeinside the gatedpreparejob and shares the working tree as anode-sourceartifact. Thesync-filesmatrix downloads the artifact and runs unchanged — no environment, no secrets, no second approval prompt. The token is confined to the single job that mints it, which aligns with GitHub's masking model: job outputs are not an authorized escape hatch for secrets.Cleanup of the new artifact is automatic — the existing
cleanupjob lists every artifact in the run viagh apiand deletes them.retention-days: 1is set as a fallback for runs where cleanup is skipped.Summary by CodeRabbit