Skip to content

feat: automatic contextual memory across conversations and task workers - #1892

Merged
santoshkumarradha merged 13 commits into
devfrom
feat/actr-memory
Oct 22, 2026
Merged

santoshkumarradha merged 13 commits into
devfrom
feat/actr-memory

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Behavior

Ordinary conversation captures durable memories and applies them in later chats without a remember command. Natural corrections update remembered decisions; explicit pins remain available.

V2 uses proof-only reinforcement and negative contradiction feedback, a protected durable admission lane with a 40% floor, specificity ranking, derived semantic labels, conversation dwell, and actual-prompt telemetry. ACT-R activation, threshold admission, unrestricted storage, conservative SimHash deduplication, pins, and the performance budget remain intact.

Capture guidance now distinguishes statements and accepted proposals from unaccepted assistant suggestions. A contradictory worked example was corrected. Normalized wording and natural confirmations still work. Explicit media pins cannot silently fall back under one-model mode.

Proof

The latest candidate is a278210. Its production change is 3b4da43; the subsequent commit adds the live regression.

  • New four-chat live regression: PASS. Natural capture → fresh recall → natural correction → fresh task application. All three fresh chats received the expected source in their first main request. Independent review confirmed preserved conditions and prohibitions, no stored orientation suggestion, and correct output for both branches. All 47 model receipt rows used OpenRouter deepseek/deepseek-v4.1-flash, including auxiliary roles.
  • Fresh full-store acceptance at a278210: all 13 sources reached the first main requests; all 12 durable cases were correct and the additional status answer correctly rejected an obsolete historical status. All 145 model receipt rows used the exact requested model. All 652 original rows remained unchanged in this recall run.
  • Complex real-usage acceptance at a278210: PASS. Eight chats, 12 completed turns, no evaluator clarification; actual SVG geometry/data, conditional annotations, immediate fresh-chat correction, topic return, project A → B → A isolation and one-off instruction non-persistence all passed independent review. Nine SVG snapshots were checked. All 393 receipt rows used the exact requested model. A separate queued solo task reached persisted completion; its first actual worker request contained the current rules and its artifact passed geometry/data review. All 36 additional receipt rows used the exact model.
  • Validation: make pr-ready passes, including build, vet, manual gates, repository laws, fixed-prefix budget and fresh tests for all seven affected packages. Latest-revision GitHub CI passes: all eight jobs green on a278210. The manual-search failure on the previous CI merge was reproduced and fixed without a waiver; its packed-manual tests pass.
  • Performance: indexed high-fan-context assembly measured 4.017 ms at 10k and 4.073 ms at 100k memories (GOMAXPROCS=4, 20 iterations).

The live regression used fictional Cedar rainfall instructions. The assistant proposed an orientation as an example; capture excluded it. A later correction changed overflow delivery from a link to an SVG attachment. The actual task wrote:

{
  "fits_in_chat": {
    "delivery": "Render the full chart inline in the chat reply.",
    "inline_allowed": true
  },
  "does_not_fit_in_chat": {
    "delivery": "Do not render inline; save the full chart as an SVG attachment.",
    "inline_allowed": false
  }
}

Earlier runs exposed to grading material or using a different media model were excluded. Personal memory examples, prompts, and transcripts are not published.

Acceptance policy and limitations

Actual recall and correct application take priority. The legacy use-count calibration remains a diagnostic regression signal, not a release blocker: current settings yield 15/23 and 28.6% unused share. Seven offline refits restored 23/23 and 0% unused share but dropped one or two actual recall targets. The current settings preserve all 13 targets.

The first complex attempt was excluded after its evaluator deadline interrupted a still-running task. The successful run used an eight-minute per-turn limit and stopped on missing replies. The queued-worker observer initially expected the wrong receipt tag; retained task records, linked worker requests and artifact checks independently establish its success. This was an evaluator classification error, not a product fix.

Capture remains model-guided, not a lossless guarantee. Conservative lexical deduplication does not merge every semantic paraphrase; two similar old captures existed in the new regression before correction removed both from the active set. Embeddings and automatic state-summary consolidation are not included.

Aggregate proof is included inline. Direct media attachment upload is unavailable through the current tools; recordings and detailed evidence are preserved locally. No evidence directories or branches were committed.

Reproduce the mock regression

After make build, with credentials configured privately:

CODEAF_E2E_MODEL=deepseek/deepseek-v4.1-flash go test -tags e2e ./internal/e2e -run '^TestMemoryCapturePreservesConditionalChartInstructions$' -count=1 -v -timeout 15m

The isolated live harness requires Linux, tmux, and bubblewrap. The manual and change entry document behavior and limitations.

@santoshkumarradha
santoshkumarradha marked this pull request as draft October 22, 2026 15:30
@santoshkumarradha
santoshkumarradha marked this pull request as ready for review October 22, 2026 17:57
@santoshkumarradha
santoshkumarradha merged commit a6b4f97 into dev Oct 22, 2026
8 checks passed
@santoshkumarradha
santoshkumarradha deleted the feat/actr-memory branch October 22, 2026 18:37
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.

1 participant