fix: schema drifts, RLS policies, wiki plugin, agent_loop syntax, test imports, frontend error handling
Check Cross-Plugin Imports / check (push) Has been cancelled

- Migration 0135: Fix 3 VARCHAR length drifts + 2 missing tables (forgejo_reported_errors, pgp_keys)
- Migration 0136: Fix 8 RLS policies referencing app.tenant_id instead of app.current_tenant_id
- wiki/__init__.py: Import WikiPlugin for discover_builtins()
- wiki/plugin.py: Fix SyntaxError (unterminated triple-quoted string)
- agent_loop.py: Fix SyntaxError (stray n character in dict)
- test_p1_6_dms_streaming.py: Fix import (CHUNK_SIZE removed, use _sanitize_filename only)
- conftest.py: Use create_all only (alembic conflicts with create_all in tests)
- frontend errorTypes.ts: asError() now handles nested detail objects
- AGENTS.md: Sub-agents forbidden in this project
- DAMAGE_REPORT.md + SCHEMA_DRIFTS.md: Complete damage assessment
- scripts/schema_drift_check.py: Schema drift checker tool

Tests: 24/24 Phase J + 12/12 Phase K = 36/36 passed
tsc: 0 errors
Frontend build: successful
This commit is contained in:
Agent Zero
2026-08-21 10:02:50 +02:00
parent 4e1a414b05
commit a614ab337b
11 changed files with 716 additions and 34 deletions
+1 -1
View File
@@ -423,7 +423,7 @@ async def run_react_loop(
{
"block_type": "approval_request",
"block_data": {
n "title": f"Approval: {tool_name}",
"title": f"Approval: {tool_name}",
"description": f"Agent wants to execute tool '{tool_name}' with arguments: {json.dumps(args)[:300]}",
"approval_id": str(approval.id),
"status": "pending",
+5
View File
@@ -0,0 +1,5 @@
"""Wiki plugin — categories, articles, markdown editor, version history."""
from app.plugins.builtins.wiki.plugin import WikiPlugin
__all__ = ["WikiPlugin"]
+7 -2
View File
@@ -1,4 +1,4 @@
"""Wiki plugin knowledge articles, categories, versioning (H-WIKI, H-VER).""
"""Wiki plugin - knowledge articles, categories, versioning."""
from __future__ import annotations
import logging
from app.plugins.base import BasePlugin
@@ -6,6 +6,7 @@ from app.plugins.manifest import FrontendMenuItem, FrontendPageRoute, PluginMani
logger = logging.getLogger(__name__)
class WikiPlugin(BasePlugin):
manifest = PluginManifest(
name="wiki",
@@ -22,7 +23,6 @@ class WikiPlugin(BasePlugin):
)
async def on_activate(self, db, service_container, event_bus) -> None:
"""Register wiki search provider on activation."""
await super().on_activate(db, service_container, event_bus)
try:
from app.plugins.builtins.unified_search.provider_registry import get_search_registry
@@ -32,3 +32,8 @@ class WikiPlugin(BasePlugin):
logger.info("Registered WikiSearchProvider")
except Exception:
logger.exception("Failed to register WikiSearchProvider")
async def on_deactivate(self, db, service_container, event_bus) -> None:
from app.core.hooks import unregister_actions_by_owner
unregister_actions_by_owner("wiki")
await super().on_deactivate(db, service_container, event_bus)