docs(specs): gap-analysis validation pass across all 9 HA-family specs
Appended "Gap Analysis — Validation Pass (2026-06-09)" to each spec's research.md with requirement-to-asset maps, status tags, and effort/risk. Key outcomes: - ha-repl-hardening: REOPENED with task series 7.1-7.7 — replication payload data plane is missing (snapshot chunks and WAL catch-up ship header-only; standbys converge on LSN without holding entity state) - worker-join-refactor, resval-id-decoupling: marked implemented (all criteria re-verified, full test suite green) - buglog: 335/336 (scheduler dequeue, open), 337/338/339 (fixed in previous commit); cerebrum Decision Log corrected (term-only vote deny was recorded as intentional but was a regression)
This commit is contained in:
parent
9821ec4f3c
commit
cdd446fc17
21 changed files with 3955 additions and 288 deletions
|
|
@ -5292,6 +5292,246 @@
|
|||
"related_bugs": [],
|
||||
"occurrences": 2,
|
||||
"last_seen": "2026-06-09T08:35:24.717Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-331",
|
||||
"timestamp": "2026-06-09T09:28:15.795Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/controller/myapp.c",
|
||||
"root_cause": "5 lines replaced/restructured",
|
||||
"fix": "Rewrote 27→36 lines (5 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T09:28:15.795Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-332",
|
||||
"timestamp": "2026-06-09T09:41:02.753Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/lib/raft/raft.c",
|
||||
"root_cause": "4 lines replaced/restructured",
|
||||
"fix": "Rewrote 9→15 lines (4 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T09:41:02.753Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-333",
|
||||
"timestamp": "2026-06-09T10:23:01.661Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "37 lines replaced/restructured",
|
||||
"fix": "Rewrote 41→4 lines (37 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T10:23:01.661Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-334",
|
||||
"timestamp": "2026-06-09T12:56:11.095Z",
|
||||
"error_message": "Wrong condition in logic",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "Condition was: if (my_role == CTRL_STANDBY && ha_heartbeat_is_fresh(h)",
|
||||
"fix": "Changed to: if (my_role == CTRL_STANDBY && ha->primary_ctrl_fd >= )",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"logic-fix",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T12:56:11.095Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-335",
|
||||
"timestamp": "2026-06-09T00:00:00Z",
|
||||
"error_message": "UPDATE_RESVALS dequeue writes worker resval at index 0 unconditionally instead of resolving resource idx by name",
|
||||
"file": "src/scheduler/src/scheduler.c",
|
||||
"root_cause": "zarray_put(&w->resvals, 0, rv->val) hardcodes index 0; worker resvals are indexed by resource idx (see schedobj.c:291)",
|
||||
"fix": "NOT YET FIXED — found during scheduler-controller-msg-gap validation gap analysis (research.md G-1). Fix: key_find rv->name in sched->resmgr, put at r->idx",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"resvals",
|
||||
"latent-bug",
|
||||
"gap-analysis",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-336",
|
||||
"timestamp": "2026-06-09T00:00:00Z",
|
||||
"error_message": "XCE_SCHED_OP_UPDATE_RESOURCES cannot update existing resources; makeResource returns NULL/EEXIST and return value is silently ignored",
|
||||
"file": "src/scheduler/src/scheduler.c",
|
||||
"root_cause": "makeResource_ in src/lib/resobj.c rejects duplicates with EEXIST; dequeue case ignores NULL return, so 'add or update' (EARS-UB-1.1) is only 'add'",
|
||||
"fix": "NOT YET FIXED — found during scheduler-controller-msg-gap validation gap analysis (research.md G-2). Fix: on EEXIST mutate existing resource fields and log failures",
|
||||
"tags": [
|
||||
"scheduler",
|
||||
"resources",
|
||||
"latent-bug",
|
||||
"gap-analysis",
|
||||
"silent-error",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-337",
|
||||
"timestamp": "2026-06-09T00:02:00Z",
|
||||
"error_message": "Vote-deny gate inert: ha_heartbeat_is_fresh reads ha->last_heartbeat which has no production writer after the liveness refactor",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "ha-heartbeat-liveness refactor moved activity tracking to ha->last_activity but ha_heartbeat_is_fresh (ha.c:1762) still reads the orphaned last_heartbeat timespec; only tests write it, so freshness is always stale after ~heartbeat_timeout_ms of uptime and standbys grant votes despite a live primary (gates at ha.c:214 and ha.c:1841)",
|
||||
"fix": "FIXED 2026-06-09: ha_heartbeat_is_fresh now reads ha->last_activity (returns 0 when last_activity==0); dead last_heartbeat field removed from ha_state_t; test_ha_vote_gate.c helper rewritten as set_last_activity_age and fresh/stale tests now also set primary_ctrl_fd. All tests green.",
|
||||
"tags": [
|
||||
"ha",
|
||||
"heartbeat",
|
||||
"liveness",
|
||||
"vote-gate",
|
||||
"dead-field",
|
||||
"gap-analysis"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T17:30:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-338",
|
||||
"timestamp": "2026-06-09T00:00:00Z",
|
||||
"error_message": "controller_unit_test: test_vote_granted_to_same_candidate_same_term FAIL (Expected 1 Was 0); test_standby_fresh_heartbeat_denies_vote_request FAIL (Expected 0 Was 1, Req 6.2)",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "Uncommitted handle_request_vote changes: (1) duplicate-vote deny made candidate-agnostic (denies same-candidate idempotent re-grant, diverging from raft.c which keeps re-grant); (2) STANDBY vote deny now requires primary_ctrl_fd >= 0, tests use ha_init default fd=-1",
|
||||
"fix": "FIXED 2026-06-09: handle_request_vote Req 2.6 check restored to same-candidate idempotent re-grant (deny only when voted_for_name differs from candidate_id), matching raft.c; test_standby_fresh_heartbeat_denies_vote_request updated to set primary_ctrl_fd=999. Also fixed myapp.c leader_known check to treat a vote for myconf->name as a self-vote (production records real name, not the 'self' test placeholder). All tests green.",
|
||||
"tags": [
|
||||
"ha",
|
||||
"election",
|
||||
"vote-gate",
|
||||
"raft",
|
||||
"unit-test",
|
||||
"uncommitted-drift",
|
||||
"gap-analysis"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T17:30:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-339",
|
||||
"timestamp": "2026-06-10T00:23:18.666Z",
|
||||
"error_message": "Missing guard clause",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "No early return/throw for edge case: last == 0",
|
||||
"fix": "Added guard clause: if (last == 0)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"guard-clause",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T00:23:18.666Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-340",
|
||||
"timestamp": "2026-06-10T00:23:21.918Z",
|
||||
"error_message": "Wrong condition in logic",
|
||||
"file": "src/controller/ha.c",
|
||||
"root_cause": "Condition was: if (ha->voted_for_term == term && ha->voted_for_name[0)",
|
||||
"fix": "Changed to: if (ha->voted_for_term == term && ha->voted_for_name[0)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"logic-fix",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T00:23:21.918Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-341",
|
||||
"timestamp": "2026-06-10T00:23:52.563Z",
|
||||
"error_message": "Wrong reference: last_heartbeat should be voted_for_term",
|
||||
"file": "src/controller/ha.h",
|
||||
"root_cause": "Used \"last_heartbeat\" instead of \"voted_for_term\"",
|
||||
"fix": "Changed last_heartbeat → voted_for_term",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"wrong-reference",
|
||||
"h"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T00:23:52.563Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-342",
|
||||
"timestamp": "2026-06-10T00:24:41.873Z",
|
||||
"error_message": "Significant refactor of ",
|
||||
"file": "src/controller/myapp.c",
|
||||
"root_cause": "4 lines replaced/restructured",
|
||||
"fix": "Rewrote 13→17 lines (4 removed)",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"refactor",
|
||||
"c"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T00:24:41.873Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-339",
|
||||
"timestamp": "2026-06-09T17:30:00Z",
|
||||
"error_message": "raft_init discards persisted vote term: voted_for_term reset to 0 even when initial_voted_for is restored, so duplicate-vote check cannot match after restart (possible double vote in same term)",
|
||||
"file": "src/lib/raft/raft.c",
|
||||
"root_cause": "raft_init set s->voted_for_term=0 unconditionally; persistence writes (term, voted_for) as a pair, so a restored vote belongs to initial_term",
|
||||
"fix": "FIXED 2026-06-09: voted_for_term = (initial_voted_for != -1) ? initial_term : 0. Added test_proto_H6_restored_vote_blocks_second_vote and strengthened H1 assertion in src/lib/testsuite/test_raft.c. Found as candidate bug C2 in raft-library gap analysis.",
|
||||
"tags": [
|
||||
"raft",
|
||||
"election-safety",
|
||||
"restart",
|
||||
"persistence",
|
||||
"gap-analysis"
|
||||
],
|
||||
"related_bugs": [
|
||||
"bug-338"
|
||||
],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-09T17:30:00Z"
|
||||
},
|
||||
{
|
||||
"id": "bug-344",
|
||||
"timestamp": "2026-06-10T00:32:34.054Z",
|
||||
"error_message": "Incorrect value in code",
|
||||
"file": "../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_ha_bootstrap_progress.md",
|
||||
"root_cause": "Had `ha->last_heartbeat`",
|
||||
"fix": "Changed to `ha->last_activity`",
|
||||
"tags": [
|
||||
"auto-detected",
|
||||
"wrong-value",
|
||||
"md"
|
||||
],
|
||||
"related_bugs": [],
|
||||
"occurrences": 1,
|
||||
"last_seen": "2026-06-10T00:32:34.054Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue