|
|
@@ -15,12 +15,14 @@
|
|
|
|
|
|
- `product_documents/抖音游走策略/douyin_walk_strategy.v1.json` 有 edge -> rule pack binding。
|
|
|
- binding 来源是 `WalkStrategyStore.load_walk_strategy()["walk_rule_pack_binding"]`,不是 policy bundle 主体。
|
|
|
+- `walk_rule_pack_binding` 当前只有 6 条边(video_to_author、author_to_works、video_to_hashtag、hashtag_to_query、query_next_page、budget_downgrade),没有 `path_stop`、`decision_to_asset` 条目。
|
|
|
- `walk_engine.py` 当前不读取 binding。
|
|
|
- `_walk_action()` 当前没有 `rule_pack_id` 参数。
|
|
|
- DB run `v1_run_faaf9a1d0ad6` 中 `query_next_page` / `author_to_works` 的 `rule_pack_id` 是 NULL,`path_stop` 错挂 Content 包,不能说明 Path 包真的执行过。
|
|
|
|
|
|
## 修改范围
|
|
|
|
|
|
+- `product_documents/抖音游走策略/douyin_walk_strategy.v1.json`(仅 `walk_rule_pack_binding` 增补 `path_stop`、`decision_to_asset` 两条 binding,不改其他 section)
|
|
|
- `content_agent/business_modules/walk_engine.py`
|
|
|
- `content_agent/integrations/walk_strategy_json.py`
|
|
|
- `tests/test_walk_actions_runtime.py`
|
|
|
@@ -54,7 +56,7 @@
|
|
|
"rule_pack_binding": {
|
|
|
"edge_id": "author_to_works",
|
|
|
"target_entity": "Budget",
|
|
|
- "dispatch_policy": "future"
|
|
|
+ "dispatch_policy": "advisory"
|
|
|
},
|
|
|
"rule_pack_execution": {
|
|
|
"executed": false,
|
|
|
@@ -69,7 +71,7 @@
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
- "rule_pack_id": "douyin_path_observe_rule_pack_v1",
|
|
|
+ "rule_pack_id": "douyin_path_stop_rule_pack_v1",
|
|
|
"raw_payload": {
|
|
|
"rule_pack_execution": {
|
|
|
"executed": true,
|
|
|
@@ -84,16 +86,20 @@
|
|
|
|
|
|
## 施工步骤
|
|
|
|
|
|
-1. 在游走入口加载 walk strategy 后,构建 `_binding_by_edge_id(walk_strategy)`。
|
|
|
-2. `_binding_by_edge_id(...)` 只读取 `walk_strategy["walk_rule_pack_binding"]`。
|
|
|
-3. `_resolve_edge_binding(edge_id, walk_strategy)` 返回 binding 明细;未知 edge 返回空 binding 和 reason `edge_binding_missing`。
|
|
|
-4. `_walk_action(...)` 接收 binding 和 execution record。
|
|
|
-5. `_walk_action(...)` 顶层写 `rule_pack_id=binding.rule_pack_id`。
|
|
|
-6. future 包未启用时写:
|
|
|
+1. 在 `douyin_walk_strategy.v1.json` 的 `walk_rule_pack_binding` 增补两条 binding(仅此两条;`budget_downgrade` 已有条目不动):
|
|
|
+ - `path_stop` → `target_entity="Path"`、`rule_pack_id="douyin_path_stop_rule_pack_v1"`、`rule_pack_version="1.0.0"`、`required=false`、`dispatch_policy="advisory"`。
|
|
|
+ - `decision_to_asset` → `target_entity="Content"`、`rule_pack_id="douyin_content_discovery_rule_pack_v1"`、`rule_pack_version="1.0.0"`、`required=false`、`dispatch_policy="advisory"`。
|
|
|
+ 增补后跑 `uv run python scripts/validate_walk_strategy_config.py` 确认配置合法。
|
|
|
+2. 在游走入口加载 walk strategy 后,构建 `_binding_by_edge_id(walk_strategy)`。
|
|
|
+3. `_binding_by_edge_id(...)` 只读取 `walk_strategy["walk_rule_pack_binding"]`。
|
|
|
+4. `_resolve_edge_binding(edge_id, walk_strategy)` 返回 binding 明细;未知 edge 返回空 binding 和 reason `edge_binding_missing`。
|
|
|
+5. `_walk_action(...)` 接收 binding 和 execution record。
|
|
|
+6. `_walk_action(...)` 顶层写 `rule_pack_id=binding.rule_pack_id`。
|
|
|
+7. future 包未启用时写:
|
|
|
- `executed=false`
|
|
|
- `executed_rule_pack_id=null`
|
|
|
- `reason="future_pack_not_enabled"`
|
|
|
-7. 复用 Content decision 作为游走 gate 时写:
|
|
|
+8. 复用 Content decision 作为游走 gate 时写:
|
|
|
- `executed=true`
|
|
|
- `executed_rule_pack_id="douyin_content_discovery_rule_pack_v1"`
|
|
|
- `reason="content_decision_reused_for_walk_gate"`
|