Skip to content

Implement capability-oriented chat runtime - #261

Merged
anth-volk merged 4 commits into
mainfrom
feat/capability-oriented-chat-runtime
Aug 30, 2026
Merged

Implement capability-oriented chat runtime#261
anth-volk merged 4 commits into
mainfrom
feat/capability-oriented-chat-runtime

Conversation

@anth-volk

Copy link
Copy Markdown
Contributor

Fixes #260

Summary

  • replace the previous linear orchestration with typed, reusable capabilities and tools
  • preserve one authoritative typed conversation context across turns
  • validate, resolve, and atomically apply model-proposed context changes
  • add household, policy-reform, policy-information, society-analysis, chart, and follow-up capabilities
  • add SQL-backed capability, context, artifact, and trace persistence with Alembic migrations
  • expose structured private and public invocation activity through the optional debug setting
  • remove superseded orchestration, event, prompt, and evaluation pathways
  • prevent direct monetary facts from being silently discarded and use only accepted context facts during collective-income resolution
  • add multi-turn regressions for every reported household conversation failure

Verification

  • 445 backend tests passed; 15 skipped
  • 9 multi-turn regression cases pass, including the conditionally enabled live Anthropic case
  • backend type checking passed for 35 source files
  • strict OpenSpec validation passed
  • local backend health check and frontend HTTP check passed

@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-uk-chat Ready Ready Preview Aug 30, 2026 10:03am

Request Review

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.77209% with 1036 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.50%. Comparing base (536bd06) to head (29eb2c3).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
backend/capabilities/household.py 79.85% 90 Missing and 53 partials ⚠️
backend/conversation_context/reducer.py 64.21% 63 Missing and 44 partials ⚠️
backend/conversation_context/change_pipeline.py 73.65% 70 Missing and 33 partials ⚠️
backend/chat/capability_service.py 82.66% 45 Missing and 28 partials ⚠️
...ackend/conversation_context/variable_resolution.py 82.46% 35 Missing and 22 partials ⚠️
backend/capabilities/policy_reform.py 76.75% 33 Missing and 20 partials ⚠️
backend/capabilities/household_input.py 80.00% 34 Missing and 18 partials ⚠️
backend/conversation_context/models.py 85.67% 26 Missing and 26 partials ⚠️
backend/chat/context_coordination.py 66.16% 29 Missing and 16 partials ⚠️
backend/capabilities/society.py 77.63% 22 Missing and 14 partials ⚠️
... and 27 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #261      +/-   ##
==========================================
+ Coverage   68.00%   74.50%   +6.49%     
==========================================
  Files         109      153      +44     
  Lines        6827    11468    +4641     
  Branches     1390     1973     +583     
==========================================
+ Hits         4643     8544    +3901     
- Misses       1771     2189     +418     
- Partials      413      735     +322     
Flag Coverage Δ
backend 81.76% <80.77%> (+0.46%) ⬆️
frontend 37.46% <ø> (+4.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
backend/capabilities/__init__.py 100.00% <100.00%> (ø)
backend/capabilities/artifacts.py 100.00% <100.00%> (ø)
backend/capabilities/compatibility.py 100.00% <100.00%> (ø)
backend/capabilities/input_resolution.py 100.00% <100.00%> (ø)
backend/chat/__init__.py 100.00% <100.00%> (ø)
backend/chat/activity.py 100.00% <100.00%> (ø)
backend/chat/events.py 100.00% <100.00%> (ø)
backend/chat/routes.py 77.27% <ø> (ø)
backend/chat/schemas.py 100.00% <100.00%> (ø)
backend/chat/turn_input.py 88.88% <100.00%> (+0.65%) ⬆️
... and 78 more

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

Beta preview has been cleaned up because this PR was closed.

@anth-volk
anth-volk marked this pull request as ready for review August 30, 2026 10:06
@anth-volk
anth-volk merged commit dbfd9f0 into main Aug 30, 2026
10 of 11 checks passed
@anth-volk
anth-volk deleted the feat/capability-oriented-chat-runtime branch August 30, 2026 10:06
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.

Implement capability-oriented chat runtime with persistent typed context

1 participant