Skip to content

fix(verifier): reject [policy_hook] in Chainlink-node mode at boot - #1414

Merged
tt-cll merged 3 commits into
mainfrom
tt/policy-hook-cl-mode-error
Sep 9, 2026
Merged

fix(verifier): reject [policy_hook] in Chainlink-node mode at boot#1414
tt-cll merged 3 commits into
mainfrom
tt/policy-hook-cl-mode-error

Conversation

@tt-cll

@tt-cll tt-cll commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

Testing

Checklist

  • Breaking changes documented in changelog (see changelog directory)
  • Cross link related PRs (in this or other repositories)

Stack created with GitHub Stacks CLIGive Feedback 💬

@tt-cll
tt-cll requested review from a team as code owners September 5, 2026 19:03
Copilot AI lite review requested due to automatic review settings September 5, 2026 19:03
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

👋 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!

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.

🟡 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.PolicyHook is set, and to wire the coordinator with the ungated commitVerifier.
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.

Comment thread integration/pkg/constructors/committee_verifier.go Outdated
Comment on lines +58 to +62
// 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 {
Comment thread integration/pkg/constructors/committee_verifier.go
Comment thread verifier/docs/policy_hook.md
Comment thread integration/pkg/constructors/committee_verifier.go Outdated
@tt-cll
tt-cll force-pushed the tt/policy-hook-cl-mode-error branch from 935a12c to 1731ce6 Compare September 9, 2026 11:20
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Code coverage report:

Package main tt/policy-hook-cl-mode-error Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 50.80% 50.86% +0.06%
github.com/smartcontractkit/chainlink-ccv/bootstrap 72.00% 72.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 58.12% 58.12% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 35.65% 35.65% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 47.76% 47.76% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 42.80% 42.80% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.55% 35.54% -0.01%
github.com/smartcontractkit/chainlink-ccv/integration 59.34% 59.33% -0.01%
github.com/smartcontractkit/chainlink-ccv/internal 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/migration 78.70% 78.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 63.46% 63.46% +0.00%
github.com/smartcontractkit/chainlink-ccv/tools 43.61% 43.61% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 36.53% 36.72% +0.19%
Total 50.80% 50.80% +0.00%

Files removed (from main):

  • github.com/smartcontractkit/chainlink-ccv/integration/pkg/constructors/options.go

@tt-cll
tt-cll added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 23f8516 Sep 9, 2026
66 of 67 checks passed
@tt-cll
tt-cll deleted the tt/policy-hook-cl-mode-error branch September 9, 2026 12:38
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