The user wants 2000 tasks, most of them ones Qwen cannot solve. New batch tasks are now measured on their branch first (3 Qwen trials each), and only HARD or MEDIUM tasks reach main; ROUTINE ones stay on the batch branches. A session cut by context_limit or output_limit counts as a failure for difficulty (user decision 2026-11-03); the trajectory stays incomplete. - Batch 26 (route D, real upstream fixes in embedded open-source projects): 7 HARD of 20 (coreJSON, littlefs, CANopen, coreMQTT, LwM2M, Zephyr ring, lwIP SNTP). Most failures are Qwen exhausting its context in the larger workspaces. - Batch 25 (HWE mutation repairs): 1 HARD and 1 MEDIUM of 56. - Batch 27 (spec-dense implementation tasks): 2 MEDIUM of the first 10. Each task comes from the exact commit Qwen measured, and its digest matches the measured one. Failure reasons are not yet reviewed, so difficulty is the automatic label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.9 KiB
Resource format and object API
These rules describe the userspace LwM2M TLV codec. The wire format follows OMA Lightweight M2M TLV data format (Appendix C); integer and Float conversion follow the codec API.
R01. A TLV header stores type in bits 7..6, ID width in bit 5, and length representation in bits 4..3. IDs are one or two bytes in network order. Length representation zero uses bits 2..0; representations one, two and three use that many network-order bytes after the ID. The value follows the header.
R02. Reading a complete TLV returns the number of bytes occupied by its header and value, exposes its type, ID, value pointer and value length, and ignores trailing bytes. An incomplete header or value returns zero.
R03. A Float value uses network-order IEEE 754 binary32 for a four-byte value or binary64 for an eight-byte value. Other value lengths are malformed. The existing Float-to-fixed API name and signature are retained.
R04. Fixed-point values are signed int32_t integers with bits fractional bits. For this workspace bits ranges from 0 through 30. A normal finite Float x converts to truncation toward zero of x multiplied by 2^bits, with magnitude capped at INT32_MAX. Positive and negative zero and subnormal Float values produce zero. A successful conversion returns the Float value length.
R05. A malformed Float value length or a non-finite Float (infinity or NaN, either sign) produces output zero and returns zero.
R06. The object Float reader parses one TLV and applies the same conversion. Successful reads return the complete TLV size and update context last_value_len to the value length. A failed read returns zero and leaves last_value_len unchanged. If TLV parsing fails before conversion, the caller's numeric output is unchanged.
R07. Integer values use big-endian two's complement; integer writers choose the shortest representation preserving sign, and readers sign-extend into int32_t. Boolean writers encode zero as zero and any nonzero value as one. Successful object reads return the complete TLV size and update last_value_len.
R08. The Float writer emits a four-byte binary32 resource from its fixed-point input. Exactly representable fixed-point values round-trip through the Float object reader. Writing a resource uses context resource_id; writing a resource instance uses type RESOURCE_INSTANCE and context resource_instance_id.
R09. String writers copy the requested bytes without a terminating zero to the wire. Object string reads require space for those bytes and a terminating zero, returning zero and preserving last_value_len if it will not fit. Successful reads append the terminating zero and update last_value_len.
R10. TLV size calculation includes the complete header and value. Generic TLV writing preserves the requested type, ID, length and value bytes. The userspace observer and network declarations are inert build stubs and are outside the requested repair.