Fix documentation inaccuracies, add unit tests, and clean up docs#580
Merged
Fix documentation inaccuracies, add unit tests, and clean up docs#580
Conversation
- chatbot-system.md: correct state namespaces (system/user/context/temp), replace JSON Logic with CEL syntax, fix sync execution model description, fix processor hierarchy, add /v1 prefix to endpoints, update schema - cms.md: remove fictional webhook registration endpoints, add missing schema fields (school_id, visibility, search_document), condense stale Landbot migration references - architecture-service-layer.md: refactor from 2294 to 287 lines, separate current implementation from aspirational design, verify all service and repository inventories against code - pyproject.toml: add psutil to dev deps, remove unused playwright/ pytest-playwright
Documentation: - CLAUDE.md: deduplicate with README (216 to 108 lines), keep AI-specific instructions, reference README for shared content - README.md: absorb unique content from CLAUDE.md, add LOCAL_BUILD_ONLY flag, document @pytest.mark.isolated, reference setup-test-env.sh - docs/cms.md: annotate analytics endpoints as real SQL vs placeholder, trim verbose response examples (-313 lines) - docs/design-session-replay.md: refactor from 886 to 104 lines, verify all components against code, remove pseudo-code for implemented features - docs/testing-credentials.md: consolidate on seed script as primary approach, fix OpenAPI URLs (/docs to /v1/docs), fix absolute paths - docs/architecture-roadmap.md: new file preserving design thinking cut from architecture refactor (UoW, CQRS, migration strategy, events) - docs/analytics-design-note.md: new design note categorizing 21 analytics endpoints (8 real SQL, 5 hardcoded fake, 4 deferred, 5 no backend) Tests: - app/tests/unit/test_cms_workflow.py: 66 new unit tests covering publish, bulk ops, validation, variants, content lifecycle - app/tests/unit/test_chatbot_integrations.py: 49 new unit tests covering helper functions and Pydantic models
The seed script (scripts/seed_admin_ui_data.py) is the canonical test data setup. The legacy Playwright-focused script created a different school with fewer roles and is no longer needed.
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
Comprehensive documentation review and cleanup of the Huey Books Backend, driven by a three-agent team (dev, QA, tech writer) that audited all documentation against the actual codebase.
Documentation fixes:
system.*notsession.*), CEL syntax (was JSON Logic), synchronous execution model (was incorrectly described as async/Cloud Tasks), processor hierarchy,/v1endpoint prefix, ConversationSession schema, overstated maturity markersschool_id,visibility,search_document), annotated analytics endpoints as real SQL vs placeholder data (-313 lines)/docs→/v1/docs), fixed hardcoded absolute pathsNew documentation:
New unit tests (115 total):
test_cms_workflow.py: 66 tests covering publish, bulk ops, validation, variants, content lifecycletest_chatbot_integrations.py: 49 tests covering helper functions and Pydantic modelsDependency cleanup:
psutilto dev dependencies (was imported in test conftest but missing)playwrightandpytest-playwrightdev dependenciesTest plan
source scripts/setup-test-env.sh && poetry run pytest app/tests/unit/ -v)bash scripts/integration-tests.sh