完成 F1-5b 任务:
- T1 RuntimeContext unit 测试基础(36 case PASS,本地不入仓走 .gitignore:71)
- A1 admin_service.py 4 处 CURRENT_DATE → business_date 改造
- _get_range_stats / _get_7d_trend / _get_app_distribution
- 上下界双全(下界 - 6 days + 上界 < + 1 day,Step 4b 暴露原 PR
上界缺失,sandbox=4-20 时 trend_7d 漏 4-21~5-01 数据 → 修补)
- 全局聚合 list_trigger_jobs / get_budget 保留 CURRENT_DATE
(Neo D 决策选 A: 多 site 时全局无单一业务日)
- A2 fdw_queries:113 / 2552 异常分支兜底 + 三层 fallback + warning
- conn=None 也尝试 get_runtime_context(自开 conn)
- RuntimeContext 不可用降级真实 today + logger.warning
- A3 _fdw_context docstring 显式登记唯一 ETL 入口架构契约
(D2 完整且统一: 所有 ETL 视图查询通过 _fdw_context 自动 SET 三个
GUC: site_id / business_date / runtime_mode)
- 防御 hook post_edit_business_date_check.py
Wave 2 后续 PR 引回 CURRENT_DATE / date.today() 即提醒
双口径验证(§3.1 4a + 4b):
- 4a live: dashboard trend_7d 2 条 4-30~5-01 (真实今天)
- 4b sandbox=2026-04-20: trend_7d 1 条仅 4-20 (业务日上界生效硬证据)
- pytest test_runtime_context 36/36 全过
未完(下一批 Wave A): T2 integration / UI-1/2/4 / MP-3/5 / MP-1 / BE-1
F1-5b-tasks.md 新增 + audit 记录已就位
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
132 lines
3.1 KiB
JSON
132 lines
3.1 KiB
JSON
{
|
|
"permissions": {
|
|
"allow": [
|
|
"Bash(*)",
|
|
"mcp__pg-etl-test__execute_sql",
|
|
"mcp__pg-app-test__execute_sql",
|
|
"mcp__pg-app-test__list_schemas"
|
|
],
|
|
"additionalDirectories": [
|
|
"C:\\Users\\Administrator\\.claude"
|
|
]
|
|
},
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/session_start_context.py\"",
|
|
"timeout": 15,
|
|
"statusMessage": "加载项目状态..."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Read|Edit|Write|Glob",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/pre_read_archived_block.py\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Bash|Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/pre_demo_protect.py\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/post_edit_audit_reminder.py\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/post_edit_db_doc_sync.py\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/post_edit_rls_dual_schema.py\"",
|
|
"timeout": 10
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/post_edit_openapi_reminder.py\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/post_edit_prompt_sync_reminder.py\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/post_edit_business_date_check.py\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/stop_audit_check.py\"",
|
|
"timeout": 15
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "python \"$CLAUDE_PROJECT_DIR/.claude/hooks/stop_verify_check.py\"",
|
|
"timeout": 15
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|