feat(controller): clusterconfig-schema-split task 1.1 — remove dead fields from ClusterConfig schema

Removes port, candidates, vcpus, jobmgr, workermgr, qmgr, resmgr, xstrings
from the ClusterConfig capnp struct plus the now-unused MasterCandidate
struct, per the config-design.md shared-vs-local classification rule.

Cap'n Proto forbids ordinal gaps, so the 13 retained fields are renumbered
to a contiguous @0..@12 (accepted pre-1.0 wire-compat break — see
research.md's "Design Revision 2"). requirements.md/design.md updated to
match: Req 3.1 drops field-number invariance, Req 3.2/4.1 state a pre-spec
cluster.bin is not expected to decode correctly, and a new Req 5.3 covers
regenerating the checked-in ha/data/cluster.bin fixture in a later task.

Also folds in this session's live design revision: Requirement 1.7's port
replacement mechanism is the existing --peers self-reference + a hardcoded
default (no new --port CLI flag), confirmed via interactive review with
the spec owner.
This commit is contained in:
Rongsong Shen 2026-07-21 03:01:26 +00:00
parent 94f50ce6e1
commit 515248200a
6 changed files with 589 additions and 26 deletions

View file

@ -671,12 +671,6 @@ struct ResmgrConfig $C.mapname("resmgr_config_t") {
instDelta @2: UInt32 $C.mapname("inst_delta");
}
struct MasterCandidate $C.mapname("master_candidate_t") {
name @0: Text $C.mapname("name");
host @1: Text $C.mapname("host");
port @2: UInt32 $C.mapname("port");
}
struct HostConfig $C.mapname("xce_hostconfig_t") {
name @0: Text $C.mapname("name");
model @1: Text $C.mapname("hostmodel");
@ -710,26 +704,18 @@ struct LimitConfig $C.mapname("xce_limit_config_t") {
struct ClusterConfig $C.mapname("cluster_config_t") {
clusterName @0: Text $C.mapname("clustername");
port @1: UInt32 $C.mapname("port");
candidates @2: List(MasterCandidate) $C.mapname("candidates") $C.maplistcount("ncandidates");
heartbeatInterval @3: UInt32 $C.mapname("heartbeat_interval");
inactiveHeartbeatCount @4: UInt32 $C.mapname("inactive_heartbeat_count");
fetchJobInterval @5: UInt32 $C.mapname("fetch_job_interval");
netioTimeout @6: UInt32 $C.mapname("netio_timeout");
vcpus @7: UInt32 $C.mapname("vcpus"); # deprecated: use --vcpus CLI flag; kept for config blob backward compatibility
resources @8: List(Resource) $C.mapname("resources") $C.maplistcount("nres");
queues @9: List(QueueConf) $C.mapname("queues") $C.maplistcount("nqueues");
ugroups @10: List(GroupConfig) $C.mapname("ugroups") $C.maplistcount("nugroups");
hgroups @11: List(GroupConfig) $C.mapname("hgroups") $C.maplistcount("nhgroups");
hostConfigs @12: List(HostConfig) $C.mapname("hconfigs") $C.maplistcount("nhconfigs");
jobmgr @13: HashZArrayConfig;
workermgr @14: HashZArrayConfig;
qmgr @15: HashZArrayConfig;
resmgr @16: ResmgrConfig;
xstrings @17: HashZArrayConfig;
hproviders @18: List(ScalerConfig) $C.mapname("hproviders") $C.maplistcount("nhproviders");
limits @19: List(LimitConfig) $C.mapname("limits") $C.maplistcount("nlimits");
configGeneration @20: UInt64 $C.mapname("config_generation");
heartbeatInterval @1: UInt32 $C.mapname("heartbeat_interval");
inactiveHeartbeatCount @2: UInt32 $C.mapname("inactive_heartbeat_count");
fetchJobInterval @3: UInt32 $C.mapname("fetch_job_interval");
netioTimeout @4: UInt32 $C.mapname("netio_timeout");
resources @5: List(Resource) $C.mapname("resources") $C.maplistcount("nres");
queues @6: List(QueueConf) $C.mapname("queues") $C.maplistcount("nqueues");
ugroups @7: List(GroupConfig) $C.mapname("ugroups") $C.maplistcount("nugroups");
hgroups @8: List(GroupConfig) $C.mapname("hgroups") $C.maplistcount("nhgroups");
hostConfigs @9: List(HostConfig) $C.mapname("hconfigs") $C.maplistcount("nhconfigs");
hproviders @10: List(ScalerConfig) $C.mapname("hproviders") $C.maplistcount("nhproviders");
limits @11: List(LimitConfig) $C.mapname("limits") $C.maplistcount("nlimits");
configGeneration @12: UInt64 $C.mapname("config_generation");
}
# ── Persistence configuration (Part 2.6) ────────────────────────────