noCV
SRUNTIME-101 · Establish the machine contract

Decode instructions without reading past the bytecode buffer

Practice briefTaskFoundational

A truncated PUSH instruction reads its operand from bytes beyond the supplied program.

Focused work estimate
1h 30m + prerequisites
Priority in the scenario
Medium
Engineering practice
Binary parsing · Bounds checking

Estimated field mix

  • Systems programming70%
  • Compiler and language tooling30%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A fictional rules engine executes a tiny arithmetic bytecode over synthetic integers. Its interpreter trusts jump offsets and can run forever. Build a local Rust runtime; it has no filesystem, network, dynamic loading, host calls, or candidate-source execution.

Setup prerequisites

  • Stacks
  • Instruction decoding
  • Control flow

Preceding work

No earlier ticket is required. Complete the project setup above.

Acceptance criteria

  • Decoder checks opcode and operand length before advancing
  • Unknown opcodes return a stable offset and code
  • Failure exposes no partially decoded instruction

Implementation constraints

  • Keep bytecode length bounded before parsing.

Verification to include

  • Decode a program containing every documented instruction.
  • Truncate at every byte and confirm deterministic errors without panic.

Deliverables

  • Checked decoder and truncation matrix

Rollout and recovery

Reject programs not validated by the new decoder.

Value of the work

For the engineer: Practice runtime invariants, validation, resource accounting and compatibility.

For the team: Review a constrained execution component whose malformed programs fail deterministically without gaining host capabilities.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.