chore(build): make xce-build.sh self-wrap into nix develop

meson/ninja/capnp/Go only exist inside the hermetic nix dev shell, but
xce-build.sh never entered it itself -- the /xce-build skill documented
wrapping every invocation in `nix develop ./src --command ...` by hand,
so a bare `bash src/tools/xce-build.sh ...` (run directly instead of
through the skill) failed opaquely with "meson: command not found". This
was a recurring, previously-logged gap that resurfaced again today mid
bug-1789 verification.

The script now checks IN_NIX_SHELL at the top and re-execs itself under
`nix develop` if unset, so every caller -- the skill, a bare invocation,
CI, a human at a terminal -- gets it automatically. A nested call (already
inside the shell) is a no-op past that check. README.md's daily-develop
section updated to match; the old "or use nix develop --command" example
is now redundant and removed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GLfB5uWRdmx2WiZSFC7Fm7
This commit is contained in:
Rongsong Shen 2026-09-07 15:31:06 +00:00
parent 924ac32c1d
commit 028d8f6ac7
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
8 changed files with 6063 additions and 6025 deletions

View file

@ -1,5 +1,5 @@
{ {
"last_scanned": "2026-08-27T19:00:00.801Z", "last_scanned": "2026-09-07T13:00:00.251Z",
"git_head": "de6ad514e01d4907fdf1d1728a17445ace3a7481", "git_head": "22cfe61642912ac5f433eb97d1243f2263b3c187",
"file_count": 504 "file_count": 505
} }

File diff suppressed because it is too large Load diff

View file

