feat(harness): freeze aci tool contracts

This commit is contained in:
zhuyongxin
2026-07-21 18:01:18 +08:00
parent 58c39107c5
commit 4274f3350b
32 changed files with 977 additions and 1 deletions
@@ -0,0 +1,26 @@
## 1. Shared ACI Contract
- [x] 1.1 Add stable snake_case Tool names and concise implementation-neutral descriptions for RAG, logs, and MySQL.
- [x] 1.2 Reuse and lock the independent invocation lifecycle and evidence result enums without adding a second Tool Call ID type.
- [x] 1.3 Add a shared defensive-copy helper for immutable Agent-facing list and row values.
## 2. RAG Contract
- [x] 2.1 Implement the RAG Request, Result, and document evidence records with the frozen snake_case fields.
- [x] 2.2 Add an independent RAG contract test covering exact JSON fields, framework ID preservation, immutability, and description leakage.
## 3. Log Contract
- [x] 3.1 Implement logical log Topic, source kind, Request, Result, Scope, Pattern, and Event records.
- [x] 3.2 Add an independent log contract test covering Mock provenance, scope/count semantics, exact JSON fields, immutability, and excluded infrastructure inputs.
## 4. MySQL Contract
- [x] 4.1 Implement the logical MySQL Request and bounded Result records with immutable params, columns, and rows.
- [x] 4.2 Add an independent MySQL contract test covering parameterized input, structured output, exact JSON fields, deep immutability, and secret/connection exclusion.
## 5. Verification
- [x] 5.1 Run the three ACI contract test classes together and confirm lifecycle/evidence status separation.
- [x] 5.2 Run the stage 0 Harness contract and existing RAG/log focused tests to prove the old runtime path remains unchanged.
- [x] 5.3 Verify references and diff scope show no changes to old Tool methods, Chat/AIOps registration, Controller, persistence, datasource, or public protocol.