gabriel / musehub public
feat BREAKING mist task/mist-advanced-tests #1 / 1
AI Agent gabriel · 47 days ago · May 1, 2026 · Diff

feat(mist): comprehensive test coverage + docstring cleanup

Source fixes: - musehub_intel_providers.py: rewrite MistProvider docstring to reflect current dual-path behavior (snapshot index + MusehubMist blob); remove stale 'Phase 1:'/'Phase 3:' TDD labels; fix ProfileSnapshotProvider docstring from '5-domain' to '6-domain' (mist canvas added in phase 5) - musehub_mist_indexer.py: extract _HISTORY_WEEKS = 12 constant; use it in intel row initialisation instead of magic literal 11 - models/mists.py: document that _MAX_CONTENT_BYTES is enforced by ContentSizeLimitMiddleware, not by Pydantic validators

New tests (tests/test_mist_advanced.py — 32 tests): - State integrity: indexer idempotency (ON CONFLICT DO NOTHING), intel upsert replaces not appends, version monotonicity on content updates, metadata-only update does not bump version, per-mist counter isolation, history entries accumulate across commits, empty/no-anchor manifests - Performance: build_mist_anchor_index < 500 ms, MistProvider.compute < 1 s, list_mists(100 rows) < 500 ms, persist_intel_results(50) < 1 s - Security: unauthenticated fork → 401, non-owner fork of secret mist → 403/404, non-owner fork of public mist succeeds, garbage cursor silently ignored, empty cursor treated as first page - Validator: empty manifest is valid, errors accumulate across bad files, unrecognised extensions are warnings not errors - Docstrings: MistProvider, ProfileSnapshotProvider, indexer constant, _MAX_CONTENT_BYTES enforcement documented

Total: 471 tests passing (330 existing + 109 phase suite + 32 new)

sha256:2bd9bca1d3bdee3a6a1f227e4bbae607577236b2823b6d2f22cca3de5a664c92 sha
sha256:b8cbd73958c702e3321008d84800dae6868c62eb5026904f3833438d7e27b50b snapshot
← Older Oldest on task/mist-advanced-tests
All commits
Newer → Latest on task/mist-advanced-tests

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:2bd9bca1d3bdee3a6a1f227e4bbae607577236b2823b6d2f22cca3de5a664c92 --body "your comment"