Skip to content

Add in-app Malibu model switching - #956

Merged
Augustas11 merged 3 commits into
mainfrom
feat/malibu-model-switching
Aug 9, 2026
Merged

Add in-app Malibu model switching#956
Augustas11 merged 3 commits into
mainfrom
feat/malibu-model-switching

Conversation

@Augustas11

Copy link
Copy Markdown
Owner

Summary

  • Add a provider-owned model inventory protocol for Malibu.
  • Add an in-app model picker from the dashboard and Settings menu.
  • Drive live model switches through the launchd-managed CLI with progress, draining, rollback, cooldown, and revert handling.
  • Enforce signed target authority and artifact identity before a production swap can enter loading or commit.
  • Preserve supported-but-uninstalled models as idle, not-ready rows with clear preparation state.
  • Keep recommendation/adoption capability tiers absent and fail-closed until their authoritative provider contract is available.

Why

Issue #953 identifies Terminal-only model selection as a provider UX barrier. This PR delivers the safe in-app switching slice while preserving the provider CLI as the runtime authority.

Validation

  • 107 targeted SwiftPM tests passed.
  • 11 Malibu model-management tests passed.
  • JSON resources validated with jq.
  • Full-diff whitespace validation passed.
  • Three independent adversarial audits reported C=0, H=0, M=0.

SPEC-GOVERNANCE-DECLARATION-BEGIN
{
"schema_version": "spec-pr-governance-v1",
"behavior_change": "yes",
"contract_change": "none",
"specs": ["SPEC-010", "SPEC-011"],
"requirements": ["SPEC-010-R006"],
"authority_domains": ["operator-pushed-warm-swap"],
"arbitration": ["CODE_BUG"],
"tests": ["targeted SwiftPM model-switching suite", "Malibu model-management test suite"],
"journeys": ["not-required"],
"issue": "#953"
}
SPEC-GOVERNANCE-DECLARATION-END

Align the general installed-only manual check with the product trust contract by requiring scope, no-download disclosure, load/benchmark impact, duration, and provider confirmation before work begins. Carry the same contract into acceptance and test requirements.\n\nConstraint: Installed-only checks may load and benchmark local weights while the provider continues serving, so the UI must disclose non-download cost without implying a free spinner.\nRejected: Leave cost disclosure targeted-only | it contradicts the broad evaluation guard and hides material work behind the installed-model affordance.\nConfidence: high\nScope-risk: narrow\nDirective: Keep manual and background recommendation paths distinct; background checks remain installed-only and scheduler-gated.\nTested: git diff --check; targeted spec review against the prior M1 evidence.\nNot-tested: Product and adversarial re-review still running.
Expose provider-owned model inventory and a fail-closed Malibu control surface for switching the active runtime model, including signed authority, lifecycle progress, rollback, and revert behavior.

Constraint: Malibu must rely on the launchd provider's signed model authority and versioned control protocol.

Rejected: client-side model readiness and unsigned target selection | they would allow UI state to diverge from provider reality.

Confidence: high

Scope-risk: broad

Directive: Preserve the provider-owned authority boundary when extending model management.

Tested: 107 targeted Swift tests, 11 Malibu model-management tests, JSON validation, and diff checks.

Not-tested: full repository test suite and release packaging verification.
@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

antfleet-ops
antfleet-ops previously approved these changes Aug 9, 2026

@antfleet-ops antfleet-ops left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed by antfleet-ops after the audited implementation and targeted test evidence. The provider-owned authority boundary, fail-closed swap preflight, and Malibu control path are acceptable.

Place the product build artifact under the design-support tree so the repository's canonical-spec index gate can distinguish it from normative SPEC-NNN documents.

Constraint: CI treats tracked specs/ root files as canonical unless they have a normative header.

Rejected: adding a synthetic normative SPEC header | the document is a build artifact, not a canonical contract.

Confidence: high

Scope-risk: narrow

Directive: Keep future BUILD_SPEC and audit artifacts under supporting spec subdirectories.

Tested: gen_spec_index.py --lint, gen_spec_index.py --check, and git diff --check.

@antfleet-ops antfleet-ops left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-approved by antfleet-ops for the latest PR head after the supporting BUILD SPEC relocation. The audited implementation remains unchanged.

@Augustas11
Augustas11 merged commit 0d52498 into main Aug 9, 2026
15 checks passed
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.

2 participants