Qiao-yq opened a new pull request, #1615:
URL: https://github.com/apache/dubbo-admin/pull/1615

   **Please provide a description of this PR:**
   
   Draft. This PR is blocked by and must be merged after 
[#1611](https://github.com/apache/dubbo-admin/pull/1611) (structured 
conversation summaries and bounded recovery) and its prerequisites. Merge 
order: #1596 → #1608 → #1609 → #1610 → #1611 → this PR. Complete the Phase 1 
prerequisites and G1 acceptance before merging this production integration. 
After the prerequisite PRs merge, update this branch against `ai` and rerun 
validation before merging.
   
   Add explicit user-scoped Memory management and dependency-aware context 
injection for #1539.
   
   Users can explicitly save preferences, project background, and diagnostic 
constraints for reuse across sessions. The Compiler recalls matching records 
within independent item, byte, and token budgets. Updating, clearing, 
disabling, or removing a source invalidates dependent context without rewriting 
canonical history.
   
   - add shared Memory identity and mutation rules, bounded per-user ledgers, 
and Memory/GORM implementations with ownership isolation, 
generation/state/version checks, quota accounting, and source-session lifecycle 
handling
   - account record content separately from per-user control state so disabling 
does not consume a shared tenant byte reserve; rebuild persistent accounting 
during migration
   - expose Memory CRUD, clear, and settings endpoints with strict request 
validation and consistent inaccessible-source errors
   - validate explicit project/task matching context through a server-owned 
project catalog; retain legacy chat request hashes when matching context is 
empty
   - inject Memory as untrusted evidence with independent budgets and 
default-off configuration
   - propagate dependencies through selected history, tool batches, recovery, 
and summaries; filter invalid temporary views and perform bounded reselection, 
including recovery batches, after concurrent invalidation
   - add shared backend contracts, compiler and HTTP tests, provider fixtures, 
OpenAPI, JSON schemas, and operator documentation
   
   Compatibility: Memory injection is disabled by default and skipped in 
Compiler `minimal` mode. GORM adds a bounded user-ledger table and recomputes 
content-byte accounting. The project catalog is a transitional integration; 
production instances must use consistent configuration. The legacy raw-history 
tool is excluded from ReAct's compiled tools because it does not carry 
transitive Memory dependencies. Read-only Memory remains advisory context 
rather than a tool authorization mechanism.
   
   UI controls, automatic extraction, semantic retrieval, and automatic 
expired-record reclamation remain outside this PR. Expired records are not 
recalled but retain bounded storage until deletion or clear. This does not 
complete #1539 or declare full production database acceptance. The three local 
planning documents are not included.
   
   While the dependencies are open, GitHub's comparison against `ai` includes 
their changes. Review this PR's three functional commits on top of #1611 
[here](https://github.com/Qiao-yq/dubbo-admin/compare/2ffbfaa...feat/ai-1539-explicit-memory).
   
   Validation from `ai/`:
   
   - `go test ./... -count=1` — passed
   - `go test ./store/...` — passed
   - `go test ./component/agent/react -count=1` — passed
   - `git diff --check` — passed
   
   GORM tests use SQLite. An optional MySQL test uses `AI_TEST_MYSQL_DSN` and 
forces `clientFoundRows=false`; it was not run against a real MySQL server. 
Production MySQL/PostgreSQL migration and multi-connection concurrency 
acceptance remain unverified for this submission. Provider tests use local HTTP 
fixtures rather than real models.
   
   Part of #1539. Blocked by #1611 and its prerequisite PRs; do not merge 
before them.
   
   **To help us figure out who should review this PR, please put an X in all 
the areas that this PR affects.**
   
   - [x] Docs
   - [x] Installation
   - [ ] User Experience
   - [ ] Dubboctl
   - [ ] Console
   - [x] Core Component
   
   **Please check any characteristics that apply to this pull request.**
   
   - [x] Includes tests
   - [x] Changes security-sensitive behavior
   - [x] Adds database tables and migration
   - [x] Adds default-off Agent configuration
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to