add wolf state

This commit is contained in:
Rongsong Shen 2026-06-25 14:30:46 +08:00
parent 6563adf8c6
commit 295769d8ae
7 changed files with 18228 additions and 789 deletions

View file

@ -1,7 +1,11 @@
# anatomy.md
> Auto-maintained by OpenWolf. Last scanned: 2026-06-24T08:33:10.048Z
> Files: 570 tracked | Anatomy hits: 0 | Misses: 0
> Auto-maintained by OpenWolf. Last scanned: 2026-06-25T04:36:05.545Z
> Files: 579 tracked | Anatomy hits: 0 | Misses: 0
## ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-raft-tla/e9921464-33bd-405e-b66b-f65b9fa8c107/scratchpad/
- `fig8_main.c` — define XCE_TESTING 1 (~464 tok)
## ../../../../../../tmp/xce-ha-verify/
@ -16,7 +20,9 @@
- `project_bug1060_leader_completeness.md` (~538 tok)
- `project_bug1067_ae_two_terms.md` (~716 tok)
- `project_raft_commit_safety_done.md` (~603 tok)
- `project_bug1077_reply_union_type_confusion.md` — Declares metadata (~463 tok)
- `project_ha_bootstrap_progress.md` (~760 tok)
- `project_raft_commit_safety_done.md` (~771 tok)
- `project_raft_log_replication_done.md` (~507 tok)
## ./
@ -280,6 +286,7 @@
- `brief.md` — Brief: config-upgrade-snapshot (~923 tok)
- `requirements.md` — Requirements Document (~1533 tok)
- `research.md` — Gap Analysis — config-upgrade-snapshot (2026-06-24) (~3178 tok)
- `spec.json` (~147 tok)
## .kiro/specs/controller-status/
@ -361,7 +368,7 @@
- `requirements.md` — Requirements Document (~3586 tok)
- `research.md` — Research & Design Decisions: ha-convergence-recovery (~6912 tok)
- `spec.json` (~142 tok)
- `tasks.md` — Implementation Plan: ha-convergence-recovery (~5679 tok)
- `tasks.md` — Implementation Plan: ha-convergence-recovery (~5999 tok)
## .kiro/specs/ha-elect-ctx-lifecycle/
@ -431,7 +438,7 @@
- `requirements.md` — Requirements Document (~4240 tok)
- `research.md` — Research & Design Decisions (~5375 tok)
- `spec.json` (~141 tok)
- `tasks.md` — Implementation Plan (~13751 tok)
- `tasks.md` — Implementation Plan (~14377 tok)
- `TLA-gap-analysis.md` — Gap Analysis: XCE HA implementation vs `raft/raft.tla` (~2070 tok)
## .kiro/specs/ha-wal-replication/
@ -457,6 +464,7 @@
- `brief.md` — Brief: raft-commit-safety (~967 tok)
- `design.md` — Design Document (~8677 tok)
- `requirements.md` — Requirements Document (~4523 tok)
- `research.md` — Gap Analysis — raft-commit-safety (2026-06-24) (~1679 tok)
- `spec.json` (~450 tok)
- `tasks.md` — Implementation Plan (~3186 tok)
@ -480,10 +488,11 @@
## .kiro/specs/raft-sim-conformance/
- `brief.md` — Brief: raft-sim-conformance (~697 tok)
- `design.md` — Design Document (~8051 tok)
- `design.md` — Design Document (~8280 tok)
- `requirements.md` — Requirements Document (~3776 tok)
- `research.md` — Gap Analysis — raft-sim-conformance (2026-06-24) (~3557 tok)
- `spec.json` — Declares divergence (~428 tok)
- `tasks.md` — Implementation Plan (~3337 tok)
- `tasks.md` — Implementation Plan (~4680 tok)
## .kiro/specs/resval-id-decoupling/
@ -785,7 +794,7 @@
- `CLAUDE.md` — XCE Controller (~3309 tok)
- `cluster.c` — include "config.h" (~16451 tok)
- `commit.c` — Declares persist_t (~5043 tok)
- `config_repl.c` — define _GNU_SOURCE (~25407 tok)
- `config_repl.c` — define _GNU_SOURCE (~25721 tok)
- `config_repl.h` — pragma once (~6008 tok)
- `ha_convergence.c` — Declares char (~4868 tok)
- `ha.c` — define _GNU_SOURCE (~78897 tok)
@ -805,10 +814,10 @@
- `controller_test.c` — include <argp.h> (~1623 tok)
- `test_coldstart_lsn0.c` — Declares char (~4405 tok)
- `test_commit_barrier_rollout.c` — Declares explicitly (~19506 tok)
- `test_config_repl.c` — define _GNU_SOURCE (~35905 tok)
- `test_demotion_convergence.c` — define _GNU_SOURCE (~9602 tok)
- `test_config_repl.c` — define _GNU_SOURCE (~36426 tok)
- `test_demotion_convergence.c` — define _GNU_SOURCE (~10709 tok)
- `test_e2e_capnp.c` — include <stdint.h> (~2760 tok)
- `test_ha_election.c` — Declares char (~12969 tok)
- `test_ha_election.c` — Declares char (~15425 tok)
- `test_ha_prevote.c` — Declares char (~11053 tok)
- `test_ha_vote_gate.c` — define _GNU_SOURCE (~13251 tok)
- `test_persist_recovery.c` — define _GNU_SOURCE (~3654 tok)
@ -832,6 +841,7 @@
- `repl.h` — pragma once (~2163 tok)
- `typemap.h` — if !defined(_TYPEMAP_H_) (~4632 tok)
- `wal_types.h` — pragma once (~1400 tok)
- `xcectx.h` — if !defined(_XCECTX_H_) (~793 tok)
## src/lib/
@ -839,19 +849,21 @@
- `hook.c` — include <errno.h> (~1197 tok)
- `netio.c` — include <arpa/inet.h> (~6688 tok)
- `request.c` — include <errno.h> (~15862 tok)
- `xcectx.c` — include <errno.h> (~3042 tok)
- `xceapi.c` — include <errno.h> (~3528 tok)
- `xcectx.c` — include <errno.h> (~3215 tok)
## src/lib/raft/
- `raft_sim.c` — ifdef XCE_TESTING (~4777 tok)
- `raft.c` — include "raft.h" (~9032 tok)
- `raft.h` — ifndef RAFT_H (~8168 tok)
- `raft_sim.c` — ifdef XCE_TESTING (~27367 tok)
- `raft.c` — include "raft.h" (~9515 tok)
- `raft.h` — ifndef RAFT_H (~16351 tok)
## src/lib/testsuite/
- `test_config.c` — include <stdio.h> (~490 tok)
- `test_ctrlstatus.c` (~4297 tok)
- `test_hooks.c` — include <errno.h> (~1416 tok)
- `test_raft.c` — include <errno.h> (~68779 tok)
- `test_raft.c` — include <errno.h> (~95802 tok)
- `test_wal_wire.c` — include <errno.h> (~2970 tok)
## src/schema/

