proto: decide the unreferenced Value.Type enum before stability
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9
- Forks
- 0
- Avg merge
- 3h 3m
- Merged PRs (30d)
- 509
Description
Decision requested
Decide whether to remove the unreferenced nested enum flowstate.v1.Value.Type before Flowstate's schema stabilizes, or retain it explicitly as a descriptor/source-API commitment with a named purpose.
Disposition candidate for owner/Fable review: remove before stability, unless an external descriptor/generated-code consumer or a concrete roadmap need is identified. This is cleanup of a dormant contract, not a proposal to replace the live value representation.
Current evidence
On origin/main at 681f8427:
proto/flowstate/v1/value.proto:65-75declaresValue.Typewith nine values.Valuecarries no field of that enum. Its live representation is thekindoneof atvalue.proto:120-138.- An exhaustive repository search excluding generated Protobuf files found no construction, read, comparison, switch, serialization, test fixture, or documentation use of
Value.Typeas data. The only non-generated references are explanatory comments aroundInputDeclaration.Typeand conversion code. proto/flowstate/v1/workflow.proto:763-785defines the activeInputDeclaration.Type. It intentionally copied six names/numbers fromValue.Type, then evolved independently;pkg/flowstate/v1/inputs.go:344-429converts liveValue.kindarms to that declaration type without readingValue.Type.- Git history traces the enum to the initial implementation (
99d547e, 2025-06-30); no production reader/writer was found before or after the schema split (5867ce0). - The source-bearing descriptor and generated Go therefore publish nine enum values that describe neither a wire field nor the current oneof. #1225 already deferred
value.protodocumentation until this lifecycle question is settled, but no focused decision issue existed.
This proves there is no in-repository consumer. It cannot prove that no external user imported the generated constants or reflected over the descriptor.
Compatibility constraints
Removing the nested enum is a Buf FILE/source API break, even though no durable Protobuf payload can carry one of its values because no field references it. Generated Go constants/types and descriptor reflection are the plausible consumers; durable workflow history is not.
Flowstate's super-alpha posture makes a deliberate cleanup plausible, but it should still be visible in migration/release notes and checked against any known external SDK/plugin use. Keeping it indefinitely is also a compatibility choice: it preserves an attractive but misleading second type vocabulary beside the oneof and InputDeclaration.Type.
Options and tradeoffs
- Remove now (candidate). Smallest mental model and avoids documenting a dead abstraction. Costs one explicit FILE break and any external generated-source migration.
- Deprecate for one announced window, then remove. Gives external source consumers notice, but temporarily adds lifecycle machinery for a symbol with no wire instances and no known reader.
- Retain as a descriptor-only classification. Justified only if a concrete consumer needs it; document that purpose and test the relation to
Value.kind. This keeps permanent synchronization cost.
Do not add a type field merely to make the enum used: that would duplicate the oneof discriminator and create invalid combinations.
Acceptance criteria
- Search generated consumers, handwritten code, tests, docs/examples, published package use that is locally observable, and history; record any external consumer found.
- Owner/Fable chooses remove, timed deprecation, or retain with a concrete purpose and evidence.
- If removed, spend the FILE break in one bounded change, regenerate derived files/descriptors, state that wire histories are unaffected, and provide the generated-source migration note.
- If retained, document its exact semantics and add a test preventing it from drifting from the live representation it is meant to classify.
- Unblock the
value.protodocumentation slice in #1225 after the decision.
Non-goals
- Changing
Value.kind, CEL value encoding,InputDeclaration.Type, or runtime behavior. - Replacing the oneof with an enum-plus-payload design.
- Treating all unused-looking Protobuf declarations as removable; this finding is specific to a type with no field and no repository reader/writer.
Questions for owner/Fable
- Is there a known external generated-code or descriptor consumer of
Value.Type? - If not, is a notice window worth more than removing the misleading surface while the project is super-alpha?
- If retained, what operation should consume it that cannot read the oneof descriptor directly?
Related: #1225, #1159, #1232.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing proto/flowstate/v1/value.proto:65-75 and the live Value.kind oneof at lines 120-138, then inspect workflow.proto:763-785 and pkg/flowstate/v1/inputs.go:344-429. Search generated consumers, repository history, and any locally observable package use before presenting the findings to the owner/Fable. Done means a recorded decision with the bounded removal and regeneration path, or documented semantics and a drift-prevention test if retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100