You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- PR #706 implementou e mergeou a superfície canônica de gerenciamento hierárquico de contexto: https://github.com/SynkraAI/aiox-core/pull/706
65
+
- Issue #447 foi atendido pela story 447.1.
66
+
- A implementação é aditiva e preserva `context-tracker`, `MemoryBridge` e o context manager de orchestration sem mudanças comportamentais obrigatórias.
67
+
- Próximas integrações em loops de agente devem ser tratadas como novas stories, fora do escopo deste epic.
Copy file name to clipboardExpand all lines: docs/stories/epic-447-hierarchical-context-management/STORY-447.1-HIERARCHICAL-CONTEXT-MANAGER-CONTRACT.md
| quality_gate_tools | npm test focused, npm run lint, npm run typecheck, npm run validate:manifest|
@@ -24,6 +24,7 @@
24
24
-[x] PO validated
25
25
-[x] Ready for implementation
26
26
-[x] Ready for Review
27
+
-[x] Done
27
28
28
29
## Executor Assignment
29
30
@@ -66,16 +67,16 @@ Existing surfaces to reuse or preserve:
66
67
67
68
## Acceptance Criteria
68
69
69
-
- [] AC1: A new canonical `HierarchicalContextManager` API exists under the SYNAPSE/context runtime and is exported from the appropriate module surface.
70
-
- [] AC2: The API supports at minimum `addMessage(message)`, `getContext()`, `getStats()` and `clear()` without requiring a live LLM provider.
71
-
- [] AC3: Configuration supports `maxTokens`, `summarizationThreshold`, injected `tokenizer`, injected `summarizer`, and a safe fallback to the existing `estimateTokens()` utility.
72
-
- [] AC4: When the active context crosses the configured threshold, older messages are summarized into a long-term buffer while recent messages remain available in short-term context.
73
-
- [] AC5: `getContext()`returns a context payload that stays within `maxTokens` under deterministic tests, including cases with repeated long messages.
74
-
- [] AC6: Swap events are observable through a minimal event interface or callback hooks, including success and failure paths, without crashing the agent loop on summarization failure.
75
-
- [] AC7: The implementation preserves message role/content/metadata shape and never silently drops unsummarized content unless the configured summarizer explicitly returns a summary.
76
-
- [] AC8: The story does not alter existing `context-tracker`, `MemoryBridge`, or orchestration behavior except through additive exports or optional integration points.
77
-
- [] AC9: Documentation includes a usage example matching the issue intent and explains how to inject tokenizer/summarizer dependencies.
- [x] AC1: A new canonical `HierarchicalContextManager` API exists under the SYNAPSE/context runtime and is exported from the appropriate module surface.
71
+
- [x] AC2: The API supports at minimum `addMessage(message)`, `getContext()`, `getStats()` and `clear()` without requiring a live LLM provider.
72
+
- [x] AC3: Configuration supports `maxTokens`, `summarizationThreshold`, injected `tokenizer`, injected `summarizer`, and a safe fallback to the existing `estimateTokens()` utility.
73
+
- [x] AC4: When the active context crosses the configured threshold, older messages are summarized into a long-term buffer while recent messages remain available in short-term context.
74
+
- [x] AC5: `getContext()`returns a context payload that stays within `maxTokens` under deterministic tests, including cases with repeated long messages.
75
+
- [x] AC6: Swap events are observable through a minimal event interface or callback hooks, including success and failure paths, without crashing the agent loop on summarization failure.
76
+
- [x] AC7: The implementation preserves message role/content/metadata shape and never silently drops unsummarized content unless the configured summarizer explicitly returns a summary.
77
+
- [x] AC8: The story does not alter existing `context-tracker`, `MemoryBridge`, or orchestration behavior except through additive exports or optional integration points.
78
+
- [x] AC9: Documentation includes a usage example matching the issue intent and explains how to inject tokenizer/summarizer dependencies.
- Required remote checks passed for PR #706: Validation Summary, ESLint, TypeScript Type Checking and Jest on Node 18/20/22/24/25.
174
+
- CodeRabbit actionable comments were addressed before merge: serialized concurrent mutations, preserved long-term summary lineage under hard token limits, strengthened event/error assertions and aligned the test import with the configured absolute module alias.
175
+
- No deploy verification required because `deploy_type: none`.
161
176
162
177
## Dev Agent Record
163
178
@@ -171,6 +186,7 @@ If `tests/synapse/hierarchical-context-manager.test.js` lands under a different
171
186
- Validation completed: focused hierarchical test suite passed, adjacent SYNAPSE/orchestration suites passed, manifest validation passed, ESLint scoped check passed, repository lint passed with pre-existing warnings only, typecheck passed and full Jest suite passed.
172
187
- Story DoD self-assessment completed. Build command is N/A because `package.json` does not define `npm run build`. CodeRabbit PR loop is deferred until a PR exists; no local CodeRabbit script is defined in `package.json`.
173
188
- CodeRabbit follow-up addressed on PR #706: serialized concurrent `addMessage()` mutations, collapsed long-term summaries before hard-limit truncation, strengthened event/error tests and switched the test import to the configured absolute module alias.
189
+
- PR #706 was merged to `main` on 2026-05-08 with squash commit `d3f9e6fc9449c9f4797148754df2424660bcdc5d`.
174
190
175
191
### Agent Model Used
176
192
@@ -184,6 +200,7 @@ If `tests/synapse/hierarchical-context-manager.test.js` lands under a different
184
200
- Hard-limit truncation now compacts all long-term summaries before truncating the combined result, preserving source-message lineage.
185
201
- Documentation includes dependency-injection usage for tokenizer and summarizer.
186
202
- Story is ready for architecture/QA review.
203
+
- Story closure completed after merge; Epic 447 now has 1/1 stories done.
187
204
188
205
### File List
189
206
@@ -207,3 +224,4 @@ If `tests/synapse/hierarchical-context-manager.test.js` lands under a different
0 commit comments