File diff suppressed because it is too large Load diff

View file

@ -83,6 +83,7 @@
## Do-Not-Repeat
- (2026-06-24, raft-sim-conformance task 1.2) A CONFORMANCE cluster (`raft_sim_conformance_init`) wires `on_send_vote_request`/`on_send_append_entries` to the unified `c->bag[]` (sim_conf_send_*), NOT to the legacy `c->pending[]`/`c->ae_pending[]`. So `raft_sim_deliver_pending` / `raft_sim_deliver_append_entries` (which drain pending[]/ae_pending[]) DO NOTHING on a conformance cluster — a 3-node conformance election will leave node 0 stuck in CANDIDATE (assert "Expected 2 Was 1" = RAFT_LEADER vs RAFT_CANDIDATE). Bag delivery is task 2.1. To force a leader in a task-1.2 test WITHOUT bag delivery, use a 1-node conformance cluster: `raft_start_election` short-circuits node 0 straight to RAFT_LEADER (no peers to canvass). The conformance `applied[]` decode reads the committed entry's `node->log[k-1].bytes` (the legacy `raft_sim_entry_t` byte WAL, reused) as a little-endian uint64 (memcpy), NOT the `raft_sim_log_entry_t {term,value}` struct (that type is only used by the bag message `entry_value` field).
- (2026-06-21, raft-sim tasks 9.1-9.4) In raft_sim.c, leader per-peer `next_index[peer]` is initialized to `Len(log)+1` at become_leader and ONLY advances via `raft_on_append_entries_reply` success (= matchIndex+1). It does NOT change when a send to a partitioned peer is dropped (no reply comes back). So to exercise nextIndex BACK-OFF in a sim test you cannot just partition+drop — you must create a real `(prev_log_index)` mismatch: replicate so next_index runs ahead, then shrink the follower's actual log (call `c.nodes[k].cbs.on_truncate_from(&c.nodes[k], idx)`) so the leader's stale next_index points past the follower's true tail; the next AE is then rejected and walks back. To bump a sim leader's term for "higher-term leader" tests, set `c.nodes[0].state.term = N` directly AFTER a clean single election (raft_log_append stamps entries from s->term; next_index/match_index are term-independent) — do NOT chain `raft_on_election_timeout`+`raft_start_election` on a node that is already LEADER (election_timeout is CANDIDATE→FOLLOWER, a no-op on a leader, so the term never climbs). For a duplicate-AE idempotency assertion, rewind `next_index[peer]` to re-send an ALREADY-PRESENT entry (already-have branch = no log growth); re-sending at the live next_index sends the NEXT entry, which is not a duplicate.
- (2026-06-21, bug-850) Do NOT fix "a rejoining standby races live replication ahead of catch-up" by defaulting `repl_add_standby` to `in_catch_up=1`. It has a huge blast radius: a fresh standby then does NOT count toward `repl_active_standby_count` write quorum until it converges, so EVERY commit-WAIT path stalls — the full controller suite TIMED OUT at 300s (commit.c "WAIT deadline expired ... committed_lsn=0"), because unit tests register standbys + commit directly without running the heartbeat dispatch that would clear the flag. The correct, surgical fix is a CONTIGUITY GUARD at the persist layer (Raft log-matching): `persist_wal_write_replicated` rejects a forward gap (`lsn > current_lsn`) with `-EAGAIN` (no write, no current_lsn jump); the apply path treats `-EAGAIN` as a quiet skip (no ack, no ERROR spam) so the ACK-driven catch-up continuation re-streams from `current_lsn` and the log fills in order. Zero quorum-semantics change → zero suite regression (129/0/0). Relies on bug-848 (advertise `durable_floor == current_lsn-1`) so catch-up always starts AT `current_lsn` and is never spuriously rejected.
- (2026-06-18) When a task changes commit semantics to be ASYNC-durable (self caps at durable_lsn, advanced by the demand-driven group-commit flusher), every test that SYNCHRONOUSLY asserts "covering ACK ⇒ committed_lsn advances" must first force durability (persist_flush) or bounded-poll. ha-commit-durability 2.2 primed durable_lsn in the in-memory barrier_setup_vcpus stubs but MISSED the real-persist test_fact_hook_append_is_retained_and_nonblocking → 6/6 deterministic FAIL. Do NOT trust an impl-note that blames a test failure on a /tmp-overlay fdatasync-EIO without re-verifying: fdatasync returned rc=0 on /tmp here and the test passed pre-spec — it was a real durable-gating regression. Also: meson 'Fail:0' masks Unity sub-group failures — always gate on ANSI-stripped ':FAIL:' count from the test binary's stdout, not the meson summary.

