Skip to content

Feature/20260626/fix memory v5 pipeline pollution#5376

Closed
myipanta wants to merge 4 commits into
esengine:main-v2from
myipanta:feature/20260626/fix-memory-v5-pipeline-pollution
Closed

Feature/20260626/fix memory v5 pipeline pollution#5376
myipanta wants to merge 4 commits into
esengine:main-v2from
myipanta:feature/20260626/fix-memory-v5-pipeline-pollution

Conversation

@myipanta

@myipanta myipanta commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Verification

Cache impact

Cache-impact: low — adds new methods to Agent struct, no system-prompt or tool-schema changes
Cache-guard: go test ./internal/agent/ -run "TestShouldInject|TestMarkCompiler|TestRunUsesMemoryCompiler" -count=1
System-prompt-review: N/A

For cache-sensitive changes, fill these lines before requesting review:

  • Cache-impact: none, low, medium, or high, plus the reason.
  • Cache-guard: the focused guard test/command added or run, or why an existing guard covers the change.
  • System-prompt-review: required reviewer/approval note when provider-visible system prompt, memory prefix, output style, or skill index behavior changes.

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) agent Core agent loop (internal/agent, internal/control) labels Jun 26, 2026
ipanta added 2 commits June 27, 2026 19:21
Add shouldInjectCompiler() with three-layer guard:
- Session cap (default 5 injections)
- Genuine input check (reject system-generated/empty)
- Cooldown enforcement (default 30s between injections)

Fixes esengine#5342 (infinite injection loop) and esengine#5316-B3 (spontaneous injection).
Replace silent stripMemoryCompilerExecution with collapsible component:
- Extract memory compiler block instead of deleting it
- Show 'Memory v5 context' toggle, collapsed by default
- Click to expand raw IR content

Fixes esengine#5316-B1 (IR leak to user chat UI).
@myipanta myipanta force-pushed the feature/20260626/fix-memory-v5-pipeline-pollution branch from ab887e1 to 9cd87bf Compare June 27, 2026 11:23
ipanta added 2 commits June 27, 2026 19:33
- Fix syntax error: missing ) closing ternary in Message.tsx
- Add extractMemoryCompilerExecution to lib/memoryCompilerDisplay.ts
- Remove duplicate local function definitions from Message.tsx
- Add missing msg.memoryCompilerContext i18n key to zh-TW locale
@SivanCola

Copy link
Copy Markdown
Collaborator

Thanks @myipanta for investigating the Memory v5 pipeline pollution/noise path.

I'm closing this PR as superseded by #5493. The selected fix keeps the same product goal but uses the newer Memory v5 path: task/chat classification gates Memory v5 startup, simple greetings and acknowledgements skip execution-contract injection, real task/failure descriptions still use Memory v5, and compiler citations are kept out of the visible transcript. #5493 also has focused backend/frontend coverage and is clean against the current main-v2 after #5487.

We are not adopting this branch because it is based on an older version of the flow and leaves more of the raw Memory v5 contract/UI behavior exposed than the selected approach. Thanks again for the exploration here.

@SivanCola SivanCola closed this Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants