docs: sync design doc event:view rename + OpenWolf session bookkeeping

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
lei.chen 2026-08-13 02:19:04 +00:00
parent 673f2eb792
commit e5b3c42ab3
5 changed files with 347 additions and 88 deletions

View file

@ -1,6 +1,6 @@
# anatomy.md # anatomy.md
> Auto-maintained by OpenWolf. Last scanned: 2026-08-04T05:49:57.570Z > Auto-maintained by OpenWolf. Last scanned: 2026-08-07T08:56:49.576Z
> Files: 845 tracked | Anatomy hits: 0 | Misses: 0 > Files: 845 tracked | Anatomy hits: 0 | Misses: 0
## ../../../../../../tmp/claude-1000/ ## ../../../../../../tmp/claude-1000/
@ -114,7 +114,7 @@
- `.clang-format` (~226 tok) - `.clang-format` (~226 tok)
- `.gitignore` — Git ignore rules (~217 tok) - `.gitignore` — Git ignore rules (~217 tok)
- `.mcp.json` (~7 tok) - `.mcp.json` (~86 tok)
- `.opencode.json` (~7 tok) - `.opencode.json` (~7 tok)
- `CLAUDE.md` — OpenWolf (~1400 tok) - `CLAUDE.md` — OpenWolf (~1400 tok)
- `codegraph.html` — CodeGraph - Interactive Visualization (~13864 tok) - `codegraph.html` — CodeGraph - Interactive Visualization (~13864 tok)

View file

@ -1,84 +1,12 @@
{ {
"session_id": "session-2026-08-03-0843", "session_id": "session-2026-08-13-0213",
"started": "2026-08-03T08:43:53.877Z", "started": "2026-08-13T02:13:41.065Z",
"files_read": { "files_read": {},
"/home/lchen/code/xce/.mcp.json": { "files_written": [],
"count": 1, "edit_counts": {},
"tokens": 7, "anatomy_hits": 0,
"first_read": "2026-08-03T08:44:41.511Z"
},
"/home/lchen/code/xce/src/configs/hosts.yaml": {
"count": 1,
"tokens": 248,
"first_read": "2026-08-03T08:44:41.714Z"
}
},
"files_written": [
{
"file": "/tmp/frpcdbg_mon.sh",
"action": "create",
"tokens": 268,
"at": "2026-08-04T01:37:20.418Z"
},
{
"file": "/tmp/frpc_prod.toml",
"action": "create",
"tokens": 100,
"at": "2026-08-04T02:10:17.877Z"
},
{
"file": "/tmp/frpc_mon.sh",
"action": "create",
"tokens": 291,
"at": "2026-08-04T02:10:21.788Z"
},
{
"file": "/tmp/frpc_prod.toml",
"action": "create",
"tokens": 101,
"at": "2026-08-04T02:10:59.756Z"
},
{
"file": "/tmp/frpc_mon.sh",
"action": "create",
"tokens": 292,
"at": "2026-08-04T02:11:01.550Z"
},
{
"file": "/tmp/frpc_mon.sh",
"action": "edit",
"tokens": 5,
"at": "2026-08-04T02:11:33.854Z"
},
{
"file": "/tmp/frpc_mon.sh",
"action": "edit",
"tokens": 22,
"at": "2026-08-04T02:16:46.011Z"
},
{
"file": "/tmp/frpc_watchdog.sh",
"action": "create",
"tokens": 523,
"at": "2026-08-04T02:52:22.852Z"
},
{
"file": "/tmp/frpc-watchdog.sh",
"action": "create",
"tokens": 362,
"at": "2026-08-04T05:49:57.595Z"
}
],
"edit_counts": {
"../../../../tmp/frpcdbg_mon.sh": 1,
"../../../../tmp/frpc_prod.toml": 2,
"../../../../tmp/frpc_mon.sh": 4,
"../../../../tmp/frpc_watchdog.sh": 1,
"../../../../tmp/frpc-watchdog.sh": 1
},
"anatomy_hits": 2,
"anatomy_misses": 0, "anatomy_misses": 0,
"repeated_reads_warned": 0, "repeated_reads_warned": 0,
"cerebrum_warnings": 0, "cerebrum_warnings": 0,
"stop_count": 14 "stop_count": 2
} }

View file