@ -1,17 +1,17 @@
# anatomy.md # anatomy.md
> Auto-maintained by OpenWolf. Last scanned: 2026-09-07T07:29:49.789Z > Auto-maintained by OpenWolf. Last scanned: 2026-09-07T15:28:08.691Z
> Files: 711 tracked | Anatomy hits: 0 | Misses: 0 > Files: 514 tracked | Anatomy hits: 0 | Misses: 0
## ./ ## ./
- `.clang-format` (~226 tok) - `.clang-format` (~226 tok)
- `.gitignore` — Git ignore rules (~402 tok) - `.gitignore` — Git ignore rules (~413 tok)
- `.mcp.json` (~7 tok) - `.mcp.json` (~7 tok)
- `.opencode.json` (~7 tok) - `.opencode.json` (~7 tok)
- `CHANGES.md` — XCE Change Log (~8850 tok) - `CHANGES.md` — XCE Change Log (~14607 tok)
- `CLAUDE.md` — OpenWolf (~1806 tok) - `CLAUDE.md` — OpenWolf (~1806 tok)
- `README.md` — Project documentation (~919 tok) - `README.md` — Project documentation (~1157 tok)
## .agent-shell/transcripts/ ## .agent-shell/transcripts/
@ -22,28 +22,16 @@
- `2026-08-16-06-11-30.md` — Agent Shell Transcript (~60273 tok) - `2026-08-16-06-11-30.md` — Agent Shell Transcript (~60273 tok)
- `2026-08-23-15-56-15.md` — Agent Shell Transcript (~69291 tok) - `2026-08-23-15-56-15.md` — Agent Shell Transcript (~69291 tok)
- `2026-08-26-17-36-06.md` — Agent Shell Transcript (~183 tok) - `2026-08-26-17-36-06.md` — Agent Shell Transcript (~183 tok)
- `2026-08-30-21-28-19.md` — Agent Shell Transcript (~106161 tok)
## .claude/skills/xce-build/ - `2026-09-02-10-55-02.md` — Agent Shell Transcript (~10751 tok)
- `SKILL.md` — build xce source code (~3121 tok)
## .claude/skills/xce-changes/
- `SKILL.md` — xce-changes Skill (~2690 tok)
## .claude/skills/xce-deploy-ha/
- `SKILL.md` — XCE HA Cluster Deployment (~7053 tok)
## .claude/skills/xce-test-resources/
- `run-resource-verify.sh` — run-resource-verify.sh -- driver for /xce-test-resources: end-to-end (~21442 tok)
- `SKILL.md` — XCE Resource-Value Verification (~3549 tok)
## .codegraph/ ## .codegraph/
- `.gitignore` — Git ignore rules (~61 tok) - `.gitignore` — Git ignore rules (~61 tok)
- `daemon.log` (~23680 tok) - `codegraph.db-shm` (~8738 tok)
- `codegraph.db-wal` (~0 tok)
- `daemon.log` (~28663 tok)
- `daemon.pid` (~45 tok)
## .kiro/settings/rules/ ## .kiro/settings/rules/
@ -168,7 +156,7 @@
## .kiro/specs/eliminate-frontend-makefile/ ## .kiro/specs/eliminate-frontend-makefile/
- `brief.md` — Brief: eliminate-frontend-makefile (~2334 tok) - `brief.md` — Brief: eliminate-frontend-makefile (~2334 tok)
- `design.md` — Design Document (~7808 tok) - `design.md` — Design Document (~7820 tok)
- `requirements.md` — Requirements Document (~1953 tok) - `requirements.md` — Requirements Document (~1953 tok)
- `research.md` — Summary (~3737 tok) - `research.md` — Summary (~3737 tok)
- `spec.json` (~1136 tok) - `spec.json` (~1136 tok)
@ -335,11 +323,6 @@
- `spec.json` (~444 tok) - `spec.json` (~444 tok)
- `tasks.md` — Implementation Plan: job-array-single-wal-record (~15580 tok) - `tasks.md` — Implementation Plan: job-array-single-wal-record (~15580 tok)
## .kiro/specs/job-dispatch-commit-batching/
- `requirements.md` — Requirements Document (~874 tok)
- `spec.json` (~263 tok)
## .kiro/specs/libxce-failover/ ## .kiro/specs/libxce-failover/
- `brief.md` — Brief: libxce-failover (~2238 tok) - `brief.md` — Brief: libxce-failover (~2238 tok)
@ -433,6 +416,14 @@
- `spec.json` (~133 tok) - `spec.json` (~133 tok)
- `tasks.md` — Implementation Plan (~8164 tok) - `tasks.md` — Implementation Plan (~8164 tok)
## .kiro/specs/resreq-maxtasks-wiring/
- `design.md` — Overview (~8860 tok)
- `requirements.md` — Requirements Document (~2381 tok)
- `research.md` — Research & Design Decisions (~6129 tok)
- `spec.json` (~277 tok)
- `tasks.md` — Implementation Plan (~2899 tok)
## .kiro/specs/resval-id-decoupling/ ## .kiro/specs/resval-id-decoupling/
- `design.md` — Design: resval-id-decoupling (~3914 tok) - `design.md` — Design: resval-id-decoupling (~3914 tok)
@ -443,9 +434,12 @@
## .kiro/specs/scheduler-allocation/ ## .kiro/specs/scheduler-allocation/
- `brief.md` — Brief: scheduler-allocation (~3375 tok) - `brief.md` — Brief: scheduler-allocation (~4230 tok)
- `requirements.md` — Requirements Document (~9034 tok) - `design.md` — Design Document (~10595 tok)
- `spec.json` (~443 tok) - `requirements.md` — Requirements Document (~17107 tok)
- `research.md` — Summary (~2972 tok)
- `spec.json` (~708 tok)
- `tasks.md` — Implementation Plan (~6117 tok)
## .kiro/specs/scheduler-config-version-tag/ ## .kiro/specs/scheduler-config-version-tag/
@ -496,6 +490,14 @@
- `requirements.md` — Requirements Document (~2476 tok) - `requirements.md` — Requirements Document (~2476 tok)
- `spec.json` (~262 tok) - `spec.json` (~262 tok)
## .kiro/specs/scheduler-primary-lifecycle/
- `design.md` — Overview (~9246 tok)
- `requirements.md` — Requirements Document (~4256 tok)
- `research.md` — Summary (~3750 tok)
- `spec.json` — Declares product (~1287 tok)
- `tasks.md` — Implementation Plan (~2686 tok)
## .kiro/specs/scheduler-sim-decision-parity/ ## .kiro/specs/scheduler-sim-decision-parity/
- `brief.md` — Brief: scheduler-sim-decision-parity (~2025 tok) - `brief.md` — Brief: scheduler-sim-decision-parity (~2025 tok)
@ -567,7 +569,14 @@
- `requirements.md` — Requirements Document (~3631 tok) - `requirements.md` — Requirements Document (~3631 tok)
- `research.md` — Research & Design Decisions: worker-rejoin-resync (~5335 tok) - `research.md` — Research & Design Decisions: worker-rejoin-resync (~5335 tok)
- `spec.json` (~674 tok) - `spec.json` (~674 tok)
- `tasks.md` — Implementation Plan (~10465 tok) - `tasks.md` — Implementation Plan (~10811 tok)
## .kiro/specs/xce-node-manager/
- `design.md` — Overview (~12460 tok)
- `requirements.md` — Requirements Document (~4421 tok)
- `research.md` — Research & Design Decisions (~4199 tok)
- `spec.json` (~1261 tok)
## .kiro/specs/xce-test-cli-ux/ ## .kiro/specs/xce-test-cli-ux/
@ -618,6 +627,12 @@
- `2026-05-13-config-replication.md` — Config Replication Implementation Plan (~21833 tok) - `2026-05-13-config-replication.md` — Config Replication Implementation Plan (~21833 tok)
- `2026-05-20-config-repl-wire-protocol.md` — Config Replication — Wire Protocol Completion + Bug Fixes (~5322 tok) - `2026-05-20-config-repl-wire-protocol.md` — Config Replication — Wire Protocol Completion + Bug Fixes (~5322 tok)
## issues/
- `.simulator-1.md.~undo-tree~` (~21777 tok)
- `#simulator-1.md#` (~1371 tok)
- `simulator-1.md` (~643 tok)
## raft/ ## raft/
- `raft.tla` — ------------------------------- MODULE raft --------------------------------- (~5350 tok) - `raft.tla` — ------------------------------- MODULE raft --------------------------------- (~5350 tok)
@ -628,6 +643,7 @@
- `aug08-aug15-2026.md` — XCE Project Status — Aug 08 – Aug 15, 2026 (~3603 tok) - `aug08-aug15-2026.md` — XCE Project Status — Aug 08 – Aug 15, 2026 (~3603 tok)
- `aug16-aug22-2026.md` — XCE Project Status — Aug 16 – Aug 22, 2026 (~2706 tok) - `aug16-aug22-2026.md` — XCE Project Status — Aug 16 – Aug 22, 2026 (~2706 tok)
- `aug23-aug29-2026.md` — XCE Project Status — Aug 23 – Aug 29, 2026 (~3530 tok) - `aug23-aug29-2026.md` — XCE Project Status — Aug 23 – Aug 29, 2026 (~3530 tok)
- `aug30-sep05-2026.md` — XCE Project Status — Aug 30 – Sep 05, 2026 (~4201 tok)
- `jul06-jul11-2026.md` — Jul 6 → Jul 11 Progress Report (~2311 tok) - `jul06-jul11-2026.md` — Jul 6 → Jul 11 Progress Report (~2311 tok)
- `jul13-jul18-2026.md` — Jul 13 → Jul 18 Progress Report (~3919 tok) - `jul13-jul18-2026.md` — Jul 13 → Jul 18 Progress Report (~3919 tok)
- `jul19-jul26-2026.md` — Work Summary: Jul 19 – Jul 26, 2026 (~3482 tok) - `jul19-jul26-2026.md` — Work Summary: Jul 19 – Jul 26, 2026 (~3482 tok)
@ -640,7 +656,7 @@
## src/ ## src/
- `flake.nix` (~1301 tok) - `flake.nix` (~1432 tok)
- `meson.build` (~672 tok) - `meson.build` (~672 tok)
- `meson.options` — dirty-content-fingerprint task 1: sibling `dirty_fingerprint` string option (default '') added next to commit_id/build_time (~124 tok) - `meson.options` — dirty-content-fingerprint task 1: sibling `dirty_fingerprint` string option (default '') added next to commit_id/build_time (~124 tok)
@ -709,418 +725,124 @@
- `logger.go` — Config (50 fields) (~1649 tok) - `logger.go` — Config (50 fields) (~1649 tok)
- `provUtils.go` — InitProv, ExitWithError, Result, CreationTimeout, TerminationTimeout (~718 tok) - `provUtils.go` — InitProv, ExitWithError, Result, CreationTimeout, TerminationTimeout (~718 tok)
## src/autoscaler/scaler/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/
- `obj_mgr.c` — include <errno.h> (~3260 tok) - `modules.txt` — github.com/baidubce/bce-sdk-go v0.9.233 (~309 tok)
- `plug_mgr.c` — Main functions: (~4412 tok)
- `prov_conf.c` — include "prov_conf.h" (~2721 tok)
- `scaler_ctx.c` — include <string.h> (~547 tok)
- `scaler_json.c` — include <stdio.h> (~3716 tok)
- `scaler_misc.c` — include <math.h> (~1482 tok)
- `scaler_obj.c` — include "scaler_obj.h" (~2462 tok)
- `scaler.c` — include <errno.h> (~5076 tok)
## src/autoscaler/scaler/conf/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/
- `hostProviders.json` (~60 tok) - `LICENSE` — Project license (~2714 tok)
- `hostProviders.yaml` (~35 tok)
## src/autoscaler/scaler/include/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/auth/
- `obj_mgr.h` — ifndef _OBJ_MGR_H_ (~492 tok) - `signer.go` — signer.go - implement the specific sign algorithm of BCE V1 protocol (~1616 tok)
- `plug_mgr.h` — ifndef _PLUG_MGR_H_ (~119 tok)
- `prov_conf.h` — ifndef _SCALER_CONF_H_ (~132 tok)
- `scaler_ctx.h` — ifndef _SCALER_CTX_H_ (~73 tok)
- `scaler_json.h` — ifndef __JSON_UTILS_H__ (~267 tok)
- `scaler_misc.h` — ifndef _SCALER_MISC_H_ (~203 tok)
- `scaler_obj.h` — ifndef _SCALER_OBJ_H_ (~273 tok)
- `scaler.h` — ifndef _SCALER_H_ (~384 tok)
## src/autoscaler/scaler/include/scaler/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/bce/
- `types.h` — ifndef _SCALER_TYPES_H_ (~1091 tok) - `builder.go` — builder.go - defines the RequestBuilder structure for BCE servies (~1252 tok)
- `client.go` — implements the infrastructure to access BCE services. (~2713 tok)
- `config.go` — config.go - define the client configuration for BCE (~770 tok)
- `error.go` — error.go - define the error types for BCE (~603 tok)
- `request.go` — request.go - defines the BCE servies request (~2212 tok)
- `response.go` — response.go - defines the common BCE services response (~928 tok)
- `retry.go` — retry.go - define the retry policy when making requests to BCE services (~1031 tok)
## src/autoscaler/scaler/testsuite/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/http/
- `test_plug_mgr.c` — include <stdlib.h> (~1794 tok) - `client.go` — defines the structure of request and response which used to access the BCE services (~1771 tok)
- `test_scale_misc.c` — include <stdio.h> (~1258 tok) - `constants.go` — constants.go - defines constants of the BCE http package including headers and methods (~1095 tok)
- `test.c` — include <stdio.h> (~97 tok) - `request.go` — request.go - the custom HTTP request for BCE (~1331 tok)
- `response.go` — response.go - the custom HTTP response for BCE (~536 tok)
## src/autoscaler/scaler/testsuite/scripts/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/model/
- `getAvailableTemplates.sh` (~242 tok) - `tag.go` — TagModel (3 fields) (~31 tok)
- `getRequestStatus.sh` — Parse command line arguments (~644 tok)
- `getReturnRequests.sh` (~44 tok)
- `requestMachines.sh` (~20 tok)
- `requestReturnMachines.sh` (~38 tok)
## src/build-asan/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/services/bcc/
- `.gitignore` — Git ignore rules (~25 tok) - `client.go` — defines the BCC services of BCE. The supported APIs are all defined in sub-package (~23637 tok)
- `.hgignore` — This file is autogenerated by Meson. If you change or delete it, it won't be recreated. (~29 tok) - `config.json` (~12 tok)
- `.ninja_log` — ninja log v7 (~34178 tok)
- `build.ninja` — This is the build file for project "xce" (~238122 tok)
- `compile_commands.json` (~247104 tok)
- `xce` (~176 tok)
## src/build-asan/controller/apiserver_push_unit_test.p/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/services/bcc/api/
- `apiserver.c.o` (~269434 tok) - `autoSnapshotPolicy.go` — defines all APIs supported by the BCC service of BCE. (~2256 tok)
- `dataex.c.o` (~255400 tok) - `cds.go` — defines all APIs supported by the BCC service of BCE. (~7227 tok)
- `testsuite_test_job_array_apiserver_push.c.o` (~264685 tok) - `deploySet.go` — defines all APIs supported by the BCC service of BCE. (~2378 tok)
- `image.go` — defines all APIs supported by the BCC service of BCE. (~4460 tok)
- `instance.go` — defines all APIs supported by the BCC service of BCE. (~24137 tok)
- `keypair.go` — defines all APIs supported by the BCC service of BCE. (~1948 tok)
- `model.go` — model.go - definitions of the request arguments and results data structure model (~35163 tok)
- `other.go` — defines all APIs supported by the BCC service of BCE. (~1850 tok)
- `reserved.go` — defines all APIs supported by the BCC service of BCE. (~1395 tok)
- `securityGroup.go` — defines all APIs supported by the BCC service of BCE. (~2453 tok)
- `snapshot.go` — defines all APIs supported by the BCC service of BCE. (~2309 tok)
- `tags.go` — BindInstanceToTagsByResourceType, UnbindInstanceToTagsByResourceType (~310 tok)
- `util.go` — util.go - define the utilities for api package of BCC service (~5231 tok)
## src/build-asan/controller/controller_unit_test.p/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/util/
- `commit.c.o` (~256615 tok) - `mime.go` — LoadMimeMap (~9714 tok)
- `ctrl_metrics.c.o` (~14066 tok) - `string.go` — defines the common utilities including string and time. (~988 tok)
- `ctrlstatus.c.o` (~253988 tok) - `time.go` — time.go - define the time utility functions for BCE (~400 tok)
- `egress.c.o` (~246954 tok)
- `ha_convergence.c.o` (~259978 tok)
- `join.c.o` (~259103 tok)
- `opupd.c.o` (~252253 tok)
- `queue.c.o` (~255055 tok)
- `repl.c.o` (~256263 tok)
- `slowlane.c.o` (~26286 tok)
- `startup_validation.c.o` (~250657 tok)
- `testsuite_configcompare.c.o` (~30589 tok)
- `testsuite_controller_test.c.o` (~52147 tok)
- `testsuite_rcfile.c.o` (~19766 tok)
- `testsuite_snapdiff.c.o` (~30235 tok)
- `testsuite_snapverify.c.o` (~40726 tok)
- `testsuite_test_apply_reapply_idempotency.c.o` (~267824 tok)
- `testsuite_test_apply_seam.c.o` (~259051 tok)
- `testsuite_test_bug857_regression.c.o` (~271414 tok)
- `testsuite_test_cluster_persist.c.o` (~269684 tok)
- `testsuite_test_coldstart_lsn0.c.o` (~269200 tok)
- `testsuite_test_commit_admission_pool.c.o` (~255382 tok)
- `testsuite_test_configcompare.c.o` (~56534 tok)
- `testsuite_test_ctrl_metrics.c.o` (~39039 tok)
- `testsuite_test_dispatch_fail_terminal.c.o` (~265949 tok)
- `testsuite_test_drive_async_config.c.o` (~258287 tok)
- `testsuite_test_e2e_checkpoint.c.o` (~229647 tok)
- `testsuite_test_e2e_gc.c.o` (~223678 tok)
- `testsuite_test_e2e_wal.c.o` (~226506 tok)
- `testsuite_test_egress_filter.c.o` (~272202 tok)
- `testsuite_test_fetchfile_disconnect.c.o` (~261723 tok)
- `testsuite_test_gc_retention.c.o` (~217751 tok)
- `testsuite_test_ha_bootstrap_support.c.o` (~245136 tok)
- `testsuite_test_ha_cluster.c.o` (~259030 tok)
- `testsuite_test_ha_ctrlhello.c.o` (~268038 tok)
- `testsuite_test_ha_elect_ctx_lifecycle.c.o` (~265129 tok)
- `testsuite_test_ha_failover_prevote.c.o` (~274783 tok)
- `testsuite_test_ha_failover.c.o` (~273020 tok)
- `testsuite_test_ha_heartbeat_committed.c.o` (~266799 tok)
- `testsuite_test_ha_redirect.c.o` (~252976 tok)
- `testsuite_test_ha_repl_push.c.o` (~267090 tok)
- `testsuite_test_ha_start_election_async.c.o` (~269563 tok)
- `testsuite_test_ha_vote_floor_heartbeat.c.o` (~270577 tok)
- `testsuite_test_hooks.c.o` (~248860 tok)
- `testsuite_test_job_array_fence.c.o` (~270968 tok)
- `testsuite_test_job_dispatch_fail_count.c.o` (~201471 tok)
- `testsuite_test_job_dispatch.c.o` (~30881 tok)
- `testsuite_test_jobdispatch_no_double_notify.c.o` (~273947 tok)
- `testsuite_test_join_redirect.c.o` (~254908 tok)
- `testsuite_test_p1_integration.c.o` (~254297 tok)
- `testsuite_test_p2_integration.c.o` (~262497 tok)
- `testsuite_test_p3_manual_failover.c.o` (~253028 tok)
- `testsuite_test_persist_checkpoint_offload.c.o` (~274642 tok)
- `testsuite_test_persist_checkpoint.c.o` (~223341 tok)
- `testsuite_test_persist_recovery.c.o` (~274130 tok)
- `testsuite_test_persist_repl.c.o` (~209772 tok)
- `testsuite_test_persist_schema.c.o` (~247187 tok)
- `testsuite_test_persist_types.c.o` (~200420 tok)
- `testsuite_test_persist_wal.c.o` (~222899 tok)
- `testsuite_test_rcfile.c.o` (~61221 tok)
- `testsuite_test_repl_apply.c.o` (~217832 tok)
- `testsuite_test_repl_catchup.c.o` (~42126 tok)
- `testsuite_test_repl_majority.c.o` (~258306 tok)
- `testsuite_test_repl_unit.c.o` (~269036 tok)
- `testsuite_test_replay_apply_seam.c.o` (~269938 tok)
- `testsuite_test_slowlane.c.o` (~51878 tok)
- `testsuite_test_snapdiff.c.o` (~50170 tok)
- `testsuite_test_snapverify.c.o` (~61878 tok)
- `testsuite_test_term_adoption_vectors.c.o` (~273567 tok)
- `testsuite_test_upgrade_snapshot_restore.c.o` (~267366 tok)
- `testsuite_test_walcompare.c.o` (~243026 tok)
- `testsuite_test_waldump.c.o` (~272426 tok)
- `testsuite_walcompare.c.o` (~201332 tok)
- `testsuite_waldump.c.o` (~267791 tok)
- `worker.c.o` (~273718 tok)
## src/build-asan/controller/resval_typeresolve_unit_test.p/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/util/crypto/
- `testsuite_resval_typeresolve.c.o` (~228167 tok) - `ebc.go` — EBCEncrypto (~227 tok)
- `testsuite_test_resval_typeresolve.c.o` (~245352 tok)
## src/build-asan/controller/sched_push_unit_test.p/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/baidubce/bce-sdk-go/util/log/
- `dataex.c.o` (~255400 tok) - `logger.go` — implements the log facilities for BCE. It supports log to stderr, stdout as well as (~3234 tok)
- `util.go` — util.go - define the package-level default logger and functions for easily use. (~1674 tok)
## src/configs/schema/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/github.com/google/uuid/
- `xce.schema.json` (~461 tok) - `CHANGELOG.md` — Change log (~412 tok)
- `CONTRIBUTING.md` — How to contribute (~239 tok)
- `CONTRIBUTORS` (~28 tok)
- `dce.go` — Use of this source code is governed by a BSD-style (~592 tok)
- `doc.go` — generates and inspects UUIDs. (~117 tok)
- `hash.go` — Use of this source code is governed by a BSD-style (~561 tok)
- `LICENSE` — Project license (~395 tok)
- `marshal.go` — Use of this source code is governed by a BSD-style (~260 tok)
- `node_js.go` — Use of this source code is governed by a BSD-style (~143 tok)
- `node_net.go` — Use of this source code is governed by a BSD-style (~272 tok)
- `node.go` — Use of this source code is governed by a BSD-style (~664 tok)
- `null.go` — Use of this source code is governed by a BSD-style (~704 tok)
- `README.md` — Project documentation (~210 tok)
- `sql.go` — Use of this source code is governed by a BSD-style (~417 tok)
- `time.go` — Use of this source code is governed by a BSD-style (~1085 tok)
- `util.go` — Use of this source code is governed by a BSD-style (~549 tok)
- `uuid.go` — Use of this source code is governed by a BSD-style (~2753 tok)
- `version1.go` — Use of this source code is governed by a BSD-style (~360 tok)
- `version4.go` — Use of this source code is governed by a BSD-style (~587 tok)
- `version6.go` — Use of this source code is governed by a BSD-style (~633 tok)
- `version7.go` — Use of this source code is governed by a BSD-style (~964 tok)
## src/controller/ ## src/autoscaler/providers/baidu/src/bcctool/vendor/go.uber.org/multierr/
- `cluster.c` — include "config.h" (~27168 tok) - `.codecov.yml` (~218 tok)
- `config_repl.c` — define _GNU_SOURCE (~35341 tok) - `.gitignore` — Git ignore rules (~10 tok)
- `ha.c` — define _GNU_SOURCE (~126576 tok)
- `job.c` — include <assert.h> (~43752 tok)
- `main.c` — include <argp.h> (~5489 tok)
- `meson.build` (~3882 tok)
- `misc.c` — include <errno.h> (~2257 tok)
- `persist.c` — define _GNU_SOURCE (~109526 tok)
- `resync.c` — here: construction (~11095 tok)
- `sched.c` — include <errno.h> (~7390 tok)
- `worker.c` — include <errno.h> (~10201 tok)
## src/controller/include/
- `cluster.h` — if !defined(_CLUSTER_H_) (~4699 tok)
- `resync.h` — if !defined(_RESYNC_H_) (~4484 tok)
## src/controller/testsuite/
- `controller_test.c` — include <argp.h> (~2562 tok)
- `test_apply_committed_entry.c` — Declares directly (~13500 tok)
- `test_apply_pump_integration.c` — Declares hook (~17030 tok)
- `test_apply_pump.c` — Declares of (~21139 tok)
- `test_apply_reapply_idempotency.c` — Declares xce_job_t (~4115 tok)
- `test_commit_barrier_reply.c` — Declares uint8_t (~45642 tok)
- `test_commit_barrier_rollout.c` — Declares explicitly (~28611 tok)
- `test_commit_durability.c` — define _GNU_SOURCE (~34003 tok)
- `test_commit_engine.c` (~18081 tok)
- `test_config_repl.c` — define _GNU_SOURCE (~87218 tok)
- `test_convergence_verification.c` — define _GNU_SOURCE (~19002 tok)
- `test_demotion_convergence.c` — define _GNU_SOURCE (~15498 tok)
- `test_dispatch_fail_retry.c` — Declares table (~13308 tok)
- `test_egress_filter.c` — Declares of (~5156 tok)
- `test_ha_bootstrap.c` — does: defer_config_fetch (~5845 tok)
- `test_ha_ctrlhello.c` (~1327 tok)
- `test_ha_role_lifecycle.c` — define _GNU_SOURCE (~15235 tok)
- `test_host_runusage.c` — Declares char (~3442 tok)
- `test_job_array_fence.c` — Declares of (~6195 tok)
- `test_job_array_replay_fence.c` — Declares uint64_t (~13778 tok)
- `test_jobstatereport_dispatch.c` (~3663 tok)
- `test_p2_integration.c` — include <errno.h> (~5212 tok)
- `test_wal_job_finish_fact.c` — Declares as (~8980 tok)
- `test_wal_job_start_fact.c` — Declares as (~12368 tok)
- `test_worker_join.c` — include <rtti.h> (~14543 tok)
- `test_worker_resync.c` — Declares that (~55780 tok)
- `test.c` — include <argp.h> (~40634 tok)
## src/docs/
- `apiserver-backend-tasks.md` — API Server Backend Enhancement — Task Tracker (~2499 tok)
- `deployment.md` — XCE Deployment Guide (~6503 tok)
## src/frontend/
- `CLAUDE.md` — XCE Frontend (API Server + CLI) (~686 tok)
## src/frontend/apiserver/
- `meson.build` — frontend/apiserver — Go REST API server with CGO backend integration. (~1136 tok)
## src/frontend/apiserver/backend/
- `convert_pure.go` — Struct: rawStartInfo (~3703 tok)
- `convert_test.go` — TestRawJobToModel_BasicFields, TestRawJobToModel_ExecHostsUsesRealPerHostSlotCount, TestRawJobToMode (~7765 tok)
- `convert.go` — go:build cgo (~3817 tok)
- `handler.go` — Struct: DefaultHandler (~3107 tok)
## src/frontend/apiserver/cmd/
- `main.go` (~1598 tok)
## src/frontend/apiserver/controllers/
- `host_control_test.go` — TestPreCheckHostControlRequest_AllFlag, TestPreCheckHostControlRequest_NotAll, TestPreCheckHostContr (~1579 tok)
- `hosts.go` — Struct: HostHandler (~5549 tok)
- `jobs_test.go` — TestPreCheckJobRequest_LostAndFound, TestJobsListFieldValidation_UsesJobInfoNotSubmitRequest, TestPr (~2001 tok)
- `jobs.go` — Struct: JobController (~30943 tok)
## src/frontend/docs/
- `status.md` — Project Status (~1193 tok)
## src/frontend/tests/regression/
- `run.sh` — Regression test suite: xcecli ↔ apiserver (~1655 tok)
## src/frontend/xcecli/cmd/
- `main.go` (~1160 tok)
## src/frontend/xcecli/common/output/
- `page_print_hosts.go` — Struct: HostsPagePrinter (~3340 tok)
## src/frontend/xcecli/models/
- `hosts.go` — Struct: HostsResponse (~1435 tok)
## src/include/
- `client.h` — if !defined(_CLIENT_H_) (~2478 tok)
- `clusterconfig.h` — if !defined(_CLUSTERCONFIG_H_) (~337 tok)
- `request.h` — if !defined(_REQUEST_H_) (~3239 tok)
- `typemap.h` — if !defined(_TYPEMAP_H_) (~8555 tok)
## src/include/xce/
- `types.h` — < NULL. (~6030 tok)
## src/lib/
- `client.c` — include <errno.h> (~7752 tok)
- `controller.capnp.c` — include "controller.capnp.h" (~167125 tok)
- `helper.c` — include <errno.h> (~3062 tok)
- `meson.build` (~1772 tok)
- `request.c` — include <errno.h> (~19604 tok)
- `utils.c` — include <ctype.h> (~7883 tok)
- `vtaskmgr.c` — include <errno.h> (~3978 tok)
## src/lib/testsuite/
- `test_job_state_wire.c` (~4069 tok)
- `test_libxce_retry.c` — Declares struct (~19738 tok)
- `test_vtask_enq_race.c` — Declares under (~1430 tok)
- `test.c` — include <argp.h> (~1297 tok)
## src/scheduler/
- `meson.build` (~1521 tok)
- `tools_verify_fixture.c` — include <errno.h> (~1550 tok)
## src/scheduler/include/ ## src/scheduler/include/
- `core.h` — if !defined(_CORE_H_) (~8819 tok) - `scheduler.h` — if !defined(_SCHEDULER_H_) (~4701 tok)
- `scheduler.h` — if !defined(_SCHEDULER_H_) (~4176 tok)
## src/scheduler/src/ ## src/scheduler/src/
- `core_events.c` — include <errno.h> (~15473 tok) - `plugin.c` — include <errno.h> (~4328 tok)
- `core_session.c` — include <errno.h> (~4516 tok) - `resource.c` — include <errno.h> (~8052 tok)
- `driver.c` — include <errno.h> (~9443 tok)
- `handler.c` — include <errno.h> (~7039 tok) ## src/scheduler/src/plugins/
- `main.c` — include <argp.h> (~5752 tok)
- `repl_bp_kind.c` — include <string.h> (~979 tok) - `parjob_allocator.c` — include <errno.h> (~7506 tok)
- `repl_break.c` — include <stdio.h> (~9921 tok) - `seqjob_allocator.c` — include <errno.h> (~3274 tok)
- `repl_fmt.c` — include <stdarg.h> (~3971 tok)
- `repl_info.c` — include <stdio.h> (~14934 tok)
- `repl_internal.h` — if !defined(_REPL_INTERNAL_H_) (~7113 tok)
- `repl_jobid_range.c` — include <stdarg.h> (~2916 tok)
- `repl_params.c` — include <errno.h> (~4864 tok)
- `repl_prompt.c` — include <stdio.h> (~221 tok)
- `repl.c` — include <ctype.h> (~7087 tok)
- `resource.c` — include <errno.h> (~6852 tok)
- `schedobj.c` — include <errno.h> (~5151 tok)
- `scheduler.c` — include <errno.h> (~16542 tok)
- `sim_loop.c` — include <errno.h> (~16693 tok)
- `snapshot_load.c` — include <errno.h> (~5920 tok)
- `snapshot.c` — include <errno.h> (~8498 tok)
## src/scheduler/testsuite/ ## src/scheduler/testsuite/
- `meson.build` — Declares vtask_entry (~24510 tok) - `test_parjob_combinatorial.c` — Declares of (~12038 tok)
- `test_admin_request.c` — Declares level (~13172 tok) - `test_resource_accounting.c` — Declares pulled (~12240 tok)
- `test_core_events.c` — Declares and (~16152 tok) - `test_seqjob_allocator.c` — Declares char (~3701 tok)
- `test_core_full_cycle.c` — Declares is (~8075 tok)
- `test_core_session.c` (~5409 tok)
- `test_driver_decision_cb.c` — Declares is (~3835 tok)
- `test_driver_session_ordering.c` — Declares started (~8672 tok)
- `test_driver_translate.c` — Declares field (~9667 tok)
- `test_handlers.c` — define UNIT_TEST 1 (~3218 tok)
- `test_job_update.c` — Declares char (~3307 tok)
- `test_picker_config_fields.c` — Declares char (~3355 tok)
- `test_picker_wiring.c` — Declares is (~5443 tok)
- `test_record_lifecycle.c` — Declares char (~12885 tok)
- `test_repl_breakpoints_inspection.c` — Declares and (~22516 tok)
- `test_repl_equivalence.c` — Declares char (~7810 tok)
- `test_repl_event_echo.c` — Declares char (~7374 tok)
- `test_repl_execution_control.c` — Declares directly (~9278 tok)
- `test_repl_help.c` — Declares error (~6018 tok)
- `test_repl_output_compression.c` — Declares under (~3851 tok)
- `test_repl_prompt_context.c` — Declares char (~6687 tok)
- `test_repl_resource_formatting.c` — Declares design (~4465 tok)
- `test_repl_resource_table.c` — Declares char (~17776 tok)
- `test_repl_round_rollup.c` — Declares char (~10735 tok)
- `test_repl_snapshot_params.c` — Declares char (~10134 tok)
- `test_repl_step_verbosity.c` — Declares unconditionally (~11316 tok)
- `test_resource_accounting.c` — Declares char (~8455 tok)
- `test_resval_ownership.c` — Declares instead (~5631 tok)
- `test_review_fixture_gen.c` — include <errno.h> (~3093 tok)
- `test_scheduler_decision_publish_retry.c` — Declares directly (~8825 tok)
- `test_sim_alt_events.c` — Declares char (~5141 tok)
- `test_sim_contention_parity.c` — Declares calls (~18713 tok)
- `test_sim_e2e_original_motivation.c` (~17120 tok)
- `test_sim_equivalence.c` — Declares BOTH (~8517 tok)
- `test_sim_event_loop.c` — Declares char (~9504 tok)
- `test_sim_isolation.c` — Declares names (~8548 tok)
- `test_sim_print_decision_gate.c` — Declares char (~7154 tok)
- `test_sim_reconcile_unaccounted.c` — Declares documents (~25802 tok)
- `test_sim_record_output.c` — Declares char (~6041 tok)
- `test_sim_session_ordering.c` (~8267 tok)
- `test_sim_snapshot_reconcile_gap.c` — Declares char (~6308 tok)
- `test_sim_startup.c` — Declares char (~5708 tok)
- `test_sim_verify.c` — Declares mismatch (~16265 tok)
- `test_snapshot_save_load.c` (~28712 tok)
## src/schema/
- `controller.capnp` — Declares OPCode (~15956 tok)
## src/tools/ ## src/tools/
- `deploy-ha.sh` (~8229 tok) - `xce-build.sh` (~4476 tok)
- `xce-build.sh` (~4296 tok)
## src/worker/
- `meson.build` (~746 tok)
## src/worker/include/
- `hardware_monitor.h` — ifndef HARDWARE_MONITOR_H (~266 tok)
- `xcecd_resync.h` — ifndef XCECD_RESYNC_H (~2516 tok)
- `xcecd_worker_utils.h` — ifndef XCED_WORKER_UTILS_H (~2063 tok)
## src/worker/src/
- `controller_connector.c` — include "client.h" (~20090 tok)
- `hardware_monitor.c` — include "hardware_monitor.h" (~1652 tok)
- `resource_sync.c` — include "resource_sync.h" (~3991 tok)
- `uv_ipc.c` — include "uv_ipc.h" (~12439 tok)
- `xcecd_resync.c` — include "xcecd_resync.h" (~3402 tok)
- `xcecd_worker_utils.c` — include "xcecd_worker_utils.h" (~6845 tok)
- `xcecd.c` — fake pids used in virtual cluster (~5307 tok)
## src/worker/testsuite/
- `meson.build` — Worker unit test suite (component-failover-adoption, task 2.1). White-box (~2333 tok)
- `test_controller_connector.c` — Declares char (~16661 tok)
- `test_finished_job_retention.c` — Declares uint64_t (~3274 tok)
- `test_hardware_monitor.c` — include <errno.h> (~1395 tok)
- `test_resource_sync.c` (~2719 tok)
- `test_uv_ipc_job_exit_severity.c` — Declares with (~863 tok)
- `test_xcecd_resync.c` (~9890 tok)
- `test_xcecd_startup_order.c` — Declares in (~4151 tok)
## src/xceadmin/
- `meson-build.sh` — Meson-driven xceadmin build: install + test out-of-tree, in the meson (~2445 tok)
## src/xceadmin/src/xcecommon/
- `mapping.py` — YAML-section-dict -> ``ClusterConfig`` capnp field mapping for (~7203 tok)
## src/xceadmin/tests/
- `test_config_build.py` — Golden-file-style build tests for ``xceadmin.build`` (design.md, (~4122 tok)
- `test_e2e_live_ha_push.py` (~8887 tok)
- `test_mapping.py` — Unit tests for ``xcecommon.mapping`` (design.md, ``xcecommon.mapping``; (~7235 tok)
## src/xceadmin/tests/fixtures/full/configs/
- `xce.yaml` (~52 tok)

View file

@ -230,3 +230,4 @@
- **(2026-08-26, xce-test-rc-file task 3.1) `xce_test`'s `cmd_set(argc==1)` (`set` with no args) is the generic, no-live-cluster-required readback for ANY setting** (`test.c:3684`, format `"%-12s:%s default: %s\n"`, `KVAL()` prints `"<not set>"` for a NULL current value) — the right primitive for any integration test that needs to observe an rc-file/`set`-driven setting change (e.g. `masters`) without a live controller connection. Don't hardcode the exact column padding when grepping its output (fragile) — extract via `sed -E 's/^masters[[:space:]]*:(.*) default:.*/\1/'` (greedy `(.*)` correctly captures the embedded-space `"<not set>"` sentinel too, since there's only one literal `" default:"` substring per line to anchor against). - **(2026-08-26, xce-test-rc-file task 3.1) `xce_test`'s `cmd_set(argc==1)` (`set` with no args) is the generic, no-live-cluster-required readback for ANY setting** (`test.c:3684`, format `"%-12s:%s default: %s\n"`, `KVAL()` prints `"<not set>"` for a NULL current value) — the right primitive for any integration test that needs to observe an rc-file/`set`-driven setting change (e.g. `masters`) without a live controller connection. Don't hardcode the exact column padding when grepping its output (fragile) — extract via `sed -E 's/^masters[[:space:]]*:(.*) default:.*/\1/'` (greedy `(.*)` correctly captures the embedded-space `"<not set>"` sentinel too, since there's only one literal `" default:"` substring per line to anchor against).
- **(2026-08-26, xce-test-rc-file task 3.1) `xce_test` uses `libedit`'s `readline()`/`isatty(STDIN_FILENO)`-gated `g_interactive`, so a genuine interactive-mode integration test needs a REAL pty, not a piped stdin** — confirmed working via a small embedded Python `pty.fork()` driver (write commands to the master fd with a short settle delay after each, drain with `select()`, detect child exit via non-blocking `waitpid`, `os.waitstatus_to_exitcode()` for the real exit code). Same technique task 2.2's own implementer used for manual verification; this task turned it into a reusable scripted harness. The prompt itself (`fill_prompt`, top-level context) renders as literal `"xce>"` — grepping for that substring in the pty transcript is a good "this really was a TTY session, not a piped fallback" sanity check, distinct from the actual assertion under test. - **(2026-08-26, xce-test-rc-file task 3.1) `xce_test` uses `libedit`'s `readline()`/`isatty(STDIN_FILENO)`-gated `g_interactive`, so a genuine interactive-mode integration test needs a REAL pty, not a piped stdin** — confirmed working via a small embedded Python `pty.fork()` driver (write commands to the master fd with a short settle delay after each, drain with `select()`, detect child exit via non-blocking `waitpid`, `os.waitstatus_to_exitcode()` for the real exit code). Same technique task 2.2's own implementer used for manual verification; this task turned it into a reusable scripted harness. The prompt itself (`fill_prompt`, top-level context) renders as literal `"xce>"` — grepping for that substring in the pty transcript is a good "this really was a TTY session, not a piped fallback" sanity check, distinct from the actual assertion under test.
- **A `.kiro/specs/*/tasks.md` checkbox count (`- [ ]` vs `- [x]`) is NOT reliable at face value when it includes section-HEADER checkboxes ("- [ ] N. Some phase name") — a spec whose every N.M subtask is `[x]` but whose parent `- [ ] N.` header was never flipped reads as "in progress" when it is actually 100% done.** (2026-09-03, cross-spec audit) Recurred a second time after the first fix (`5c82ad0b`, 2026-08-24, 5 specs): `scheduler-sim-eager-reconciliation` looked like "6/9, stalled since Aug 22" by a naive checkbox count, but all 3 "unchecked" items were section headers whose children (1.1/1.2/2.1/3.1/3.2/3.3) were already all `[x]`, with a `task 3.3 full regression confirmation` commit proving genuine completion on 2026-08-27. `worker-rejoin-resync` was the same drift the other direction (28/28 real tasks incl. headers all `[x]`, but `spec.json.phase` itself never advanced past `tasks-generated`). **Before reporting any spec as "stalled" or "N/M done," check headers and children SEPARATELY (`grep -E '^\s*-\s*\[ \]\s*[0-9]+\.'` for unchecked headers vs `^\s*-\s*\[ \]\s*[0-9]+\.[0-9]'` for unchecked subtasks) and cross-check `spec.json.phase`/`updated_at` against the tasks.md file's own git log — a low, stale-looking checkbox ratio and a phase field that hasn't moved are both metadata that can independently lag the real state, not just one signal.** - **A `.kiro/specs/*/tasks.md` checkbox count (`- [ ]` vs `- [x]`) is NOT reliable at face value when it includes section-HEADER checkboxes ("- [ ] N. Some phase name") — a spec whose every N.M subtask is `[x]` but whose parent `- [ ] N.` header was never flipped reads as "in progress" when it is actually 100% done.** (2026-09-03, cross-spec audit) Recurred a second time after the first fix (`5c82ad0b`, 2026-08-24, 5 specs): `scheduler-sim-eager-reconciliation` looked like "6/9, stalled since Aug 22" by a naive checkbox count, but all 3 "unchecked" items were section headers whose children (1.1/1.2/2.1/3.1/3.2/3.3) were already all `[x]`, with a `task 3.3 full regression confirmation` commit proving genuine completion on 2026-08-27. `worker-rejoin-resync` was the same drift the other direction (28/28 real tasks incl. headers all `[x]`, but `spec.json.phase` itself never advanced past `tasks-generated`). **Before reporting any spec as "stalled" or "N/M done," check headers and children SEPARATELY (`grep -E '^\s*-\s*\[ \]\s*[0-9]+\.'` for unchecked headers vs `^\s*-\s*\[ \]\s*[0-9]+\.[0-9]'` for unchecked subtasks) and cross-check `spec.json.phase`/`updated_at` against the tasks.md file's own git log — a low, stale-looking checkbox ratio and a phase field that hasn't moved are both metadata that can independently lag the real state, not just one signal.**
- **(2026-09-07, bug-1789) When a per-job "how much of resource X does this job want" value needs to reach a NEW consumer (e.g. a limit-evaluation function) that only sees a *subset* of the data (`ctx->alloc_req.shared`, filled only with genuinely-`XCE_RESF_GLOBAL`-flagged resources), do NOT "fix" it by writing that value into the shared/global request vector too, even if an existing sibling code path two lines above already branches on the same condition and looks like it's establishing the pattern to mirror.** `sched_fill_limit_requests()` (resource.c) needed a GLOBAL limit's underlying `"slots"` resource want, which seqjob/parjob's `prepare_allocation` hooks always staged into `ctx->alloc_req.host` (never `.shared`, since `"slots"` is deliberately per-host-only and excluded from `calc_wanted_global_resvals()`). The natural-looking fix — branch that one unbranched store by `ctx->worker == NULL` to mirror the `calc_wanted_*_resvals()` if/else two lines above it — compiled, passed 2 new targeted regression tests, and then broke 6 *other* previously-green tests (seqjob/parjob dispatch going from DISPATCH to PEND): `ctx->alloc_req.shared` is DUAL-PURPOSE — also read by `sched_check_shared_satisfy()` against `sched->core.sharedInst`, the genuinely-global capacity pool, which has no entry for `"slots"` at all, so injecting a spurious "wants slots" entry there made EVERY job's general resource-satisfy check spuriously fail, not just limit-scoped ones. **General lesson: before writing a new value into a shared/multi-purpose vector to fix ONE consumer, grep every OTHER reader of that same vector and confirm none of them will now see a value they don't know how to interpret — prefer teaching the ONE actually-broken consumer to read the value from its true source (here: `ctx->nslots`, already computed correctly earlier in the same call) over widening what a shared vector carries.** Caught only by re-running the full test suite after the first fix, not by reasoning about the change in isolation — a good reminder that "just mirror the adjacent branch" is not a substitute for checking a shared data structure's OTHER readers. **Follow-up refinement (same bug, user-prompted):** the eventual read-side fix initially special-cased by resource NAME (`strcmp(vres->res->name, "slots")`) — correctly called out as unreliable, since it silently fails to generalize to any future per-host resource not literally spelled "slots". Replaced with the resource's own `XCE_RESF_GLOBAL` flag (the same flag `calc_wanted_global_resvals()`/`calc_wanted_host_resvals()` already dispatch on) to pick `alloc_req->shared` vs `.host` — before hand-rolling a name/string-based special case for "which bucket does this belong in," check whether the codebase already has a flag/enum driving the identical classification elsewhere and reuse it.

View file

@ -1,14 +1,7 @@
{ {
"last_heartbeat": "2026-08-28T06:29:24.365Z", "last_heartbeat": "2026-09-07T14:41:46.821Z",
"engine_status": "running", "engine_status": "running",
"execution_log": [ "execution_log": [
{
"task_id": "project-suggestions",
"status": "failed",
"timestamp": "2026-05-21T13:48:25.789Z",
"duration_ms": 120850,
"error": "claude -p failed: spawnSync /bin/sh ETIMEDOUT"
},
{ {
"task_id": "anatomy-rescan", "task_id": "anatomy-rescan",
"status": "success", "status": "success",
@ -620,6 +613,12 @@
"status": "success", "status": "success",
"timestamp": "2026-08-28T01:00:00.042Z", "timestamp": "2026-08-28T01:00:00.042Z",
"duration_ms": 32 "duration_ms": 32
},
{
"task_id": "anatomy-rescan",
"status": "success",
"timestamp": "2026-09-07T13:00:00.252Z",
"duration_ms": 246
} }
], ],
"dead_letter_queue": [], "dead_letter_queue": [],

View file

@ -4307,3 +4307,106 @@
| 00:27 | Edited src/scheduler/testsuite/test_sim_verify.c | modified Correction() | ~824 | | 00:27 | Edited src/scheduler/testsuite/test_sim_verify.c | modified Correction() | ~824 |
| 00:29 | Edited .kiro/specs/scheduler-sim-eager-reconciliation/design.md | modified Correction() | ~527 | | 00:29 | Edited .kiro/specs/scheduler-sim-eager-reconciliation/design.md | modified Correction() | ~527 |
| 00:29 | Edited .kiro/specs/scheduler-sim-decision-parity/design.md | modified Correction() | ~624 | | 00:29 | Edited .kiro/specs/scheduler-sim-decision-parity/design.md | modified Correction() | ~624 |
| 00:47 | Session end: 43 writes across 17 files (test_hardware_monitor.c, hardware_monitor.h, hardware_monitor.c, xcecd.c, test_xcecd_startup_order.c) | 21 reads | ~23717 tok |
## Session: 2026-09-07 00:47
| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
| 00:59 | Edited src/frontend/apiserver/backend/convert_pure.go | modified WorkerDefaultOutputPath() | ~217 |
| 00:59 | Edited src/frontend/apiserver/backend/convert.go | 5→8 lines | ~80 |
| 00:59 | Edited src/frontend/apiserver/backend/convert.go | 3→4 lines | ~35 |
| 00:59 | Edited src/frontend/apiserver/backend/convert_test.go | modified TestResolveExecUser_DefaultsToSubmitUserWhenEmpty() | ~259 |
| 01:14 | Edited src/frontend/apiserver/backend/convert_pure.go | modified jobCtrlUnionDiscriminant() | ~255 |
| 01:15 | Edited src/frontend/apiserver/backend/clib.go | 5→8 lines | ~99 |
| 01:16 | Edited src/frontend/apiserver/backend/convert_test.go | modified TestJobCtrlUnionDiscriminant_StopResumeKillUseSiginfo() | ~279 |
| 01:20 | Edited src/frontend/apiserver/backend/convert_pure.go | 6→8 lines | ~23 |
| 01:21 | Edited src/frontend/apiserver/backend/convert_pure.go | modified ParseHumanJobID() | ~423 |
| 01:21 | Edited src/frontend/apiserver/controllers/jobs.go | modified IsNumeric() | ~217 |
| 01:21 | Edited src/frontend/apiserver/backend/convert_test.go | modified TestParseHumanJobID_NonArrayRoundTripsWithFormatJobID() | ~554 |
| 01:22 | Edited src/frontend/apiserver/backend/convert_test.go | 5→6 lines | ~18 |
| 01:31 | Edited src/frontend/apiserver/backend/clib.go | 1783 → 1781 | ~20 |
| 01:58 | Edited src/lib/testsuite/test_group.c | modified test_load_configs_registers_each_group_by_name() | ~1125 |
| 01:58 | Edited src/lib/testsuite/test_group.c | 3→6 lines | ~71 |
| 01:59 | Edited src/include/group.h | 1→2 lines | ~34 |
| 02:00 | Edited src/lib/group.c | added 3 condition(s) | ~391 |
| 02:00 | Edited src/scheduler/src/scheduler.c | modified sched_init_config() | ~213 |
| 02:00 | Edited src/scheduler/src/scheduler.c | 2→3 lines | ~16 |
| 02:22 | Edited src/scheduler/src/scheduler.c | 2→4 lines | ~73 |
| 02:31 | Edited src/scheduler/src/scheduler.c | modified for() | ~219 |
| 02:39 | Edited src/lib/group.c | modified if() | ~80 |
| 02:47 | Edited src/lib/group.c | modified if() | ~14 |
| 02:47 | Edited src/lib/xcelimit.c | modified if() | ~155 |
| 02:50 | Edited src/lib/xcelimit.c | modified if() | ~327 |
| 02:57 | Edited src/lib/xcelimit.c | added 1 condition(s) | ~344 |
| 02:57 | Edited src/lib/xcelimit.c | modified if() | ~117 |
| 02:58 | Edited src/scheduler/src/scheduler.c | removed 17 lines | ~44 |
| 02:59 | Edited src/lib/testsuite/test_limit.c | modified test_build_consumer_empty_config_defaults_to_all() | ~360 |
| 02:59 | Edited src/lib/testsuite/test_limit.c | 3→4 lines | ~46 |
| 03:09 | Edited src/scheduler/src/plugins/limit.c | modified if() | ~60 |
| 03:12 | Edited src/scheduler/src/plugins/limit.c | expanded (+12 lines) | ~360 |
| 03:12 | Edited src/scheduler/src/plugins/limit.c | modified if() | ~31 |
| 03:17 | Edited src/scheduler/src/plugins/limit.c | modified if() | ~260 |
| 03:21 | Edited src/lib/xcelimit.c | expanded (+6 lines) | ~156 |
| 03:26 | Edited src/scheduler/src/plugins/limit.c | modified if() | ~155 |
| 03:26 | Edited src/lib/xcelimit.c | removed 7 lines | ~22 |
| 03:26 | Edited src/scheduler/src/plugins/limit.c | expanded (+14 lines) | ~288 |
| 03:30 | Edited src/scheduler/src/plugins/limit.c | modified if() | ~60 |
| 03:40 | Edited src/lib/xcelimit.c | modified if() | ~103 |
| 03:41 | Edited src/scheduler/src/scheduler.c | modified for() | ~180 |
| 03:46 | Edited src/lib/xcelimit.c | modified if() | ~201 |
| 03:50 | Edited src/lib/xcelimit.c | modified if() | ~406 |
| 03:50 | Edited src/lib/xcelimit.c | modified if() | ~56 |
| 03:50 | Edited src/lib/xcelimit.c | 3→7 lines | ~99 |
| 03:51 | Edited src/scheduler/src/plugins/limit.c | modified if() | ~30 |
| 03:51 | Edited src/scheduler/src/scheduler.c | modified for() | ~72 |
| 05:39 | Edited src/lib/group.c | 2→2 lines | ~22 |
| 05:39 | Edited src/scheduler/src/plugins/limit.c | 3→3 lines | ~60 |
| 05:47 | Session end: 49 writes across 12 files (convert_pure.go, convert.go, convert_test.go, clib.go, jobs.go) | 30 reads | ~9421 tok |
## Session: 2026-09-07 05:47
| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
| 06:04 | Edited src/scheduler/src/plugins/seqjob_allocator.c | modified if() | ~275 |
| 06:04 | Edited src/scheduler/src/plugins/parjob_allocator.c | modified if() | ~250 |
| 06:05 | Edited src/scheduler/testsuite/test_seqjob_allocator.c | modified test_seqjob_prepare_allocation_global_phase_stores_slots_into_shared() | ~694 |
| 06:06 | Edited src/scheduler/testsuite/test_parjob_combinatorial.c | modified test_parjob_prepare_allocation_global_phase_stores_slots_into_shared() | ~684 |
| 06:07 | Edited src/scheduler/testsuite/test_parjob_combinatorial.c | 3→5 lines | ~52 |
| 06:10 | Edited src/scheduler/src/plugins/seqjob_allocator.c | removed 21 lines | ~54 |
| 06:11 | Edited src/scheduler/src/plugins/parjob_allocator.c | modified if() | ~58 |
| 06:11 | Edited src/scheduler/testsuite/test_seqjob_allocator.c | removed 68 lines | ~64 |
| 06:11 | Edited src/scheduler/testsuite/test_parjob_combinatorial.c | removed 63 lines | ~8 |
| 06:12 | Edited src/scheduler/testsuite/test_parjob_combinatorial.c | 4→2 lines | ~26 |
| 06:12 | Edited src/scheduler/src/resource.c | added 1 condition(s) | ~429 |
| 06:13 | Edited src/scheduler/include/scheduler.h | 1→2 lines | ~36 |
| 06:13 | Edited src/scheduler/src/plugin.c | 2→2 lines | ~33 |
| 06:13 | Edited src/scheduler/src/plugin.c | modified if() | ~44 |
| 06:17 | Edited src/scheduler/testsuite/test_resource_accounting.c | modified test_fill_limit_requests_global_slots_limit_uses_ctx_nslots() | ~1271 |
| 06:35 | Session wrap: bug-1789 FIXED — global limits on "slots" (ug1_slots/ug1_normal_slots/limit1) always recorded 0 wanted slots per job, so their numeric caps never bound. Root cause: seqjob/parjob's prepare_allocation hooks always stage the job's wanted slot count into ctx->alloc_req.host (never .shared, since "slots" is deliberately excluded from calc_wanted_global_resvals), so sched_fill_limit_requests()'s vec-lookup always missed for a global limit. First attempt (branch the seqjob/parjob store by ctx->worker to mirror the sibling calc_wanted_*_resvals branch) broke 6 other tests — ctx->alloc_req.shared is dual-purpose, also read by sched_check_shared_satisfy() against the real global capacity pool, which has no "slots" entry at all — reverted. Real fix: sched_fill_limit_requests() takes an added xce_sched_ctx_t* ctx param and uses ctx->nslots directly (already correctly computed earlier in the same call) for a "slots"-resname'd limit only, leaving every other resource's existing vec-lookup untouched. 23 test-suite link-satisfying stubs mechanically updated to the new 4-arg signature. 2 new focused unit tests added (test_resource_accounting.c). Full scheduler suite 76/77 (only pre-existing unrelated bug-1762 remains). Live-verified via fresh single-node deploy: limit1 (cap 3) now correctly binds and PENDs the 4th of 10 submitted jobs, scheduler trace showing a real nonzero "wanted" value for the first time ever | src/scheduler/src/{resource.c,plugin.c,plugins/seqjob_allocator.c (reverted),plugins/parjob_allocator.c (reverted)}, src/scheduler/include/scheduler.h, src/scheduler/testsuite/{test_resource_accounting.c,+23 stub files}, .wolf/buglog.json (bug-1789), .wolf/cerebrum.md | FIXED, live-verified, buglog updated | ~950k |
| 06:17 | Edited src/scheduler/testsuite/test_resource_accounting.c | 2→4 lines | ~64 |
| 07:24 | Edited src/scheduler/src/resource.c | modified sched_fill_limit_requests() | ~511 |
| 07:24 | Edited src/scheduler/include/scheduler.h | 2→2 lines | ~38 |
| 07:25 | Edited src/scheduler/src/plugin.c | 2→2 lines | ~37 |
| 07:25 | Edited src/scheduler/src/plugin.c | modified if() | ~47 |
| 07:27 | Edited src/scheduler/testsuite/test_resource_accounting.c | modified combination() | ~2153 |
| 07:27 | Edited src/scheduler/testsuite/test_resource_accounting.c | 2→3 lines | ~65 |
| 07:33 | bug-1789 refined per user feedback: replaced the name-based `strcmp(res->name,"slots")` special-case with a flag-based one (`XCE_RESF_GLOBAL`, the same flag calc_wanted_global_resvals()/calc_wanted_host_resvals() already dispatch on) — sched_fill_limit_requests() now takes xce_sched_alloc_req_t* alloc_req instead of ctx (nothing else from ctx was used) and picks alloc_req->shared vs .host per-resource by that flag. 2 unit tests replaced with 3 (added a symmetric case: host-scoped limit on a genuinely-global resource reads from .shared). Full suite re-run 76/77 (same pre-existing bug-1762), fresh live redeploy re-verified byte-identical trace to the first verification. Flagged one explicit residual gap to the user: a hypothetical new global limit on a non-"slots" per-host resource (e.g. absolute mem) would still be broken, since only "slots" has a dedicated always-computed staging step — not present in current config, deliberately not attempted | src/scheduler/src/{resource.c,plugin.c}, src/scheduler/include/scheduler.h, src/scheduler/testsuite/{test_resource_accounting.c,+23 stub files}, .wolf/{buglog.json,cerebrum.md} | refined, live re-verified, buglog+cerebrum updated | ~600k |
| 07:54 | Edited src/scheduler/src/resource.c | modified sched_fill_limit_requests() | ~657 |
| 07:55 | Edited src/scheduler/include/scheduler.h | 2→2 lines | ~34 |
| 07:55 | Edited src/scheduler/src/plugin.c | 2→1 lines | ~21 |
| 07:55 | Edited src/scheduler/src/plugin.c | modified if() | ~31 |
| 07:57 | Edited src/scheduler/testsuite/test_resource_accounting.c | modified test_fill_limit_requests_global_limit_on_host_resource_reads_host() | ~2380 |
| 07:57 | Edited src/scheduler/testsuite/test_resource_accounting.c | 2→4 lines | ~70 |
## Session: 2026-09-07 08:11
| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
| 08:20 | Edited src/tools/xce-build.sh | modified incremental() | ~231 |
| 08:20 | Edited src/tools/xce-build.sh | removed 4 lines | ~4 |
| 08:22 | Edited README.md | 23→19 lines | ~199 |
| 08:27 | Edited src/scheduler/src/resource.c | modified sched_fill_limit_requests() | ~30 |
| 08:28 | Edited src/scheduler/include/scheduler.h | 2→1 lines | ~19 |
| 08:28 | Edited src/scheduler/src/plugin.c | inline fix | ~19 |
| 08:28 | Edited src/scheduler/src/plugin.c | inline fix | ~18 |

View file

@ -114,12 +114,12 @@ git add frontend/apiserver/go.mod frontend/apiserver/go.sum frontend/apiserver/v
## 3.4 build (for daily develop) ## 3.4 build (for daily develop)
日常开发推荐直接使用 `src/tools/xce-build.sh`(若在 Claude Code 中开发,对应的是 `/xce-build` skill), 日常开发推荐直接使用 `src/tools/xce-build.sh`(若在 Claude Code 中开发,对应的是 `/xce-build` skill),
它会执行 `meson setup` / `meson compile`,并在 `asan` profile 下跑测试。**注意它自己不会进入 `nix develop` 它会执行 `meson setup` / `meson compile`,并在 `asan` profile 下跑测试。**该脚本会自动进入 `nix develop`
环境**,需要先手动 `nix develop`,或者用 `nix develop --command` 包一层: 环境**(脚本开头检测 `IN_NIX_SHELL`,未设置时自动用 `nix develop` 重新执行自身),无需手动
`nix develop` 或额外包一层,直接跑即可:
```sh ```sh
cd xce/src cd xce/src
nix develop
tools/xce-build.sh # 全部组件 + 全部测试 (asan profile, 输出到 xce.build/) tools/xce-build.sh # 全部组件 + 全部测试 (asan profile, 输出到 xce.build/)
tools/xce-build.sh controller # 只构建/测试 controller (lib + controller + xce_test) tools/xce-build.sh controller # 只构建/测试 controller (lib + controller + xce_test)
@ -128,12 +128,8 @@ tools/xce-build.sh scheduler # 只构建/测试 scheduler
tools/xce-build.sh apiserver # 只构建/测试 apiserver + xcecli (Go) tools/xce-build.sh apiserver # 只构建/测试 apiserver + xcecli (Go)
``` ```
或者不进入交互式 shell,直接一条命令跑: (如果已经身处 `nix develop` 交互式 shell 内运行以上命令,脚本会检测到 `IN_NIX_SHELL` 已设置,跳过重新
进入的步骤,直接执行构建。)
```sh
cd xce/src
nix develop --command tools/xce-build.sh controller
```
支持三种 profile(`tools/xce-build.sh [component] [profile]`): 支持三种 profile(`tools/xce-build.sh [component] [profile]`):

View file

@ -1,6 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SRC_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
# Self-wrap into the hermetic nix dev shell. meson/ninja/capnp/Go live only
# there; a bare invocation outside it fails opaquely ("meson: command not
# found") well past the point a caller can tell why. Re-exec once under
# `nix develop` -- the same wrapper the /xce-build skill already documents
# running by hand -- so every caller (the skill, a bare `bash xce-build.sh`,
# CI, a human at a terminal) gets it automatically instead of relying on
# remembering it. `nix develop` sets IN_NIX_SHELL, so a nested invocation
# (e.g. already inside the shell) is a no-op past this check.
if [ -z "${IN_NIX_SHELL:-}" ]; then
exec nix develop "$SRC_DIR" --command "$0" "$@"
fi
# --incremental (bug-1565 escape hatch): opt-in, NOT the default. Every # --incremental (bug-1565 escape hatch): opt-in, NOT the default. Every
# invocation normally does a full `rm -rf "$BUILD_DIR"` + fresh `meson # invocation normally does a full `rm -rf "$BUILD_DIR"` + fresh `meson
# setup` (see setup_build below) -- correct in isolation, but since # setup` (see setup_build below) -- correct in isolation, but since
@ -72,9 +87,6 @@ case "$PROFILE" in
release) MESON_OPTS=(--buildtype=release -Db_sanitize=none); RUN_TESTS=0 ;; release) MESON_OPTS=(--buildtype=release -Db_sanitize=none); RUN_TESTS=0 ;;
esac esac
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SRC_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$SRC_DIR" cd "$SRC_DIR"
# build-time-versioning task 2.1: compute commit_id/build_time once, common to # build-time-versioning task 2.1: compute commit_id/build_time once, common to