Skip to content

release: prepare v8.0.0#90

Merged
gaelic-ghost merged 2 commits into
mainfrom
api/request-purpose-preface-policy
May 9, 2026
Merged

release: prepare v8.0.0#90
gaelic-ghost merged 2 commits into
mainfrom
api/request-purpose-preface-policy

Conversation

@gaelic-ghost
Copy link
Copy Markdown
Owner

@gaelic-ghost gaelic-ghost commented May 9, 2026

Release

  • prepares v8.0.0 from branch api/request-purpose-preface-policy
  • keeps protected main updates behind pull request review and CI
  • release tag v8.0.0 will be created after CI and the review-comment gate pass, so failed or still-discussed release candidates do not get tagged

Review Loop

Before merge and tagging, scripts/repo-maintenance/release.sh watches CI and stops on review comments unless the maintainer has already addressed or resolved them and reruns with --review-comments-addressed.

Summary by CodeRabbit

  • Chores

    • Bumped SpeakSwiftly to 9.0.0 and TextForSpeech to 0.22.0
  • New Features

    • Request-purpose provenance is now set and propagated for live, file, and batch speech requests
    • Optional preface policy from callers is preserved and forwarded when present
  • Documentation

    • Added v8.0.0 release notes with migration guidance and verification steps

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 80ce3fcf-fc6e-4ff1-b632-97d7c534ef3e

📥 Commits

Reviewing files that changed from the base of the PR and between 498fd2d and 94be734.

📒 Files selected for processing (2)
  • Sources/SpeakSwiftlyServer/Host/ServerModels.swift
  • Tests/SpeakSwiftlyServerLibraryTests/HostStateTests.swift
🚧 Files skipped from review as they are similar to previous changes (1)
  • Sources/SpeakSwiftlyServer/Host/ServerModels.swift

📝 Walkthrough

Walkthrough

This PR upgrades SpeakSwiftly to 9.0.0 and TextForSpeech to 0.22.0, adds route-appropriate request-purpose defaults (live → .speech; files/batches → .audioFile), propagates an optional prefacePolicy through request context defaults, and updates MCP descriptions, tests, and release notes.

Changes

Request Purpose Feature with Dependency Upgrade

Layer / File(s) Summary
Dependency Pinning Updates
Package.swift, Package.resolved
Bump SpeakSwiftly from 8.0.0 to 9.0.0 and TextForSpeech from 0.21.0 to 0.22.0 in both manifest and lockfile.
Request Context Data Model
Sources/SpeakSwiftlyServer/Host/ServerModels.swift
SpeechRequestContextDefaults gains reqPurpose and optional prefacePolicy fields; makeSpeechRequestContext merges these with caller-provided values via fallback logic.
HTTP Route Integration
Sources/SpeakSwiftlyServer/HTTP/HTTPSpeechRoutes.swift
Import SpeakSwiftly; routes (/speech/live, /speech/files, /speech/batches) now pass route-appropriate reqPurpose values (.speech for live; .audioFile for files and batches) to httpSpeechRequestContextDefaults, which stores the purpose in SpeechRequestContextDefaults.
MCP Tool Integration
Sources/SpeakSwiftlyServer/MCP/MCPClientIdentity.swift
Import SpeakSwiftly; add mcpRequestPurpose(for:) helper that maps tool names (generate_audio_file, generate_batch.audioFile; others → .speech); mcpSpeechRequestContextDefaults calls this helper to set reqPurpose.
Documentation & Tool Descriptions
Sources/SpeakSwiftlyServer/MCP/MCPResources.swift, Sources/SpeakSwiftlyServer/MCP/MCPToolCatalog.swift
Update MCP tool catalog descriptions and embedded voice-profile guide to document request-purpose provenance filling; clarify server default behavior and caller-provided context override guidance.
Test Updates
Tests/SpeakSwiftlyServerLibraryTests/HTTPWorkflowTests.swift, Tests/SpeakSwiftlyServerLibraryTests/HostStateTests.swift, Tests/SpeakSwiftlyServerLibraryTests/MCPCatalogRuntimeTests.swift
HTTP, HostState, and MCP catalog runtime tests now include reqPurpose in request JSON payloads and verify corresponding reqPurpose values in expected RequestContext assertions.
Release Documentation
docs/releases/v8.0.0-release-notes.md
Document v8.0.0 changes: dependency bumps, request-purpose defaults for HTTP and MCP routes, prefacePolicy propagation, breaking changes requiring reqPurpose when bypassing defaults, and migration guidance for callers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through routes to set their aim,
live now speaks, files carry a different name,
MCP tools wear purpose too—
a tiny preface may follow through,
and tests sing back the change with glee.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'release: prepare v8.0.0' clearly describes the main objective of the changeset: preparing for a v8.0.0 release. It is concise, specific, and accurately reflects the PR's primary purpose.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch api/request-purpose-preface-policy

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Sources/SpeakSwiftlyServer/Host/ServerModels.swift (1)

