forked from lei.chen/myxce
save wolf status
This commit is contained in:
parent
2655edd2b4
commit
0eafed3999
5 changed files with 17252 additions and 93 deletions
|
|
@ -1,7 +1,12 @@
|
|||
# anatomy.md
|
||||
|
||||
> Auto-maintained by OpenWolf. Last scanned: 2026-06-21T13:07:04.771Z
|
||||
> Files: 507 tracked | Anatomy hits: 0 | Misses: 0
|
||||
> Auto-maintained by OpenWolf. Last scanned: 2026-06-23T04:47:56.802Z
|
||||
> Files: 551 tracked | Anatomy hits: 0 | Misses: 0
|
||||
|
||||
## ../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/
|
||||
|
||||
- `project_raft_commit_safety_done.md` (~603 tok)
|
||||
- `project_raft_log_replication_done.md` (~507 tok)
|
||||
|
||||
## ./
|
||||
|
||||
|
|
@ -407,7 +412,8 @@
|
|||
- `design.md` — Design Document (~11209 tok)
|
||||
- `requirements.md` — Requirements Document (~4240 tok)
|
||||
- `research.md` — Research & Design Decisions (~5375 tok)
|
||||
- `spec.json` (~128 tok)
|
||||
- `spec.json` (~141 tok)
|
||||
- `tasks.md` — Implementation Plan (~13751 tok)
|
||||
- `TLA-gap-analysis.md` — Gap Analysis: XCE HA implementation vs `raft/raft.tla` (~2070 tok)
|
||||
|
||||
## .kiro/specs/ha-wal-replication/
|
||||
|
|
@ -451,7 +457,7 @@
|
|||
- `requirements.md` — Requirements Document (~4710 tok)
|
||||
- `research.md` — Research Log: raft-log-replication (~1206 tok)
|
||||
- `spec.json` (~307 tok)
|
||||
- `tasks.md` — Implementation Plan (~3226 tok)
|
||||
- `tasks.md` — Implementation Plan (~3864 tok)
|
||||
|
||||
## .kiro/specs/raft-sim-conformance/
|
||||
|
||||
|
|
@ -498,8 +504,8 @@
|
|||
- `api-standards.md` — API Standards (~1291 tok)
|
||||
- `build-deployment.md` — Build & Deployment (~1241 tok)
|
||||
- `error-handling.md` — Error Handling Standards (~1026 tok)
|
||||
- `ha-async-io.md` — HA Protocol & Async I/O (~1603 tok)
|
||||
- `persistence.md` — WAL & Persistence Durability (~2042 tok)
|
||||
- `ha-async-io.md` — HA Protocol & Async I/O (~2686 tok)
|
||||
- `persistence.md` — WAL & Persistence Durability (~2127 tok)
|
||||
- `product.md` — Product Overview (~1246 tok)
|
||||
- `roadmap.md` — Roadmap (~6012 tok)
|
||||
- `security.md` — Security Standards (~804 tok)
|
||||
|
|
@ -755,3 +761,71 @@
|
|||
- `24fa3f5b3b5b6d59088387aad4130a5e2d657f88706205d6dbe57e8afda2e425.json` (~722 tok)
|
||||
- `251ce70fbb55f062faef6259731b4c82238f4f7af22d2c1ed266c86c15263b99.json` (~502 tok)
|
||||
- `25389b2042efd3ef5da1211191cd0c53e4d697dc319451cd5c7289fe6891dda0.json` (~1946 tok)
|
||||
|
||||
## src/controller/
|
||||
|
||||
- `cluster.c` — include "config.h" (~16351 tok)
|
||||
- `commit.c` — Declares persist_t (~5043 tok)
|
||||
- `config_repl.c` — define _GNU_SOURCE (~24927 tok)
|
||||
- `config_repl.h` — pragma once (~5622 tok)
|
||||
- `ha_convergence.c` — Declares char (~4868 tok)
|
||||
- `ha.c` — define _GNU_SOURCE (~77256 tok)
|
||||
- `ha.h` — ifndef HA_H (~21010 tok)
|
||||
- `meson.build` (~1352 tok)
|
||||
- `myapp.c` — define _GNU_SOURCE (~4691 tok)
|
||||
- `persist.c` — define _GNU_SOURCE (~33172 tok)
|
||||
- `repl.c` — include <assert.h> (~7500 tok)
|
||||
|
||||
## src/controller/include/
|
||||
|
||||
- `commit.h` — pragma once (~1102 tok)
|
||||
|
||||
## src/controller/testsuite/
|
||||
|
||||
- `clean_failover_preservation.sh` — clean_failover_preservation.sh — ha-term-safety task 5.2 live integration test. (~4972 tok)
|
||||
- `controller_test.c` — include <argp.h> (~1623 tok)
|
||||
- `test_commit_barrier_rollout.c` — Declares explicitly (~19506 tok)
|
||||
- `test_config_repl.c` — define _GNU_SOURCE (~34816 tok)
|
||||
- `test_demotion_convergence.c` — define _GNU_SOURCE (~9602 tok)
|
||||
- `test_e2e_capnp.c` — include <stdint.h> (~2760 tok)
|
||||
- `test_ha_election.c` — Declares char (~12140 tok)
|
||||
- `test_ha_prevote.c` — Declares char (~11053 tok)
|
||||
- `test_ha_vote_gate.c` — define _GNU_SOURCE (~13251 tok)
|
||||
- `test_repl_apply.c` — include <dirent.h> (~5744 tok)
|
||||
- `test_repl_unit.c` — include <assert.h> (~6231 tok)
|
||||
- `test_term_safety_adapter.c` — define _GNU_SOURCE (~25125 tok)
|
||||
- `test_walcompare.c` — define _GNU_SOURCE (~3795 tok)
|
||||
- `test.c` — include <argp.h> (~27479 tok)
|
||||
- `walcompare.c` — define _GNU_SOURCE (~2485 tok)
|
||||
- `walcompare.h` — pragma once (~839 tok)
|
||||
- `waldump.c` — define _GNU_SOURCE (~4586 tok)
|
||||
- `waldump.h` — pragma once (~1006 tok)
|
||||
|
||||
## src/controller/testsuite/clean_failover_preservation.sh (~330 lines, ~3k tokens)
|
||||
|
||||
|
||||
## src/include/
|
||||
|
||||
- `persist.h` — pragma once (~9539 tok)
|
||||
- `repl.h` — pragma once (~2163 tok)
|
||||
- `typemap.h` — if !defined(_TYPEMAP_H_) (~4480 tok)
|
||||
- `wal_types.h` — pragma once (~1400 tok)
|
||||
|
||||
## src/lib/
|
||||
|
||||
- `request.c` — include <errno.h> (~15710 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)
|
||||
|
||||
## src/lib/testsuite/
|
||||
|
||||
- `test_config.c` — include <stdio.h> (~490 tok)
|
||||
- `test_raft.c` — include <errno.h> (~68779 tok)
|
||||
|
||||
## src/schema/
|
||||
|
||||
- `controller.capnp` — Declares OPCode (~8927 tok)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<!-- How the user likes things done. Code style, tools, patterns, communication. -->
|
||||
|
||||
## Key Learnings
|
||||
- (2026-06-22, ha-term-safety task 3.1) The single primary-append seam is `ha_primary_log_append(cluster_t*,type,payload,len,&out_lsn)` (ha.c, decl ha.h ~333): packs the `raft_entry_blob_t` envelope and calls `raft_log_append(&c->ha.raft,...)` so the LIBRARY stamps `s->term` + assigns LSN + fires `on_persist_entry`. CRITICAL: `raft_log_append` returns `-EPERM` unless `s->role==RAFT_LEADER` — and `ha_do_promote`/the non-raft `ha_promote_to_primary` road sets `ha->role=CTRL_PRIMARY` but NOT `ha->raft.role` (only the raft election road via on_become_leader sets RAFT_LEADER). So `ha_primary_log_append` MUST have a `-EPERM`→legacy `persist_wal_async` fallback (stamping `ha->term` via persist_set_term first) or init-time/non-raft/engine-less promotion breaks. Retired the hand-rolled bypass by routing persist.c `wal_hook_append_classified` (RETAIN job/queue/worker hooks) + `persist_wal_sync_append` (WAL_JOB_SUBMIT WAIT) through `ha_primary_log_append` GUARDED on `p->cluster != NULL` — standalone persist (lib-level tests, `persist_init(p,&cfg,NULL)`) keeps the direct persist_wal_async path. `p->cluster` is the back-ref (persist.h, set in persist_init); ha.h is reachable in persist.c via `xce/cluster_def.h`. Co-tracking invariant `p->current_lsn == s->log_len + 1` holds because raft_init (2.5) seeds log_len from durable floor and every primary append advances both by 1. To make a controller TEST drive raft_log_append: `ha_init_raft` then set `c->ha.raft.role=RAFT_LEADER` + `c->ha.raft.term=T` directly (the raft-sim convention). on_persist_entry calls persist_wal_async (NOT the hooks) so no recursion. `ha_arm_own_term_gate` is static → test seam `ha_arm_own_term_gate_for_test`. Validation: pre-existing `test_wal_catchup_*` (7, bug-924 overlayfs) fail IDENTICALLY on baseline (git stash + rebuild proves it); every other group 0 fail.
|
||||
- (2026-06-20, waldump tooling) The `xce_test` binary (`src/controller/meson.build`) builds from `testsuite/test.c` ONLY + `libxce_dep` — it does NOT link `persist.c`/`job.c` (those are in the `controller_unit_test` target). The investigation doc's claim that xce_test "links persist.c/job.c" was WRONG. BUT capnp `read_Job` is generated into `controller.capnp.c` which IS compiled into `libxce`, so it's reachable transitively. To USE capnp/zlib symbols from test.c you must add `c_capnproto_dep` + `zlib_dep` to `xce_test_deps` (static-lib deps don't auto-propagate through `declare_dependency(link_with: libxce)`). For a zero-alloc jobid decode read `struct Job.jobid` directly after `read_Job` — skip the allocating `decode_Job`. WAL CRC reader template = `persist_test_durable_lsn_on_disk` (persist.c ~888): seg files `seg-%016llx.wal` under `<node>/data/wal`, 40B `wal_entry_hdr_t`, crc32 over `WAL_HDR_CRC_SIZE`(=32) header bytes + payload, prev_crc chain, all-zero hdr = clean EOF (pre-alloc). Offline `waldump` lives in `testsuite/waldump.{c,h}` + `cmd_waldump` in test.c top_commands.
|
||||
- (2026-06-18, ha-commit-durability task 5.2 VALIDATION) Deterministic E2E on the FIXED build = GREEN, stable 3/3 runs (9/9 probes PASS), in-window primary fdatasync=2 on EVERY probe (vs 0/RED on the unfixed 1.3 build) — the RED→GREEN flip is the deterministic acceptance and is confirmed. Run via `nix develop ./src --command bash -c 'bash src/tools/test-commit-durability.sh --deterministic <deploy>'` background+poll worktree log; cold election ~15s, 3 probes, exit 0. The ROLLING SIGKILL SOAK is host-verification-needed in-sandbox: rounds 1-2 PASS (jobs survive failover), then round 3 onward "no new primary elected within 40s" and every "DATA LOSS" report is a query against a cluster with NO live primary (same 5 jobs frozen, never re-acked). ROOT CAUSE of the collapse is the durability fix's OWN promotion fence working AS DESIGNED: ctrl-1 won PreVote for term=5, computed safe_committed_lsn=13, then `persist_recover_fatal_if_unrecoverable` FATAL-terminated ("recovery-truncated log ... no healthy peer reachable ... durable_floor_lsn=13 < hwm=13 ... terminating rather than serving divergent state, Req 2.4") — refusing to let a structurally-truncated node lead and overwrite the good timeline (exactly the bug-661 failure mode the fix prevents). Under aggressive rolling-kill+immediate-restart the fence repeatedly self-terminates recovering nodes → cluster drops below quorum → liveness collapse, NOT durable loss. PROOF it's not loss: committed entries still on disk after the run (ctrl-3 WAL has seg-1 + seg-15; ctrl-2 seg-1) and 0 live controllers at end. So the soak's exit=1 / "DATA LOSS" verdict is a HARNESS ARTIFACT (it equates empty-joblist-with-no-primary to loss) — the soak harness conflates election-stall liveness failure with durability loss. The deterministic flip is the must-have and passed; the live multi-round soak needs a real host (slower election timing, no sandbox reaping) to distinguish fence-driven safety self-termination from a true regression. Did NOT patch production (5.2 is validation-only).
|
||||
- (2026-06-18, ha-commit-durability task 5.1) End-to-end durable-majority commit verified via 3 integration tests in test_commit_durability.c (NO production wiring gap found — the 2.x/4.x wiring already connects append→flusher fdatasync→durable_lsn→durable-advance wake→majority_candidate_locked self-cap→committed_lsn→commit barrier). (1) test_durable_majority_commit_end_to_end: REAL persist + REAL flusher + commit_engine(n_peers=3) + 2 registered standbys; with persist_test_set_force_fsync_fail(1) a FULL standby-ACK majority does NOT advance committed_lsn (durable precondition gate, Req 1.1/1.4) and a WAIT submit on its own thread does NOT release; after clearing the fault + persist_flush, durable_lsn advances, the durable-advance cb re-derives majority and the WAIT releases rc=0. GOTCHA: persist_wal_async fans out via repl_broadcast to registered standby eps — dummy int eps cause an ASAN global-buffer-overflow in dataq_enq; FIX = install the XCE_TESTING `repl_broadcast_send_hook` (drop hook, same as test_commit_engine.c) before appending, NULL it after. (2) test_sole_durable_contributor_loss_survives: models the N=3 durable-majority property (committed ⇒ ≥2 durable copies) — write the same op durably to two independent persist dirs (one via persist_wal_async+flush, one via persist_wal_write_replicated which fdatasyncs inline), rm -rf one, prove the survivor still recovers it CLEAN; live multi-host failover proof deferred to 5.2 (Req 1.5/2.5). (3) test_durability_work_off_iomgr_preserves_liveness (Req 1.6): new XCE_TESTING seam persist_test_last_fdatasync_thread() records pthread_self() at the successful flusher fdatasync site (flusher_flush_once, under p->lock); test asserts it != caller thread, and that heartbeat-style atomic reads on the caller thread complete <50ms while flushes are in flight. RED PROVEN by injecting the pre-2.2 bug (cap=highest_appended_lsn): the commit.c:162 `assert(cand <= persist_durable_lsn)` aborts when the ACK-majority tries to advance committed over a non-durable entry. 4.3's bounded-window catch-up TIMER left as 5.3 follow-up (immediate fail-loud is safety-conservative). Suite Fail:0 ASAN x2; seam nm-excluded from xce_controller. 34 durability tests (was 31).
|
||||
|
|
@ -80,9 +81,13 @@
|
|||
|
||||
## Do-Not-Repeat
|
||||
|
||||
- (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.
|
||||
|
||||
- (2026-06-22, ha-term-safety task 3.3 remediation) Do NOT run `clang-format -i` on whole XCE controller source files (ha.c/ha.h/test files): these files are NOT clang-format-clean against the repo's config, so a full reformat rewrites ~1700 lines and BURIES the targeted change (and violates a "preserve the existing diff" instruction). I then made it worse with `git checkout HEAD -- <files>` to undo the format — but the uncommitted task-3.3 work lived ONLY in the working tree, so that wiped it (no stash, unrecoverable from git). Recovery worked only because the full original content was already in my context. Lesson: (1) only format the exact changed regions or skip formatting; (2) NEVER `git checkout HEAD -- <file>` to discard formatting noise when the file also holds uncommitted feature work — instead revert just the format hunks, or stash first. The reflog showed branch HEAD was already at task-3.2 (754e586), and the initial-context "recent commit 2c5d298" was a stale snapshot — the uncommitted 3.3 diff sat on top of 3.2.
|
||||
- (2026-06-22, ACK peer-index, bug-960) The walAck branch of `repl_ack_decode_and_dispatch` (ha.c) fires for TWO endpoint types whose stored `peer_idx` means DIFFERENT things: promoted-vote eps (`vote_ep_ctx_t`, `ctx!=NULL`) carry a self-EXCLUDED *votes* index (relative); heartbeat standby eps (`standby_ep_ctx_t`, `ctx==NULL`) carry an ALREADY-ABSOLUTE candidate index. The authoritative branch is ha.c:6187-6189 (`sctx->ctx != NULL ? votes_idx : i`). The pre-existing ACK consumer `ha_walack_on_ack(c, vctx->peer_idx, …)` uses `peer_idx` DIRECTLY (no remap) — proof the ACK path's index is already absolute. Any code consuming the ACK `peer_idx` for the library (match_index[]/next_index[], which raft.c writes UNCHECKED) MUST branch on `vctx->ctx != NULL` before remapping, or it double-maps the heartbeat path → wrong-peer false quorum / OOB write. `self_idx == ha->my_priority` (raft_cfg.self_idx = my_priority everywhere).
|
||||
|
||||
<!-- Mistakes made and corrected. Each entry prevents the same mistake recurring. -->
|
||||
<!-- Format: [YYYY-MM-DD] Description of what went wrong and what to do instead. -->
|
||||
|
||||
|
|
@ -227,3 +232,28 @@ User chose to EXTEND the raft library to strictly follow raft/raft.tla, using th
|
|||
- raft-commit-safety (6 reqs/18 tasks): AdvanceCommitIndex Figure-8 current-term rule (G4); (lastLogTerm,lastLogIndex) freshness (G6). New: raft_advance_commit, on_commit_advanced(commit_index) [TRIGGERS the existing barrier, never replaces], commit_index state. raft_on_vote_request/raft_on_pre_vote_request gain (cand_last_log_term, cand_last_log_index); library now owns logOk (locus moved from caller/dispatcher → library; supersedes raft.h:246-248 doc).
|
||||
- raft-sim-conformance (8 reqs/23 tasks): extend raft_sim.c into in-process oracle driving raft.tla Next-actions, asserting the 4 safety invariants; negative test via compile-time RAFT_SIM_BREAK_* switches (test build only). Would have caught bug-851.
|
||||
Pure library core (no I/O/threads) + controller callback adapters keeps it simulator-verifiable. Preserve as policy: PreVote, priority leadership, sync commit-barrier + persist-before-ACK durability, controller-never-self-terminates. INTENTIONAL safe deviation from raft.tla: conflict branch does truncate-THEN-append in one handler (raft.tla is truncate-only) — documented. ha-term-safety reframed = controller wiring + config R7/R8 + live regression; its R1-R6 realized by the library specs. Implement order: raft-library(done) → log-replication → commit-safety → sim-conformance, then ha-term-safety.
|
||||
|
||||
## Key Learnings (raft-log-replication, 2026-06-21)
|
||||
- Library build/test: `cd src && nix develop --command bash tools/xce-build.sh lib` does a CLEAN ASAN build (rm -rf + meson setup). For fast TDD inner loop reuse the dir: `nix develop --command bash -c 'meson compile -C xce.build xcelib_test && meson test -C xce.build "libxce test" --print-errorlogs'`. test binary: `./xce.build/lib/xcelib_test` (Unity, runs all). raft tests live in testsuite/test_raft.c + raft_sim.c, registered in lib/meson.build.
|
||||
- `src/lib/raft` is a PURE library: stores no entry bytes, no commit index, no transport. All side effects via callbacks. Index is 1-based == WAL LSN.
|
||||
- Simulator gotcha: buffered AE RPCs must capture the leader's term at SEND time (raft_sim_ae_t.leader_term), NOT re-read live state.term at delivery — else reorder/stale-churn tests inject the wrong term and defeat UpdateTerm/stale-drop (G5).
|
||||
- Adapter invariant: never deliver entry_term==0 with entries_len==1 (already-have branch would false-match; correct leader stamps term>=1).
|
||||
|
||||
## Key Learnings (ha-term-safety task 2.4, 2026-06-22)
|
||||
- The controller commit barrier (commit.c) is SELF-DERIVING: `majority_candidate_locked` computes committed_lsn autonomously from registry watermarks (median) capped at `persist_durable_lsn`. The own-term `writable_lsn` gate is ONLY a WAIT-completion predicate, NOT a cap on committed_lsn (so it can't deadlock a commit source).
|
||||
- Task 2.4 makes the raft library's current-term-gated `commit_index` the COMMIT SOURCE via a NEW `commit_engine_t.raft_commit_index` ceiling + `commit_set_raft_commit_index()` setter; `on_commit_advanced` callback (ha.c) feeds it into `&ha->raft_c->commit`. committed_lsn = min(durable-majority, raft_commit_index). Own-term gate RETAINED (design lines 193/201/228) as complementary durability gate.
|
||||
- FEATURE GATE: raft_commit_index==0 means INERT (library source not yet wired by tasks 3.x) → barrier keeps autonomous durable-majority behavior. This is what stops 2.4 from regressing the whole test_commit_engine suite (which sets no raft index). The ceiling only engages at commit_index>=1.
|
||||
- Unit-test runner: `./xce.build/controller/controller_unit_test -t <group> [-t <group2>]` runs only named groups (argp `--run`/`-t`). Far faster than the full binary which times out (bug-924). Full clean build still `nix develop --command bash tools/xce-build.sh controller`.
|
||||
|
||||
## Do-Not-Repeat (2026-06-21)
|
||||
- Don't trust a green "baseline" reading blindly: the lib suite was actually red on HEAD via a stale test_config.c assertion (DEFAULT_SYNC_TIMEOUT_MS 50 vs committed 500 from commit ca1d9ae). Verify with the exact meson test command, not assumptions.
|
||||
|
||||
## Do-Not-Repeat (2026-06-22, task 2.4)
|
||||
- When the commit source is a feature-gated ceiling that is INERT at 0, a test that ACKs a durable majority BEFORE feeding the ceiling will commit autonomously to the durable floor, and the ceiling (monotonic) can never regress committed below it. Establish the raft_commit_index/on_commit_advanced ceiling FIRST (production order: the ACK path drives raft_advance_commit which fires on_commit_advanced), THEN drive the ACK. Initial ACK-then-ceiling ordering cost 3 test failures.
|
||||
- Do NOT make `raft_commit_index` an unconditional ceiling: capping at 0 when unset breaks every autonomous-barrier test (test_commit_engine: 25/38 failed). Gate it with `!= 0`.
|
||||
|
||||
## Key Learnings (appended 2026-06-22, ha-term-safety 4.3 r2)
|
||||
- Config MARKER (WAL stream) and config BYTES (out-of-band OPCode_replConfigPush) arrive on INDEPENDENT transports. config_committed_marker only returns a marker once it is in the committed prefix (LSN <= committed_lsn); an uncommitted marker is ignored. This creates a push-before-commit window where saved-but-unverified bytes mismatch the older committed marker.
|
||||
- conf_save_config bumps myconf->config_version_tag (the advertised tag) WITHOUT decoding/activating (cluster_config unchanged). Only load_primary_config decodes into mc->cluster_config. So the activation witness in tests is the cluster_config POINTER (load_primary_config frees+reallocates it), NOT config_version_tag.
|
||||
- In the single-member commit fixture (commit_engine_init n_peers=1), majority_candidate_locked returns persist_durable_lsn => committed_lsn auto-advances to the durable WAL tip on any commit re-eval (incl. conf_save_config). To hold a flushed marker "uncommitted" in a test, SAVE first then atomic_store committed_lsn back below the marker LSN (models a standby whose committed prefix lags its local WAL tip).
|
||||
- Off-iomgr scheduling pattern: ha_convergence.c is the canonical example — delay_task_ms(&c->delaymgr, 1, 1, entry, ctx) enqueues (ordq_put only, non-blocking) and the delaymgr worker runs the body off the iomgr ACK thread. Tests drive the queued task by calling its entry fn directly (the fixture leaves delaymgr unstarted). Guard scheduling on c->delaymgr.running to avoid leaking tasks into an undrained queue in the unit-test fixture.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
531
.wolf/memory.md
531
.wolf/memory.md
|
|
@ -2048,3 +2048,534 @@
|
|||
| 13:08 | descope ha-term-safety R8 → independent config-upgrade-snapshot spec | ha-term-safety/{requirements,design,research}.md, config-upgrade-snapshot/* (new), roadmap.md, buglog | ha-term-safety now R1-R7 (config bytes via config-push, no snapshot dep); R8 (bug-857 full-snapshot upgrade) → new spec, HARD-deps entity-bearing-snapshots | ~25k |
|
||||
| 06:08 | Session end: 81 writes across 9 files (requirements.md, project_bug851_term_divergence.md, TLA-gap-analysis.md, roadmap.md, brief.md) | 69 reads | ~214123 tok |
|
||||
| 06:56 | Session end: 81 writes across 9 files (requirements.md, project_bug851_term_divergence.md, TLA-gap-analysis.md, roadmap.md, brief.md) | 69 reads | ~214123 tok |
|
||||
|
||||
## Session: 2026-06-21 07:55
|
||||
|
||||
| Time | Action | File(s) | Outcome | ~Tokens |
|
||||
|------|--------|---------|---------|--------|
|
||||
| 14:30 | kiro-impl raft-log-replication: baseline green (libxce test OK), build dir src/xce.build; reconciled RED-only spec tasks by pairing RED+GREEN per TDD cycle so suite stays green at every commit | .kiro/specs/raft-log-replication | autonomous loop start | ~30k |
|
||||
| 08:02 | Edited src/lib/testsuite/test_raft.c | modified stub_start_election_after_delay() | ~509 |
|
||||
| 08:03 | Edited src/lib/testsuite/test_raft.c | expanded (+6 lines) | ~170 |
|
||||
| 08:03 | Edited src/lib/testsuite/test_raft.c | modified callbacks() | ~658 |
|
||||
| 08:03 | Edited src/lib/testsuite/test_raft.c | 2→7 lines | ~122 |
|
||||
| 08:04 | Edited src/lib/raft/raft.c | added 4 condition(s) | ~162 |
|
||||
| 08:04 | Edited src/lib/raft/raft.c | 5→10 lines | ~123 |
|
||||
| 08:16 | Edited src/lib/testsuite/test_config.c | 50 → 500 | ~15 |
|
||||
| 08:21 | Edited src/lib/raft/raft.h | modified struct() | ~658 |
|
||||
| 08:21 | Edited src/lib/raft/raft.h | 4→8 lines | ~93 |
|
||||
| 08:21 | Edited src/lib/raft/raft_sim.c | added 12 condition(s) | ~1108 |
|
||||
| 08:22 | Edited src/lib/raft/raft_sim.c | 3→8 lines | ~160 |
|
||||
| 15:23 | task 8.1: sim in-memory log + 4 log callbacks wired | lib/raft/raft.h, lib/raft/raft_sim.c | GREEN Ok:1 Fail:0 | ~6k |
|
||||
| 08:28 | Edited .kiro/specs/raft-log-replication/tasks.md | inline fix | ~18 |
|
||||
| 08:29 | Edited .kiro/specs/raft-log-replication/tasks.md | modified NOTE() | ~139 |
|
||||
| 08:32 | Edited src/lib/testsuite/test_raft.c | modified init_node_log_len() | ~767 |
|
||||
| 08:32 | Edited src/lib/testsuite/test_raft.c | 1→3 lines | ~41 |
|
||||
| 08:33 | Edited src/lib/raft/raft.c | modified if() | ~83 |
|
||||
| 08:33 | Edited src/lib/raft/raft.c | modified leader() | ~104 |
|
||||
| 08:34 | Edited src/lib/raft/raft.c | modified if() | ~54 |
|
||||
| 15:35 | task 2.2: leader progress init (next_index=log_len+1, match_index=0) on both win paths | raft.c, test_raft.c | Ok:1 Fail:0 | ~3k |
|
||||
| 08:40 | Edited .kiro/specs/raft-log-replication/tasks.md | inline fix | ~18 |
|
||||
| 08:41 | Edited src/lib/raft/raft.c | added 1 condition(s) | ~113 |
|
||||
| 08:41 | Edited src/lib/testsuite/test_raft.c | modified test_raft_init_oversize_peers_returns_einval() | ~343 |
|
||||
| 08:41 | Edited src/lib/testsuite/test_raft.c | 2→3 lines | ~46 |
|
||||
| 08:44 | Edited src/lib/testsuite/test_raft.c | added 1 condition(s) | ~1665 |
|
||||
| 08:45 | Edited src/lib/testsuite/test_raft.c | expanded (+6 lines) | ~110 |
|
||||
| 08:45 | Edited src/lib/raft/raft.c | added 4 condition(s) | ~356 |
|
||||
| 15:47 | TDD 3.1+3.2 raft_log_append: 4 spy-based tests RED (link err) → impl leader role-gate + persist-before-act → GREEN | raft.c, test_raft.c | Ok:1 Fail:0, 190 tests | ~14k |
|
||||
| 08:52 | Edited src/lib/testsuite/test_raft.c | added 1 condition(s) | ~2037 |
|
||||
| 08:52 | Edited src/lib/testsuite/test_raft.c | expanded (+6 lines) | ~100 |
|
||||
| 08:53 | Edited src/lib/raft/raft.c | added 2 condition(s) | ~455 |
|
||||
| 08:59 | Edited src/lib/raft/raft.c | added 1 condition(s) | ~134 |
|
||||
| 09:00 | Edited src/lib/testsuite/test_raft.c | 4→5 lines | ~66 |
|
||||
| 09:05 | Edited src/lib/testsuite/test_raft.c | modified struct() | ~6002 |
|
||||
| 09:05 | Edited src/lib/testsuite/test_raft.c | expanded (+17 lines) | ~270 |
|
||||
| 09:06 | Edited src/lib/raft/raft.c | added 18 condition(s) | ~1700 |
|
||||
| 16:08 | impl raft_on_append_entries_request (tasks 5.1/5.2/6.1/6.2/6.3): UpdateTerm-first, logOk, reject/step-down/accept(already-have/conflict-truncate/append) | src/lib/raft/raft.c, src/lib/testsuite/test_raft.c | GREEN: 208 tests 0 fail, 14 new ae_req tests | ~38k |
|
||||
| 09:15 | Edited src/lib/raft/raft.c | 6→11 lines | ~202 |
|
||||
| 09:16 | Edited src/lib/testsuite/test_raft.c | modified test_ae_req_candidate_equal_term_steps_down_then_rejects() | ~565 |
|
||||
| 09:16 | Edited src/lib/testsuite/test_raft.c | 3→3 lines | ~44 |
|
||||
| 09:16 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~35 |
|
||||
| 09:20 | Edited src/lib/testsuite/test_raft.c | modified test_ae_reply_success_advances_indices() | ~1163 |
|
||||
| 09:20 | Edited src/lib/testsuite/test_raft.c | 1→6 lines | ~73 |
|
||||
| 09:20 | Edited src/lib/raft/raft.c | added 3 condition(s) | ~397 |
|
||||
| 09:28 | Edited src/lib/raft/raft.h | expanded (+10 lines) | ~190 |
|
||||
| 09:29 | Edited src/lib/testsuite/test_raft.c | modified test_sim_deliver_append_entries_replicates() | ~635 |
|
||||
| 09:29 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~28 |
|
||||
| 09:29 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~450 |
|
||||
| 09:29 | Edited src/lib/raft/raft_sim.c | 8→11 lines | ~188 |
|
||||
| 09:36 | Edited src/lib/raft/raft.h | modified struct() | ~144 |
|
||||
| 09:36 | Edited src/lib/raft/raft_sim.c | 6→7 lines | ~84 |
|
||||
| 09:36 | Edited src/lib/raft/raft_sim.c | 4→6 lines | ~122 |
|
||||
| 09:36 | Edited src/lib/testsuite/test_raft.c | 3→5 lines | ~98 |
|
||||
| 09:41 | Edited src/lib/raft/raft.h | expanded (+15 lines) | ~255 |
|
||||
| 09:42 | Edited src/lib/testsuite/test_raft.c | modified test_sim_check_log_matching_pass_on_converged() | ~1009 |
|
||||
| 09:42 | Edited src/lib/testsuite/test_raft.c | 1→3 lines | ~48 |
|
||||
| 09:42 | Edited src/lib/raft/raft_sim.c | added 3 condition(s) | ~463 |
|
||||
| 09:51 | Edited src/lib/testsuite/test_raft.c | added error handling | ~4895 |
|
||||
| 09:51 | Edited src/lib/testsuite/test_raft.c | 2→6 lines | ~95 |
|
||||
| 09:53 | Edited src/lib/testsuite/test_raft.c | modified for() | ~542 |
|
||||
| 09:53 | Edited src/lib/testsuite/test_raft.c | 15→11 lines | ~180 |
|
||||
| 09:54 | Edited src/lib/testsuite/test_raft.c | 12→8 lines | ~114 |
|
||||
| 09:54 | Edited src/lib/testsuite/test_raft.c | modified if() | ~248 |
|
||||
| 16:55 | raft-log-replication tasks 9.1-9.4 sim invariant tests added | src/lib/testsuite/test_raft.c | 4 tests PASS, libxce Ok:1 Fail:0 | ~28k |
|
||||
| 10:03 | Edited src/lib/testsuite/test_raft.c | modified REORDER() | ~439 |
|
||||
| 10:04 | Edited src/lib/testsuite/test_raft.c | expanded (+9 lines) | ~259 |
|
||||
| 10:04 | Edited src/lib/testsuite/test_raft.c | modified while() | ~245 |
|
||||
| 10:14 | Created ../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_raft_log_replication_done.md | — | ~520 |
|
||||
| 10:14 | Session end: 63 writes across 7 files (test_raft.c, raft.c, test_config.c, raft.h, raft_sim.c) | 13 reads | ~128957 tok |
|
||||
| 14:44 | Edited src/lib/raft/raft.h | expanded (+12 lines) | ~177 |
|
||||
| 14:44 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~384 |
|
||||
| 14:45 | Edited src/lib/testsuite/test_raft.c | modified test_sim_9_5_node_restart_resumes_replication() | ~832 |
|
||||
| 14:45 | Edited src/lib/testsuite/test_raft.c | 1→2 lines | ~31 |
|
||||
| 14:49 | Edited .kiro/specs/raft-log-replication/tasks.md | inline fix | ~142 |
|
||||
| 14:50 | Session end: 68 writes across 7 files (test_raft.c, raft.c, test_config.c, raft.h, raft_sim.c) | 14 reads | ~131805 tok |
|
||||
| 17:10 | raft-log-replication spec COMPLETE+validated GO (12 commits, 220 ASAN tests); starting raft-commit-safety (G4 commit-advance + G6 vote freshness), HARD-deps on raft-log-replication | src/lib/raft, .kiro/specs | autonomous loop | ~200k |
|
||||
| 15:58 | Edited src/lib/raft/raft.h | expanded (+7 lines) | ~212 |
|
||||
| 15:58 | Edited src/lib/raft/raft.h | 2→3 lines | ~92 |
|
||||
| 15:58 | Edited src/lib/raft/raft.h | 2→3 lines | ~30 |
|
||||
| 15:59 | Edited src/lib/raft/raft.h | expanded (+13 lines) | ~258 |
|
||||
| 15:59 | Edited src/lib/raft/raft.h | expanded (+22 lines) | ~378 |
|
||||
| 15:59 | Edited src/lib/raft/raft.h | expanded (+8 lines) | ~208 |
|
||||
| 15:59 | Edited src/lib/raft/raft_sim.c | modified sim_on_commit_advanced() | ~185 |
|
||||
| 15:59 | Edited src/lib/raft/raft_sim.c | 4→5 lines | ~99 |
|
||||
| 16:00 | Edited src/lib/raft/raft_sim.c | 4→5 lines | ~70 |
|
||||
| 16:00 | Edited src/lib/raft/raft_sim.c | 14→19 lines | ~252 |
|
||||
| 16:00 | Edited src/lib/raft/raft.c | added 1 condition(s) | ~100 |
|
||||
| 16:00 | Edited src/lib/raft/raft.c | 6→10 lines | ~110 |
|
||||
| 16:01 | Edited src/lib/testsuite/test_raft.c | modified stub_truncate_from() | ~332 |
|
||||
| 16:01 | Edited src/lib/testsuite/test_raft.c | 7→8 lines | ~110 |
|
||||
| 16:01 | Edited src/lib/testsuite/test_raft.c | modified test_raft_init_null_commit_advanced_returns_einval() | ~598 |
|
||||
| 16:01 | Edited src/lib/testsuite/test_raft.c | 3→7 lines | ~112 |
|
||||
| 23:07 | raft-commit-safety 1.1+1.2+2.1: commit_index state + on_commit_advanced required callback + raft_advance_commit proto | raft.h,raft.c,raft_sim.c,test_raft.c | GREEN 224/0 | ~14k |
|
||||
| 16:14 | Edited src/lib/testsuite/test_raft.c | modified struct() | ~2403 |
|
||||
| 16:14 | Edited src/lib/testsuite/test_raft.c | expanded (+8 lines) | ~166 |
|
||||
| 16:14 | Edited src/lib/raft/raft.c | added 8 condition(s) | ~599 |
|
||||
| 16:14 | Edited src/lib/raft/raft.h | expanded (+12 lines) | ~177 |
|
||||
| 16:14 | Edited src/lib/raft/raft_sim.c | added 1 condition(s) | ~178 |
|
||||
| 23:17 | impl raft_advance_commit (AdvanceCommitIndex + Figure-8 current-term rule) + 6 tests + sim driver (tasks 3.1/3.2/3.3/6.1) | raft.c, test_raft.c, raft_sim.c, raft.h | GREEN Ok:1 Fail:0, 6 new tests PASS | ~9k |
|
||||
| 16:29 | Edited src/lib/testsuite/test_raft.c | expanded (+7 lines) | ~167 |
|
||||
| 16:30 | Edited src/lib/testsuite/test_raft.c | added 1 condition(s) | ~189 |
|
||||
| 16:31 | Edited src/lib/testsuite/test_raft.c | modified set_voter_log() | ~2998 |
|
||||
| 16:31 | Edited src/lib/testsuite/test_raft.c | expanded (+13 lines) | ~229 |
|
||||
| 16:31 | Edited src/lib/raft/raft.h | modified decision() | ~359 |
|
||||
| 16:31 | Edited src/lib/raft/raft.h | 9→13 lines | ~204 |
|
||||
| 16:32 | Edited src/lib/raft/raft.c | modified raft_log_ok() | ~290 |
|
||||
| 16:32 | Edited src/lib/raft/raft.c | added 2 condition(s) | ~187 |
|
||||
| 16:32 | Edited src/lib/raft/raft.c | 6 → 7 | ~18 |
|
||||
| 16:32 | Edited src/lib/raft/raft.c | modified raft_on_pre_vote_request() | ~53 |
|
||||
| 16:32 | Edited src/lib/raft/raft.c | added 2 condition(s) | ~237 |
|
||||
| 16:32 | Edited src/lib/raft/raft.h | modified struct() | ~165 |
|
||||
| 16:32 | Edited src/lib/raft/raft_sim.c | modified log() | ~178 |
|
||||
| 16:33 | Edited src/lib/raft/raft_sim.c | 4→7 lines | ~123 |
|
||||
| 23:38 | raft-commit-safety vote/PreVote (lastLogTerm,lastLogIndex) freshness: extended raft_on_vote_request/raft_on_pre_vote_request sigs + raft_log_ok helper (logOk before app gate, prevote side-effect-free), sim rpc carries cand last-log tuple at send | raft.h raft.c raft_sim.c test_raft.c | GREEN 239 tests 0 fail; controller cluster.c callers still old-sig (ha-term-safety adapter scope) | ~9k |
|
||||
| 17:13 | Edited src/lib/raft/raft.c | 3→4 lines | ~83 |
|
||||
| 17:19 | Edited src/lib/testsuite/test_raft.c | added 2 condition(s) | ~4497 |
|
||||
| 17:19 | Edited src/lib/testsuite/test_raft.c | expanded (+6 lines) | ~113 |
|
||||
| 17:19 | Edited src/lib/testsuite/test_raft.c | inline fix | ~17 |
|
||||
| 17:44 | Created ../../../../../claude/.claude/projects/-home-rshen-projects-xce-xce/memory/project_raft_commit_safety_done.md | — | ~622 |
|
||||
| 17:44 | Session end: 108 writes across 8 files (test_raft.c, raft.c, test_config.c, raft.h, raft_sim.c) | 22 reads | ~181743 tok |
|
||||
| 18:21 | Edited .kiro/specs/ha-term-safety/spec.json | 4→4 lines | ~20 |
|
||||
| 18:24 | Created .kiro/specs/ha-term-safety/tasks.md | — | ~3845 |
|
||||
| 18:24 | Edited .kiro/specs/ha-term-safety/spec.json | inline fix | ~9 |
|
||||
| 18:24 | Edited .kiro/specs/ha-term-safety/spec.json | 7→8 lines | ~46 |
|
||||
| 18:25 | Session end: 112 writes across 9 files (test_raft.c, raft.c, test_config.c, raft.h, raft_sim.c) | 26 reads | ~204478 tok |
|
||||
| 19:34 | Edited .kiro/specs/ha-term-safety/design.md | inline fix | ~14 |
|
||||
| 19:35 | Session end: 113 writes across 10 files (test_raft.c, raft.c, test_config.c, raft.h, raft_sim.c) | 26 reads | ~204493 tok |
|
||||
| 19:52 | Edited src/schema/controller.capnp | modified mapname() | ~210 |
|
||||
| 19:52 | Edited src/schema/controller.capnp | modified mapname() | ~244 |
|
||||
| 19:52 | Edited src/include/typemap.h | modified struct() | ~120 |
|
||||
| 19:52 | Edited src/include/typemap.h | expanded (+7 lines) | ~165 |
|
||||
| 19:52 | Edited src/controller/cluster.c | modified 2() | ~293 |
|
||||
| 19:53 | Edited src/controller/cluster.c | modified if() | ~66 |
|
||||
| 19:53 | Edited src/controller/cluster.c | modified 2() | ~231 |
|
||||
| 19:53 | Edited src/controller/cluster.c | 1→2 lines | ~39 |
|
||||
| 19:54 | Edited src/controller/ha.c | expanded (+6 lines) | ~136 |
|
||||
| 19:54 | Edited src/controller/ha.c | expanded (+8 lines) | ~242 |
|
||||
| 19:54 | Edited src/controller/ha.c | 4→8 lines | ~128 |
|
||||
| 19:54 | Edited src/controller/ha.c | 6→9 lines | ~105 |
|
||||
| 19:54 | Edited src/controller/ha.c | 8→11 lines | ~136 |
|
||||
| 19:55 | Edited src/controller/ha.c | modified TODO() | ~719 |
|
||||
| 19:55 | Edited src/controller/ha.c | expanded (+7 lines) | ~175 |
|
||||
| 19:56 | Edited src/controller/testsuite/test_ha_vote_gate.c | expanded (+6 lines) | ~154 |
|
||||
| 19:56 | Edited src/controller/testsuite/test_ha_prevote.c | modified voter_pre_vote_decide() | ~224 |
|
||||
| 19:56 | Edited src/controller/testsuite/test_e2e_capnp.c | 9→11 lines | ~53 |
|
||||
| 19:57 | Edited src/controller/testsuite/test_e2e_capnp.c | added error handling | ~1371 |
|
||||
| 19:57 | Edited src/controller/testsuite/test_e2e_capnp.c | 29→26 lines | ~239 |
|
||||
| 03:10 | ha-term-safety 1.1+1.2: +lastLogTerm/lastLogIndex on RequestVote, +term/prevLog{Index,Term} on WalCatchupEntry (capnp+typemap); fixed vote/prevote call arity in cluster.c; populate candidate tuple in ha.c send path; wired 5 MINIMAL log-cb stubs (ha_cb_*_stub) into s_real_cbs to satisfy raft_init non-NULL (TODO task 2.x) | controller.capnp, typemap.h, cluster.c, ha.c, test_e2e_capnp.c, test_ha_prevote.c, test_ha_vote_gate.c | build RESTORED (compiles+links); lib green; 2 new round-trip tests PASS; 6 pre-existing test_wal_catchup_* FAILs (bug-855, NOT mine) | ~75k |
|
||||
| 20:43 | Session end: 133 writes across 17 files (test_raft.c, raft.c, test_config.c, raft.h, raft_sim.c) | 36 reads | ~272510 tok |
|
||||
| 20:58 | Created src/controller/testsuite/test_term_safety_adapter.c | — | ~2252 |
|
||||
| 20:58 | Edited src/controller/meson.build | 2→3 lines | ~32 |
|
||||
| 20:58 | Edited src/controller/testsuite/controller_test.c | 2→3 lines | ~33 |
|
||||
| 20:58 | Edited src/controller/testsuite/controller_test.c | 2→3 lines | ~27 |
|
||||
| 20:58 | Edited src/include/persist.h | expanded (+17 lines) | ~332 |
|
||||
| 20:59 | Edited src/include/persist.h | expanded (+39 lines) | ~621 |
|
||||
| 20:59 | Edited src/controller/persist.c | added 8 condition(s) | ~971 |
|
||||
| 20:59 | Edited src/controller/persist.c | modified unregistered() | ~150 |
|
||||
| 21:00 | Edited src/controller/persist.c | expanded (+6 lines) | ~73 |
|
||||
| 21:00 | Edited src/controller/persist.c | modified entry() | ~240 |
|
||||
| 21:00 | Edited src/controller/persist.c | expanded (+8 lines) | ~233 |
|
||||
| 21:01 | Edited src/controller/persist.c | 4→9 lines | ~157 |
|
||||
| 21:01 | Edited src/controller/persist.c | added 1 condition(s) | ~281 |
|
||||
| 21:01 | Edited src/controller/persist.c | held() → path() | ~105 |
|
||||
| 21:10 | Created src/controller/testsuite/test_term_safety_adapter.c | — | ~2252 |
|
||||
| 04:11 | ha-term-safety 1.3: persist_set_term seam + per-LSN term index + persist_entry_term accessor + legacy-0→term1 rule | persist.c persist.h test_term_safety_adapter.c meson.build controller_test.c | GREEN, controller test Ok:1 Fail:0 (5 new tests) | ~70k |
|
||||
| 21:40 | Edited src/include/wal_types.h | modified struct() | ~399 |
|
||||
| 21:41 | Edited src/controller/ha.h | modified XCE_TESTING() | ~313 |
|
||||
| 21:41 | Edited src/controller/testsuite/test_term_safety_adapter.c | 5→9 lines | ~43 |
|
||||
| 21:42 | Edited src/controller/testsuite/test_term_safety_adapter.c | added 5 condition(s) | ~1607 |
|
||||
| 21:42 | Edited src/controller/ha.c | modified XCE_TESTING() | ~171 |
|
||||
| 21:45 | Edited src/controller/ha.c | added 6 condition(s) | ~950 |
|
||||
| 21:45 | Edited src/controller/ha.c | modified TODO() | ~150 |
|
||||
| 21:46 | Edited src/controller/testsuite/test_term_safety_adapter.c | expanded (+6 lines) | ~299 |
|
||||
| 04:48 | task 2.1: implement on_persist_entry (term stamp + WAL write, role-routed); RED->GREEN | ha.c, persist? no, wal_types.h, ha.h, test_term_safety_adapter.c | 3 new tests pass, 0 group failures | ~12k |
|
||||
| 21:55 | Edited src/controller/ha.h | modified ha_cb_get_entry_term_for_test() | ~267 |
|
||||
| 21:55 | Edited src/controller/testsuite/test_term_safety_adapter.c | added 3 condition(s) | ~1306 |
|
||||
| 21:56 | Edited src/controller/testsuite/test_term_safety_adapter.c | 3→6 lines | ~75 |
|
||||
| 21:56 | Edited src/controller/ha.c | modified ha_cb_persist_entry_for_test() | ~214 |
|
||||
| 21:57 | Edited src/controller/ha.c | added 1 condition(s) | ~359 |
|
||||
| 21:57 | Edited src/controller/ha.c | added 2 condition(s) | ~322 |
|
||||
| 21:57 | Edited src/controller/persist.c | added 2 condition(s) | ~201 |
|
||||
| 21:57 | Edited src/controller/persist.c | 8→10 lines | ~118 |
|
||||
| 21:57 | Edited src/controller/persist.c | 8→10 lines | ~100 |
|
||||
| 05:10 | ha-term-safety 2.2: on_get_entry_term + on_truncate_from real bodies | ha.c, ha.h, persist.c, test_term_safety_adapter.c | GREEN: 3 new tests pass, all groups 0 Failures | ~9k |
|
||||
| 22:44 | Edited src/controller/testsuite/test_term_safety_adapter.c | 5→6 lines | ~34 |
|
||||
| 22:45 | Edited src/include/repl.h | expanded (+22 lines) | ~410 |
|
||||
| 22:45 | Edited src/include/repl.h | modified XCE_TESTING() | ~293 |
|
||||
| 22:45 | Edited src/controller/ha.h | modified ha_cb_send_append_entries_for_test() | ~225 |
|
||||
| 22:46 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified register_one_standby() | ~1398 |
|
||||
| 22:46 | Edited src/controller/testsuite/test_term_safety_adapter.c | 3→5 lines | ~60 |
|
||||
| 22:47 | Edited src/controller/repl.c | added error handling | ~1079 |
|
||||
| 22:47 | Edited src/controller/ha.c | 3→4 lines | ~22 |
|
||||
| 22:47 | Edited src/controller/ha.c | added 15 condition(s) | ~1677 |
|
||||
| 22:48 | Edited src/controller/ha.c | modified ha_cb_truncate_from_for_test() | ~249 |
|
||||
| 22:49 | Edited src/controller/testsuite/test_term_safety_adapter.c | 15→20 lines | ~278 |
|
||||
| 22:49 | Edited src/controller/testsuite/test_term_safety_adapter.c | 11→13 lines | ~146 |
|
||||
| 05:50 | ha-term-safety 2.3: on_send_append_entries body (peer→ep map, prev tuple+leaderCommit, local-WAL entry sourcing, heartbeat) + repl_send_append_entries + capture seam | ha.c, repl.c, repl.h, ha.h, test_term_safety_adapter.c | GREEN: 13/13 adapter tests pass, all groups 0 Failures, no new ASAN | ~45k |
|
||||
| 23:00 | Edited src/controller/repl.c | heartbeat() → parameter() | ~103 |
|
||||
|
||||
## Session: 2026-06-22 23:31
|
||||
|
||||
| Time | Action | File(s) | Outcome | ~Tokens |
|
||||
|------|--------|---------|---------|--------|
|
||||
| 23:37 | Edited src/controller/testsuite/test_term_safety_adapter.c | 6→7 lines | ~39 |
|
||||
| 23:38 | Edited src/controller/testsuite/test_term_safety_adapter.c | added error handling | ~2657 |
|
||||
| 23:38 | Edited src/controller/testsuite/test_term_safety_adapter.c | 3→8 lines | ~112 |
|
||||
| 23:38 | Edited src/controller/include/commit.h | expanded (+9 lines) | ~245 |
|
||||
| 23:39 | Edited src/controller/include/commit.h | expanded (+7 lines) | ~178 |
|
||||
| 23:39 | Edited src/controller/commit.c | added 1 condition(s) | ~338 |
|
||||
| 23:39 | Edited src/controller/commit.c | 3→4 lines | ~63 |
|
||||
| 23:39 | Edited src/controller/commit.c | added 2 condition(s) | ~422 |
|
||||
| 23:39 | Edited src/controller/ha.c | added 1 condition(s) | ~391 |
|
||||
| 23:40 | Edited src/controller/ha.c | 5→5 lines | ~114 |
|
||||
| 23:40 | Edited src/controller/ha.c | modified ha_cb_commit_advanced_for_test() | ~156 |
|
||||
| 23:40 | Edited src/controller/ha.h | modified ha_cb_commit_advanced_for_test() | ~184 |
|
||||
| 23:40 | Edited src/controller/testsuite/test_term_safety_adapter.c | 30→35 lines | ~470 |
|
||||
| 00:19 | Edited src/controller/commit.c | modified if() | ~322 |
|
||||
| 00:19 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_commit_advanced_is_commit_source() | ~454 |
|
||||
| 00:20 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_on_commit_advanced_wired_feeds_barrier() | ~755 |
|
||||
| 00:21 | Edited src/controller/testsuite/test_term_safety_adapter.c | commit_on_ack() → evaluation() | ~244 |
|
||||
| 00:21 | Edited src/controller/testsuite/test_term_safety_adapter.c | 16→16 lines | ~209 |
|
||||
| 00:22 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified majority() | ~236 |
|
||||
| 07:25 | ha-term-safety task 2.4: on_commit_advanced real body — library commit_index as commit SOURCE via commit_set_raft_commit_index ceiling in commit.c; own-term gate RETAINED; inert-on-0 feature gate; 5 new tests | commit.c, commit.h, ha.c, ha.h, test_term_safety_adapter.c | READY_FOR_REVIEW (18/18 term-safety, 38/38 commit_engine green) | ~38k |
|
||||
| 00:32 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~32 |
|
||||
| 00:32 | Edited .kiro/specs/ha-term-safety/tasks.md | modified LOW() | ~588 |
|
||||
| 00:37 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_init_restores_recovered_floor() | ~1134 |
|
||||
| 00:37 | Edited src/controller/testsuite/test_term_safety_adapter.c | 2→4 lines | ~42 |
|
||||
| 00:39 | Edited src/controller/ha.c | added 1 condition(s) | ~678 |
|
||||
| 07:41 | task 2.5 init restore: ha_init_raft restores initial_log_len=persist_durable_floor + initial_commit_index=committed_lsn (clamped) | src/controller/ha.c, testsuite/test_term_safety_adapter.c | RED(Expected 3 Was 0)->GREEN; term_safety group 19/19 PASS, repl_unit fails pre-existing (bug-924) | ~22k |
|
||||
| 00:47 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~26 |
|
||||
| 00:47 | Edited .kiro/specs/ha-term-safety/tasks.md | modified COMMENT() | ~519 |
|
||||
| 00:53 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified make_leader() | ~1633 |
|
||||
| 00:53 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_primary_log_append_non_leader_legacy_fallback() | ~474 |
|
||||
| 00:53 | Edited src/controller/testsuite/test_term_safety_adapter.c | 3→6 lines | ~79 |
|
||||
| 00:54 | Edited src/controller/ha.c | added 7 condition(s) | ~1036 |
|
||||
| 00:55 | Edited src/controller/ha.c | modified ha_arm_own_term_gate() | ~222 |
|
||||
| 00:55 | Edited src/controller/ha.h | modified ha_primary_log_append() | ~302 |
|
||||
| 00:55 | Edited src/controller/ha.c | modified ha_cb_commit_advanced_for_test() | ~128 |
|
||||
| 00:56 | Edited src/controller/ha.h | modified ha_arm_own_term_gate_for_test() | ~106 |
|
||||
| 00:56 | Edited src/controller/testsuite/test_term_safety_adapter.c | ha_arm_own_term_gate() → ha_arm_own_term_gate_for_test() | ~26 |
|
||||
| 00:56 | Edited src/controller/persist.c | added 1 condition(s) | ~265 |
|
||||
| 00:57 | Edited src/controller/persist.c | added 1 condition(s) | ~291 |
|
||||
| 00:58 | Edited src/controller/ha.c | modified if() | ~163 |
|
||||
| 08:05 | ha-term-safety task 3.1: ha_primary_log_append (ha.c) routes primary append + own-term NOOP through raft_log_append (library stamps term + LSN, fires on_persist_entry); -EPERM→legacy persist_wal_async fallback (stamps ha->term). Retired hand-rolled bypass: persist.c wal_hook_append_classified + persist_wal_sync_append route via ha_primary_log_append when p->cluster!=NULL (standalone persist keeps direct). ha_arm_own_term_gate uses it. 3 RED→GREEN tests (LSN==log_len, hdr.term==s->term, current_lsn==log_len+1 co-track, noop live term, non-leader fallback). | ha.c, ha.h, persist.c, testsuite/test_term_safety_adapter.c | GREEN: term_safety + durability/commit/p2 groups 0 fail; only pre-existing test_wal_catchup_* (bug-924) fail, identical on baseline | ~38k |
|
||||
| 01:09 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~16 |
|
||||
| 01:09 | Edited .kiro/specs/ha-term-safety/tasks.md | modified COMMENT() | ~616 |
|
||||
| 01:16 | Edited src/controller/testsuite/test_term_safety_adapter.c | added error handling | ~2172 |
|
||||
| 01:17 | Edited src/controller/testsuite/test_term_safety_adapter.c | 2→5 lines | ~71 |
|
||||
| 01:17 | Edited src/schema/controller.capnp | modified 2() | ~120 |
|
||||
| 01:17 | Edited src/include/typemap.h | modified 2() | ~105 |
|
||||
| 01:19 | Edited src/lib/request.c | modified wal_entry_to_wire() | ~181 |
|
||||
| 01:19 | Edited src/lib/request.c | added error handling | ~390 |
|
||||
| 01:20 | Edited src/lib/request.c | modified capn_len() | ~472 |
|
||||
| 01:20 | Edited src/lib/request.c | modified capn_len() | ~311 |
|
||||
| 01:20 | Edited src/controller/repl.c | modified if() | ~182 |
|
||||
| 01:21 | Edited src/controller/ha.c | added error handling | ~1647 |
|
||||
| 01:22 | Edited src/controller/testsuite/test_term_safety_adapter.c | 6→8 lines | ~104 |
|
||||
| 01:22 | Edited src/controller/ha.h | added error handling | ~303 |
|
||||
| 01:23 | Edited src/controller/ha.c | added error handling | ~687 |
|
||||
| 01:23 | Edited src/controller/ha.c | added 4 condition(s) | ~635 |
|
||||
| 01:24 | Edited src/controller/ha_convergence.c | modified is() | ~389 |
|
||||
| 01:25 | Edited src/controller/testsuite/test_demotion_convergence.c | modified test_rejoin_no_watermark_truncate_no_restart() | ~579 |
|
||||
| 01:25 | Edited src/controller/testsuite/test_demotion_convergence.c | modified test_rejoin_repeated_calls_remain_no_op() | ~351 |
|
||||
| 01:26 | Edited src/controller/testsuite/test_demotion_convergence.c | modified Assert() | ~256 |
|
||||
| 01:26 | Edited src/controller/testsuite/test_demotion_convergence.c | 4→4 lines | ~65 |
|
||||
| 01:27 | Edited src/controller/ha_convergence.c | reduced (-41 lines) | ~145 |
|
||||
| 08:29 | task 3.2 route AE intake through library + leaderCommit wire | ha.c ha_convergence.c repl.c request.c controller.capnp typemap.h ha.h test_term_safety_adapter.c test_demotion_convergence.c | 156/0/0 GREEN | ~70k |
|
||||
| 01:42 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~39 |
|
||||
| 01:42 | Edited .kiro/specs/ha-term-safety/tasks.md | added error handling | ~679 |
|
||||
| 01:47 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified ha_raft_on_repl_ack() | ~2176 |
|
||||
| 01:47 | Edited src/controller/testsuite/test_term_safety_adapter.c | 2→5 lines | ~66 |
|
||||
| 01:48 | Edited src/controller/ha.h | modified ha_raft_on_repl_ack() | ~412 |
|
||||
| 01:48 | Edited src/controller/ha.c | added 1 condition(s) | ~591 |
|
||||
| 01:49 | Edited src/controller/ha.c | modified if() | ~346 |
|
||||
| 08:54 | task 3.3: ACK→raft_on_append_entries_reply+raft_advance_commit live commit source | ha.c ha.h test_term_safety_adapter.c | GREEN 159T/0F, behavioral-RED proven | ~46k |
|
||||
| 02:04 | Edited src/controller/ha.c | added 2 condition(s) | ~1166 |
|
||||
| 02:04 | Edited src/controller/ha.c | modified 3() | ~374 |
|
||||
| 02:05 | Edited src/controller/ha.h | modified blocking() | ~531 |
|
||||
| 02:05 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified ha_raft_on_repl_ack() | ~417 |
|
||||
| 02:05 | Edited src/controller/testsuite/test_term_safety_adapter.c | 3→4 lines | ~85 |
|
||||
| 02:05 | Edited src/controller/testsuite/test_term_safety_adapter.c | 4→4 lines | ~54 |
|
||||
| 02:05 | Edited src/controller/testsuite/test_term_safety_adapter.c | 2→2 lines | ~48 |
|
||||
| 02:06 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_repl_ack_abs_peer_idx_endpoint_type_roundtrip() | ~1842 |
|
||||
| 02:06 | Edited src/controller/testsuite/test_term_safety_adapter.c | 4→7 lines | ~96 |
|
||||
| 02:08 | Edited src/controller/ha.c | 4→3 lines | ~54 |
|
||||
| 02:08 | Edited src/controller/ha.c | added 1 condition(s) | ~62 |
|
||||
| 02:11 | Edited src/controller/ha.c | added 3 condition(s) | ~1226 |
|
||||
| 02:12 | Edited src/controller/ha.c | modified if() | ~513 |
|
||||
| 02:12 | Edited src/controller/ha.h | modified ha_raft_on_repl_ack() | ~762 |
|
||||
| 02:13 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified ha_raft_on_repl_ack() | ~4042 |
|
||||
| 02:14 | Edited src/controller/testsuite/test_term_safety_adapter.c | 6→7 lines | ~37 |
|
||||
| 02:14 | Edited src/controller/testsuite/test_term_safety_adapter.c | expanded (+6 lines) | ~149 |
|
||||
| 09:20 | task 3.3 REMEDIATION: fixed OOB/false-quorum peer remap in ha_raft_on_repl_ack; absolute-index seam + ha_repl_ack_abs_peer_idx resolver + 3 tests; reconstructed lost uncommitted 3.3 diff onto HEAD after a clang-format mishap | ha.c, ha.h, test_term_safety_adapter.c | 1299 PASS / 0 FAIL, RED captured (Expected 1 Was 2) | ~80k |
|
||||
| 02:25 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~24 |
|
||||
| 02:25 | Edited .kiro/specs/ha-term-safety/tasks.md | modified cleanup() | ~830 |
|
||||
| 02:29 | Edited src/controller/testsuite/test_config_repl.c | modified test_config_marker_encode_decode_roundtrip() | ~957 |
|
||||
| 02:29 | Edited src/controller/testsuite/test_config_repl.c | modified XCE_TESTING() | ~98 |
|
||||
| 02:29 | Edited src/include/wal_types.h | modified struct() | ~462 |
|
||||
| 02:30 | Edited src/controller/config_repl.h | 4→5 lines | ~45 |
|
||||
| 02:30 | Edited src/controller/config_repl.h | expanded (+43 lines) | ~556 |
|
||||
| 02:31 | Edited src/controller/config_repl.c | added 5 condition(s) | ~568 |
|
||||
| 09:32 | task 4.1 WAL_CONFIG_MARKER=50 + {version_tag,sha256} codec (no config bytes) | wal_types.h config_repl.c/.h test_config_repl.c | GREEN 327/0 | ~9k |
|
||||
| 02:37 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~19 |
|
||||
| 02:37 | Edited .kiro/specs/ha-term-safety/tasks.md | modified 4() | ~520 |
|
||||
| 02:42 | Edited src/controller/config_repl.h | expanded (+46 lines) | ~679 |
|
||||
| 02:42 | Edited src/controller/testsuite/test_config_repl.c | 5→6 lines | ~35 |
|
||||
| 02:43 | Edited src/controller/testsuite/test_config_repl.c | added 4 condition(s) | ~2393 |
|
||||
| 02:43 | Edited src/controller/testsuite/test_config_repl.c | modified XCE_TESTING() | ~121 |
|
||||
| 02:44 | Edited src/controller/persist.c | modified marker() | ~220 |
|
||||
| 02:44 | Edited src/controller/persist.c | modified marker() | ~266 |
|
||||
| 02:44 | Edited src/controller/testsuite/test_commit_barrier_rollout.c | 4→5 lines | ~87 |
|
||||
| 02:45 | Edited src/controller/config_repl.c | added 17 condition(s) | ~1475 |
|
||||
| 09:49 | task 4.2 config marker append+derive via unified log | config_repl.{c,h} persist.c test_config_repl.c | GREEN: 4 new tests pass, classify-totality+durability green, 7 wal_catchup FAILs pre-existing bug-924 | ~45k |
|
||||
| 03:03 | Edited src/include/persist.h | expanded (+17 lines) | ~417 |
|
||||
| 03:04 | Edited src/controller/persist.c | added 10 condition(s) | ~939 |
|
||||
| 03:04 | Edited src/controller/persist.c | expanded (+6 lines) | ~172 |
|
||||
| 03:04 | Edited src/controller/persist.c | expanded (+8 lines) | ~231 |
|
||||
| 03:04 | Edited src/controller/persist.c | added 1 condition(s) | ~313 |
|
||||
| 03:04 | Edited src/controller/config_repl.c | added 4 condition(s) | ~370 |
|
||||
| 03:05 | Edited src/controller/config_repl.c | added 6 condition(s) | ~1143 |
|
||||
| 03:05 | Edited src/controller/config_repl.c | modified if() | ~391 |
|
||||
| 03:06 | Edited src/controller/config_repl.h | expanded (+25 lines) | ~427 |
|
||||
| 03:08 | Edited src/controller/testsuite/test_config_repl.c | modified INTEGRATION() | ~1482 |
|
||||
| 03:09 | Edited src/include/persist.h | expanded (+7 lines) | ~138 |
|
||||
| 03:10 | Edited src/controller/persist.c | added 1 condition(s) | ~172 |
|
||||
| 03:10 | Edited src/controller/testsuite/test_config_repl.c | inline fix | ~20 |
|
||||
| 03:10 | Edited src/controller/testsuite/test_config_repl.c | 4→7 lines | ~116 |
|
||||
| 03:10 | Edited src/controller/testsuite/test_config_repl.c | 3→4 lines | ~22 |
|
||||
| 03:16 | Edited src/controller/config_repl.c | modified config_commit_change() | ~856 |
|
||||
| 03:16 | Edited src/controller/testsuite/test_commit_barrier_rollout.c | expanded (+13 lines) | ~391 |
|
||||
| 03:16 | Edited src/controller/testsuite/test_commit_barrier_rollout.c | 2→4 lines | ~58 |
|
||||
| 03:16 | Edited src/controller/testsuite/test_commit_barrier_rollout.c | 2→3 lines | ~28 |
|
||||
| 03:17 | Edited src/controller/testsuite/test_commit_barrier_rollout.c | added 1 condition(s) | ~178 |
|
||||
| 03:19 | Edited src/controller/testsuite/test_config_repl.c | expanded (+9 lines) | ~482 |
|
||||
| 03:19 | Edited src/controller/testsuite/test_config_repl.c | 7→11 lines | ~156 |
|
||||
| 03:20 | Edited src/controller/testsuite/test_config_repl.c | 5→7 lines | ~119 |
|
||||
| 03:20 | Edited src/controller/testsuite/test_config_repl.c | 5→6 lines | ~78 |
|
||||
| 03:21 | Edited src/controller/config_repl.c | reduced (-6 lines) | ~31 |
|
||||
| 03:22 | Edited src/controller/config_repl.c | config_append_marker() → appended() | ~32 |
|
||||
| 10:24 | task 4.2 remediation r1: live config-marker wiring + compaction-safe derive | config_repl.{c,h}, persist.c, persist.h, test_config_repl.c, test_commit_barrier_rollout.c | GREEN 0 failures direct-run; RED confirmed | ~32k |
|
||||
| 03:25 | Edited src/controller/config_repl.c | expanded (+7 lines) | ~230 |
|
||||
| 03:33 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~30 |
|
||||
| 03:34 | Edited .kiro/specs/ha-term-safety/tasks.md | modified 2() | ~902 |
|
||||
| 03:38 | Edited src/controller/ha.h | expanded (+17 lines) | ~385 |
|
||||
| 03:38 | Edited src/controller/config_repl.h | modified marker() | ~709 |
|
||||
| 03:39 | Edited src/controller/testsuite/test_config_repl.c | added 2 condition(s) | ~3091 |
|
||||
| 03:39 | Edited src/controller/testsuite/test_config_repl.c | 2→7 lines | ~113 |
|
||||
| 03:40 | Edited src/controller/config_repl.c | added 11 condition(s) | ~1456 |
|
||||
| 03:40 | Edited src/controller/config_repl.c | added 1 condition(s) | ~292 |
|
||||
| 10:46 | ha-term-safety 4.3: config byte-delivery hash-verify-before-activate + serve-fence | config_repl.c/.h, ha.h, test_config_repl.c | 4 RED→GREEN tests pass; 162/0 | ~9k |
|
||||
| 03:56 | Edited src/controller/testsuite/test_config_repl.c | modified test_push_path_mismatch_does_not_preactivate() | ~2106 |
|
||||
| 03:57 | Edited src/controller/testsuite/test_config_repl.c | modified XCE_TESTING() | ~179 |
|
||||
| 03:57 | Edited src/controller/config_repl.c | added 1 condition(s) | ~301 |
|
||||
| 03:57 | Edited src/controller/config_repl.c | modified 3() | ~451 |
|
||||
| 03:58 | Edited src/controller/myapp.c | 2→5 lines | ~79 |
|
||||
| 03:58 | Edited src/controller/myapp.c | added 1 condition(s) | ~433 |
|
||||
| 03:58 | Edited src/controller/ha.c | modified XCE_TESTING() | ~200 |
|
||||
| 03:59 | Edited src/controller/ha.c | modified ha_cb_commit_advanced_stub() | ~351 |
|
||||
| 03:59 | Edited src/controller/ha.c | added 1 condition(s) | ~561 |
|
||||
| 04:00 | Edited src/controller/ha.c | added 1 condition(s) | ~350 |
|
||||
| 04:00 | Edited src/controller/ha.h | expanded (+11 lines) | ~177 |
|
||||
| 04:00 | Edited src/controller/ha.c | added 1 condition(s) | ~152 |
|
||||
| 11:15 | ha-term-safety 4.3 remediation r1: push-path sole activation (Finding A), boot/recovery + -ENOENT fallback activate (Finding B), dispatch-gate + promotion serve-fence reader (Finding C) | config_repl.c, ha.c, ha.h, myapp.c, test_config_repl.c | GREEN: 7/7 config_repl tests pass, clean meson gate OK, classify/gate/quorum unregressed; bug-976 logged | ~58k |
|
||||
| 04:21 | Edited src/controller/config_repl.c | added 8 condition(s) | ~1166 |
|
||||
| 04:21 | Edited src/controller/config_repl.h | expanded (+28 lines) | ~456 |
|
||||
| 04:21 | Edited src/controller/ha.c | added 1 condition(s) | ~589 |
|
||||
| 04:22 | Edited src/controller/ha.c | modified 3() | ~102 |
|
||||
| 04:22 | Edited src/controller/testsuite/test_config_repl.c | modified t43_append_marker_uncommitted() | ~1482 |
|
||||
| 04:23 | Edited src/controller/testsuite/test_config_repl.c | 3→6 lines | ~106 |
|
||||
| 04:26 | Edited src/controller/testsuite/test_config_repl.c | modified t43_append_marker_uncommitted() | ~1810 |
|
||||
| 04:30 | Edited src/controller/testsuite/test_config_repl.c | 26→21 lines | ~366 |
|
||||
| 04:30 | Edited src/controller/testsuite/test_config_repl.c | 3→2 lines | ~26 |
|
||||
| 04:32 | Edited src/controller/testsuite/test_config_repl.c | expanded (+14 lines) | ~879 |
|
||||
| 04:32 | Edited src/controller/testsuite/test_config_repl.c | 2→2 lines | ~26 |
|
||||
|
||||
| 11:35 | ha-term-safety 4.3 r2: fixed Finding D push-before-commit permanent serve-fence (liveness §7.9) — added config_schedule_activate_retry + config_activate_retry_fn (off-iomgr delaymgr retry) called from ha_cb_commit_advanced_stub when fenced; non-blocking ordq_put only, disk I/O on delaymgr worker | config_repl.{c,h}, ha.c, test_config_repl.c | RED captured (stubbed retry → fence stays, NEW config not loaded) → GREEN (direct binary 162 tests 0 fail) | ~18k |
|
||||
| 04:46 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~24 |
|
||||
| 04:47 | Edited .kiro/specs/ha-term-safety/tasks.md | modified 981() | ~961 |
|
||||
| 04:50 | Edited src/controller/testsuite/test_term_safety_adapter.c | 7→8 lines | ~46 |
|
||||
| 04:50 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_every_callback_and_marker_path_end_to_end() | ~2354 |
|
||||
| 04:50 | Edited src/controller/testsuite/test_term_safety_adapter.c | 2→4 lines | ~52 |
|
||||
| 04:52 | Edited src/controller/testsuite/test_term_safety_adapter.c | expanded (+13 lines) | ~417 |
|
||||
| 04:52 | Edited src/controller/testsuite/test_term_safety_adapter.c | reduced (-8 lines) | ~168 |
|
||||
| 04:53 | Edited src/controller/ha.c | 4→5 lines | ~58 |
|
||||
| 04:53 | Edited src/controller/ha.c | 5→4 lines | ~46 |
|
||||
| 04:53 | Edited src/controller/ha.c | added 1 condition(s) | ~55 |
|
||||
| 04:54 | Edited src/controller/ha.c | 3→2 lines | ~38 |
|
||||
| 04:54 | Edited src/controller/testsuite/test_term_safety_adapter.c | expanded (+13 lines) | ~397 |
|
||||
| 04:55 | Edited src/controller/testsuite/test_term_safety_adapter.c | 16→15 lines | ~270 |
|
||||
| 04:55 | Edited src/controller/ha.c | 2→3 lines | ~50 |
|
||||
| 04:55 | Edited src/controller/ha.c | 3→2 lines | ~38 |
|
||||
| 11:57 | ha-term-safety 5.1: every-callback+marker-path e2e integration test (coverage audit found all 5 scenarios+5 callbacks already covered in isolation; gap = no single full-flow test) | src/controller/testsuite/test_term_safety_adapter.c | adapter suite 33/33 PASS ASAN-clean; RED-proven (neuter on_truncate_from→FAIL, on_commit_advanced→FAIL) | ~9k |
|
||||
| 05:02 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~14 |
|
||||
| 05:03 | Edited .kiro/specs/ha-term-safety/tasks.md | modified NEXT() | ~479 |
|
||||
| 05:06 | Edited src/controller/testsuite/waldump.h | modified struct() | ~557 |
|
||||
| 05:06 | Edited src/controller/testsuite/waldump.c | modified visit() | ~138 |
|
||||
| 05:06 | Edited src/controller/testsuite/waldump.c | added 3 condition(s) | ~241 |
|
||||
| 05:06 | Edited src/controller/testsuite/waldump.c | modified visit() | ~85 |
|
||||
| 05:06 | Edited src/controller/testsuite/waldump.c | modified for() | ~150 |
|
||||
| 05:07 | Created src/controller/testsuite/walcompare.h | — | ~839 |
|
||||
| 05:08 | Created src/controller/testsuite/walcompare.c | — | ~2485 |
|
||||
| 05:08 | Edited src/controller/testsuite/test.c | 1→2 lines | ~42 |
|
||||
| 05:08 | Edited src/controller/testsuite/test.c | 2→3 lines | ~32 |
|
||||
| 05:09 | Edited src/controller/testsuite/test.c | 3→4 lines | ~71 |
|
||||
| 05:09 | Edited src/controller/testsuite/test.c | 3→4 lines | ~78 |
|
||||
| 05:09 | Edited src/controller/testsuite/test.c | added 7 condition(s) | ~668 |
|
||||
| 05:09 | Edited src/controller/testsuite/test.c | 3→4 lines | ~21 |
|
||||
| 05:09 | Edited src/controller/meson.build | inline fix | ~23 |
|
||||
| 05:09 | Edited src/controller/meson.build | 3→5 lines | ~42 |
|
||||
| 05:10 | Edited src/controller/testsuite/controller_test.c | modified setUp() | ~38 |
|
||||
| 05:10 | Edited src/controller/testsuite/controller_test.c | 4→5 lines | ~30 |
|
||||
| 05:11 | Created src/controller/testsuite/test_walcompare.c | — | ~3795 |
|
||||
| 12:14 | task 5.3 walcompare cross-member divergence tool + visitor seam in waldump + 11 tests | walcompare.{c,h}, waldump.{c,h}, test_walcompare.c, test.c, meson.build, controller_test.c | clean build Ok:1 Fail:0; RED captured (5 fail neutered); CLI exit 0/1 verified | ~38k |
|
||||
| 06:04 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~14 |
|
||||
| 06:05 | Edited .kiro/specs/ha-term-safety/tasks.md | added error handling | ~453 |
|
||||
| 06:14 | Created src/controller/testsuite/clean_failover_preservation.sh | — | ~3782 |
|
||||
| 06:19 | Edited src/controller/testsuite/clean_failover_preservation.sh | expanded (+9 lines) | ~280 |
|
||||
| 13:23 | task 5.2 feasibility: LIVE-on-localhost deploy works; built clean_failover_preservation.sh harness; BLOCKED on live-send retirement (standbys persist term=0) | clean_failover_preservation.sh | harness ready, strict term gate blocked | ~40k |
|
||||
| 06:26 | Edited .kiro/specs/ha-term-safety/tasks.md | 3→4 lines | ~318 |
|
||||
| 06:27 | Edited .kiro/specs/ha-term-safety/tasks.md | 2→3 lines | ~89 |
|
||||
| 06:27 | Edited .kiro/specs/ha-term-safety/tasks.md | 2→3 lines | ~120 |
|
||||
| 08:02 | Edited .kiro/specs/ha-term-safety/tasks.md | added error handling | ~475 |
|
||||
| 08:09 | Edited src/include/repl.h | modified 4() | ~229 |
|
||||
| 08:10 | Edited src/controller/repl.c | modified repl_broadcast() | ~46 |
|
||||
| 08:10 | Edited src/controller/repl.c | modified 4() | ~305 |
|
||||
| 08:10 | Edited src/controller/persist.c | added 2 condition(s) | ~240 |
|
||||
| 08:10 | Edited src/controller/persist.c | 15→11 lines | ~114 |
|
||||
| 08:10 | Edited src/controller/persist.c | expanded (+6 lines) | ~149 |
|
||||
| 08:11 | Edited src/controller/config_repl.c | modified for() | ~223 |
|
||||
| 08:11 | Edited src/controller/config_repl.c | modified if() | ~495 |
|
||||
| 08:11 | Edited src/controller/config_repl.c | expanded (+7 lines) | ~176 |
|
||||
| 08:12 | Edited src/controller/ha.c | added 2 condition(s) | ~692 |
|
||||
| 08:12 | Edited src/controller/ha.c | modified if() | ~63 |
|
||||
| 08:13 | Edited src/lib/request.c | added error handling | ~223 |
|
||||
| 08:13 | Edited src/controller/ha.c | added 2 condition(s) | ~342 |
|
||||
| 08:14 | Edited src/controller/testsuite/test_repl_unit.c | modified test_broadcast_hook() | ~282 |
|
||||
| 08:14 | Edited src/controller/testsuite/test_repl_unit.c | 4→7 lines | ~55 |
|
||||
| 08:14 | Edited src/controller/testsuite/test_repl_unit.c | modified XCE_TESTING() | ~525 |
|
||||
| 08:15 | Edited src/controller/testsuite/test_repl_unit.c | 3→4 lines | ~60 |
|
||||
| 08:26 | Edited src/controller/testsuite/test_term_safety_adapter.c | added error handling | ~1049 |
|
||||
| 08:27 | Edited src/controller/testsuite/test_term_safety_adapter.c | 2→3 lines | ~53 |
|
||||
| 08:44 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~38 |
|
||||
| 08:44 | Edited .kiro/specs/ha-term-safety/tasks.md | modified 4() | ~780 |
|
||||
| 08:44 | Edited .kiro/specs/ha-term-safety/tasks.md | "repl_broadcast" → "s term and standbys persi" | ~188 |
|
||||
| 08:45 | Edited .kiro/specs/ha-term-safety/tasks.md | inline fix | ~101 |
|
||||
| 08:48 | Edited .kiro/specs/ha-term-safety/tasks.md | "clean-failover suite gree" → "/xce-build controller" | ~203 |
|
||||
| 08:49 | Session end: 227 writes across 31 files (test_term_safety_adapter.c, commit.h, commit.c, ha.c, ha.h) | 55 reads | ~534825 tok |
|
||||
| 13:56 | Edited src/controller/testsuite/clean_failover_preservation.sh | 2→6 lines | ~120 |
|
||||
| 13:56 | Edited src/controller/testsuite/clean_failover_preservation.sh | 7→12 lines | ~160 |
|
||||
| 14:03 | Edited src/controller/testsuite/clean_failover_preservation.sh | expanded (+25 lines) | ~527 |
|
||||
| 14:10 | Edited .kiro/specs/ha-term-safety/tasks.md | modified CAUSE() | ~519 |
|
||||
| 15:09 | Edited src/controller/ha.c | expanded (+9 lines) | ~283 |
|
||||
| 15:09 | Edited src/lib/raft/raft.c | added 1 condition(s) | ~220 |
|
||||
| 15:09 | Edited src/lib/raft/raft.c | removed 16 lines | ~27 |
|
||||
| 15:09 | Edited src/controller/ha.c | 4→7 lines | ~79 |
|
||||
| 15:21 | Edited src/controller/ha.c | modified if() | ~308 |
|
||||
| 15:21 | Edited src/controller/repl.c | modified if() | ~128 |
|
||||
| 15:31 | Edited src/controller/testsuite/test_term_safety_adapter.c | added error handling | ~1501 |
|
||||
| 15:31 | Edited src/controller/testsuite/test_term_safety_adapter.c | 2→3 lines | ~51 |
|
||||
| 15:32 | Edited src/controller/ha.c | added error handling | ~245 |
|
||||
| 15:33 | Edited src/controller/ha.c | added error handling | ~112 |
|
||||
| 15:33 | Edited src/controller/ha.c | atomically() → the() | ~144 |
|
||||
| 15:33 | Edited src/controller/ha.c | modified semantic() | ~399 |
|
||||
| 15:34 | Edited src/controller/testsuite/test_config_repl.c | 13→16 lines | ~189 |
|
||||
| 15:34 | Edited src/controller/testsuite/test_config_repl.c | 3→4 lines | ~57 |
|
||||
| 15:34 | Edited src/controller/testsuite/test_config_repl.c | 3→4 lines | ~64 |
|
||||
| 15:34 | Edited src/controller/testsuite/test_config_repl.c | 4→6 lines | ~115 |
|
||||
| 15:34 | Edited src/controller/testsuite/test_config_repl.c | 5→6 lines | ~85 |
|
||||
| 15:35 | Edited src/controller/testsuite/test_config_repl.c | 3→4 lines | ~62 |
|
||||
| 15:35 | Edited src/controller/testsuite/test_config_repl.c | 6→7 lines | ~117 |
|
||||
| 15:35 | Edited src/controller/testsuite/test_config_repl.c | 11→10 lines | ~183 |
|
||||
| 15:44 | Edited src/controller/testsuite/test_config_repl.c | added 1 condition(s) | ~177 |
|
||||
| 15:47 | Edited src/controller/testsuite/test_config_repl.c | reduced (-8 lines) | ~47 |
|
||||
| 22:50 | bug-991 fix: applied_lsn last-held (3 setters) + reader audit + unit RED->GREEN; live commit=1 is separate task-3.1 blocker (baseline-identical) | ha.c, test_term_safety_adapter.c, test_config_repl.c | unit GREEN, live=separate-blocker | ~95k |
|
||||
| 16:44 | Edited src/controller/commit.c | added error handling | ~431 |
|
||||
| 16:44 | Edited src/controller/commit.c | modified commit_set_raft_commit_index() | ~498 |
|
||||
| 16:44 | Edited src/controller/include/commit.h | 9→9 lines | ~178 |
|
||||
| 16:45 | Edited src/controller/include/commit.h | 6→8 lines | ~152 |
|
||||
| 16:45 | Edited src/controller/commit.c | inline fix | ~23 |
|
||||
| 16:46 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_commit_advances_to_durable_majority_index_inert() | ~1988 |
|
||||
| 16:46 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified Test() | ~374 |
|
||||
| 16:46 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified test_on_commit_advanced_wired_records_advisory_index() | ~918 |
|
||||
| 16:47 | Edited src/controller/testsuite/test_term_safety_adapter.c | 5→6 lines | ~103 |
|
||||
| 16:47 | Edited src/controller/testsuite/test_term_safety_adapter.c | modified cluster() | ~189 |
|
||||
| 16:48 | Edited src/controller/testsuite/test_term_safety_adapter.c | commit_index() → yet() | ~184 |
|
||||
| 16:48 | Edited src/controller/testsuite/test_term_safety_adapter.c | 3→6 lines | ~121 |
|
||||
| 16:48 | Edited src/controller/testsuite/test_term_safety_adapter.c | 22→25 lines | ~472 |
|
||||
|
||||
| --:-- | commit-ceiling-optA: removed raft_commit_index ceiling fold in majority_candidate_locked; made commit_set_raft_commit_index inert-advisory | commit.c, commit.h, test_term_safety_adapter.c | durable-majority barrier + own-term gate now authoritative; 177 unit tests 0 fail; LIVE committed_lsn 4->5 + walcompare OK byte-identical prefix; bug-1013 logged; A/B proved ceiling pins commit under catch-up delivery | ~110k |
|
||||
| 17:22 | Edited src/controller/commit.c | modified INFO() | ~140 |
|
||||
| 17:22 | Edited src/controller/testsuite/clean_failover_preservation.sh | added error handling | ~325 |
|
||||
| 17:28 | Edited .kiro/specs/ha-term-safety/tasks.md | modified _RESOLVED() | ~664 |
|
||||
| 17:29 | Session end: 269 writes across 32 files (test_term_safety_adapter.c, commit.h, commit.c, ha.c, ha.h) | 59 reads | ~553719 tok |
|
||||
| 18:29 | Edited src/controller/testsuite/test_ha_election.c | expanded (+11 lines) | ~258 |
|
||||
| 18:30 | Edited src/controller/testsuite/test_ha_election.c | added error handling | ~800 |
|
||||
| 18:30 | Edited src/controller/testsuite/test_ha_election.c | 4→7 lines | ~91 |
|
||||
| 18:30 | Edited src/controller/persist.c | added 1 condition(s) | ~427 |
|
||||
| 18:31 | Edited src/controller/testsuite/test_repl_apply.c | expanded (+8 lines) | ~187 |
|
||||
| 18:31 | Edited src/controller/ha.c | added 2 condition(s) | ~1345 |
|
||||
| 18:32 | Edited src/controller/ha.h | expanded (+23 lines) | ~430 |
|
||||
| 18:32 | Edited src/controller/ha.c | modified XCE_TESTING() | ~352 |
|
||||
| 01:42 | bug-828 safe-commit-from-votes: route vote-reply LSN into ectx (ha_record_vote_reply seam, no double-promotion) + persist durable_lsn advance | ha.c, ha.h, persist.c, test_ha_election.c, test_repl_apply.c | 177/177 unit GREEN; RED safe=1 from 1 -> GREEN safe=5 from 3; LIVE residual = pre-existing bug-795 catch-up gap (baseline also fails) | ~50k |
|
||||
| 19:42 | Session end: 277 writes across 34 files (test_term_safety_adapter.c, commit.h, commit.c, ha.c, ha.h) | 63 reads | ~576945 tok |
|
||||
| 19:58 | Edited src/controller/testsuite/test_ha_vote_gate.c | added error handling | ~1320 |
|
||||
| 19:58 | Edited src/controller/testsuite/test_ha_vote_gate.c | reduced (-6 lines) | ~19 |
|
||||
| 19:59 | Edited src/controller/testsuite/test_ha_vote_gate.c | 2→6 lines | ~98 |
|
||||
| 03:05 | bug-828 part2: investigated advertise-durable-tip; already correct after part1 (durable_floor==durable_lsn, advanced post inline-fdatasync). LIVE x3 proves safe=1 is correct: survivors genuinely durable only at LSN1; residual loss = upstream bug-795/661 commit-barrier-vs-durability, out of scope. Added unit test_live_durable_tip_advertised_over_lagging_learned (GREEN). | test_ha_vote_gate.c, buglog.json | READY_FOR_REVIEW | ~95k |
|
||||
| 20:14 | Edited .kiro/specs/ha-term-safety/tasks.md | modified landed() | ~702 |
|
||||
| 20:21 | Edited src/controller/persist.c | 9→12 lines | ~160 |
|
||||
| 20:21 | Edited src/controller/ha.c | 4→7 lines | ~85 |
|
||||
| 20:27 | Edited src/controller/testsuite/test_repl_apply.c | added error handling | ~1238 |
|
||||
| 20:28 | Edited src/controller/ha.c | modified slice() | ~476 |
|
||||
| 20:28 | Edited src/controller/persist.c | 8→5 lines | ~49 |
|
||||
| 20:28 | Edited src/controller/ha.c | 7→4 lines | ~37 |
|
||||
| 03:45 | bug-828 final: removed pre-election WAL truncate in ha_enter_real_election (clamped durable_lsn on stale last_known_committed → committed jobs lost on clean failover); Leader Completeness restored. Live safe_committed=5, walcompare identical (was divergent at LSN 2). EXIT 1 remains = PRE-EXISTING libxce dead-first-master client failover bug, not data loss. | ha.c test_repl_apply.c buglog.json | fixed (data-loss); live EXIT blocked on unrelated client bug | ~75k |
|
||||
| 21:07 | Edited .kiro/specs/ha-term-safety/tasks.md | modified _RESIDUAL() | ~736 |
|
||||
| 21:09 | Edited src/controller/testsuite/clean_failover_preservation.sh | modified name_to_addr() | ~256 |
|
||||
| 21:09 | Edited src/controller/testsuite/clean_failover_preservation.sh | 2→2 lines | ~42 |
|
||||
| 21:09 | Edited src/controller/testsuite/clean_failover_preservation.sh | 4→4 lines | ~28 |
|
||||
| 21:13 | Session end: 291 writes across 35 files (test_term_safety_adapter.c, commit.h, commit.c, ha.c, ha.h) | 64 reads | ~601903 tok |
|
||||
| 21:47 | Edited .kiro/steering/ha-async-io.md | 10→10 lines | ~616 |
|
||||
| 21:47 | Edited .kiro/steering/ha-async-io.md | added error handling | ~778 |
|
||||
| 21:47 | Edited .kiro/steering/persistence.md | inline fix | ~126 |
|
||||
| 21:48 | Session end: 294 writes across 37 files (test_term_safety_adapter.c, commit.h, commit.c, ha.c, ha.h) | 66 reads | ~607176 tok |
|
||||
| 00:04 | Session end: 294 writes across 37 files (test_term_safety_adapter.c, commit.h, commit.c, ha.c, ha.h) | 66 reads | ~607176 tok |
|
||||
|
|
|
|||
14525
.wolf/token-ledger.json
14525
.wolf/token-ledger.json
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue