Skip to content

Establish the 0.9.0 HTTP behavior contract #266

Description

@Mattsface

Establish the 0.9.0 HTTP behavior contract

Why

Version 0.9.0 will add configurable HTTP behavior on top of the transport work completed in version 0.8.0.

The compatibility and strict-mode behavior should be protected by deterministic tests before production behavior changes.

Parent release issue: #265

Scope

Add offline contract tests covering:

  • Library-created Session retry configuration
  • Caller-injected Session behavior
  • Existing 4xx compatibility behavior
  • Existing endpoint-specific 404 behavior
  • Existing MlbHttpError attributes
  • User-Agent behavior
  • Public retry-policy imports
  • Planned strict-mode behavior

This issue should document the baseline and expected new contract without intentionally changing production behavior.

Required coverage

  • Library-created Sessions receive the default retry policy
  • Injected Sessions are not automatically reconfigured
  • Injected Sessions are not closed by the library
  • Final 404 responses preserve endpoint-specific behavior
  • Final non-404 4xx responses preserve compatibility behavior by default
  • Final 5xx responses raise MlbHttpError
  • Existing exception inheritance remains unchanged
  • Existing constructor usage remains valid
  • Existing timeout forwarding remains unchanged

Add failing or skipped contract tests for planned behavior only where that clearly improves the implementation sequence.

Suggested branch

test/v0.9-http-contract

The branch should start from and target:

release/0.9.0

Acceptance criteria

  • HTTP behavior is covered without contacting the live MLB API
  • Existing version 0.8.0 behavior is explicitly protected
  • New strict-mode expectations are documented in tests
  • New retry-policy expectations are documented in tests
  • No intentional production behavior changes occur
  • Offline tests pass

Not included

  • Public retry helpers
  • Strict mode implementation
  • New warning classes
  • User-Agent changes
  • Error-context changes
  • Documentation changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions