Skip to content

RUN-CSTR-01: Decide on /v1/run constraints tests #109

@Talchain

Description

@Talchain

Problem

Tests in tests/constraints.test.ts are failing because they expect /v1/run to support constraints validation, but the current implementation doesn't handle constraints.

Failing tests:

  • Constraints on /v1/run > rejects bounds violation (min)
  • Constraints on /v1/run > rejects bounds violation (max)
  • Constraints on /v1/run > rejects forbidden edge
  • Constraints on /v1/run > accepts graph with allowed edges
  • Constraints on /v1/run > rejects bounds on non-existent node
  • Constraints on /v1/run > accepts valid bounds

Options

  1. Move tests to /v1/optimise: Constraints are already fully implemented there
  2. Add minimal constraints passthrough: Return 400 with helpful message pointing to /v1/optimise
  3. Implement full constraints support: Add validation to /v1/run handler

Acceptance Criteria

ACCEPT:RUN_CSTR tests=green behaviour=documented no_regression=true
  • Tests pass without lowering standards
  • Behaviour clearly documented
  • No performance regression
  • Decision documented in code comments

Impact

Current pass rate: 98.1% (761/776)
Target pass rate: ≥98.5%
Tests affected: 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions