feat: 会话编排建材化+阿语号码转ASCII+12小时话术跨层同步
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""Red-line: `context` injection must be CONDITIONAL + WHITELIST only.
|
||||
|
||||
- No `context` passed -> `raw_info` stays `{}` (widget WS path unchanged).
|
||||
- `context` passed -> only `vehicle_name`/`vehicle_id` map to `app_*`.
|
||||
- `context` passed -> only `product_name`/`product_id` map to `app_*`.
|
||||
"""
|
||||
from sqlalchemy import select
|
||||
|
||||
@@ -33,13 +33,13 @@ async def test_context_seeds_whitelist_only(async_db):
|
||||
mgr = ConversationManager(db)
|
||||
conv = await mgr.create_conversation(
|
||||
context={
|
||||
"vehicle_name": "Tesla Model Y",
|
||||
"vehicle_id": "v123",
|
||||
"product_name": "HDPE PE100 Pipe DN110",
|
||||
"product_id": "p123",
|
||||
"evil_key": "should_be_ignored",
|
||||
}
|
||||
)
|
||||
raw = await _raw_info_for(async_db, conv.id)
|
||||
assert raw == {
|
||||
"app_vehicle_name": "Tesla Model Y",
|
||||
"app_vehicle_id": "v123",
|
||||
"app_product_name": "HDPE PE100 Pipe DN110",
|
||||
"app_product_id": "p123",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user