Skip to content

TASK-300: TOML Scenario Parser #70

@copyleftdev

Description

@copyleftdev

Description

Implement scenario file parser per SCENARIO_FORMAT.md

Phase

Set up development infrastructure with Tiger Style discipline

Test-First Requirements

⚠️ Write tests BEFORE implementation

  • Test valid scenarios (10+ examples)
  • Test invalid scenarios (missing fields, wrong types)
  • Test all schedule types
  • Fuzz TOML parser

Acceptance Criteria

  • Parse TOML scenario files
  • Validate required fields: runtime, target, requests
  • Parse request definitions (method, path, headers, body)
  • Parse schedule types: constant, ramp, spike, steps
  • Parse assertions
  • Parse limits configuration
  • Validation: URL format, timeout ranges, VU count
  • Error messages: clear, actionable
  • Scenario size limit: 10 MB
  • Minimum 2 assertions per function
  • >95% test coverage
  • Fuzz test: malformed TOML, 100K inputs
  • All tests pass

Dependencies

  • TASK-102

Files to Create/Modify

src/scenario.zig
tests/unit/scenario_test.zig
tests/fuzz/scenario_parser_fuzz.zig
tests/fixtures/scenarios/...

Estimated Effort

24 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 testingparserParser implementationsphase-3Scenario Execution phasescenarioScenario parsing and loadingtiger-styleTiger Style philosophy compliance

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions