REPOSITORY CODING · HARD
Decode exactly one complete value with no trailing bytes and preserve semantic tags with their complete child value
Decode exactly one complete value with no trailing bytes and preserve semantic tags with their complete child value. Trace the native model, algorithm services, repository snapshot and HTTP preview. Repair the incident while preserving the other contracts. All explicit fixtures and mandatory regression groups are available with bash test/run.sh.
binary-codecLength first deterministic CBOR laboratory
Work through a real codebase.
Choose an environment, investigate the existing implementation and use the tests to check your change. Sign in to open a workspace; execution and Ono usage follow your plan’s allowances.
Task requirements and environments
Go · 85 minute session
- Encode integer and length arguments in their shortest permitted unsigned width, including the twenty-three/twenty-four boundary.
- CBOR negative integers encode the unsigned magnitude minus one, so minus one has argument zero.
- Text headers count UTF-8 bytes rather than Unicode scalar values, while byte strings preserve exact bytes.
- Use length-first deterministic map-key ordering and reject duplicate canonical key encodings instead of silently dropping pairs.
- Decode exactly one complete value with no trailing bytes and preserve semantic tags with their complete child value.
- Definite-length integer, text, byte, boolean, null, array, map and tag subset. Integers fit the exact JSON-safe range; map keys are scalar. Containers have at most twelve entries and depth eight. Floating-point and indefinite encodings are intentionally unsupported.