From 5cc94314c732c4c0920faca6ffddc7b13c44f2da Mon Sep 17 00:00:00 2001 From: Eugene Blikh Date: Sat, 23 May 2026 22:52:11 +0300 Subject: [PATCH] beads: close rc8 --- .beads/interactions.jsonl | 1 + .beads/issues.jsonl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.beads/interactions.jsonl b/.beads/interactions.jsonl index e1bc68c14da3f75966ab7f55df79adb37c360dbf..b79e52e6905fd7cb3b19a0e591eed4aae77bca52 100644 --- a/.beads/interactions.jsonl +++ b/.beads/interactions.jsonl @@ -30,3 +30,4 @@ {"id":"int-bc164b8a","kind":"field_change","created_at":"2026-05-23T18:04:37.771425Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-wyp","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}} {"id":"int-b39fa74a","kind":"field_change","created_at":"2026-05-23T18:22:01.107078Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-rmf","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}} {"id":"int-8dbcb031","kind":"field_change","created_at":"2026-05-23T18:38:56.610443Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-m7u","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}} +{"id":"int-500abbb3","kind":"field_change","created_at":"2026-05-23T19:50:37.871661Z","actor":"Eugene Blikh","issue_id":"tarantool-protobuf-rc8","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}} diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 9caf8f22dfc5aebb0847dc1e9bb0fcea0e5bc47f..44a217628d282235530f0a96485a09f99cfe8b0b 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -1,4 +1,4 @@ -{"_type":"issue","id":"tarantool-protobuf-rc8","title":"C decoder: strict-decode parity with pure-Lua codec (wire-type 6/7, UTF-8, field-num, merge)","description":"After bd-43t wiring (init.lua dispatch + codegen lazy-compile prologue), the C codec is actually exercised by `PB_ENABLE_C=1 just test` and `just conformance-c`. 77 conformance failures and 13 luatest failures cluster into 7 categories that the pure-Lua decoder already rejects:\n\n1. UnknownWireType6 / UnknownWireType7 — C decoder accepts illegal wire types instead of erroring (Required.Proto[23].ProtobufInput.UnknownWireType{6,7}_Field{1,2,3}_Version{0..3}, 32 cases).\n2. IllegalZeroFieldNum_Case_{0,1,3} — field number 0 must be rejected.\n3. BadTag_FieldNumberSlightlyTooHigh / FieldNumberTooHigh — field numbers \u003e 2^29-1 must be rejected.\n4. BadTag_OverlongVarint — tag varints over the spec-mandated length must be rejected.\n5. RejectInvalidUtf8.String.{Singular,Repeated,Oneof,MapKey,MapValue} — invalid UTF-8 in string/map-key fields must be rejected.\n6. UnmatchedStartGroup / UnmatchedStartGroupNested (proto2) — group balancing.\n7. ValidDataOneof.MESSAGE.Merge / RepeatedScalarMessageMerge — oneof message-merge semantics and repeated-scalar merge accumulate vs replace.\n\nReference impl: runtime/pb/codec.lua + wire.lua (decode_tag rejects wt 6/7 since commit 7442ea2; utf8 validation via utf8.len; merge_message recurses; etc.). C decoder lives in runtime/pb/c/c_runtime.c.\n\nStatus: pb.encode/pb.decode lazy-dispatch to pb.c_runtime.encode/decode whenever PB_ENABLE_C=1 and a c_plan exists. Wrappers in mode=full prologue + runtime mode via pb.encode central dispatch. Dispatch is proven (in-container probe + 1026/1039 luatest pass after wiring vs 748 with C inert / skip).\n\nRepro: PB_ENABLE_C=1 just test → 13 fails in conformance.core.* group. just conformance-c → 77 unexpected failures in binary suite.\n\nBlocks: tarantool-protobuf-43t conformance gate.","status":"open","priority":1,"issue_type":"bug","owner":"bigbes@gmail.com","created_at":"2026-05-23T19:29:06Z","created_by":"Eugene Blikh","updated_at":"2026-05-23T19:29:06Z","dependency_count":0,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"tarantool-protobuf-rc8","title":"C decoder: strict-decode parity with pure-Lua codec (wire-type 6/7, UTF-8, field-num, merge)","description":"After bd-43t wiring (init.lua dispatch + codegen lazy-compile prologue), the C codec is actually exercised by `PB_ENABLE_C=1 just test` and `just conformance-c`. 77 conformance failures and 13 luatest failures cluster into 7 categories that the pure-Lua decoder already rejects:\n\n1. UnknownWireType6 / UnknownWireType7 — C decoder accepts illegal wire types instead of erroring (Required.Proto[23].ProtobufInput.UnknownWireType{6,7}_Field{1,2,3}_Version{0..3}, 32 cases).\n2. IllegalZeroFieldNum_Case_{0,1,3} — field number 0 must be rejected.\n3. BadTag_FieldNumberSlightlyTooHigh / FieldNumberTooHigh — field numbers \u003e 2^29-1 must be rejected.\n4. BadTag_OverlongVarint — tag varints over the spec-mandated length must be rejected.\n5. RejectInvalidUtf8.String.{Singular,Repeated,Oneof,MapKey,MapValue} — invalid UTF-8 in string/map-key fields must be rejected.\n6. UnmatchedStartGroup / UnmatchedStartGroupNested (proto2) — group balancing.\n7. ValidDataOneof.MESSAGE.Merge / RepeatedScalarMessageMerge — oneof message-merge semantics and repeated-scalar merge accumulate vs replace.\n\nReference impl: runtime/pb/codec.lua + wire.lua (decode_tag rejects wt 6/7 since commit 7442ea2; utf8 validation via utf8.len; merge_message recurses; etc.). C decoder lives in runtime/pb/c/c_runtime.c.\n\nStatus: pb.encode/pb.decode lazy-dispatch to pb.c_runtime.encode/decode whenever PB_ENABLE_C=1 and a c_plan exists. Wrappers in mode=full prologue + runtime mode via pb.encode central dispatch. Dispatch is proven (in-container probe + 1026/1039 luatest pass after wiring vs 748 with C inert / skip).\n\nRepro: PB_ENABLE_C=1 just test → 13 fails in conformance.core.* group. just conformance-c → 77 unexpected failures in binary suite.\n\nBlocks: tarantool-protobuf-43t conformance gate.","notes":"Fixed in c_runtime.c. Strict-decode parity items implemented:\n- decode_body: reject wire types 6/7, field number 0, field number \u003e 2^29-1, overlong tag varint\n- dec_push_kind PB_KIND_STRING: RFC 3629 UTF-8 validator (port of utf8.len)\n- decode_body: track egroup_seen, error on loop exit if stop_group_id != 0\n- decode_body singular message dispatch + decode_extension_into singular: merge into prev table via merge_subresult_into, recurses for nested message, concat for repeated, last-wins per key for map, skip for WKT custom-decode\n- merge_subresult_into ports codec.lua's merge_message C-side\n\nRegression coverage (test/conformance_test.lua conformance.core group):\n- pre-existing tests covered field-number/wire-type/overlong/UTF-8 singular-repeated-oneof/merge — now exercise C path via PB_ENABLE_C=1\n- added test_invalid_utf8_map_key_rejected, test_invalid_utf8_map_value_rejected\n- added test_unmatched_start_group_rejected, test_unmatched_start_group_nested_rejected (proto2 via PROTO2_NAME)\n\nResults:\n- PB_ENABLE_C=1 just test: 1043/1043 pass (was 1039 baseline; +4 from new tests)\n- PB_ENABLE_C=1 just conformance-c: 2806 + 434 pass, 0 unexpected failures (was 77)\n- just conformance (Lua path): 2806 + 434 pass — no regression","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Eugene Blikh","owner":"bigbes@gmail.com","created_at":"2026-05-23T19:29:06Z","created_by":"Eugene Blikh","updated_at":"2026-05-23T19:50:29Z","started_at":"2026-05-23T19:34:31Z","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"tarantool-protobuf-exy","title":"ra6 3f: repeated strings + repeated messages (cached stack-idx)","description":"Repeated string fields and repeated message fields. Encode: iterate the Lua array via cached stack idx, write each element (string field or recursive submsg encode). Decode: first hit lazy-creates the result array and stashes its stack index in a per-field slot (sized by plan-\u003en_fields, cap 16 for the spike fixed-size); subsequent hits lua_rawseti directly without re-lookup; one lua_setfield at decode_message exit attaches the array to the result table. This is the SPIKE-VALIDATED PATTERN — naive lazy-getfield is 2x slower at 100KB. Depends on 3d (needs sub-message machinery for repeated messages). Acceptance: Person.emails (repeated string) and Person.friends (repeated Person, self-reference) both round-trip byte-equal to mode=full at 1KB, 10KB, 100KB sizes.","status":"closed","priority":1,"issue_type":"task","assignee":"Eugene Blikh","owner":"bigbes@gmail.com","created_at":"2026-05-18T20:20:52Z","created_by":"Eugene Blikh","updated_at":"2026-05-23T11:07:38Z","started_at":"2026-05-23T11:05:14Z","closed_at":"2026-05-23T11:07:38Z","close_reason":"Acceptance tests landed: Person.emails (repeated string) and Person.friends (repeated Person, self-reference) round-trip byte-equal to mode=full at 1KB/10KB/100KB. Repeated string + message dispatch was already implemented as part of 3e (encode_repeated_field handles MESSAGE + string/bytes branches alongside scalars, decode_body uses cached list_stack_idx[] per-field); this ticket adds the formal size-scaled acceptance coverage.","dependencies":[{"issue_id":"tarantool-protobuf-exy","depends_on_id":"tarantool-protobuf-hwe","type":"blocks","created_at":"2026-05-18T23:22:18Z","created_by":"Eugene Blikh","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"tarantool-protobuf-jc9","title":"ra6 3e: repeated/packed scalar encode/decode","description":"Repeated scalar fields: encode-time, walk the Lua array via cached stack idx; decode-time, lazy-create the array on first hit and append via lua_rawseti with a cached stack idx (NOT lazy lua_getfield per element — that's 2x slower at 100KB per the spike). Packed repeated: length-prefixed varint blob; tight loop in C. Covers int32/sint32/uint32/int64/uint64/fixed32/fixed64/double/bool/enum. Depends on 3b + 3c (need the scalar primitives). Acceptance: Person.lucky_numbers (packed int32) round-trips byte-equal; a fixture with both packed and unpacked repeated scalars round-trips against mode=full at 10/100/1000-element counts.","status":"closed","priority":1,"issue_type":"task","assignee":"Eugene Blikh","owner":"bigbes@gmail.com","created_at":"2026-05-18T20:20:33Z","created_by":"Eugene Blikh","updated_at":"2026-05-23T10:39:55Z","started_at":"2026-05-23T10:29:02Z","closed_at":"2026-05-23T10:39:55Z","close_reason":"Closed","dependencies":[{"issue_id":"tarantool-protobuf-jc9","depends_on_id":"tarantool-protobuf-mz6","type":"blocks","created_at":"2026-05-18T23:22:07Z","created_by":"Eugene Blikh","metadata":"{}"},{"issue_id":"tarantool-protobuf-jc9","depends_on_id":"tarantool-protobuf-y1n","type":"blocks","created_at":"2026-05-18T23:22:07Z","created_by":"Eugene Blikh","metadata":"{}"}],"dependency_count":2,"dependent_count":2,"comment_count":0} {"_type":"issue","id":"tarantool-protobuf-hwe","title":"ra6 3d: sub-message encode/decode (recursion)","description":"Nested-message support. Encode: open a sub-buffer, recurse with the submsg plan, prefix parent buffer with tag + length. Decode: bound the byte range, recurse, lua_setfield the resulting table. Sub-buffer stack-backed (4KB) and malloc-promoted, same pattern as the outer buffer. Recursion is by C function call into the same encode/decode routine with a different plan, so depth is bounded by C stack. Depends on 3b + 3c. Acceptance: Person.address (1-level) round-trips; deeper nesting via a 5-level test fixture round-trips byte-equal to mode=full.","status":"closed","priority":1,"issue_type":"task","assignee":"Eugene Blikh","owner":"bigbes@gmail.com","created_at":"2026-05-18T20:20:24Z","created_by":"Eugene Blikh","updated_at":"2026-05-23T10:24:19Z","started_at":"2026-05-23T10:11:41Z","closed_at":"2026-05-23T10:24:19Z","close_reason":"ra6 3d: sub-message encode/decode (recursion) — refactored encode_lua/decode_lua into reusable encode_body/decode_body, added singular sub-message encode (force-promoted parent heap_idx before recursion to make lua_settop safe) and decode (temporarily shrunk c-\u003elen for bounded inner read). 22 new tests cover round-trip, empty sub-message presence, proto3-optional fields, 5-level depth (new test/proto/c_nested.proto), parent-buffer regrow path, truncated-input errors. Full suite 854/854 with PB_ENABLE_C=1.","dependencies":[{"issue_id":"tarantool-protobuf-hwe","depends_on_id":"tarantool-protobuf-mz6","type":"blocks","created_at":"2026-05-18T23:22:06Z","created_by":"Eugene Blikh","metadata":"{}"},{"issue_id":"tarantool-protobuf-hwe","depends_on_id":"tarantool-protobuf-y1n","type":"blocks","created_at":"2026-05-18T23:22:05Z","created_by":"Eugene Blikh","metadata":"{}"}],"dependency_count":2,"dependent_count":4,"comment_count":0}