Skip to content

feat(ask): host-neutral Ask turn service - #426

Draft
haileyok wants to merge 1 commit into
hailey/ask-ai-1-providerfrom
hailey/ask-ai-2-service
Draft

feat(ask): host-neutral Ask turn service#426
haileyok wants to merge 1 commit into
hailey/ask-ai-1-providerfrom
hailey/ask-ai-2-service

Conversation

@haileyok

Copy link
Copy Markdown
Member

Description

Part 2/5 of the Ask AI stack (stacked on hailey/ask-ai-1-provider). Adds osprey_worker/lib/ask: vendor-neutral contracts, a stable error taxonomy, host adapter Protocols (ModelPolicy, ConversationStore, ConversationLock, ContextSnapshotProvider, ToolRegistryFactory, Redactor, AuditSink, EvidenceNormalizer) + AskConfig, and AskService.run_turn — a generator that pre-flights before emitting, streams a deterministic bounded tool loop, redacts structured payloads, enforces history/context/output budgets, checks cancellation, persists only successful turns, and releases the lock on every terminal path. Implements AC2.1–AC2.5, AC3.1–AC3.5.

Checklist

  • Tests pass locally (28 tests via ./run-tests.sh)
  • uv run ruff check . passes
  • uv tool run fawltydeps --check-unused --pyenv .venv passes
  • Updated CHANGELOG.md (deferred — happy to add)

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 857482c2-a39f-4446-a35b-5b8d2f07c6bd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hailey/ask-ai-2-service

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Add osprey_worker/lib/ask: vendor-neutral contracts (AskRequest/AskEvent/Principal/
AskLimits/Conversation/ContextSnapshot/ResolvedModel), a stable error taxonomy, host
adapter Protocols (ModelPolicy, ConversationStore, ConversationLock,
ContextSnapshotProvider, ToolRegistryFactory, Redactor, AuditSink, EvidenceNormalizer)
+ AskConfig, and AskService.run_turn -- a generator that pre-flights (raising before
any event), streams a deterministic bounded tool loop, redacts structured payloads,
enforces history/context/output budgets, checks cancellation, persists only successful
turns, and releases the conversation lock on every terminal path.

Tests (28 passing under run-tests.sh) cover the deterministic event sequence, tool
feed-back, multi-tool ordering, iteration/output budgets, ownership + pre-flight
rejections, provider/tool/cancellation/lock failures, structured redaction, and
audit-failure isolation.

Implements osprey-ask-ai AC2.1-AC2.5, AC3.1-AC3.5.
@haileyok
haileyok force-pushed the hailey/ask-ai-2-service branch from 45f307d to 44cfeca Compare July 14, 2026 22:13
@haileyok
haileyok force-pushed the hailey/ask-ai-1-provider branch from 3917584 to f2f422c Compare July 14, 2026 22:13
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.

1 participant