docs(scheduler-agent): update design doc with cluster verification results
- Design doc v1.2: Phase 0-1 cluster verification status (read + submit OK, control HTTP 500 open bug-1490), bug table for whitelist/job_status fixes, mcp_operator queue:control note. - Root + frontend CLAUDE.md: reflect verified state and apiserver bugs found. - wolf memory/anatomy/buglog: log deployment session, bug-1489/bug-1490. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e36ed63ca0
commit
9fe14c1512
6 changed files with 135 additions and 30 deletions
|
|
@ -1199,6 +1199,25 @@
|
|||
## src/frontend/apiserver/config/
|
||||
|
||||
- `auth.yaml` — Authentication provider: config_file | pam | ldap | oauth2 (~187 tok)
|
||||
- `rbac.yaml` — Roles/permissions; includes mcp_readonly (Phase 0) + mcp_operator (Phase 1, queue:submit + job:control) (~1.4k tok)
|
||||
|
||||
## src/frontend/schedulerclient/
|
||||
|
||||
- `client.go` — Client interface: 6 read + 4 write (SubmitJob/CancelJob/HoldJob/ReleaseJob) methods (~0.5k tok)
|
||||
- `types.go` — URM types (URMJob/URMQueue/URMNode/JobFilter/LogOpts/Page/Metrics) (~1k tok)
|
||||
- `httpclient.go` — resty v3 read implementation (GET, apiEnvelope, mbToBytes=1e6) (~3.5k tok)
|
||||
- `write.go` — Phase 1: JobSpec, SubmitJobResult, JobControlRequest, doPost (HTTP 200 + envelope-code), SubmitJob/Cancel/Hold/Release impl (~3k tok)
|
||||
- `statusmap.go` — Status string → URM mapping functions (~0.9k tok)
|
||||
- `write_test.go` — httptest TDD for write paths (~2.5k tok)
|
||||
- `statusmap_test.go` — Table-driven status mapping tests (~0.9k tok)
|
||||
|
||||
## src/frontend/mcp-server/
|
||||
|
||||
- `cmd/main.go` — MCP stdio entry; registers 10 tools (6 read + 4 write), env XCE_API_URL/XCE_API_KEY (~2k tok)
|
||||
- `internal/app.go` — Tool handlers wiring schedulerclient (read + write) (~3k tok)
|
||||
- `internal/templates.go` — JobTemplate registry + general_serial (通用串行脚本) + parseMemoryToBytes/parseWalltimeSeconds (~3k tok)
|
||||
- `internal/app_test.go` — fake-client handler TDD (~2.5k tok)
|
||||
- `internal/templates_test.go` — Template/registry/parser TDD (~2k tok)
|
||||
|
||||
## src/frontend/xcecli/cmd/auth/
|
||||
|
||||
|
|
|
|||
|
|
@ -14507,5 +14507,42 @@
|
|||
],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-08-01T03:30:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-1489",
|
||||
"timestamp": "2026-08-01",
|
||||
"error_message": "POST /xce/v1/apikeys -> 403 \"URL is not allowed\": WhitelistURLMiddleware blocks it",
|
||||
"file": "src/frontend/apiserver/middleware/whitelist.go",
|
||||
"root_cause": "Phase 0 added apikeys route (routers.go:82) but never added /xce/v1/apikeys to WhitelistPOSTURL, so the URL whitelist middleware rejects it before RBAC",
|
||||
"fix": "Added \"/xce/v1/apikeys\" to WhitelistPOSTURL in whitelist.go",
|
||||
"tags": [
|
||||
"apiserver",
|
||||
"whitelist",
|
||||
"apikeys",
|
||||
"phase0"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-08-01"
|
||||
},
|
||||
{
|
||||
"id": "bug-1490",
|
||||
"timestamp": "2026-08-01",
|
||||
"error_message": "POST /xce/v1/jobs/<id>/control action=kill/stop/resume returns 202 with \"job not found\" even though the job exists in store.Jobs (list shows it)",
|
||||
"file": "src/frontend/apiserver/controllers/jobs.go",
|
||||
"root_cause": "Chain of issues in apiserver job-control path. (1) job_status int64 assertion broke control (fixed: normalizeJobStatus in jobs.go). (2) After that fix, control now returns HTTP 500 \u2014 request never reaches the controller (controller log shows no control event). Likely a backend call to controller blocking/erroring inside apiserver. Not yet root-caused.",
|
||||
"fix": "PARTIAL: jobs.go normalizeJobStatus() deployed. Control still returns HTTP 500 \u2014 open.",
|
||||
"tags": [
|
||||
"apiserver",
|
||||
"job-control",
|
||||
"http500",
|
||||
"phase1-verify",
|
||||
"open"
|
||||
],
|
||||
"related_bugs": [
|
||||
"bug-1489"
|
||||
],
|
||||
"occurrences": 2,
|
||||
"last_seen": "2026-08-01"
|
||||
}
|
||||
]
|
||||
|
|
@ -7265,3 +7265,13 @@
|
|||
| 02:32 | Session end: 35 writes across 11 files (_live_e2e_common.py, test_e2e_live_push.py, test_e2e_live_ha_push.py, manual_ha_deploy.sh, test_repro_bug1485.py) | 30 reads | ~366672 tok |
|
||||
| 03:04 | Merged origin/working (64 commits: config-upgrade-snapshot feature + HA/repl bug fixes), deduped capnpc override — kept xce.nix fetchFromGitHub pin (bug-918 canonical fix), dropped flake.nix ghfast.top overlay | src/flake.nix, src/nixSupport/xce.nix | merged clean, 0 conflicts; nix files parse OK | ~1200 |
|
||||
| 03:50 | User rule: never push to Rongsong's branch (origin/working) without explicit permission; we only sync his code into our own branch. Written to Claude memory (xce-push-policy-rongsong) + cerebrum User Preferences | .wolf/cerebrum.md, /home/lchen/.claude/projects/-home-lchen-code/memory/ | persisted both stores | ~400 |
|
||||
| 04:44 | Phase 1: schedulerclient write API (SubmitJob/CancelJob/HoldJob/ReleaseJob + JobSpec + doPost) TDD green | src/frontend/schedulerclient/write.go, write_test.go, client.go | 33+12 tests pass | ~2k tok |
|
||||
| 04:48 | Phase 1: mcp-server write tools + templates (general_serial, dry_run review mode) + fix read-tool annotations | src/frontend/mcp-server/internal/templates.go, app.go, app_test.go, templates_test.go, cmd/main.go | go vet/build/test green | ~3k tok |
|
||||
| 04:49 | Phase 1: mcp_operator RBAC role (queue:submit + job:control, domain all) TDD green | src/frontend/apiserver/config/rbac.yaml, controllers/rbac_mcp_operator_test.go | tests pass | ~0.5k tok |
|
||||
| 04:50 | Phase 1 build verify: schedulerclient/mcp-server vet+build+test green, apiserver controllers/store green, make test green, mcp-server binary builds (12MB) | all modules | pass | ~0.5k tok |
|
||||
| 04:53 | Phase 1 docs: updated 设计文档 v1.1 (§4.4.2 write tools, §4.5.3 mcp_operator, §5.2 done, §6.2 layout, §10 progress, §12.2 gotchas) + root/frontend CLAUDE.md + anatomy | docs/Scheduler-Agent-设计文档.md, CLAUDE.md, src/frontend/CLAUDE.md, .wolf/anatomy.md | done | ~1k tok |
|
||||
| 06:16 | AppImage built: xce-x86_64.AppImage 280500768B, single-pass mksquashfs (relative AppRun/mountroot sources + -no-strip deps + -p entrypoint) | /home/lchen/xce-appimage/package.sh + xce-x86_64.AppImage | OK, layout matches old | ~2k tok |
|
||||
| 06:33 | Stopped+disabled old XCE systemd (t1 scheduler+workerd, t2 workerd) via sudo | t1/t2 systemd | old daemons killed | ~0.5k tok |
|
||||
| 06:53 | Synced /opt/newxce store (99 paths) + run.sh t1→t2,t3 (rsync, 929MB); cluster.bin built (sha 044f1b3a) + certs + workdir on t1 | t1/t2/t3 /opt/newxce | done | ~1k tok |
|
||||
| 08:59 | HA 3-node election deadlock (voted_for term residue + no-pool standbys) → switched to t1 single-node controller (omit --peers) per user; now CTRL_PRIMARY term=1 | t1 /opt/newxce | primary OK | ~1k tok |
|
||||
| 09:01 | Cluster up on t1: controller(9990, CTRL_PRIMARY) + apiserver(8080, RBAC OK) + scheduler + worker; t2/t3 workers launched | t1/t2/t3 | all daemons running | ~1k tok |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue