feat: add plugin raw_options blob and typed generic options#81
Merged
Conversation
Introduce a plugin-owned raw_options blob (always JSON) on the identify RPCs so plugins become the source of truth for their own parse options: - IdentifyProjectsResponse, IdentifyEnvironmentsRequest and Environment each carry a bytes raw_options field. - ParseRequest.raw_options_format is dropped (raw_options is always JSON) and its field number reserved. Add typed, caller-sourced fields to GenericOptions for data a plugin cannot derive from the repo (flag/env/API): required_attributes (plus a new AttributeRequirement message), default_tags, source_map, env and force_local_module_paths. Regenerated Go and TS bindings.
liamg
approved these changes
Jul 10, 2026
liamcervante
marked this pull request as ready for review
July 10, 2026 12:22
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.
Summary
Makes plugins the source of truth for their own parse options, and moves caller-assembled runtime data into the typed options channel. Additive and backwards-compatible.
parser.proto— pluginraw_optionsblob (always JSON)bytes raw_optionstoIdentifyProjectsResponse,IdentifyEnvironmentsRequest, andEnvironment. A plugin generates it during identification; the caller persists it (as a YAML map in the config file) and forwards it verbatim intoParse— opaque to the config library / CLI / runner.ParseRequest.raw_options_format(field 4) andreservethe number —raw_optionsis always JSON.options.proto— typed caller-sourced fields onGenericOptionsData a plugin can't derive from the repo (flag / env var / API) is typed here rather than in the blob:
required_attributes(+ newAttributeRequirementmessage) — FinOps naming policydefault_tags— YOR config /YOR_SIMPLE_TAGSsource_map— flatINFRACOST_TERRAFORM_SOURCE_MAP(the config-file regex source map stays in the blob)env— runtime/integration env varsforce_local_module_paths— caller flagEach new field documents which plugins consume it; others ignore it.
Rule
Source decides the channel: caller-sourced (flag/env/API) → typed
GenericOptions; plugin-derived-from-repo or user-config-in-the-config-file →raw_optionsblob.IdentifyAllProjects(letting a plugin own the whole-repo walk) is intentionally not included here — it's a separate follow-up.Testing
make generatepasses:buf lint,buf format,buf generate,go build ./gen/go/..., and the TStsccheck. Go and TS bindings regenerated.