fix(verifier): reject [policy_hook] in Chainlink-node mode at boot - #1414
Conversation
|
👋 tt-cll, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
There was a problem hiding this comment.
🟡 Changes recommended
The new contract conflicts with existing documentation/changelog and there are a couple of correctness/clarity issues in the updated constructor/docs that should be addressed first.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the Chainlink-node (integration constructor) entry point to reject any [policy_hook] configuration at startup, reflecting that the policy hook is only supported in the standalone verifier deployment mode.
Changes:
- Update policy hook documentation to state that
[policy_hook]is not supported when running inside a Chainlink node. - Remove the functional option plumbing (
WithPolicyHookCredential, options resolver) previously used to support policy hook credentials in the Chainlink-node constructor. - Update the Chainlink-node constructor to hard-fail if
cfg.PolicyHookis set, and to wire the coordinator with the ungatedcommitVerifier.
File summaries
| File | Description |
|---|---|
| verifier/docs/policy_hook.md | Clarifies that [policy_hook] is unsupported in Chainlink-node mode and should fail at startup. |
| integration/pkg/constructors/options.go | Deleted: removes the now-obsolete functional option used to pass policy hook credentials. |
| integration/pkg/constructors/committee_verifier.go | Rejects [policy_hook] in Chainlink-node mode and removes policy hook gating/wrapping from this constructor. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // The policy hook is not supported on a verifier running inside a Chainlink node: its HMAC | ||
| // credential is resolved from the standalone verifier's secrets file, which does not exist | ||
| // here. Configuring the section must fail loudly rather than screen traffic with an | ||
| // unauthenticated hook. | ||
| if cfg.PolicyHook != nil { |
935a12c to
1731ce6
Compare
|
Code coverage report:
Files removed (from
|
Description
Testing
Checklist
changelogdirectory)Stack created with GitHub Stacks CLI • Give Feedback 💬