Fix prewarm prompt preview staleness (cache + Admin wait)

Include skill_role_binding store JSON in executor and manager prompt cache signatures so skill catalog updates after binding edits without restart. Admin async prewarm now polls prewarm/status until not running before router() so parallel prompts fetch matches completed warm.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-11 16:24:33 +08:00
parent 4dbb834c95
commit c33ca303a2
4 changed files with 84 additions and 2 deletions

View file

@ -9,6 +9,7 @@ from oclaw.platform.persistence.sqlite_store import SqliteStore
from oclaw.runtime.agent_context import build_role_system_context
from oclaw.runtime.agents.specialists import discover_specialist_ids
from oclaw.runtime.direct_loop import tool_wire_freeze_status, warm_tool_wire_cache
from oclaw.runtime.skill_role_binding import SKILL_ROLE_BINDING_KEY
from oclaw.runtime.system_prompt import get_executor_prompt_static, warm_executor_prompt_cache
from oclaw.runtime.tools.catalog import default_registry
from oclaw.runtime.workspaces.experts import expert_workspace_signature_token, list_experts
@ -36,6 +37,7 @@ def _manager_settings_signature(store: Any) -> tuple[str, ...]:
"AIA_SKILL_DISABLED_NAMES",
"AIA_SKILL_ROLE_BINDING_ENABLED",
"AIA_SKILL_ROLE_BINDING_MANAGER_INHERIT",
SKILL_ROLE_BINDING_KEY,
"AIA_CHAT_SPECIALIST_FLAGS_JSON",
)
parts: list[str] = []

View file

@ -8,6 +8,7 @@ from typing import Any
from oclaw.platform.config.paths import PROJECT_ROOT
from oclaw.runtime.memory_stage import render_memory_context_block
from oclaw.runtime.project_context_prompt import build_project_context_block
from oclaw.runtime.skill_role_binding import SKILL_ROLE_BINDING_KEY
from oclaw.runtime.skills_prompt import build_skills_catalog_block
from oclaw.runtime.skills_workspace_lane import (
fs_safe_workspace_lane_segment,
@ -83,6 +84,7 @@ def _executor_prompt_settings_signature(store: Any) -> tuple[str, ...]:
"AIA_SKILL_DISABLED_NAMES",
"AIA_SKILL_ROLE_BINDING_ENABLED",
"AIA_SKILL_ROLE_BINDING_MANAGER_INHERIT",
SKILL_ROLE_BINDING_KEY,
"AIA_PROJECT_CONTEXT_MAX_FILE_CHARS",
"AIA_PROJECT_CONTEXT_MAX_TOTAL_CHARS",
)