docs(buglog): follow-ups fixed (bug-1958..bug-1966); log bug-1967 (limit config re-push)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-10 10:47:23 +00:00
parent f389845701
commit f51adebe8e
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
11 changed files with 251 additions and 117 deletions

View file

@ -18425,9 +18425,9 @@
},
{
"id": "bug-1958",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "apiserver",
"severity": "security",
"timestamp": "2026-10-10T10:15:56Z",
@ -18435,8 +18435,8 @@
"occurrences": 1,
"error_message": "apiserver lets any rbac:control grant create roles and extend its own role (privilege escalation)\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\nReported by the bug-1952 fix: role create/update in `controllers/roles.go` accepts any `rbac:control` scope, so a user holding `rbac:control` with scope `self` can add `cluster:control` (or any permission) to a role it already holds: the same escalation bug-1952 closed for user-role assignment, by another route.\n\n**Expected:** Creating roles or changing a role's permissions requires `rbac:control` with scope `all` (as user-role changes do since bug-1952).\n**Impact:** Security: privilege escalation through role editing.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/frontend/apiserver/controllers/roles.go",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "`CreateRole`, `AddPermissionsForRole` and `DeleteRoleAndPermissions` (`controllers/roles.go`) were guarded only by the route's `RequirePermission(\"rbac:control\")`, which accepts any scope, so a `self`-scoped grant could add `cluster:control` to a role its holder has. Pre-existing.",
"fix": "New `checkRoleChangePermission()` in `roles.go`, called first in the three handlers, reuses `canChangeUserRoles` (bug-1952; all grants before deduplication) and answers 403 unless the caller holds `rbac:control` with scope `all`.\n\nVerification:\n- Test: `TestAddPermissionsForRole_SelfScopeCannotExtendOwnRole` (`controllers/roles_rbac_test.go`): RED `roles_rbac_test.go:65: privilege escalation: mallory (rbac:control scope self) added cluster:control to its own role (status 200)`; `TestCreateRole_SelfScopeRejected`, `TestDeleteRole_SelfScopeRejected` RED (status 200, want 403); GREEN after, plus `TestRoleChanges_AllScopeAllowed`.\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"apiserver",
"security",
@ -18445,16 +18445,18 @@
"related_bugs": [
"bug-1952"
],
"fix_commits": [],
"fix_commits": [
"736ed81d"
],
"record": ".wolf/bugs/bug-1958.md",
"gitea_issue": 389,
"gitea_synced_status": "open"
},
{
"id": "bug-1959",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "xcecli",
"severity": "security",
"timestamp": "2026-10-10T10:15:59Z",
@ -18462,8 +18464,8 @@
"occurrences": 1,
"error_message": "xcecli logout only clears local config and never calls the logout API, so the token is not revoked\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\nReported by the bug-1946 fix: server-side token revocation exists (`POST /xce/v1/auth/logout`), but `xcecli logout` deletes the local token without calling it, so the token stays valid until expiry.\n\n**Expected:** `xcecli logout` calls the logout API (best effort) before clearing local state.\n**Impact:** Security: a CLI token survives logout.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/frontend/xcecli/cmd/auth",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "`runLogout` (`src/frontend/xcecli/cmd/auth/logout.go`) only removed the server entry from the local config; the CLI never called the logout API, so the token stayed valid server side until expiry. Pre-existing.",
"fix": "New `APIClient.Logout(token)` (`common/request/request.go`) posts `/xce/v1/auth/logout` with the bearer token; `runLogout` calls it first and, if the server is unreachable or rejects the token, warns `server-side token revocation could not be confirmed` and still clears local state; help text updated.\n\nVerification:\n- Test: `TestRunLogout_RevokesTokenOnServer` (`cmd/auth/logout_test.go`, httptest): RED `logout_test.go:124: requests = [], want [\"POST /xce/v1/auth/logout Bearer tok\"]`; `TestRunLogout_ServerFailureStillClearsLocalState` (rejected and unreachable server) RED `logout_test.go:157`; GREEN after (5 auth tests).\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"xcecli",
"security",
@ -18472,16 +18474,18 @@
"related_bugs": [
"bug-1946"
],
"fix_commits": [],
"fix_commits": [
"03798230"
],
"record": ".wolf/bugs/bug-1959.md",
"gitea_issue": 390,
"gitea_synced_status": "open"
},
{
"id": "bug-1960",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "controller",
"severity": "wrong-result",
"timestamp": "2026-10-10T10:16:02Z",
@ -18489,8 +18493,8 @@
"occurrences": 1,
"error_message": "closed queues accept submissions: controller never checks, apiserver skips the default queue\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\nReported by the bug-1938 fix: `handle_jobsubmit()` (`src/controller/job.c`) never checks `QUEUE_STAT_CLOSED`; the apiserver's check in `preCheckJobRequest()` runs only when a queue name is given, so a submission without one goes to `normal` unchecked, and non-REST submit paths (libxce, harness) are not checked at all.\n\n**Expected:** A submission to a closed queue (explicit or default) is rejected with a clear error on every submit path.\n**Impact:** Admin queue close silently ignored for default-queue and non-REST submissions.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/controller/job.c, src/frontend/apiserver/controllers/jobs.go",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "`handle_jobsubmit()` (`src/controller/job.c`) only checked that the queue field was non-empty, never the queue's existence or `QUEUE_STAT_CLOSED`, so single and array submissions from libxce/harness (and REST without a queue name) reached closed or unknown queues; `preCheckJobRequest()` (`controllers/jobs.go`) checked only a named queue. Pre-existing.",
"fix": "Controller (`b239db5f`): new `jobsubmit_check_queue()` (in-memory read under the qmgr/queue read locks) rejects an unknown queue or `lost_and_found` with `-E_XCE_BAD_QUEUE` and a closed queue with new `-E_XCE_QUEUE_CLOSED` (10016, `include/xce/errnox.h`, string in `lib/utils.c`) before the hook, the in-flight registry and any WAL append; replay/apply paths unchanged, so committed submits still apply. Apiserver (`1ff068f6`): the default queue gets the same existence/closed checks. Apiserver (`4f579041`): `SubmitJob` maps the two codes to `backend.ErrQueueClosed`/`ErrQueueInvalid` (checked against errnox.h at compile time) and the submit/restart handlers answer 400 naming the queue (covers a close racing the apiserver check). Behaviour change: a submission without a queue is rejected when the cluster has no `normal` queue.\n\nVerification:\n- Test: Controller: `test_jobsubmit_closed_queue_rejected`, `test_jobsubmit_unknown_queue_rejected`, `test_jobsubmit_lost_and_found_rejected` (`src/controller/testsuite/test_jobsubmit_validate.c`): RED `test_jobsubmit_validate.c:370: FAIL: Expected -10016 Was -5` (and -10008), GREEN after; `test_ace_job_submit_closed_queue_still_applies` guards replay. Apiserver: `jobs_test.go:137: submission to the closed default queue: err = <nil>` RED, GREEN after; `TestSubmitRCError`, `TestJobHandler_SubmitQueueRejectedByController` failed to build before (no typed errors), GREEN after.\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"controller",
"apiserver",
@ -18500,16 +18504,20 @@
"related_bugs": [
"bug-1938"
],
"fix_commits": [],
"fix_commits": [
"b239db5f",
"1ff068f6",
"4f579041"
],
"record": ".wolf/bugs/bug-1960.md",
"gitea_issue": 391,
"gitea_synced_status": "open"
},
{
"id": "bug-1961",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "apiserver",
"severity": "wrong-result",
"timestamp": "2026-10-10T10:16:04Z",
@ -18517,23 +18525,25 @@
"occurrences": 1,
"error_message": "apiserver ControlHost writes a second response after validateHost rejected the request\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\nReported by the bug-1949 fix: `validateHost` (`controllers/hosts.go`) writes a 403 via `ReturnError` without aborting and `ControlHost` continues and writes another response (today masked by the route's RequirePermission).\n\n**Expected:** A rejected host control stops after the first error response.\n**Impact:** Wrong result / noise: double responses, possible action after a rejection if the route guard changes.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/frontend/apiserver/controllers/hosts.go",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "`validateHost` (`controllers/hosts.go`) wrote a 403 via `ReturnError` without aborting, so `ControlHost`'s `IsAborted()` check never fired and it wrote a second (202) response. Pre-existing.",
"fix": "`validateHost` no longer writes a response: it checks `host:control` once, before the host loop (it used to check per host and not at all for an empty list), and returns an error; `ControlHost` writes a single 403 and returns; for `all` the host list is resolved first.\n\nVerification:\n- Test: `TestControlHost_RejectedWritesSingleResponse` (`controllers/hosts_handler_test.go`, route without its guard): RED `hosts_handler_test.go:61: handler wrote 2 responses, want 1`, GREEN after.\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"apiserver",
"hosts"
],
"related_bugs": [],
"fix_commits": [],
"fix_commits": [
"d720132c"
],
"record": ".wolf/bugs/bug-1961.md",
"gitea_issue": 392,
"gitea_synced_status": "open"
},
{
"id": "bug-1962",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "apiserver",
"severity": "security",
"timestamp": "2026-10-10T10:16:07Z",
@ -18541,24 +18551,26 @@
"occurrences": 1,
"error_message": "apiserver JWT excluded-path check drops the last character of every entry, matching unintended paths\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\n`ValidateHandler.isExcludedPath` (`middleware/validatehandler.go:52-61`) trims the last character of every excluded entry, not only a trailing `*`, and matches by prefix: `/ping` matches any path starting with `/pin`, and `/swagger/*any` never matches.\n\n**Expected:** Exact entries match exactly; only entries ending in `*` match by prefix.\n**Impact:** Security: paths that merely share a prefix with an excluded entry skip JWT validation.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/frontend/apiserver/middleware/validatehandler.go",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "`isExcludedPath` (`middleware/validatehandler.go`) cut the last character of every excluded entry and matched by prefix. Pre-existing.",
"fix": "The (hardcoded) excluded list moved to `jwtExcludedPaths`; entries match exactly; an entry ending in a gin catch-all segment (`/swagger/*any`) matches anything under `/swagger/`; ping, logon, logout and swagger still excluded.\n\nVerification:\n- Test: `TestIsExcludedPath`, `TestValidateHandler_PrefixLookAlikeNeedsToken` (`middleware/validatehandler_test.go`): RED `isExcludedPath(\"/pinX\") = true, want false`, `isExcludedPath(\"/swagger/index.html\") = false, want true`, `/pinX without a token reached the handler (status 200)`; GREEN after.\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"apiserver",
"security",
"jwt"
],
"related_bugs": [],
"fix_commits": [],
"fix_commits": [
"387a421c"
],
"record": ".wolf/bugs/bug-1962.md",
"gitea_issue": 393,
"gitea_synced_status": "open"
},
{
"id": "bug-1963",
"status": "investigating",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "suspected; confirm with a scheduler fixture test",
"status_note": "",
"component": "scheduler",
"severity": "wrong-result",
"timestamp": "2026-10-10T10:16:09Z",
@ -18566,23 +18578,25 @@
"occurrences": 1,
"error_message": "xce_scheduler host iteration offers unavailable or reconciling hosts as placement candidates\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\nSuspected (reported by the bug-1939 fix, not verified): `sched_host_iter_next()` (`src/scheduler/src/host_iter.c`) skips admin-closed hosts since bug-1939 but not `XCE_WORKER_UNAVAIL` or `XCE_WORKER_RECONCILING`; other checks (`resource.c:704,887`, `core_session.c:136`) are accounting skips, not placement filters.\n\n**Expected:** Unavailable and reconciling hosts get no new placements.\n**Impact:** Possible dispatch to a dead or reconciling host (dispatch then fails and is retried).\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/scheduler/src/host_iter.c",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "`sched_host_iter_next()` (`src/scheduler/src/host_iter.c`) skipped only admin-closed hosts; the UNAVAIL/RECONCILING checks elsewhere (`resource.c`, `core_session.c`) only affect accounting, and such a host keeps its last usage, so the resource check does not reject it. Pre-existing.",
"fix": "`host_iter.c` skips `IS_WORKER_UNAVAIL` and `IS_WORKER_RECONCILING` hosts right after the closed-host check, for both drivers.\n\nVerification:\n- Test: `test_unavail_and_reconciling_hosts_get_no_new_jobs` (`src/scheduler/testsuite/test_host_unavail_reconciling.c`): RED `test_host_unavail_reconciling.c:200: FAIL: Expected 1 Was 2 (normal mode, unavailable host: serial job B must pend)`, GREEN after (both drivers, both status bits).\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"scheduler",
"host"
],
"related_bugs": [],
"fix_commits": [],
"fix_commits": [
"2cd02cdc"
],
"record": ".wolf/bugs/bug-1963.md",
"gitea_issue": 394,
"gitea_synced_status": "investigating"
},
{
"id": "bug-1964",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "scheduler",
"severity": "wrong-result",
"timestamp": "2026-10-10T10:16:12Z",
@ -18590,8 +18604,8 @@
"occurrences": 1,
"error_message": "xce_scheduler --sim does not re-seed limits when a config push arrives mid-replay\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\nReported by the bug-1943 fix: the simulator seeds the limit plugin only at bootstrap (`sim_bootstrap_limit_plugin`); a CONFIG_PUSH during replay updates groups (bug-1943) but a new or changed limit config never reaches the limit plugin, while the live scheduler applies it (`plugin_config_update`).\n\n**Expected:** Live and simulated scheduling apply the same limits after a config change.\n**Impact:** Replays that span a limit config change decide differently than live.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/scheduler/src/sim_limit.c, src/scheduler/src/core_events.c",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "Live `sched_init_config()` calls `plugin_config_update()`, but the core's CONFIG_PUSH handler (`core_events.c:xce_core_push_events`) did not, and the simulator loaded limits only at bootstrap (`sim_limit.c:sim_bootstrap_limit_plugin`). Pre-existing.",
"fix": "`plugin_config_update_core(core, config)` (`plugin.c/.h`) is the shared update (live's `plugin_config_update()` calls it); a driver-registered core hook (`xce_core_set_config_cb`, `core.h`/`core_session.c`, modelled on the cache-clear hook, keeping the core free of plugin calls) is called by CONFIG_PUSH after loading groups; the simulator registers it; `limit_update_config()` reads `plugin->core` instead of casting `plugin->sched` (absent in sim); fixtures set `plugin->core`.\n\nVerification:\n- Test: `test_config_push_reaches_limit_plugin_in_sim_as_in_live` (`src/scheduler/testsuite/test_sim_limit_config_push_parity.c`): RED `test_sim_limit_config_push_parity.c:311: FAIL: Expected 1 Was 0 (sim: a CONFIG_PUSH during replay must configure its limit as live does)`, GREEN after; `test_sim_group_limit_parity`, `test_limit_plugin` (6/6), `test_repl_limit_table` (35/35) pass.\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"scheduler",
"sim",
@ -18601,16 +18615,18 @@
"related_bugs": [
"bug-1943"
],
"fix_commits": [],
"fix_commits": [
"3224e906"
],
"record": ".wolf/bugs/bug-1964.md",
"gitea_issue": 395,
"gitea_synced_status": "open"
},
{
"id": "bug-1965",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "build",
"severity": "noise",
"timestamp": "2026-10-10T10:16:14Z",
@ -18618,24 +18634,26 @@
"occurrences": 1,
"error_message": "xce-build.sh apiserver skips the middleware, router and cmd Go test packages\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\n`xce-build.sh` runs `go test ./store/... ./utils/... ./controllers/... ./backend/...` for the apiserver; `./middleware/...`, `./router/...`, `./cmd/...` (which hold several security tests since bug-1945..1952) are never run by the build.\n\n**Expected:** The build runs every apiserver test package.\n**Impact:** Regressions in middleware/router/cmd tests go unnoticed by `/xce-build`.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/tools/xce-build.sh",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "`src/tools/xce-build.sh` listed `./store/... ./utils/... ./controllers/... ./backend/...` for the apiserver Go tests, so `cmd`, `middleware`, `models` and `router` never ran in the build. Pre-existing.",
"fix": "Both apiserver `go test` lines (components `apiserver` and `all`) now run `./...` (vendor excluded automatically).\n\nVerification:\n- Test: With a temporary deliberately failing middleware test (not committed): the old script exited 0 without running middleware; the new script exited 1 with `--- FAIL: TestBug1965DeliberatelyBroken` / `FAIL apiserver/middleware`. The merged-branch `all` build log shows `ok apiserver/cmd`, `middleware`, `models`, `router`.\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"build",
"tests",
"apiserver"
],
"related_bugs": [],
"fix_commits": [],
"fix_commits": [
"387cc994"
],
"record": ".wolf/bugs/bug-1965.md",
"gitea_issue": 396,
"gitea_synced_status": "open"
},
{
"id": "bug-1966",
"status": "open",
"status": "fixed",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"status_note": "",
"component": "apiserver",
"severity": "noise",
"timestamp": "2026-10-10T10:16:16Z",
@ -18643,18 +18661,46 @@
"occurrences": 1,
"error_message": "apiserver swagger generation fails on hosts.go models.Error; published swagger is a stale stub\n\n**Observed:** (source reading; follow-up of the 2026-10-10 P0 fixes (bug-1936..1957))\n`swag init -g cmd/main.go` fails: `ParseComment error in controllers/hosts.go for comment: '// @Failure 400 {object} models.Error': cannot find type definition: models.Error`. `docs/swagger.yaml` is a 212-line stub last generated before the meson merge (no job-control endpoints).\n\n**Expected:** Swagger generates from the annotations and the published spec covers the API.\n**Impact:** API documentation missing/stale.\n**Found by:** follow-up of the 2026-10-10 P0 fixes (bug-1936..1957)",
"file": "src/frontend/apiserver/controllers/hosts.go, src/frontend/apiserver/docs/swagger.yaml",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"root_cause": "Swag annotations in `controllers/hosts.go` and `controllers/jobs.go` named non-existent types (`models.Error`, `ErrorResponse`, `JobsResponse`, `JobSignalRequest`, `JobControlResponseSummary`), had malformed `@Param`/`@Failure` lines and wrong `/api/v1` paths, and no general API info existed. Pre-existing.",
"fix": "Errors use `JsonErrStruct` (what `ReturnError` writes), success `JsonStruct`; bodies use `models.JobSubmitRequest`, `JobControlJobIDRequest`, `JobControlRequest`; paths match the routes; `@BasePath /xce/v1` and general info in `cmd/main.go`; `docs/docs.go`, `swagger.json`, `swagger.yaml` regenerated with `swag init -g cmd/main.go -o docs`. Only hosts and jobs handlers are annotated so far.\n\nVerification:\n- Test: RED: `swag init -g cmd/main.go` failed with `ParseComment error in file .../controllers/hosts.go ... models.Error: cannot find type definition`; GREEN: swag runs cleanly and the spec lists `/hosts`, `/jobs`, `/jobs/create`, `/jobs/{jobids}`, `/jobs/{jobids}/control`, `/jobs/control`; `cmd` (imports docs) tests pass.\n- Suites: `xce-build.sh all asan xce.build --incremental` on the merged branch, 2026-10-10: C suites Ok 157 / Fail 0; frontend Go tests ok (the build now also runs apiserver cmd, middleware, models and router)\n- Live: n/a: unit/fixture-level verification; no live deployment was run",
"tags": [
"apiserver",
"docs",
"swagger"
],
"related_bugs": [],
"fix_commits": [],
"fix_commits": [
"f7fef278"
],
"record": ".wolf/bugs/bug-1966.md",
"gitea_issue": 397,
"gitea_synced_status": "open"
},
{
"id": "bug-1967",
"status": "open",
"status_updated": "2026-10-10",
"status_note": "newly logged",
"component": "scheduler",
"severity": "wrong-result",
"timestamp": "2026-10-10T10:47:20Z",
"last_seen": "2026-10-10T10:47:20Z",
"occurrences": 1,
"error_message": "xce_scheduler ignores limit changes in a re-pushed config: seeding stops at the first existing name\n\n**Observed:** (source reading, 2026-10-10; reported by the bug-1964 fix)\n`limit_seed_config_impl()` (`src/scheduler/src/plugins/limit.c`) builds each\nconfigured limit and adds it with `key_add(privdata->limits, limit->name, ...)`,\nreturning at the first failure:\n```c\nrc = key_add(privdata->limits, (void*)limit->name, (void*)limit);\n...\nif (rc < 0) {\n ... /* bug-1685: the kvmgr already freed `limit` */\n return rc;\n}\n```\nOn a later config push (live config upgrade, or a mid-replay CONFIG_PUSH in\nthe simulator since bug-1964) every limit name already exists, so the first\n`key_add` fails with `-EEXIST`: no limit is updated, a limit whose value or\nscope changed keeps its old definition, and limits listed after an existing\none are never added.\n\n**Expected:** a config push replaces the configured limits: changed limits\ntake their new definition, new ones are added, removed ones disappear\n(their usage instances handled consistently).\n**Impact:** wrong result: limit changes made by a live config upgrade do not\ntake effect until the scheduler restarts; live and simulator agree (both\nwrong).\n**Found by:** fix of bug-1964 (sim limit config push), 2026-10-10.",
"file": "src/scheduler/src/plugins/limit.c",
"root_cause": "TODO: required for fixed/partial",
"fix": "TODO: required for fixed/partial\n\nVerification:\n- Test: TODO: name + file; RED before the fix, GREEN after\n- Suites: TODO: suite results and build profile\n- Live: TODO: soak/deploy run, or n/a and why",
"tags": [
"scheduler",
"limit",
"config"
],
"related_bugs": [
"bug-1964",
"bug-1685"
],
"fix_commits": [],
"record": ".wolf/bugs/bug-1967.md"
}
]
}