@ -7381,3 +7381,18 @@
| 09:01 | Session end: 10 writes across 6 files (frpcdbg_mon.sh, frpc_prod.toml, frpc_mon.sh, frpc_watchdog.sh, frpc-watchdog.sh) | 2 reads | ~2247 tok | | 09:01 | Session end: 10 writes across 6 files (frpcdbg_mon.sh, frpc_prod.toml, frpc_mon.sh, frpc_watchdog.sh, frpc-watchdog.sh) | 2 reads | ~2247 tok |
| 03:2x | Merged js branch sched.c NULL guard (commit 5657fca); fixed bug-1510 scheduler dispatch-fail re-PEND (commit 6928f74) | src/controller/sched.c, src/scheduler/{src,include,testsuite} | verified full job lifecycle on t1 cluster (job PEND->RUN->EXIT, all daemons healthy, 0 ASAN) | ~120k tok | | 03:2x | Merged js branch sched.c NULL guard (commit 5657fca); fixed bug-1510 scheduler dispatch-fail re-PEND (commit 6928f74) | src/controller/sched.c, src/scheduler/{src,include,testsuite} | verified full job lifecycle on t1 cluster (job PEND->RUN->EXIT, all daemons healthy, 0 ASAN) | ~120k tok |
| 06:1x | Fixed bug-1494 sub-2: scheduler kept stale slots=0 after worker rejoin (key_add EEXIST dropped fresh worker); fixed sched_update_workers in-place update (commit 1a2bd3f), verified jobs dispatch after worker rejoin | src/scheduler/src/scheduler.c | verified on t1 (worker dead->rejoin slots 0->8, PEND jobs dispatch, no ASAN) | ~150k tok | | 06:1x | Fixed bug-1494 sub-2: scheduler kept stale slots=0 after worker rejoin (key_add EEXIST dropped fresh worker); fixed sched_update_workers in-place update (commit 1a2bd3f), verified jobs dispatch after worker rejoin | src/scheduler/src/scheduler.c | verified on t1 (worker dead->rejoin slots 0->8, PEND jobs dispatch, no ASAN) | ~150k tok |
## Session: 2026-08-13 01:43
| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
## Session: 2026-08-13 01:44
| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
## Session: 2026-08-13 02:13
| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|

View file

@ -2,14 +2,14 @@
"version": 1, "version": 1,
"created_at": "2026-05-21T04:35:43.577Z", "created_at": "2026-05-21T04:35:43.577Z",
"lifetime": { "lifetime": {
"total_tokens_estimated": 318128677, "total_tokens_estimated": 318137665,
"total_reads": 36491, "total_reads": 36499,
"total_writes": 57113, "total_writes": 57153,
"total_sessions": 268, "total_sessions": 271,
"anatomy_hits": 23942, "anatomy_hits": 23950,
"anatomy_misses": 11632, "anatomy_misses": 11632,
"repeated_reads_blocked": 101297, "repeated_reads_blocked": 101297,
"estimated_savings_vs_bare_cli": 2665446615 "estimated_savings_vs_bare_cli": 2665448215
}, },
"sessions": [ "sessions": [
{ {
@ -532345,6 +532345,322 @@
"repeated_reads_blocked": 0, "repeated_reads_blocked": 0,
"anatomy_lookups": 2 "anatomy_lookups": 2
} }
},
{
"id": "session-2026-08-03-0843",
"started": "2026-08-03T08:43:53.877Z",
"ended": "2026-08-07T08:57:08.593Z",
"reads": [
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 7,
"was_repeated": false,
"anatomy_had_description": false
},
{
"file": "/home/lchen/code/xce/src/configs/hosts.yaml",
"tokens_estimated": 248,
"was_repeated": false,
"anatomy_had_description": false
}
],
"writes": [
{
"file": "/tmp/frpcdbg_mon.sh",
"tokens_estimated": 268,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 100,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 291,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 101,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 292,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 5,
"action": "edit"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 22,
"action": "edit"
},
{
"file": "/tmp/frpc_watchdog.sh",
"tokens_estimated": 523,
"action": "create"
},
{
"file": "/tmp/frpc-watchdog.sh",
"tokens_estimated": 362,
"action": "create"
},
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 28,
"action": "edit"
}
],
"totals": {
"input_tokens_estimated": 255,
"output_tokens_estimated": 1992,
"reads_count": 2,
"writes_count": 10,
"repeated_reads_blocked": 0,
"anatomy_lookups": 2
}
},
{
"id": "session-2026-08-03-0843",
"started": "2026-08-03T08:43:53.877Z",
"ended": "2026-08-07T08:59:00.227Z",
"reads": [
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 7,
"was_repeated": false,
"anatomy_had_description": false
},
{
"file": "/home/lchen/code/xce/src/configs/hosts.yaml",
"tokens_estimated": 248,
"was_repeated": false,
"anatomy_had_description": false
}
],
"writes": [
{
"file": "/tmp/frpcdbg_mon.sh",
"tokens_estimated": 268,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 100,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 291,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 101,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 292,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 5,
"action": "edit"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 22,
"action": "edit"
},
{
"file": "/tmp/frpc_watchdog.sh",
"tokens_estimated": 523,
"action": "create"
},
{
"file": "/tmp/frpc-watchdog.sh",
"tokens_estimated": 362,
"action": "create"
},
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 28,
"action": "edit"
}
],
"totals": {
"input_tokens_estimated": 255,
"output_tokens_estimated": 1992,
"reads_count": 2,
"writes_count": 10,
"repeated_reads_blocked": 0,
"anatomy_lookups": 2
}
},
{
"id": "session-2026-08-03-0843",
"started": "2026-08-03T08:43:53.877Z",
"ended": "2026-08-07T09:00:50.580Z",
"reads": [
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 7,
"was_repeated": false,
"anatomy_had_description": false
},
{
"file": "/home/lchen/code/xce/src/configs/hosts.yaml",
"tokens_estimated": 248,
"was_repeated": false,
"anatomy_had_description": false
}
],
"writes": [
{
"file": "/tmp/frpcdbg_mon.sh",
"tokens_estimated": 268,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 100,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 291,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 101,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 292,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 5,
"action": "edit"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 22,
"action": "edit"
},
{
"file": "/tmp/frpc_watchdog.sh",
"tokens_estimated": 523,
"action": "create"
},
{
"file": "/tmp/frpc-watchdog.sh",
"tokens_estimated": 362,
"action": "create"
},
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 28,
"action": "edit"
}
],
"totals": {
"input_tokens_estimated": 255,
"output_tokens_estimated": 1992,
"reads_count": 2,
"writes_count": 10,
"repeated_reads_blocked": 0,
"anatomy_lookups": 2
}
},
{
"id": "session-2026-08-03-0843",
"started": "2026-08-03T08:43:53.877Z",
"ended": "2026-08-07T09:01:13.494Z",
"reads": [
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 7,
"was_repeated": false,
"anatomy_had_description": false
},
{
"file": "/home/lchen/code/xce/src/configs/hosts.yaml",
"tokens_estimated": 248,
"was_repeated": false,
"anatomy_had_description": false
}
],
"writes": [
{
"file": "/tmp/frpcdbg_mon.sh",
"tokens_estimated": 268,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 100,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 291,
"action": "create"
},
{
"file": "/tmp/frpc_prod.toml",
"tokens_estimated": 101,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 292,
"action": "create"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 5,
"action": "edit"
},
{
"file": "/tmp/frpc_mon.sh",
"tokens_estimated": 22,
"action": "edit"
},
{
"file": "/tmp/frpc_watchdog.sh",
"tokens_estimated": 523,
"action": "create"
},
{
"file": "/tmp/frpc-watchdog.sh",
"tokens_estimated": 362,
"action": "create"
},
{
"file": "/home/lchen/code/xce/.mcp.json",
"tokens_estimated": 28,
"action": "edit"
}
],
"totals": {
"input_tokens_estimated": 255,
"output_tokens_estimated": 1992,
"reads_count": 2,
"writes_count": 10,
"repeated_reads_blocked": 0,
"anatomy_lookups": 2
}
} }
], ],
"daemon_usage": [], "daemon_usage": [],

View file

@ -318,7 +318,7 @@ C Controller ──OPCode_push──→ apiserver ──SSE──→ mcp-server
|------|--------|------| |------|--------|------|
| apiserver 加 SSE endpoint + EventBroker | 1 天 | `controllers/events.go`(新建)| | apiserver 加 SSE endpoint + EventBroker | 1 天 | `controllers/events.go`(新建)|
| NotificationHandler → Broker 转发 | 0.5 天 | `handler.go` 加 publish | | NotificationHandler → Broker 转发 | 0.5 天 | `handler.go` 加 publish |
| RBAC `event:subscribe` 权限 | 0.5 天 | `config/rbac.yaml` + middleware | | RBAC `event:view` 权限 | 0.5 天 | `config/rbac.yaml` + middleware |
| schedulerclient 加 `WatchJobs()` | 0.5 天 | `httpclient.go` SSE 解析 | | schedulerclient 加 `WatchJobs()` | 0.5 天 | `httpclient.go` SSE 解析 |
| mcp-server 集成 | 0.5 天 | Agent 工作流:提交→监控→自动处理 | | mcp-server 集成 | 0.5 天 | Agent 工作流:提交→监控→自动处理 |