Skip to content

Harden Primary decode lifecycle and isolate MLX worker - #227

Merged
FluffyAIcode merged 9 commits into
mainfrom
agent/primary-decode-worker-acceptance-integration-0721
Jul 21, 2026
Merged

Harden Primary decode lifecycle and isolate MLX worker#227
FluffyAIcode merged 9 commits into
mainfrom
agent/primary-decode-worker-acceptance-integration-0721

Conversation

@FluffyAIcode

Copy link
Copy Markdown
Owner

Summary

  • unify session cleanup, memory governance, cancellable non-blocking Generate, liveness and launchd watchdog recovery
  • keep greedy argmax/logits on MLX and isolate decode into a feature-flagged UDS worker process
  • add worker crash/KV restore controls plus the Mac 100-session, disconnect, hang, parity, latency and 4-hour acceptance harness

Test plan

  • focused integrated suite: 37 passed
  • broader session/server/bridge suite: 226 passed
  • decode worker retest: 10 passed
  • real MLX pre-4-hour acceptance
  • blocking 4-hour mixed-prompt acceptance

The 4-hour hardware gate remains blocking before production deployment and proof restart.

Made with Cursor

fluffy314 and others added 6 commits July 21, 2026 20:43
Unify session cleanup and move blocking RPC work off asyncio while adding cancellation guards, memory governance, liveness diagnostics, and external watchdog recovery.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reduce primary decode synchronization and materialization while preserving the full speculative block contract, with exact logits/KV parity and focused performance coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep model and session KV in a recoverable UDS child so router liveness and cancellation no longer depend on an in-process Metal forward.

Co-authored-by: Cursor <cursoragent@cursor.com>
Provide fixed release gates and a worker-neutral control contract so decode isolation can be validated without coupling the harness to runtime internals.

Co-authored-by: Cursor <cursoragent@cursor.com>
Expose local-only worker state, fault injection, and snapshot restore parity so the Mac acceptance harness can validate the process-isolated runtime end to end.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the complete origin/main integration diff free of trailing whitespace before CI handoff.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 21, 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.

fluffy314 and others added 3 commits July 21, 2026 21:44
Exercise worker snapshot imports, proxy appends, cancellation, concurrency, and memory-drain paths so the platform-neutral gate remains deterministic at 100% coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Guard terminal gRPC streams from late cancellation cleanup and replace ps-based footprint sampling so long-running decode workers cannot deadlock gRPC during memory checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
Capture the release-blocking Gemma hardware evidence so deployment is tied to the verified runtime commit and recovery behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@FluffyAIcode
FluffyAIcode merged commit c8b84d1 into main Jul 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant