Skip to content

TASK-203: HTTP/2 Frame Parser Implementation #62

@copyleftdev

Description

@copyleftdev

Description

Implement HTTP/2 frame parsing per HTTP_PROTOCOL.md

Phase

Set up development infrastructure with Tiger Style discipline

Test-First Requirements

⚠️ Write tests BEFORE implementation

  • Test all frame types (DATA, HEADERS, SETTINGS, etc.)
  • Test HPACK header compression
  • Test flow control
  • Fuzz all frame types (1M inputs per type)

Acceptance Criteria

  • Parse HTTP/2 frame header (9 bytes)
  • Parse frame types: DATA, HEADERS, PRIORITY, RST_STREAM, SETTINGS, PING, GOAWAY, WINDOW_UPDATE
  • HPACK decoder (static + dynamic table)
  • Flow control tracking (stream + connection level)
  • Error detection: ProtocolError, FlowControlError, etc.
  • Frame size limits (16 MB max per spec)
  • Minimum 2 assertions per function
  • >98% test coverage
  • Fuzz test: 1M inputs per frame type, zero crashes
  • All tests pass

Dependencies

  • TASK-200

Files to Create/Modify

src/http/http2.zig
src/http/hpack.zig
tests/unit/http2_test.zig
tests/fuzz/http2_frame_fuzz.zig
tests/fuzz/hpack_fuzz.zig
corpus/http2_frame/...

Estimated Effort

48 hours


Tiger Style Requirements:

  • Minimum 2 assertions per function
  • All loops are bounded
  • Explicit error handling (no silent failures)
  • Code formatted with zig fmt
  • Pre-commit hook passes
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    fuzz-requiredRequires fuzz testinghttpHTTP protocolhttp2HTTP/2 protocolparserParser implementationsphase-2HTTP Protocol phasetiger-styleTiger Style philosophy compliance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions