From 73886f38f459694250374e6a5c891d2294917ddc Mon Sep 17 00:00:00 2001 From: Sergey Date: Sun, 11 Oct 2026 16:30:02 +0000 Subject: [PATCH] Auto-sync 2026-10-11 16:30:02 --- index.md | 2 +- reports/provenance-coverage.md | 10 +++---- reports/stale-pages.md | 2 +- sources/agents.md | 29 ++++++++++++++++--- sources/memory.md | 10 +++---- .../pg-boss-queue-ai-inference-worker.md | 17 +++++++++++ 6 files changed, 54 insertions(+), 16 deletions(-) diff --git a/index.md b/index.md index e44cea9..dc3ca71 100644 --- a/index.md +++ b/index.md @@ -4,7 +4,7 @@ - Render mode: `native` - Total pages: 143 -- Claims: 170 +- Claims: 171 - Sources: 99 - Entities: 11 - Concepts: 13 diff --git a/reports/provenance-coverage.md b/reports/provenance-coverage.md index ecc4d55..7ac8f9c 100644 --- a/reports/provenance-coverage.md +++ b/reports/provenance-coverage.md @@ -3,23 +3,23 @@ pageType: report id: report.provenance-coverage title: Provenance Coverage status: active -updatedAt: 2026-10-11T08:50:31.382Z +updatedAt: 2026-10-11T16:25:55.041Z --- # Provenance Coverage ## Generated -- Evidence entries: 205 +- Evidence entries: 207 - Claims missing evidence: 0 ### Evidence Classes -- source-file: 204 +- source-file: 206 - file: 1 ### Top Evidence Sources -- source.memory: 96 -- source.agents: 32 +- source.memory: 97 +- source.agents: 33 - source.bridge-workspace-4c6d747f-memory-2d62c497: 22 - source.user: 19 - source.embedding-trading: 14 diff --git a/reports/stale-pages.md b/reports/stale-pages.md index 267c8df..c5c60c3 100644 --- a/reports/stale-pages.md +++ b/reports/stale-pages.md @@ -3,7 +3,7 @@ pageType: report id: report.stale-pages title: Stale Pages status: active -updatedAt: 2026-10-11T08:41:40.948Z +updatedAt: 2026-10-11T16:25:55.041Z --- # Stale Pages diff --git a/sources/agents.md b/sources/agents.md index 08c7258..6ff44c0 100644 --- a/sources/agents.md +++ b/sources/agents.md @@ -4,8 +4,8 @@ id: source.agents title: AGENTS sourceType: local-file sourcePath: /home/owner/.openclaw/workspace/AGENTS.md -ingestedAt: 2026-10-09T19:41:53.125Z -updatedAt: 2026-10-09T19:41:53.125Z +ingestedAt: 2026-10-11T16:19:05.837Z +updatedAt: 2026-10-11T16:19:05.837Z status: active --- @@ -14,8 +14,8 @@ status: active ## Source - Type: `local-file` - Path: `/home/owner/.openclaw/workspace/AGENTS.md` -- Bytes: 34246 -- Updated: 2026-10-09T19:41:53.125Z +- Bytes: 36235 +- Updated: 2026-10-11T16:19:05.837Z ## Content ````text @@ -432,6 +432,26 @@ Reference: `skills/wiki-ingest/README.md` (downstream contract), AGENTS.md §15, --- +### 16.2 Background Automation Rules (Stage 4.1, 2026-10-11) + +**Scope:** all regular background tasks (cron/heartbeat) that spawn local model inference (skill review, wiki ingest, report preparation, etc.). + +**R1 — Direct inference ban from cron (hard):** +- Cron/heartbeat scripts MUST NOT launch local model inference directly for heavy background tasks: no direct Ollama HTTP calls from cron scripts, no direct `sessions_spawn` of heavy subagents as part of a periodic script. +- All such tasks MUST be registered as jobs in the pg-boss queue `background_automation` (skills/pgboss_queue); execution happens via a dedicated dispatcher/worker, not via cron itself. Cron keeps only the dispatch role: enqueue job (`send`) + check status (`check_task`). +- Exception: lightweight non-inference triggers and fast read-only checks (e.g. `wiki_ingest_check.py --trigger`) may stay in cron. + +**R2 — Mandatory queue registration:** +- Regular tasks `skill-collection-review` and `wiki-ingest` MUST be registered with queue `background_automation` with low priority `priority: 10` (pg-boss v12: jobs are fetched priority-desc — 10 = low; the queue never displaces higher-priority work). +- As of Stage 4.1 the rules are pinned in documentation and code only (queue name, types, payloads). Live migration of existing cron timers is FORBIDDEN — that is Stage 4.2+. + +**R3 — Payload structure (background_automation):** +- Required fields: `task_type` (string identifier: `skill_review_task` | `wiki_ingest_task`), `target_agent` (name of the subagent whose logs/skills are reviewed), `context_window_limit` (hard token limit for the inference, e.g. 4000 — OOM protection on large collections). +- Optional fields: `requested_at` (ISO timestamp), `source` (name/id of the cron job or system that enqueued the job). +- Templates: `skills/pgboss_queue/payloads/skill_review_task.json`, `skills/pgboss_queue/payloads/wiki_ingest_task.json`; queue contract — `skills/pgboss_queue/SKILL.md`. + +--- + # 17. Work Automation Rule (Actualized 2026-07-07) **Search & Booking Rules:** @@ -1333,6 +1353,7 @@ Add whatever helps you do your job. This is your cheat sheet. - [Concept: Routing](../concepts/Routing.md) - [Entity: Infrastructure](../entities/Infrastructure.md) - [Entity: OpenClaw](../entities/OpenClaw.md) +- [Pg-Boss Queue & AI Inference Worker](../syntheses/pg-boss-queue-ai-inference-worker.md) - [Synthesis: Agent Architecture](../syntheses/Agent-Architecture.md) - [Synthesis: Work Automation Rule (§17)](../syntheses/Work-Automation.md) diff --git a/sources/memory.md b/sources/memory.md index 55477d6..592ab0c 100644 --- a/sources/memory.md +++ b/sources/memory.md @@ -4,8 +4,8 @@ id: source.memory title: MEMORY sourceType: local-file sourcePath: /home/owner/.openclaw/workspace/MEMORY.md -ingestedAt: 2026-10-10T18:39:38.605Z -updatedAt: 2026-10-10T18:39:38.605Z +ingestedAt: 2026-10-11T16:19:15.913Z +updatedAt: 2026-10-11T16:19:15.913Z status: active --- @@ -14,8 +14,8 @@ status: active ## Source - Type: `local-file` - Path: `/home/owner/.openclaw/workspace/MEMORY.md` -- Bytes: 15057 -- Updated: 2026-10-10T18:39:38.605Z +- Bytes: 16531 +- Updated: 2026-10-11T16:19:15.913Z ## Content ```text @@ -55,7 +55,7 @@ status: active * **Личный автотранспорт / Гараж:** Данные машин и мотоциклов искать в папке `wiki/entities/transport/` (например, `ford-mondeo-4`). * **Cron configuration snapshot (verified 2026-10-05):** active — mail-check (15m; trigger v3 2026-10-05: прямой exec()+json() без legacy tools.call, счётчик ошибок IMAP в trigger.state; payload agentTurn timeout 900s), wiki-ingest-event (30m), wiki-ingest-backup (ежедневно 04:00 MSK), wiki-full-backup (ежедневно 05:00 MSK), hermes-stm-garbage-collector (ежедневно 03:15 MSK, hermes_cron_sweep.sh — единственный джоб памяти), searxng-weekly-update (вс 04:00), trash-cleanup (1-е число 06:00 MSK), skill-collection-review-main (7d). Legacy-джобы check-dreaming и dreaming-sweep (03:00) удалены 2026-09-09 по протоколу CRON CLEANUP. Перед изменением или диагностикой cron фактическое состояние system/user cron и OpenClaw automation state проверяется непосредственно в системе. * **Search Tool Priority:** web_search (SearXNG локально) → Tavily Search → Tavily Extract → Firecrawl. -* **Очередь длинных задач (pg-boss v12.37.1, внешняя PG 192.168.1.20:5432/openclaw_queue):** задачи >60с, схема pgboss (version=45); параметр-фиксация: expire=3600/retention=86400 (retry=3/delay=60); skill: skills/pgboss_queue (`node dist/index.js`; receipts → queue-receipts/); DSN = PG_CONNECTION_STRING в ~/.openclaw/.env (masked во всех выводах). AI Inference Worker (Stage-2, 2026-10-10): очередь llm_inference + резидент `node dist/worker.js` (ручной запуск, без daemon) → Ollama 192.168.1.200:11434, модель qwen3.8-27b-q5xl:latest, single-flight (batchSize:1+localConcurrency:1 = VRAM-guard); evaluator PASS 8/8. +* **Очередь длинных задач (pg-boss v12.37.1, внешняя PG 192.168.1.20:5432/openclaw_queue):** задачи >60с, схема pgboss (version=45); параметр-фиксация: expire=3600/retention=86400 (retry=3/delay=60); skill: skills/pgboss_queue (`node dist/index.js`; receipts → queue-receipts/); DSN: worker → `skills/pgboss_queue/.env.worker` (600, Stage-3.1), CLI → `~/.openclaw/.env` (значения masked во всех выводах). AI Inference Worker (Stage-2, 2026-10-10; final state 2026-10-11, MODERNIZATION-STAGE-1..3.3 завершён): systemd-сервис `openclaw-worker.service` (enabled+active, Restart=always, RestartSec=10s, After=docker.service — нативного PG-юнита нет) → `node dist/worker.js` (skills/pgboss_queue) → очередь `llm_inference` → Ollama 192.168.1.200:11434, модель qwen3.8-27b-q5xl:latest (num_ctx=8192), single-flight (batchSize:1+localConcurrency:1 = VRAM-guard); внешняя PG 192.168.1.20:5432, БД openclaw_queue, схема pgboss (pg-boss v12.37.1, version=45); DSN: worker → `skills/pgboss_queue/.env.worker` (600, Stage-3.1), CLI → `~/.openclaw/.env` (значения masked во всех выводах); resilience verified 2026-10-11 (SIGKILL → systemd авторестарт 10с, NRestarts-счётчик работает, статус: `systemctl is-active openclaw-worker` + `journalctl -u openclaw-worker`); evaluator: Stage-2 8/8, Stage-3.1 8/8, Stage-3.2 5/5, Final Acceptance (Preflight/Round Trip/Resilience/Security Log) + независимая read-only-проверка Resilience — PASS. **Stage 4.1 (2026-10-11, подготовка только, live-таймеры не мигрированы — это Stage 4.2+):** правила диспетчеризации — AGENTS.md §16.2 (запрет прямого инференса из cron; регулярные задачи `skill-collection-review` + `wiki-ingest` → очередь `background_automation`, `priority: 10`); имя очереди + типы задач + payload-шаблоны зафиксированы кодом в skills/pgboss_queue (index.ts + payloads/). * **OpenClaw Git Backup / Recovery:** канонический операционный документ — `OPENCLAW-GIT-BACKUP-RECOVERY.md`. Архитектура состоит из **трёх независимых Git-слоёв**: 1. **State Git** — `/home/owner/openclaw-backup/state-repo`, приватный Forgejo `Sergey/openclaw-clawpi-state`, native `openclaw backup git` с режимом `--all --include-secrets --push`, автоматический backup каждые 24 часа. Используется для операционного состояния OpenClaw и SQLite. diff --git a/syntheses/pg-boss-queue-ai-inference-worker.md b/syntheses/pg-boss-queue-ai-inference-worker.md index 037fac1..cd36d18 100644 --- a/syntheses/pg-boss-queue-ai-inference-worker.md +++ b/syntheses/pg-boss-queue-ai-inference-worker.md @@ -4,6 +4,7 @@ id: synthesis.pg-boss-queue-ai-inference-worker title: Pg-Boss Queue & AI Inference Worker sourceIds: - source.memory + - source.agents - source.bridge.workspace-4c6d747f.memory-2d62c497 claims: - text: "Очередь длинных задач (>60с): pg-boss v12.37.1 поверх внешней PostgreSQL @@ -95,6 +96,20 @@ claims: MSK MODERNIZATION-STAGE-3.2 — systemd unit (md5 b9a967294e1bfa0e38fbd63d85a71679), systemd-analyze verify exit 0, evaluator 5/5 PASS, деплой ждёт sudo-окно" + - text: "MODERNIZATION Stage 4.1 (2026-10-11, подготовка только, live-таймеры не мигрированы — это Stage 4.2+): правила диспетчеризации фоновых задач — AGENTS.md §16.2 (R1: запрет прямого инференса локальных моделей из cron/heartbeat; R2: регулярные задачи skill-collection-review + wiki-ingest → очередь background_automation, priority 10 (pg-boss v12: fetch priority-desc, 10 = low); R3: payload — task_type (skill_review_task | wiki_ingest_task), target_agent, context_window_limit (integer >0, cap 64000), opt. requested_at/source; шаблоны skills/pgboss_queue/payloads/); имя очереди + типы + зафиксированы в skills/pgboss_queue (index.ts const BACKGROUND_AUTOMATION_QUEUE/KNOWN_TASK_TYPES + pre-connection payload-валидация + SKILL.md); очередь в PG НЕ создавалась (создаётся в Stage 4.2+ через boss.createQueue — send её не авто-создаёт); evaluator PASS 5/5 + re-audit пост-дедуп PASS 5/5." + status: verified + confidence: 0.9 + evidence: + - kind: source-file + sourceId: source.memory + path: MEMORY.md + lines: "37" + note: "буллет pg-boss: «Stage 4.1 (2026-10-11, подготовка только, live-таймеры не мигрированы): правила §16.2; очередь/типы/шаблоны в skills/pgboss_queue»" + - kind: source-file + sourceId: source.agents + path: AGENTS.md + lines: "414-431" + note: "§16.2 Background Automation Rules (Stage 4.1): R1/R2/R3 дословно" confidence: 0.9 status: active updatedAt: 2026-10-11T08:50:29.027Z @@ -118,6 +133,7 @@ updatedAt: 2026-10-11T08:50:29.027Z - **systemd-юнит (Stage-3.2):** skills/pgboss_queue/openclaw-worker.service (md5 b9a967294e1bfa0e38fbd63d85a71679): Type=simple, User=owner, WorkingDirectory=/home/owner/.openclaw/workspace/skills/pgboss_queue, ExecStart=/usr/bin/node dist/worker.js, EnvironmentFile=…/.env.worker, Restart=always, RestartSec=10, UMask=0077, StandardOutput/Error=journal, After=docker.service (нативного PostgreSQL-юнита нет; PG = контейнер openclaw-postgres 0.0.0.0:5432, healthy, владелец docker.service); systemd-analyze verify exit 0. - **Деплой:** файл юнита только в workspace — деплой в /etc/systemd/system ждёт sudo-окно оператора (cp + daemon-reload + enable --now); /etc не тронут. - **Верификация:** evaluator Stage-2 8/8, Stage-3.1 8/8, Stage-3.2 5/5 PASS (read-only, без мутаций). +- **Stage 4.1 (2026-10-11, подготовка только):** правила диспетчеризации — AGENTS.md §16.2 (R1–R3: запрет прямого инференса из cron; skill-collection-review + wiki-ingest → pg-boss `background_automation`, priority 10; payload-контракт); имя очереди/типы/payloads зафиксированы в skills/pgboss_queue (код + SKILL.md); очередь в PG не создана, live-миграция таймеров = Stage 4.2+; evaluator 5/5 + re-audit пост-дедуп 5/5 PASS. ## Related - [[entities/Ollama]] — Ollama 192.168.1.200:11434 (цель inference worker) @@ -131,6 +147,7 @@ updatedAt: 2026-10-11T08:50:29.027Z ### Sources - [MEMORY](../sources/memory.md) +- [AGENTS](../sources/agents.md) - [Memory Bridge (main, coder-agent, evaluator-agent, humanizer-agent, setup-agent): MEMORY](../sources/bridge-workspace-4c6d747f-memory-2d62c497.md) ### Related Pages