Skip to content

[codex] Fix open bug regressions and core build readiness#985

Open
mimeding wants to merge 9 commits intoosaurus-ai:mainfrom
mimeding:codex/open-bug-pr-fixes
Open

[codex] Fix open bug regressions and core build readiness#985
mimeding wants to merge 9 commits intoosaurus-ai:mainfrom
mimeding:codex/open-bug-pr-fixes

Conversation

@mimeding
Copy link
Copy Markdown
Contributor

@mimeding mimeding commented Apr 30, 2026

Business rationale

This PR clears several high-impact harness reliability bugs that make osaurus feel untrustworthy when users connect real providers, stream reasoning/tool calls, download models, or run sandboxed chat workflows. It advances the multi-provider, agent, sandbox, and file-safety pillars by making provider payloads round-trip correctly, keeping tests away from production chat-history storage, and making local capacity checks reflect what macOS actually reports.

Coding rationale

The fixes stay narrow and preserve existing public shapes: provider wire models keep optional booleans where omission and false have different semantics, streamed reasoning/tool-call state is preserved instead of being flattened into visible chat text, and free-space checks are routed through URL volume resource keys rather than legacy filesystem attributes. The rebase cleanup also makes the touched files pass both SwiftFormat and SwiftLint without changing behavior; multiline optional bindings were split into small locals, and SwiftUI trace calls keep explicit discard bindings because ViewBuilder treats plain assignment as an invalid view expression.

What changed

  • Fix MLX/Jinja tool-spec serialization by dropping null placeholders before tokenizer conversion.
  • Preserve DeepSeek/OpenAI-compatible reasoning_content across streamed and non-stream tool-call turns so follow-up requests can replay it.
  • Query storage capacity through URL volume resource keys and reuse that path for model-download free-space checks.
  • Accept OpenAI Responses shorthand input items where message objects omit optional type: "message".
  • Update FluidAudio PocketTTS initialization for the required language parameter and align FluidAudio lockfiles so OsaurusCore compiles against the current resolved dependency set.
  • Keep core tests off production chat-history storage when no test root is configured.
  • Harden sandbox context-budget regression coverage.
  • Rebase on current origin/main and make all touched Swift files pass strict formatting/lint.

Fixes #980
Fixes #959
Fixes #964
Fixes #662

Validation

  • swift build --package-path Packages/OsaurusCore
  • swift build --package-path Packages/OsaurusCore -c release
  • swift test --package-path Packages/OsaurusCore
  • xcrun swift-format lint --strict <touched Swift files>
  • swiftlint lint --strict <touched Swift files>
  • git diff --check origin/main...HEAD
  • git diff --check

Non-scope

Residual risks

  • SwiftPM still reports existing dependency/resource warnings from current main and transitive packages; this PR does not broaden scope to clean unrelated warnings.
  • GitHub Actions must confirm the rebased branch in CI after the force-with-lease update.

@mimeding mimeding force-pushed the codex/open-bug-pr-fixes branch from ef6aaa6 to 50da318 Compare April 30, 2026 16:58
@mimeding
Copy link
Copy Markdown
Contributor Author

CI note: shellcheck, swiftlint, test-cli, and Release Drafter passed. test-core failed before running Osaurus tests with the known Xcode/SwiftPM C-module dependency resolution issue in EventSource dependencies (CAsyncHTTPClient, CNIOLLHTTP, CNIOExtrasZlib, CNIOPosix, _NumericsShims). Local validation on the rebased branch passed with swift test --package-path Packages/OsaurusCore (1174 tests). I attempted gh run rerun --failed, but this account does not have permission to rerun upstream Actions.

@mimeding
Copy link
Copy Markdown
Contributor Author

@tpae Please ask someone with repo permissions to rerun test-core on PR #985.

@mimeding mimeding marked this pull request as ready for review May 1, 2026 02:48
Comment thread .cursor/rules/pr-clean-ci.mdc Outdated
@@ -0,0 +1,39 @@
---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we remove this

@mimeding
Copy link
Copy Markdown
Contributor Author

mimeding commented May 1, 2026

Author-side cleanup complete.

Verification:

  • GitHub checks are green: test-core, test-cli, swiftlint, shellcheck, update_release_draft, and pr-clean-gate.
  • scripts/ci/check-pr-clean.sh osaurus-ai/osaurus 985 reports clean.
  • Local verification from the clean worktree passed for swift build, targeted OsaurusCore tests, and shellcheck on the clean-PR gate.

Root cause addressed: stale DerivedData restore on PRs plus stale FluidAudio locks. This branch now keeps PR test-core on the cold DerivedData path and uses FluidAudio 0.14.3.

@mimeding
Copy link
Copy Markdown
Contributor Author

mimeding commented May 1, 2026

@tpae the line/rule you flagged has been removed, and #985 is now passing clean on the latest head. Good to commit from my side.

@mimeding
Copy link
Copy Markdown
Contributor Author

mimeding commented May 1, 2026

@tpae The line was removed, and this is now good to commit. Latest checks are green: test-core, test-cli, swiftlint, shellcheck, and Release Drafter.

@tpae
Copy link
Copy Markdown
Contributor

tpae commented May 3, 2026

Hey @mimeding i apologize for not able to merge this, wanted to add DeepSeek as official provider since reasoning_content only applies to DeepSeek at the moment.

I added official DeepSeek provider here: #1012

Michael Meding and others added 9 commits May 3, 2026 22:33
Business rationale: This keeps the open bug-fix bundle moving toward a green review state so users get the provider, chat-state, and CI reliability fixes without another stale-red PR blocking maintainer trust in the harness.

Coding rationale: The rebase exposed strict touched-file lint failures after current main; the fix keeps provider wire shapes intact where omitted booleans are meaningful, rewrites multiline optional bindings into SwiftFormat- and SwiftLint-compatible forms, and preserves SwiftUI trace side effects with scoped lint suppressions because ViewBuilder cannot accept plain assignment expressions.

Co-authored-by: Codex <codex@openai.com>
@mimeding mimeding force-pushed the codex/open-bug-pr-fixes branch from 4540623 to e3619d3 Compare May 4, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants