Skip to content

feat(prefill): enforce decode-only primary mode - #170

Merged
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/primary-decode-allens-prefill-0716
Jul 16, 2026
Merged

feat(prefill): enforce decode-only primary mode#170
FluffyAIcode merged 1 commit into
mainfrom
AgentMemory/primary-decode-allens-prefill-0716

Conversation

@FluffyAIcode

Copy link
Copy Markdown
Owner

Summary

  • add remote-required prefill policy: Primary accepts only complete cache hits or completed remote worker snapshots and never computes prefill/suffix locally
  • bypass cost rejection in strict mode while retaining load-aware worker selection
  • map unavailable remote prefill to gRPC UNAVAILABLE instead of silent local fallback
  • deploy allens as the Gemma-loaded prefill-only worker with a co-located KakeyaLattice cache on :53051
  • expose all physical cache mounts through one kv:// content-addressed namespace while explicitly reporting that coherent shared memory is false

Architecture

Primary receives canonical token IDs, allens performs full prefill and stores snapshots, Primary fetches/imports once, and all autoregressive decode remains local. Partial cache hits are never extended on Primary.

Tests

  • platform-neutral Python suite — 833 passed, 1 skipped
  • TypeScript SDK — 54 passed, 100% coverage and typecheck
  • strict no-fallback, partial-hit rejection, forced worker selection, UNAVAILABLE mapping, namespace aggregation, API, and launchd role tests pass
  • Python compile, plist lint and diff checks pass

Live caveat

The selected Gemma model is ~15GB on a 16GB allens host. Previous functional tests completed but remote prefill took roughly 128–149 seconds; this deployment prioritizes role correctness, not throughput.

Made with Cursor

Require complete remote prefill or full cache hits before decode, deploy allens as the model-loaded prefill worker, and expose physically separate cache mounts through one content-addressed kv namespace.

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

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

@FluffyAIcode
FluffyAIcode merged commit 0910054 into main Jul 16, 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