Skip to content

test: unit tests for stdlib/requirements (tool_reqs, requirement, md) #814

Closed

Description

@planetf1

Add unit tests for the requirements module — currently at 42% coverage, with significant gaps in core validation logic that's entirely unit-testable.

Scope

File What's missing Est. tests
tool_reqs.py (18%) uses_tool(), tool_arg_validator() — both untested, pure logic over tool call data structures ~8
requirement.py (~50%) requirement_check_to_bool() (JSON parsing, threshold logic), reqify() (type coercion), ALoraRequirement init ~10
md.py (~30%) Edge cases only — malformed markdown, empty lists, exception handling. Happy path already covered. ~10

python_reqs.py is already well-covered (~80-90%) and doesn't need attention.

Out of scope

safety/guardian.py — deprecated in favour of Guardian Intrinsics. Not worth the investment.

Notes

~28 tests, straightforward to review as a single PR.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions