fix: repo_adapter.py was a second, dead data layer hardcoded to mock_data_json - #11
Merged
Merged
Conversation
…data_json Most of the REST API (emails/tasks/meetings/followups/wellness/reports routes) went through backend/repo_adapter.py, not repos/data_repo.py -- so it never saw live Graph data even after the Graph integration landed. repo_adapter.py now delegates every read/write to a shared DataRepo() instance instead of its own hardcoded mock_data_json path. save_meetings() is now an honest no-op (meetings are live Graph data, nothing to write locally) rather than silently pretending to succeed. get_break_suggestions() returns the real dict-of-categories shape, and get_mood_history() was added. Added a governance REST surface (routes_governance.py) wired to the existing approval queue, and wellness routes for the two new repo_adapter methods. Closes #9 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
backend/repo_adapter.pywas hardcoded to a deaddata/mock_data_json/path (with afrontend/public/data/*.jsonfallback), completely disconnected fromrepos/data_repo.py/ the live Graph integration. Most of the REST API (emails/tasks/meetings/followups/wellness/reports routes) went through this dead layer.DataRepo()instance.save_meetings()is now an honest no-op (False) instead of pretending to succeed — meetings are live Graph data.get_break_suggestions()returns the real dict-of-categories shape; addedget_mood_history().backend/routes_governance.py(audit log, LLM usage, pending actions — wired to the existinggovernance.approvalqueue) and two new wellness routes.Test plan
pytest tests/— 70 passed, 2 skippedtests/test_repo_adapter.py(11 cases): delegation toDataRepo, fail-closed on missing Graph config, honest no-opsave_meetings, correctget_break_suggestionsshape, governance route registrationCloses #9
🤖 Generated with Claude Code