File diff suppressed because it is too large Load diff

View file

@ -2838,3 +2838,241 @@
| 03:16 | Edited .kiro/specs/ha-convergence-recovery/tasks.md | inline fix | ~20 |
| 03:16 | Edited .kiro/specs/ha-convergence-recovery/tasks.md | modified 24() | ~393 |
| 18:40 | Closed ha-convergence-recovery Task 8 via live /xce-test-ha (8 rounds): PASS, 30 jobs, zero loss, all 3 nodes led; also live-validated bug-1077 (no SEGV over ~40 failovers) | .kiro/specs/ha-convergence-recovery/tasks.md | Task 8 [x]; all 8 tasks done | ~2k |
| 03:17 | Session end: 22 writes across 10 files (xcectx.c, xcectx.h, test_ctrlstatus.c, xceapi.c, project_bug1077_reply_union_type_confusion.md) | 36 reads | ~308829 tok |
| 03:24 | Edited .kiro/specs/raft-sim-conformance/design.md | "on_get_entry_term -> node" → "on_get_entry_term -> node" | ~17 |
| 03:24 | Edited .kiro/specs/raft-sim-conformance/design.md | "Election Safety: |{i: rol" → "Election Safety: &#124;{i" | ~24 |
| 03:24 | Session end: 24 writes across 11 files (xcectx.c, xcectx.h, test_ctrlstatus.c, xceapi.c, project_bug1077_reply_union_type_confusion.md) | 37 reads | ~316924 tok |
| 03:30 | Edited .kiro/specs/raft-sim-conformance/design.md | inline fix | ~18 |
| 03:30 | Edited .kiro/specs/raft-sim-conformance/design.md | inline fix | ~19 |
| 03:30 | Edited .kiro/specs/raft-sim-conformance/design.md | "vote/AE requests + respon" → "vote/AE requests + respon" | ~22 |
| 03:31 | Session end: 27 writes across 11 files (xcectx.c, xcectx.h, test_ctrlstatus.c, xceapi.c, project_bug1077_reply_union_type_confusion.md) | 37 reads | ~316987 tok |
| 03:44 | Session end: 27 writes across 11 files (xcectx.c, xcectx.h, test_ctrlstatus.c, xceapi.c, project_bug1077_reply_union_type_confusion.md) | 37 reads | ~316987 tok |
## Session: 2026-06-24 04:26
| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
| 04:31 | Edited src/lib/raft/raft.h | modified bag() | ~183 |
| 04:31 | Edited src/lib/raft/raft.h | modified enum() | ~1003 |
| 04:32 | Edited src/lib/raft/raft.h | expanded (+13 lines) | ~297 |
| 04:32 | Edited src/lib/raft/raft.h | expanded (+12 lines) | ~203 |
| 04:34 | Edited src/lib/testsuite/test_raft.c | modified test_sim_conformance_types_compile() | ~720 |
| 04:34 | Edited src/lib/testsuite/test_raft.c | 2→5 lines | ~52 |
| 11:35 | task 1.1 raft-sim-conformance: added conformance harness types (msg/log_entry/action enums+structs, bag/PRNG/seed/trace fields, applied[]+persisted shadow) | raft.h, test_raft.c | lib build OK 47 tests 0 fail | ~6k |
| 04:40 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~23 |
| 04:44 | Edited src/lib/testsuite/test_raft.c | modified test_sim_conformance_init_append_readback() | ~798 |
| 04:44 | Edited src/lib/testsuite/test_raft.c | 1→4 lines | ~51 |
| 04:45 | Edited src/lib/raft/raft.h | expanded (+18 lines) | ~327 |
| 04:45 | Edited src/lib/raft/raft_sim.c | added 7 condition(s) | ~1507 |
| 04:46 | Edited src/lib/raft/raft_sim.c | added 2 condition(s) | ~701 |
| 04:47 | Edited src/lib/testsuite/test_raft.c | modified test_sim_conformance_init_append_readback() | ~248 |
| 04:47 | Edited src/lib/testsuite/test_raft.c | 4→4 lines | ~51 |
| 04:48 | Edited src/lib/raft/raft.h | expanded (+8 lines) | ~142 |
| 04:48 | Edited src/lib/raft/raft_sim.c | sim_prng_next() → raft_sim_prng_next() | ~96 |
| 04:48 | Edited src/lib/testsuite/test_raft.c | expanded (+11 lines) | ~218 |
| 1.2 | raft-sim-conformance task 1.2: SplitMix64 PRNG + conformance adapter callbacks (sim_conf_on_commit_advanced fills applied[], sim_conf_send_* push to bag[]) + raft_sim_conformance_init wiring 6 callbacks; reused legacy log callbacks; RED→GREEN | raft_sim.c, raft.h, test_raft.c | Ok:1 Fail:0 | ~9k |
| 04:55 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~19 |
| 04:58 | Edited src/lib/testsuite/test_raft.c | modified raft_sim_bag_deliver() | ~1425 |
| 04:58 | Edited src/lib/testsuite/test_raft.c | 2→5 lines | ~65 |
| 04:59 | Edited src/lib/raft/raft.h | 5→9 lines | ~154 |
| 04:59 | Edited src/lib/raft/raft.h | expanded (+23 lines) | ~369 |
| 04:59 | Edited src/lib/raft/raft_sim.c | modified raft_sim_bag_push() | ~20 |
| 04:59 | Edited src/lib/raft/raft_sim.c | expanded (+9 lines) | ~220 |
| 05:00 | Edited src/lib/raft/raft_sim.c | added 4 condition(s) | ~1200 |
| 05:09 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~27 |
| 05:12 | Edited src/lib/testsuite/test_raft.c | modified struct() | ~1852 |
| 05:12 | Edited src/lib/testsuite/test_raft.c | 2→6 lines | ~83 |
| 05:13 | Edited src/lib/raft/raft_sim.c | added 3 condition(s) | ~569 |
| 05:13 | Edited src/lib/raft/raft.h | expanded (+24 lines) | ~337 |
| 12:15 | task 2.2 raft-sim-conformance: bag_drop/_duplicate/_pick (bag-only, mirror raft.tla:443/448) | raft_sim.c, raft.h, test_raft.c | GREEN Ok:1 Fail:0 | ~9k |
| 05:19 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~18 |
| 05:21 | Edited src/lib/testsuite/test_raft.c | modified test_sim_check_election_safety_fail_on_two_leaders() | ~605 |
| 05:21 | Edited src/lib/testsuite/test_raft.c | 1→3 lines | ~52 |
| 05:22 | Edited src/lib/raft/raft.h | expanded (+16 lines) | ~252 |
| 05:22 | Edited src/lib/raft/raft_sim.c | added 2 condition(s) | ~239 |
| 00:00 | task 3.1 RED+GREEN Election Safety checker | raft_sim.c, raft.h, test_raft.c | Ok:1 Fail:0 | ~9k |
| 05:28 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~13 |
| 05:30 | Edited src/lib/testsuite/test_raft.c | modified 2() | ~1114 |
| 05:30 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~56 |
| 12:31 | task 3.2 RED+GREEN Log Matching checker test (R3.2 shared-(idx,term)⇒identical-prefix, both directions, earlier-prefix divergence) | src/lib/testsuite/test_raft.c | lib build Ok:1 Fail:0, new test PASS | ~4k |
| 05:35 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~12 |
| 05:37 | Edited src/lib/testsuite/test_raft.c | modified test_sim_check_leader_completeness_fail_on_missing_committed() | ~819 |
| 05:37 | Edited src/lib/testsuite/test_raft.c | 1→3 lines | ~57 |
| 05:38 | Edited src/lib/raft/raft.h | modified state() | ~387 |
| 05:38 | Edited src/lib/raft/raft_sim.c | added 5 condition(s) | ~514 |
| 05:44 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~14 |
| 05:46 | Edited src/lib/testsuite/test_raft.c | modified test_sim_check_state_machine_safety_fail_on_divergence() | ~816 |
| 05:46 | Edited src/lib/testsuite/test_raft.c | 2→4 lines | ~72 |
| 05:46 | Edited src/lib/raft/raft.h | modified state() | ~350 |
| 05:47 | Edited src/lib/raft/raft_sim.c | added 2 condition(s) | ~347 |
| 12:48 | task 3.4 RED+GREEN State Machine Safety checker | raft_sim.c,test_raft.c,raft.h | Ok:1 Fail:0 (both new tests PASS) | ~3k |
| 05:51 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~15 |
| 05:54 | Edited src/lib/testsuite/test_raft.c | modified test_sim_check_all_first_failure_is_election_safety() | ~1083 |
| 05:54 | Edited src/lib/testsuite/test_raft.c | 2→5 lines | ~85 |
| 05:54 | Edited src/lib/raft/raft.h | modified enum() | ~530 |
| 05:54 | Edited src/lib/raft/raft_sim.c | added 4 condition(s) | ~386 |
| 3.5 | raft_sim_check_all composes 4 invariants in fixed order, first-failure short-circuit | raft_sim.c, raft.h, test_raft.c | RED (undef ref) → GREEN Ok:1 Fail:0, 3 new tests PASS | ~9k |
| 06:00 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~24 |
| 06:02 | Edited src/lib/testsuite/test_raft.c | added 2 condition(s) | ~1107 |
| 06:02 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~45 |
| 06:03 | Edited src/lib/testsuite/test_raft.c | 4→5 lines | ~26 |
| 06:04 | Edited src/lib/raft/raft.h | modified success() | ~478 |
| 06:04 | Edited src/lib/raft/raft_sim.c | 4→6 lines | ~26 |
| 06:04 | Edited src/lib/raft/raft_sim.c | added 2 condition(s) | ~742 |
| 13:05 | task 4.1: action trace recorder + dumper (RED→GREEN) | raft_sim.c, raft.h, test_raft.c | Ok:1 Fail:0; test_sim_4_1_trace_record_and_dump PASS | ~9k |
| 06:10 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~21 |
| 06:14 | Edited src/lib/testsuite/test_raft.c | added 2 condition(s) | ~1258 |
| 06:14 | Edited src/lib/testsuite/test_raft.c | 1→3 lines | ~44 |
| 06:15 | Edited src/lib/raft/raft.h | expanded (+28 lines) | ~457 |
| 06:15 | Edited src/lib/raft/raft_sim.c | added error handling | ~1980 |
| 06:16 | Edited src/lib/raft/raft_sim.c | removed 11 lines | ~11 |
| 06:16 | Edited src/lib/raft/raft_sim.c | 3→1 lines | ~19 |
| 06:16 | Edited src/lib/raft/raft_sim.c | 8→10 lines | ~138 |
| 06:18 | Edited src/lib/raft/raft_sim.c | 10→13 lines | ~177 |
| 06:22 | Edited src/lib/raft/raft_sim.c | added 4 condition(s) | ~429 |
| 06:22 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~106 |
| 06:22 | Edited src/lib/raft/raft_sim.c | 9→11 lines | ~130 |
| 06:23 | Edited src/lib/raft/raft_sim.c | modified if() | ~795 |
| 06:25 | Edited src/lib/raft/raft_sim.c | removed 43 lines | ~11 |
| 06:25 | Edited src/lib/raft/raft_sim.c | modified if() | ~96 |
| 06:25 | Edited src/lib/raft/raft_sim.c | 11→11 lines | ~128 |
| 06:26 | Edited src/lib/testsuite/test_raft.c | expanded (+7 lines) | ~187 |
| 06:27 | Edited src/lib/raft/raft_sim.c | expanded (+11 lines) | ~243 |
| 13:29 | task 4.2 raft_sim_step: weighted enabled-set scheduler driving only lib entry points; RED+GREEN | raft_sim.c, test_raft.c, raft.h | Ok:1 Fail:0; found 2 real raft_on_vote_reply bugs (1095/1096 dup+stale grant) | ~45k |
| 06:36 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~30 |
| 06:36 | Edited .kiro/specs/raft-sim-conformance/tasks.md | expanded (+19 lines) | ~394 |
| 06:48 | Edited src/lib/testsuite/test_raft.c | modified test_vote_reply_duplicate_grant_not_double_counted() | ~1093 |
| 06:49 | Edited src/lib/testsuite/test_raft.c | 2→4 lines | ~58 |
| 06:50 | Edited src/lib/raft/raft.h | 1→2 lines | ~62 |
| 06:50 | Edited src/lib/raft/raft.c | 3→7 lines | ~102 |
| 06:50 | Edited src/lib/raft/raft.c | added 1 condition(s) | ~136 |
| 06:50 | Edited src/lib/raft/raft.c | added 6 condition(s) | ~543 |
| 13:52 | fix bug-1095/1096 raft vote-reply dup-double-count + stale-drop (per-peer vote_replies[] + DropStaleResponse) | raft.c raft.h test_raft.c | GREEN Ok:1 Fail:0, 264 tests | ~8k |
| 06:57 | Edited .kiro/specs/raft-sim-conformance/tasks.md | modified UPDATE() | ~227 |
| 06:59 | Edited src/lib/testsuite/test_raft.c | modified applying() | ~1565 |
| 06:59 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~31 |
| 07:05 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~19 |
| 07:07 | Edited src/lib/testsuite/test_raft.c | added 1 condition(s) | ~1477 |
| 07:08 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~30 |
| 07:08 | Edited src/lib/raft/raft.h | expanded (+17 lines) | ~270 |
| 07:08 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~279 |
| --:-- | task 4.4 raft-sim-conformance: add raft_sim_run multi-step driver (halt-on-first-violation) + deterministic-replay test | src/lib/raft/raft_sim.c, raft.h, testsuite/test_raft.c | GREEN Ok:1 Fail:0, 4.4 test PASS (3 seeds x2, byte-identical) | ~6k |
| 07:14 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~19 |
| 07:17 | Edited src/lib/testsuite/test_raft.c | added error handling | ~1009 |
| 07:17 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~26 |
| 07:18 | Edited src/lib/raft/raft.h | added error handling | ~383 |
| 07:18 | Edited src/lib/raft/raft_sim.c | added error handling | ~2405 |
| 07:20 | Edited src/lib/raft/raft_sim.c | added 2 condition(s) | ~556 |
| 14:21 | impl task 5.1 partition/heal scenario | raft_sim.c, raft.h, testsuite/test_raft.c | GREEN Ok:1 Fail:0, 5 seeds zero violations | ~20k |
| 07:25 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~113 |
| 07:27 | Edited src/lib/raft/raft_sim.c | modified if() | ~42 |
| 07:28 | Edited src/lib/raft/raft_sim.c | modified if() | ~135 |
| 07:29 | Edited src/lib/raft/raft_sim.c | removed 9 lines | ~8 |
| 07:30 | Edited src/lib/raft/raft_sim.c | INJECTION() → fprintf() | ~122 |
| 07:31 | Edited src/lib/raft/raft_sim.c | reduced (-6 lines) | ~31 |
| 07:33 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~10 |
| 07:34 | Edited .kiro/specs/raft-sim-conformance/tasks.md | expanded (+14 lines) | ~374 |
| 07:36 | Edited src/lib/raft/raft.h | added error handling | ~403 |
| 07:37 | Edited src/lib/testsuite/test_raft.c | added error handling | ~1250 |
| 07:37 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~23 |
| 07:38 | Edited src/lib/raft/raft_sim.c | added 31 condition(s) | ~1690 |
| 07:40 | Edited src/lib/testsuite/test_raft.c | modified for() | ~526 |
| 5.2 | raft-sim-conformance task 5.2 restart-churn scenario (TDD RED→GREEN) | raft_sim.c, test_raft.c, raft.h | Ok:1 Fail:0; scenario zero-violation, log re-convergence asserted | ~28k |
| 07:47 | Edited .kiro/specs/raft-sim-conformance/tasks.md | modified CORRECTION() | ~341 |
| 07:47 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~10 |
| 07:50 | Edited src/lib/testsuite/test_raft.c | added error handling | ~2102 |
| 07:50 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~23 |
| 07:50 | Edited src/lib/raft/raft.h | modified op() | ~460 |
| 07:51 | Edited src/lib/raft/raft_sim.c | added 26 condition(s) | ~1742 |
| 14:53 | task 5.3 raft-sim drop/dup/reorder scenario + RED→GREEN test | raft_sim.c,raft.h,test_raft.c | Ok:1 Fail:0, non-vacuity probe 2-4 in-flight AEs perturbed | ~28k |
| 08:09 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~12 |
| 08:13 | Edited src/lib/raft/raft_sim.c | added 25 condition(s) | ~1948 |
| 08:13 | Edited src/lib/raft/raft.h | expanded (+30 lines) | ~564 |
| 08:13 | Edited src/lib/testsuite/test_raft.c | added 1 condition(s) | ~837 |
| 08:13 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~22 |
| 08:16 | Created ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-raft-tla/e9921464-33bd-405e-b66b-f65b9fa8c107/scratchpad/fig8_main.c | — | ~356 |
| 08:16 | Edited src/lib/raft/raft_sim.c | added error handling | ~481 |
| 08:17 | Edited ../../../../../../tmp/claude-1000/-home-rshen-projects-xce-worktrees-raft-tla/e9921464-33bd-405e-b66b-f65b9fa8c107/scratchpad/fig8_main.c | modified for() | ~149 |
| 08:18 | Edited src/lib/raft/raft_sim.c | added 2 condition(s) | ~389 |
| 08:18 | Edited src/lib/raft/raft_sim.c | sim_find_leader() → raft_snapshot() | ~206 |
| 08:19 | Edited src/lib/raft/raft_sim.c | added error handling | ~451 |
| 08:20 | Edited src/lib/raft/raft_sim.c | added error handling | ~622 |
| 15:21 | task 5.4 figure8: raft_sim_scenario_figure8 impl + test_sim_5_4_figure8 + raft.h decl | raft_sim.c,test_raft.c,raft.h | standalone PASS 5/5; full link BLOCKED by pre-existing missing 5.3 symbol (bug-1112) | ~38k |
| 08:25 | Edited src/lib/raft/raft_sim.c | added 26 condition(s) | ~1742 |
| 08:25 | Session end: 132 writes across 6 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 13 reads | ~215357 tok |
| 08:32 | Edited src/lib/raft/raft.c | 2→2 lines | ~24 |
| 08:33 | Edited src/lib/raft/raft.c | 2→2 lines | ~23 |
| 08:37 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~8 |
| 08:37 | Edited .kiro/specs/raft-sim-conformance/tasks.md | expanded (+10 lines) | ~267 |
| 08:40 | Edited src/lib/testsuite/test_raft.c | added 1 condition(s) | ~822 |
| 08:40 | Edited src/lib/testsuite/test_raft.c | 3→4 lines | ~36 |
| 08:40 | Edited src/lib/raft/raft.h | modified ASSERTS() | ~530 |
| 08:41 | Edited src/lib/raft/raft_sim.c | added error handling | ~2667 |
| 15:42 | task 5.5 stale-rejoin (bug-851 G5) RED->GREEN | raft_sim.c, raft.h, test_raft.c | Ok:1 Fail:0, test_sim_5_5_stale_rejoin:PASS | ~12k |
| 08:46 | Edited src/lib/raft/raft_sim.c | 4→7 lines | ~127 |
| 08:46 | Edited src/lib/raft/raft_sim.c | 4→9 lines | ~158 |
| 08:48 | Edited src/lib/raft/raft_sim.c | 7→4 lines | ~67 |
| 08:48 | Edited src/lib/raft/raft_sim.c | 9→4 lines | ~49 |
| 08:50 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~12 |
| 08:52 | Edited src/lib/testsuite/test_raft.c | added 2 condition(s) | ~1313 |
| 08:52 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~31 |
| 08:54 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~58 |
| 08:59 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~18 |
| 16:03 | task 6.2 verify raft-sim conformance batch ASAN/UBSAN-clean | raft_sim.c, test_raft.c (read-only) | PASS Ok:1 Fail:0, no sanitizer findings (ASAN + one-off ASAN+UBSAN) | ~6k |
| 09:04 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~16 |
| 09:07 | Edited src/lib/raft/raft.h | expanded (+16 lines) | ~336 |
| 09:07 | Edited src/lib/raft/raft.h | 4→9 lines | ~128 |
| 09:07 | Edited src/lib/raft/raft.h | expanded (+10 lines) | ~182 |
| 09:07 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~212 |
| 09:08 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~194 |
| 09:08 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~162 |
| 09:08 | Edited src/lib/testsuite/test_raft.c | modified test_sim_7_1_fault_switch_mechanism() | ~1300 |
| 09:09 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~35 |
| 09:15 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~24 |
| 09:19 | Edited src/lib/testsuite/test_raft.c | added 2 condition(s) | ~690 |
| 09:22 | Edited src/lib/testsuite/test_raft.c | removed 54 lines | ~29 |
| 09:22 | Edited src/lib/testsuite/test_raft.c | added error handling | ~1565 |
| 09:22 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~38 |
| 09:30 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~16 |
| 09:36 | Edited .kiro/specs/raft-sim-conformance/design.md | expanded (+10 lines) | ~470 |
| 09:37 | Session end: 165 writes across 7 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 14 reads | ~240715 tok |
| 09:42 | Edited src/lib/testsuite/test_raft.c | added 2 condition(s) | ~1042 |
| 09:42 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~43 |
| 09:43 | Edited src/lib/raft/raft.h | modified default() | ~323 |
| 09:43 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~1612 |
| 09:49 | Edited .kiro/specs/raft-sim-conformance/tasks.md | inline fix | ~18 |
| 09:51 | Session end: 170 writes across 7 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 14 reads | ~244192 tok |
| 16:41 | Session end: 170 writes across 7 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 14 reads | ~244192 tok |
| 16:45 | Session end: 170 writes across 7 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 14 reads | ~244192 tok |
| 16:51 | Session end: 170 writes across 7 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 14 reads | ~244192 tok |
| 16:58 | Session end: 170 writes across 7 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 15 reads | ~244192 tok |
| 19:27 | Session end: 170 writes across 7 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 15 reads | ~244192 tok |
| 19:37 | Edited src/controller/testsuite/test_ha_election.c | modified reinit_ctrl_raft_n() | ~2420 |
| 19:37 | Edited src/controller/testsuite/test_ha_election.c | atomic_load() → atomic_load_explicit() | ~87 |
| 19:37 | Edited src/controller/testsuite/test_ha_election.c | 3→8 lines | ~120 |
| 19:39 | Edited .kiro/specs/ha-term-safety/tasks.md | modified REMAINING() | ~816 |
| 02:39 | absorbed bug-1095/1096 into ha-term-safety: 2 controller-level Election-Safety regression tests (real raft_on_vote_reply on ctrl ha->raft) + additive spec Implementation Note | test_ha_election.c, ha-term-safety/tasks.md | 181 Tests 0 Failures, both new PASS | ~38k |
| 19:45 | Session end: 174 writes across 8 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 19 reads | ~381863 tok |
| 19:58 | Edited src/controller/testsuite/test_config_repl.c | modified destroy_test_persist_catchup() | ~271 |
| 19:58 | Edited src/controller/testsuite/test_config_repl.c | 4→7 lines | ~76 |
| 19:58 | Edited src/controller/testsuite/test_config_repl.c | 2→5 lines | ~55 |
| 19:58 | Edited src/controller/testsuite/test_config_repl.c | 5→8 lines | ~88 |
| 19:59 | Edited src/controller/testsuite/test_config_repl.c | 3→8 lines | ~114 |
| 19:59 | Edited src/controller/testsuite/test_config_repl.c | 4→8 lines | ~79 |
| 19:59 | Edited src/controller/testsuite/test_config_repl.c | 2→6 lines | ~66 |
| 19:59 | Edited src/controller/testsuite/test_config_repl.c | 2→5 lines | ~60 |
| 03:00 | fix 7 stale test_wal_catchup_* tests: seed persist current_lsn so entries are contiguous (bug-850 guard) | testsuite/test_config_repl.c | RED 7 fail -EAGAIN → GREEN all pass 3× deterministic; no prod code touched | ~3k |
| 20:17 | Edited src/controller/testsuite/test_demotion_convergence.c | modified execv() | ~570 |
| 03:20 | de-flaked test_demotion_replay_yields_committed_only (test-harness race, not product bug): added persist_stop(&g_dc.persist) before opening fresh, faithfully modeling production execv quiescence | src/controller/testsuite/test_demotion_convergence.c | RED reproduced 1/13 under load → fix applied (bug-1128) | ~12k |
| 20:37 | Session end: 183 writes across 10 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 27 reads | ~483636 tok |
| 20:45 | Edited src/controller/testsuite/test_demotion_convergence.c | 2→3 lines | ~17 |
| 20:45 | Edited src/controller/testsuite/test_demotion_convergence.c | added 1 condition(s) | ~300 |
| 20:46 | Edited src/controller/testsuite/test_demotion_convergence.c | added 1 condition(s) | ~882 |
| 20:52 | Edited src/controller/testsuite/test_demotion_convergence.c | expanded (+6 lines) | ~164 |
| 21:14 | Edited src/controller/testsuite/test_demotion_convergence.c | expanded (+14 lines) | ~320 |
| 21:14 | Edited src/controller/testsuite/test_demotion_convergence.c | reduced (-6 lines) | ~67 |
| 04:20 | deflake demotion_replay v2 (overlayfs gate + commit-race pin) | test_demotion_convergence.c | 0/20 full-suite + 0/60 group flakes (baseline 4/20) | ~22k |
| 21:29 | Session end: 189 writes across 10 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 28 reads | ~486159 tok |
| 21:35 | Edited src/lib/raft/raft_sim.c | modified switch() | ~231 |
| 21:36 | Edited src/lib/testsuite/test_raft.c | modified for() | ~387 |
| 21:39 | Session end: 191 writes across 10 files (raft.h, test_raft.c, tasks.md, raft_sim.c, raft.c) | 28 reads | ~489546 tok |

File diff suppressed because it is too large Load diff