Add libs/capability: reflection-driven capability runner - #751
Draft
cedric-cordenier wants to merge 1 commit into
Draft
Add libs/capability: reflection-driven capability runner#751cedric-cordenier wants to merge 1 commit into
cedric-cordenier wants to merge 1 commit into
Conversation
Adds libs/capability, an in-progress replacement for the libs/standalone
bootstrapper where a capability binary's main reduces to:
capability.Run(ctx, trigger.NewCron)
Run reads the constructor's parameter list by reflection, builds the
dependencies it asks for (logger, registry, limits factory), and hangs
run/embed subcommands off a cobra root. See libs/capability/AGENTS.md.
Its one in-repo dependency, libs/standalone/protohelpers/ui (the debug UI
served under /debug/capabilities), comes along. The rest of the spike
branch's libs (standalone rewrite, ocr, grpcutils, x) is not included.
NOTE: pins chainlink-common to v0.11.2-0.20260827151019-9853beb3a544,
the tip of the unmerged chainlink-common branch rtinianov_configWithOwner,
because registry.Local/registry.Registry/registry.RegisterCapability do
not exist on chainlink-common main yet. That branch should land first and
this pin be updated to a main pseudo-version afterwards.
product-security-plaid-production
Bot
requested review from
dhaidashenko and
ilija42
September 9, 2026 10:44
Contributor
|
👋 cedric-cordenier, 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! |
cedric-cordenier
marked this pull request as draft
September 9, 2026 10:44
|
Comment on lines
+483
to
+487
| http.SetCookie(w, &http.Cookie{ | ||
| Name: fanoutCookieName, | ||
| Value: base64.RawURLEncoding.EncodeToString(buf), | ||
| Path: "/", | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




What
Adds
libs/capability, an in-progress replacement for thelibs/standalonebootstrapper (spiked oncedric_configWithOwner). A capability binary'smainreduces to one line:Runreads the constructor's parameter list by reflection and builds what it asks for (logger, registry, limits factory); config sections are registered on a cobra root withrun/embedsubcommands. Full design notes, ordering constraints, and known gaps are inlibs/capability/AGENTS.md.Dependencies added
In-repo: only
libs/standalone/protohelpers/ui(the debug UI mounted under/debug/capabilities, imported bydebugui.go). The rest of the spike branch's new libs (standalonerewrite,ocr,grpcutils,x) are not included.go.mod:
fullstorydev/grpcui,jhump/protoreflect,spf13/cobra; promotedgrafana/pyroscope-goandprometheus/client_golangto direct.libs/capabilityusesregistry.Local/registry.Registry/registry.RegisterCapability, which do not exist on chainlink-common main. This PR pinschainlink-commontov0.11.2-0.20260827151019-9853beb3a544, the tip of the unmerged chainlink-common branchrtinianov_configWithOwner(which includes a merge with main). Before this merges, either:Testing