SurfSense/surfsense_backend/tests/unit
CREDO23 84b775c0ac refactor(agents): unify permissions into one vertical-slice package
Per-file verification of the slice-3 candidates showed receipts/ and
date_filters.py are shared contracts (consumed by shared/state + shared
middleware + subagents), so they correctly stay put.

permissions was the real misfit: the rule *model* lived at shared/permissions.py
while its enforcement lived at shared/middleware/permissions/. Unify them into a
single self-contained subsystem:

  shared/permissions.py                 -> shared/permissions/model.py
  shared/middleware/permissions/{deny,ask,middleware}
                                        -> shared/permissions/{deny,ask,middleware}

The package __init__ re-exports the model API + build_permission_mw, so the 32
external model consumers keep importing `from ...shared.permissions import Rule`
unchanged; only the 8 internal files redirect to `.model` (cycle-safe, model
loaded before middleware).
2026-06-05 13:29:48 +02:00
..
adapters test: bootstrap pytest environment for backend 2026-02-24 18:19:56 +02:00
agents refactor(agents): unify permissions into one vertical-slice package 2026-06-05 13:29:48 +02:00
automations refactor(agents): consolidate chat runtime infra under chat/runtime 2026-06-05 13:19:24 +02:00
connector_indexers refactor(jira): remove dead legacy indexing and write tools (mcp-only now) 2026-06-02 16:38:00 +02:00
connectors chore: ran linting 2026-04-07 05:55:39 +05:30
db feat: improved agent streaming 2026-04-29 07:20:31 -07:00
e2e_fakes test(backend): enhance Drive file filtering and add unit tests for _drive_list_files 2026-05-06 17:58:58 +05:30
etl_pipeline chore: linting 2026-05-15 17:33:44 -07:00
event_bus refactor: anonymous/free chat experience 2026-05-31 15:58:21 -07:00
gateway fix: repair pre-existing agent_task, gateway, and skills tests 2026-06-04 10:25:06 +02:00
google_unification chore: ran linting 2026-05-09 05:28:09 +05:30
indexing_pipeline Merge remote-tracking branch 'upstream/dev' into fix/backend-tests 2026-05-16 19:40:01 +05:30
middleware refactor(agents): consolidate chat runtime infra under chat/runtime 2026-06-05 13:19:24 +02:00
notifications test: add notifications unit tests and conventions doc 2026-06-03 21:53:06 +02:00
observability feat(env): add SURFSENSE_ENV variable for deployment environment and update observability resource attributes 2026-05-23 02:13:24 +05:30
routes refactor(agents): introduce chat/ category; dissolve top-level agents/shared 2026-06-05 12:54:02 +02:00
services refactor(agents): consolidate chat runtime infra under chat/runtime 2026-06-05 13:19:24 +02:00
tasks refactor(agents): introduce chat/ category; dissolve top-level agents/shared 2026-06-05 12:54:02 +02:00
utils test(backend): add OAuth state security unit tests 2026-05-06 17:18:31 +05:30
__init__.py test: bootstrap pytest environment for backend 2026-02-24 18:19:56 +02:00
test_error_contract.py chore: linting 2026-04-22 01:05:31 -07:00
test_obsidian_plugin_indexer.py chore: linting 2026-04-27 14:04:50 -07:00