Caveman Test Fixtures API
Table of Contents
upsquad/cavemantest/v1/clearance_cases.proto
Case1AnnotatedField
Case1AnnotatedField — field carries a proto edit_clearance option; walker MUST emit that value and source="proto".
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | name has an L3 edit clearance and explicit L2 read clearance. |
Case2Leaf
Case2Leaf is the nested message whose secret_value has no
annotation and must fail-closed.
| Field | Type | Label | Description |
|---|---|---|---|
| secret_value | string | secret_value is deliberately un-annotated. |
Case2NestedLeafUninherited
Case2NestedLeafUninherited — the parent field is annotated, but the nested leaf has no annotation and MUST NOT inherit. Walker emits 0 (fail-closed to L5) for the nested leaf.
| Field | Type | Label | Description |
|---|---|---|---|
| wrapper | Case2Leaf | wrapper has an L3 edit_clearance, but its nested fields MUST NOT inherit it. |
Case3OneofVariantUninherited
Case3OneofVariantUninherited — a oneof whose variants have no annotations MUST NOT inherit from anywhere. Walker emits 0 for the variants.
| Field | Type | Label | Description |
|---|---|---|---|
| arm_a | string | arm_a has no annotation. | |
| arm_b | int32 | arm_b has no annotation. |
Case4ProtoWinsOverRegistry
Case4ProtoWinsOverRegistry — a field carries BOTH a proto annotation and a sibling-registry entry. Proto wins; source="proto".
| Field | Type | Label | Description |
|---|---|---|---|
| override_me | string | override_me is annotated L3 in proto AND overridden L4 in registry. |
Case5RegistryFallsThrough
Case5RegistryFallsThrough — a field without any proto annotation, but the sibling registry has an entry. Walker emits registry value, source="registry".
| Field | Type | Label | Description |
|---|---|---|---|
| registry_set | string | registry_set is un-annotated; resolved via the fixture registry YAML to L4. |
upsquad/cavemantest/v1/kinds_matrix.proto
ClientStreamRPCRequest
ClientStreamRPCRequest — unique body for the streaming RPC; lint requires distinct request/response types per RPC.
| Field | Type | Label | Description |
|---|---|---|---|
| chunk | string | A string payload. |
ClientStreamRPCResponse
ClientStreamRPCResponse — envelope.
MapRPCRequest
MapRPCRequest carries the map<K,V> branch. The walker treats map fields as JSON-textarea (FieldKindUnknown) and does not recurse into the synthetic entry message.
| Field | Type | Label | Description |
|---|---|---|---|
| labels | MapRPCRequest.LabelsEntry | repeated | A map<string,string> — renderers emit the JSON-textarea placeholder. |
MapRPCRequest.LabelsEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
MapRPCResponse
MapRPCResponse — envelope.
NestedRPCRequest
NestedRPCRequest covers the non-wrapper, non-well-known, non-map MessageKind path (falls through the well-known switch and recurses via buildMessageIR) and the SecretRef short-circuit preceding the well-known-type switch.
| Field | Type | Label | Description |
|---|---|---|---|
| nested | ScalarRPCRequest | A nested message — exercises recursion. | |
| api_key | upsquad.secret.v1.SecretRef | A SecretRef — exercises FieldKindSecretRef short-circuit. |
NestedRPCResponse
NestedRPCResponse — envelope.
OneofRPCRequest
OneofRPCRequest exercises the FieldKindOneof path (real, non-synthetic).
| Field | Type | Label | Description |
|---|---|---|---|
| literal | string | Scalar arm. | |
| structured | ScalarRPCRequest | Message arm. |
OneofRPCResponse
OneofRPCResponse — envelope.
RepeatedRPCRequest
RepeatedRPCRequest carries every FieldKind as a repeated field, driving the writeRepeated branches in both renderers end-to-end.
| Field | Type | Label | Description |
|---|---|---|---|
| a_strings | string | repeated | repeated string. |
| a_bools | bool | repeated | repeated bool. |
| a_ints | int32 | repeated | repeated int32. |
| a_bytes_list | bytes | repeated | repeated bytes. |
| a_colors | KindsMatrixColor | repeated | repeated enum. |
| a_timestamps | google.protobuf.Timestamp | repeated | repeated Timestamp. |
| a_durations | google.protobuf.Duration | repeated | repeated Duration. |
| a_structs | google.protobuf.Struct | repeated | repeated Struct → FieldKindStruct repeated. |
| a_anys | google.protobuf.Any | repeated | repeated Any. |
| a_msgs | ScalarRPCRequest | repeated | repeated message. |
| a_secrets | upsquad.secret.v1.SecretRef | repeated | repeated SecretRef — hand-override expected in the generated TSX. |
RepeatedRPCResponse
RepeatedRPCResponse — envelope.
ScalarRPCRequest
ScalarRPCRequest carries every proto scalar kind the walker switches on. Each field has an edit_clearance so the renderers emit path-keyed entries in the FIELD_EDIT_CLEARANCE map (exercises non-empty map path).
| Field | Type | Label | Description |
|---|---|---|---|
| a_bool | bool | A bool scalar. | |
| a_int32 | int32 | An int32 scalar. | |
| a_sint32 | sint32 | A sint32 — separate walker case from int32. | |
| a_sfixed32 | sfixed32 | A sfixed32 — separate walker case from int32. | |
| a_int64 | int64 | An int64 scalar. | |
| a_sint64 | sint64 | A sint64 — separate walker case from int64. | |
| a_sfixed64 | sfixed64 | A sfixed64 — separate walker case from int64. | |
| a_uint32 | uint32 | A uint32. | |
| a_fixed32 | fixed32 | A fixed32 — uint32 walker variant. | |
| a_uint64 | uint64 | A uint64. | |
| a_fixed64 | fixed64 | A fixed64 — uint64 walker variant. | |
| a_float | float | A float. | |
| a_double | double | A double. | |
| a_string | string | A string. | |
| a_bytes | bytes | A bytes scalar. |
ScalarRPCResponse
ScalarRPCResponse is the response envelope. Intentionally empty — renderers only walk requests.
WellKnownRPCRequest
WellKnownRPCRequest carries every well-known-type short-circuit branch.
| Field | Type | Label | Description |
|---|---|---|---|
| a_ts | google.protobuf.Timestamp | A Timestamp. | |
| a_dur | google.protobuf.Duration | A Duration. | |
| a_any | google.protobuf.Any | An Any. | |
| a_struct | google.protobuf.Struct | A Struct. | |
| a_value | google.protobuf.Value | A Value (same walker branch as Struct). | |
| a_listvalue | google.protobuf.ListValue | A ListValue. | |
| a_strval | google.protobuf.StringValue | A StringValue. | |
| a_bytesval | google.protobuf.BytesValue | A BytesValue. | |
| a_boolval | google.protobuf.BoolValue | A BoolValue. | |
| a_i32val | google.protobuf.Int32Value | An Int32Value. | |
| a_i64val | google.protobuf.Int64Value | An Int64Value. | |
| a_u32val | google.protobuf.UInt32Value | A UInt32Value. | |
| a_u64val | google.protobuf.UInt64Value | A UInt64Value. | |
| a_floatval | google.protobuf.FloatValue | A FloatValue. | |
| a_doubleval | google.protobuf.DoubleValue | A DoubleValue. |
WellKnownRPCResponse
WellKnownRPCResponse — envelope.
KindsMatrixColor
KindsMatrixColor is an enum with a few values, for FieldKindEnum coverage.
| Name | Number | Description |
|---|---|---|
| KINDS_MATRIX_COLOR_UNSPECIFIED | 0 | Default unspecified. |
| KINDS_MATRIX_COLOR_RED | 1 | Red. |
| KINDS_MATRIX_COLOR_BLUE | 2 | Blue. |
KindsMatrixService
KindsMatrixService wraps every message above as an RPC request type so
the e2e test's generateFile pass renders every branch of every
renderer.
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ScalarRPC | ScalarRPCRequest | ScalarRPCResponse | ScalarRPC covers every scalar kind. |
| WellKnownRPC | WellKnownRPCRequest | WellKnownRPCResponse | WellKnownRPC covers every well-known type. |
| RepeatedRPC | RepeatedRPCRequest | RepeatedRPCResponse | RepeatedRPC covers every writeRepeated branch. |
| MapRPC | MapRPCRequest | MapRPCResponse | MapRPC covers the map<> JSON-fallback branch. |
| NestedRPC | NestedRPCRequest | NestedRPCResponse | NestedRPC covers message recursion + SecretRef. |
| OneofRPC | OneofRPCRequest | OneofRPCResponse | OneofRPC covers the oneof expansion. |
| ClientStreamRPC | ClientStreamRPCRequest stream | ClientStreamRPCResponse | ClientStreamRPC proves the streaming-RPC placeholder branch (both renderers emit a disabled div and return early from writeRPCForm). |
Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|---|---|---|---|---|---|---|---|
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |