Context Pipeline P1-1
Closing the gaps in the living context pool
Built on top of the living context pool, P1-1 closes the core gaps in context-window engineering, taking context management from "has a skeleton" to "has muscle".
The six gaps closed
| Gap | Fix | Status |
| Turn pairing | Pairing-integrity checks between the conversation view and the database view | Implemented |
| EXACT counting | Precise token-level counting replacing character-ratio estimates | Implemented |
| Real summarization | Production-grade LLM summarization replacing truncation-based pseudo-summaries | Implemented |
| FTS ledger | The eviction ledger is persisted, so a restart no longer loses it | Implemented |
| Overflow recovery | A single-shot recovery retry when the context exceeds the limit | Implemented |
| Write-side turn tagging | Conversation turns are tagged, enabling exact retrospection | Implemented |
The five living properties
| Property | Description | Implementation |
| Flow | New content flows in, old content flows out | Time decay + TTL expiry |
| Freshness | Content stays current via time decay | Timestamps + access frequency |
| Purity | Multi-stage deduplication | Exact + pattern + semantic dedup |
| Semantics | Vector matching that understands synonyms | BAAI/bge-small-zh-v1.5 |
| On-demand | A need expressed as a string matches automatically | Semantic vector similarity |
API
GET /api/v1/context/pool-settings # read context pool settings
PUT /api/v1/context/pool-settings # update settings
GET /api/v1/context/pool-settings/token-budget/{model} # token budget