Skip to content

Tests pin exact JSON substrings, so a key reorder is a failure without a behaviour change #15

Description

@flyingrobots

test/test.sh asserts lines like '{"path":"a b.md","state":"held","holder":"hh",...' by substring. Every line is also validated against the schema, which is the real contract, so the substring checks over-specify key order. A tiny jq-free field extractor (python3 -c is already a dependency of the tests) asserting on parsed fields would make the suite robust to output reordering while keeping the schema validation as the structural guard. Also: 700 lines of script-global state; a failing case can leak a cwd or env var into the next.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bad-codeCode smell, coupling, or fragility to pay down

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions