Ship the complete Pines product, design, and runtime upgrade#21
Merged
Conversation
added 30 commits
May 25, 2026 08:06
4.1: fallback decode uses fp16 scratch + an OOM guard (recoverable instead of crash). 2A: mid-generation FP16->compressed spill under memory pressure (the missing dynamic half) — GenerateParameters.spillMemoryWatermarkBytes, default off (on-device tuning). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Picks up the mlx-swift-lm fork tip carrying the turbo3 bit-metadata fix (5.5) and the new TurboQuantBench on-device A-series benchmark harness. Both are behavior-neutral / test-only for the app (pines uses its own scheme enum without turbo3; the app does not depend on the TurboQuantBench product), so this is a sync + manifest-resolution bump. Verified: full Pines app resolves mlx-swift-lm @ 3118d5b and builds green (xcodebuild, iOS Simulator, -skipPackagePluginValidation -skipMacroValidation). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Captures the working-tree TurboQuant work (control-plane + evidence types, tests, and the turboquant-implementation docs/baselines) as a green checkpoint at the current MLX pin pair (mlx-swift 609e833 + mlx-swift-lm 725add5). PinesCore builds and all 227 PinesCore tests pass, including TurboQuantPinDriftTests. Note: the mlx-swift-lm pin bump to pick up the N2 self-speculation API (makeGenerationIterator + GenerateParameters.selfSpeculationMode) is intentionally NOT included here — it requires regenerating compatibility-pair.json via the validation harness (the evidence artifact must not be hand-edited), which needs the deferred A-series device run for full evidence. See the mlx-swift-lm overhaul handoff (N2 Pines section) for the exact pin-coordination sequence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Documents that mlx-swift-lm 295e66b now exposes the N2 self-speculation product API (GenerateParameters.selfSpeculationMode + makeGenerationIterator, bit-exact, default-off) and mlx-swift adds the data-free Gaussian payload codec, and that adopting them requires advancing the MLX pin pair + regenerating compatibility- pair.json via the wave0 harness (not hand-edited) + the deferred A-series device run. Self-speculation ships default-off (inert until enabled + device-validated). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DEBUG-only, launch-gated (PINES_TQ_REAL_BENCH=1) real-model device benchmark: loads the ACTUAL on-device model weights via the production loader and runs real token generation comparing compressed affineK8V4 vs plain FP16 KV through the canonical InferenceParityBenchmark engine (real-model-inference-v1) — the real-model throughput + cosine/top-1 quality evidence the promotion gate requires (the synthetic TurboQuantBench sweep cannot provide it). Writes JSON to Documents/PinesDiagnostics. - PinesRealModelTurboQuantDiagnostics.swift (new): per-context isolation (a 64K OOM doesn't lose 32K), bootstrap 95% CIs on each arm's median decode tok/s AND on the compressed/FP16 ratio, multi-model support (PINES_TQ_REAL_MODELS csv) so a smaller fallback model can cover long contexts a larger model's weights+KV won't fit. Ensure-downloads via the app's own ModelLifecycleService (idempotent). - project.yml + generated pbxproj: add the IntegrationTestHelpers library product dependency. - PinesRootView: invoke the hook at launch alongside the existing DEBUG bench hooks. DEBUG-gated, inert in release. Build on device with -jobs 6 -skipPackagePluginValidation -skipMacroValidation. First result (A17 Pro, real Qwen3.5-2B-OptiQ-4bit): 16K compressed 0.96x FP16 with byte-identical greedy output. Evidence lives in the mlx-swift-lm repo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Finish the persistence and CloudKit lifecycle, Project Spaces synchronization, bounded provider and MCP response handling, SSRF-safe redirect policy, and conservative tool-safety persistence. Advance the maintained MLX dependency pair to the platform-aware Apple-mobile-compatible revisions, upgrade the Astro site and CI security gates, and synchronize project, runtime, documentation, and compatibility metadata. Record exact-pair iPhone synthetic and Qwen 3.5 0.8B real-model smoke evidence with explicit non-promotion caveats, backed by core, iOS, UI, security, and site validation.
Remove legacy trailing whitespace surfaced by the pull-request base comparison so the repository hygiene job evaluates the full branch cleanly.
Support both legacy and platform-derived MLX Metal helper assignments, keep the tracer bypass idempotent, and fail closed when an upstream helper can no longer be patched.
Preserve cloud-provider identity and credentials across edits, expose CloudKit sync health and retry, and add typed OpenRouter routing, privacy, and structured-output controls. Cover the new request and lifecycle semantics with package and app tests, and reconcile provider documentation with the shipped behavior.
Boot and wait for a clean simulator before each CI test phase, bound xcodebuild execution, and retry once after launcher failures so hosted runner stalls fail fast instead of consuming the full job timeout.
Unify responsive, accessible design primitives and content-first layouts across Chats, Models, Vault, Artifacts, Settings, and watchOS. Add safer actions, actionable empty states, compact controls, and broader UI coverage including accessibility sizing.
Complete the end-to-end Pines design upgrade
Finalize provider metadata after terminal accounting chunks so streamed usage and routing details are not lost. Persist a bounded privacy-minimized OpenRouter receipt, expose it through progressive chat disclosure, and reconcile provider status documentation.
Retain bounded pricing, modality, context, and lifecycle metadata from the OpenRouter catalog. Reject known-incompatible requests before spend and expose searchable model details in the chat picker. Cover metadata compatibility and eligibility behavior, and reconcile provider status documentation.
Store bounded provider catalog snapshots in encrypted GRDB with six-hour expiry and provider-deletion cascade. Hydrate fresh snapshots at launch, retain them across transient refresh failures, and keep expired OpenRouter metadata out of hard request rejection. Cover schema, bounds, expiry, round-trip persistence, replacement, cleanup, and verifier invariants.
Add bounded router-hosted web search requests and persisted engine controls. Normalize citations and usage into source panels, hosted-tool timelines, and run receipts with request, parser, settings, and compatibility coverage.
Complete Pines hardening, product UX, and exact-pair validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
This closes the stacked implementation branches so the completed product, design, security, and runtime work reaches the default branch as one coherent release candidate.
Validation
git diff --checkpassed and the worktree remained clean.Remaining release boundary
Historical iPhone evidence is retained as runtime smoke only. Current MLX-pair physical-device acceptance and any Verified/Certified performance claim remain separate release gates.