48-66: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard currently drops purpose-only or preface-only request contexts.

makeSpeechRequestContext still returns nil unless legacy fields are present. That discards meaningful new context when only reqPurpose (e.g. .audioFile) and/or prefacePolicy is set.

💡 Proposed fix
     guard
         merged.source != nil
         || merged.topic != nil
         || merged.cwd != nil
         || merged.repoRoot != nil
         || !merged.attributes.isEmpty
+        || merged.prefacePolicy != nil
+        || merged.reqPurpose != .speech
     else {
         return nil
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Sources/SpeakSwiftlyServer/Host/ServerModels.swift` around lines 48 - 66, The
guard in makeSpeechRequestContext (building SpeakSwiftly.RequestContext)
currently returns nil unless legacy fields are present, dropping contexts that
only set reqPurpose or prefacePolicy; update the guard to also consider
merged.reqPurpose (non-nil) and merged.prefacePolicy (non-default/non-nil as
appropriate) so requests with only purpose or prefacePolicy are accepted—modify
the guard condition that checks merged.source/topic/cwd/repoRoot/attributes to
include checks for merged.reqPurpose and merged.prefacePolicy on the
SpeakSwiftly.RequestContext produced in this function.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@Sources/SpeakSwiftlyServer/Host/ServerModels.swift`:
- Around line 48-66: The guard in makeSpeechRequestContext (building
SpeakSwiftly.RequestContext) currently returns nil unless legacy fields are
present, dropping contexts that only set reqPurpose or prefacePolicy; update the
guard to also consider merged.reqPurpose (non-nil) and merged.prefacePolicy
(non-default/non-nil as appropriate) so requests with only purpose or
prefacePolicy are accepted—modify the guard condition that checks
merged.source/topic/cwd/repoRoot/attributes to include checks for
merged.reqPurpose and merged.prefacePolicy on the SpeakSwiftly.RequestContext
produced in this function.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4fee6e89-7e53-4e66-b243-843f7f28efb6

📥 Commits

Reviewing files that changed from the base of the PR and between 4c023dc and 498fd2d.

📒 Files selected for processing (11)
  • Package.resolved
  • Package.swift
  • Sources/SpeakSwiftlyServer/HTTP/HTTPSpeechRoutes.swift
  • Sources/SpeakSwiftlyServer/Host/ServerModels.swift
  • Sources/SpeakSwiftlyServer/MCP/MCPClientIdentity.swift
  • Sources/SpeakSwiftlyServer/MCP/MCPResources.swift
  • Sources/SpeakSwiftlyServer/MCP/MCPToolCatalog.swift
  • Tests/SpeakSwiftlyServerLibraryTests/HTTPWorkflowTests.swift
  • Tests/SpeakSwiftlyServerLibraryTests/HostStateTests.swift
  • Tests/SpeakSwiftlyServerLibraryTests/MCPCatalogRuntimeTests.swift
  • docs/releases/v8.0.0-release-notes.md

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 498fd2dda9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

defaults: SpeechRequestContextDefaults = .init(),
) -> SpeakSwiftly.RequestContext? {
let merged = SpeakSwiftly.RequestContext(
reqPurpose: defaults.reqPurpose,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve caller-supplied request purpose when merging context

makeSpeechRequestContext now always sets reqPurpose from route/tool defaults, so any request_context.reqPurpose provided by HTTP or MCP callers is silently ignored. This breaks the new contract described in this release (callers can provide the shared RequestContext shape, including reqPurpose) and prevents valid overrides such as audioStream, causing downstream requests to be misclassified even when clients explicitly set a purpose.

Useful? React with 👍 / 👎.

@gaelic-ghost gaelic-ghost merged commit cb7882f into main May 9, 2026
2 checks passed
@gaelic-ghost gaelic-ghost deleted the api/request-purpose-preface-policy branch May 9, 2026 15:34
@coderabbitai coderabbitai Bot mentioned this pull request May 9, 2026
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