Skip to content

fix: repo_adapter.py was a second, dead data layer hardcoded to mock_data_json - #11

Merged
kowshikdev merged 1 commit into
mainfrom
fix/repo-adapter-dead-data-layer
Jul 23, 2026
Merged

fix: repo_adapter.py was a second, dead data layer hardcoded to mock_data_json#11
kowshikdev merged 1 commit into
mainfrom
fix/repo-adapter-dead-data-layer

Conversation

@kowshikdev

Copy link
Copy Markdown
Owner

Summary

  • backend/repo_adapter.py was hardcoded to a dead data/mock_data_json/ path (with a frontend/public/data/*.json fallback), completely disconnected from repos/data_repo.py / the live Graph integration. Most of the REST API (emails/tasks/meetings/followups/wellness/reports routes) went through this dead layer.
  • Now delegates every read/write to a shared 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; added get_mood_history().
  • Added backend/routes_governance.py (audit log, LLM usage, pending actions — wired to the existing governance.approval queue) and two new wellness routes.

Test plan

  • pytest tests/ — 70 passed, 2 skipped
  • New tests/test_repo_adapter.py (11 cases): delegation to DataRepo, fail-closed on missing Graph config, honest no-op save_meetings, correct get_break_suggestions shape, governance route registration

Closes #9

🤖 Generated with Claude Code

…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>
@kowshikdev
kowshikdev merged commit f405401 into main Jul 23, 2026
2 checks passed
@kowshikdev
kowshikdev deleted the fix/repo-adapter-dead-data-layer branch July 23, 2026 10:44
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.

backend/repo_adapter.py is a second, dead data layer hardcoded to mock_data_json

1 participant