feat: stabilize category rule operations

approve dcy-001 and add REQ/BAT evidence

pass selected DB path through Streamlit rule actions

expose delete_category_rule MCP tool

add category rule deletion regression
This commit is contained in:
Jarca
2026-06-27 00:02:06 +09:00
parent 97115f6acf
commit 0f881b245f
12 changed files with 459 additions and 5 deletions
+3 -3
View File
@@ -825,12 +825,12 @@ def page_rules(db_path: str) -> None:
c1, c2, c3 = st.columns(3)
if c1.button("기본 규칙 seed/update"):
res = service.seed_default_category_rules()
res = service.seed_default_category_rules(db_path=db_path)
clear_cache(); st.success(res)
if c2.button("규칙 preview"):
st.session_state["rule_preview"] = service.preview_categorization(limit=5000)
st.session_state["rule_preview"] = service.preview_categorization(limit=5000, db_path=db_path)
if c3.button("규칙 적용"):
res = service.apply_categorization_rules(limit=5000)
res = service.apply_categorization_rules(limit=5000, db_path=db_path)
clear_cache(); st.success(f"{res.get('applied_count', 0)}건 적용")
if "rule_preview" in st.session_state:
prev = st.session_state["rule_preview"]