Deepen tests (54->270), demos (5->20), and error handling - #4
Open
cognis-digital wants to merge 2 commits into
Open
Deepen tests (54->270), demos (5->20), and error handling#4cognis-digital wants to merge 2 commits into
cognis-digital wants to merge 2 commits into
Conversation
Tests: 54 -> 270. New edge-case and error-path coverage for the Store queries, indexer (missing/invalid roots, ignore rules, broken sources, git-failure messages), all six extractors, tokens, the audit chain, cross-language resolution, graph diff, the visualizer, the MCP server (every tool, error codes, scope matrix, audit fingerprints), the HTTP transport, the full CLI surface, the benchmark, and package exports. Demos: 5 -> 20 runnable scenarios. Added MCP wire protocol, scoped-token lifecycle, graph diff, incremental indexing, HTTP transport, find- references, offline audit re-verification, Mermaid blast-radius, endpoint inventory, benchmark recall, agent edit plan, dead-code report, polyglot symbol search, tamper forensics, and the module architecture map. run_all.py and docs/DEMOS.md updated. Hardening (public API unchanged): - index_path: clear FileNotFoundError / NotADirectoryError messages. - indexer/diff: wrap git invocations so a missing git or a failed clone/ checkout raises a descriptive RuntimeError instead of a buried CalledProcessError. - tokens.issue: reject empty scope sets and blank labels (an empty scope set previously produced an unusable token that no scope check matched). - viz.render: validate view/format instead of silently defaulting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A depth pass on the existing tool: roughly 5x the test coverage, 4x the runnable demos, and clearer error handling — all with the public API unchanged and CI green.
Tests: 54 -> 270
New edge-case and error-path suites covering:
require_token.Demos: 5 -> 20
Added 15 runnable scenarios (MCP wire protocol, scoped-token lifecycle, graph diff, incremental indexing, HTTP transport, find-references, offline audit re-verification, Mermaid blast-radius, endpoint inventory, benchmark recall, agent edit plan, dead-code report, polyglot symbol search, tamper forensics, module architecture).
run_all.pyanddocs/DEMOS.mdupdated. Each exits 0.Hardening (API stable)
index_path: clearFileNotFoundError/NotADirectoryErrormessages.indexer/diff: git invocations now raise a descriptiveRuntimeError(missing git, failed clone/checkout) instead of a buriedCalledProcessError.tokens.issue: reject empty scope sets and blank labels — an empty scope set previously minted an unusable token that matched no scope check.viz.render: validateview/formatinstead of silently defaulting to the project Mermaid view.Verification
python -m pytest -q-> 270 passed.PYTHONUTF8=1 python demos/run_all.py-> all 20 scenarios exit 0.Left for review; not merged.