Skip to content

docs(validation): state invariants in comments, not prior behaviour - #134

Merged
simontaurus merged 1 commit into
mainfrom
docs/comments-state-invariants
Aug 27, 2026
Merged

docs(validation): state invariants in comments, not prior behaviour#134
simontaurus merged 1 commit into
mainfrom
docs/comments-state-invariants

Conversation

@simontaurus

Copy link
Copy Markdown
Contributor

Four comments explained the defect the code was added for rather than what it now guarantees. Once that code is gone the reference is unreadable, and the history belongs in the commit that made the change.

Changes

  • select_rules - states that the CLI and the MCP server share it so both answer a query identically, and that unenforced_only selects the population before area narrows it. Drops the account of how the two copies diverged.
  • _ADVICE_LEVELS - states that it is enumerated so an unrecognised level is a distinct case rather than one this set absorbs.
  • severity - states that the vocabulary grows and the raise is reachable whenever a version is vendored, without naming the keyword that prompted it.
  • _read_rules_schema - states that absent and corrupt must stay distinguishable, and what collapsing them would allow.

No behaviour change. 463 validation tests pass, make check exits 0.

- select_rules, _ADVICE_LEVELS, severity and _read_rules_schema
  described the defect each addressed rather than what it guarantees
@github-actions

Copy link
Copy Markdown
Contributor

Release preview

No version bump from the current commits (stays at v0.18.0). Use conventional commit types (feat, fix, ...) to trigger a release.

Changelog preview (truncated)

Preview via python-semantic-release and conventional commits.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Click to see benchmark comparison
📊 Benchmark Comparison (threshold: 1.3x)
============================================================

➖ Unchanged (within threshold):
  ➖ test_simple_dict_document_store: 0.0017s → 0.0017s (-0.3%)
  ➖ test_sqlite_document_store: 0.0019s → 0.0019s (-0.9%)
  ➖ test_local_sparql_store: 0.0389s → 0.0388s (-0.2%)
  ➖ test_oneof_subschema: 0.0606s → 0.0627s (+3.5%)
  ➖ test_enum_docstrings: 0.0513s → 0.0521s (+1.5%)
  ➖ test_subclass_inheritance: 0.0550s → 0.0566s (+3.0%)
  ➖ test_class_hierarchy: 0.0519s → 0.0536s (+3.2%)
  ➖ test_core[v1]: 0.0388s → 0.0400s (+3.1%)
  ➖ test_core[v2]: 0.0444s → 0.0461s (+3.9%)
  ➖ test_schema_generation[v1]: 0.0017s → 0.0017s (-0.2%)
  ➖ test_schema_generation[v2]: 0.0028s → 0.0028s (-0.7%)
  ➖ test_simple_json: 0.0007s → 0.0007s (-1.4%)
  ➖ test_complex_graph: 0.0016s → 0.0016s (-1.7%)

============================================================
Summary: 0 regressions, 0 improvements, 13 unchanged
============================================================

✅ No significant performance regressions

Threshold: 1.3x (30% slower triggers a regression warning)

Note: Benchmarks are informational only and won't fail the build.

💡 Tip: Download the benchmark-results artifact for detailed JSON data

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@simontaurus
simontaurus merged commit 4baf212 into main Aug 27, 2026
21 checks passed
@simontaurus
simontaurus deleted the docs/comments-state-invariants branch August 27, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant