• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

informatics-isi-edu / deriva-mcp-core / 23671226824
91%

Build:
DEFAULT BRANCH: main
Ran 27 Mar 2026 11:06PM UTC
Jobs 1
Files 35
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Mar 2026 11:06PM UTC coverage: 90.98% (-0.3%) from 91.257%
23671226824

push

github

mikedarcy
feat: Phase 5.7 background tasks + LLM friction hardening

  Phase 5.7 -- Background Task Infrastructure (TaskManager, task MCP tools,
  clone_catalog_async, rag_update_docs_async):

  - tasks/manager.py: TaskManager singleton with submit/get/list/cancel/
    get_credential/update_progress; TaskRecord dataclass; principal-scoped
    in-memory state; asyncio cooperative scheduling; mutable list ref pattern
    for task_id injection into async closures
  - tasks/__init__.py: re-exports TaskManager, TaskRecord, get_task_manager
  - context.py: _current_bearer_token ContextVar + set/get helpers
  - auth/verifier.py: set_current_bearer_token() called alongside credential
    and user_id in HTTP request setup
  - plugin/api.py: submit_task(coroutine, name, description?) method; reads
    principal+bearer_token from contextvars at call time
  - tools/tasks.py: get_task_status, list_tasks, cancel_task (all mutates=False)
  - tools/catalog.py: clone_catalog_async (mutates=True); submits
    asyncio.to_thread(clone_catalog) as background task; get_credential()
    called inside task for fresh derived token on each DERIVA operation
  - rag/tools.py: rag_update_docs_async(source_name?) -- same work as
    rag_update_docs via ctx.submit_task, returns task_id immediately
  - server.py: TaskManager initialized at startup (HTTP: with token_cache,
    stdio: no cache); _set_task_manager() wires singleton; tasks module
    added to registration loop
  - tests/test_tasks.py: 20 TaskManager unit tests (state machine, principal
    isolation, cancel, get_credential, update_progress, description)
  - tests/test_tools.py: 7 task tool tests + 2 clone_catalog_async tests

  LLM friction hardening -- get_entities response shape:

  - Renamed count -> returned_count to eliminate ambiguity with total row count
  - Added truncated: bool (true when returned_count == limit, false otherwise)
  - Added next_after_rid only when truncated -- mechanically unambiguous cursor
  - Tests up... (continued)

208 of 235 new or added lines in 10 files covered. (88.51%)

2441 of 2683 relevant lines covered (90.98%)

0.91 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
96.94
-0.84% src/deriva_mcp_core/plugin/api.py
1
99.0
src/deriva_mcp_core/tasks/manager.py
3
92.59
-0.18% src/deriva_mcp_core/tools/catalog.py
7
85.42
src/deriva_mcp_core/tools/tasks.py
15
57.14
-4.88% src/deriva_mcp_core/rag/tools.py
Jobs
ID Job ID Ran Files Coverage
1 23671226824.1 27 Mar 2026 11:06PM UTC 35
90.98
GitHub Action Run
Source Files on build 23671226824
  • Tree
  • List 35
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d2223db2 on github
  • Prev Build on main (#23668491130)
  • Next Build on main (#23671553823)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc