From 4fafeadbbc201d24a0d30ce9c5cc3a039da63fff Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Fri, 12 Jun 2026 14:50:28 +0000 Subject: [PATCH] feat(ha-commit-barrier-rollout): dispatch-gate fact allowlist (task 4.2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit notify/update/setpreason/clrpreason admitted in CTRL_PRIMARY without write quorum (Req 3.2 / umbrella 2.8 / bug-396): all four terminate in receipt-style RETAIN fact paths — reviewer-traced no-block proof (no admitted opcode reaches a barrier/WAIT path; request opcodes stay rejected). 21/21 group; census 494/494 zero FAIL; RED→GREEN independently reproduced via stash-rebuild. --- .kiro/specs/ha-commit-barrier-rollout/tasks.md | 2 +- .wolf/memory.md | 3 +++ src/controller/ha.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.kiro/specs/ha-commit-barrier-rollout/tasks.md b/.kiro/specs/ha-commit-barrier-rollout/tasks.md index 27a2c96c..d2fa9ee8 100644 --- a/.kiro/specs/ha-commit-barrier-rollout/tasks.md +++ b/.kiro/specs/ha-commit-barrier-rollout/tasks.md @@ -55,7 +55,7 @@ - Observable completion: the four fact-opcode cases FAIL (red) against the current allowlist - _Requirements: 3.2_ -- [ ] 4.2 Implement the allowlist to green +- [x] 4.2 Implement the allowlist to green - Add the four fact-bearing opcodes to the CTRL_PRIMARY no-write-quorum switch (ha.c:1537-1556 anchor); CTRL_PRIMARY_COMMITTING branch untouched (deleted wholesale by ha-single-leader-role) - Observable completion: all task 4.1 tests PASS; existing gate tests for request opcodes unchanged - _Requirements: 3.2_ diff --git a/.wolf/memory.md b/.wolf/memory.md index 8d73a40b..4ad13c72 100644 --- a/.wolf/memory.md +++ b/.wolf/memory.md @@ -954,3 +954,6 @@ | 06:38 | Edited src/controller/testsuite/test_commit_barrier_rollout.c | expanded (+7 lines) | ~146 | | 13:47 | ha-commit-barrier-rollout 4.1: added 6 dispatch-gate fact-allowlist tests (4 RED + 2 pins) | src/controller/testsuite/test_commit_barrier_rollout.c | RED verified: 4 FAIL (-XCE_ERR_NOT_READY), census 494=488+6, zero other failures | ~60k | | 07:05 | Edited .kiro/specs/ha-commit-barrier-rollout/tasks.md | inline fix | ~17 | +| 07:14 | Edited src/controller/ha.c | expanded (+10 lines) | ~205 | +| 14:35 | task 4.2 validated: gate switch admits notify/update/setpreason/clrpreason; build OK; 21/21 rollout, 494 census ZERO FAIL | src/controller/ha.c | success | ~3k | +| 07:50 | Edited .kiro/specs/ha-commit-barrier-rollout/tasks.md | inline fix | ~12 | diff --git a/src/controller/ha.c b/src/controller/ha.c index f33b12ed..80da7a5c 100644 --- a/src/controller/ha.c +++ b/src/controller/ha.c @@ -1561,6 +1561,16 @@ int ha_dispatch_gate(ha_state_t *ha, int opcode) /* Read-only queries */ case OPCode_get: case OPCode_probeConfigTag: + /* Fact-bearing ops — reports of events that already happened + * (worker job transitions/rusage, scheduler pend reasons). + * Rejecting them loses the fact forever: the reporter never + * retries (bug-396). Admit so the RETAIN path can append and + * hold them until quorum returns (Req 3.2; umbrella 2.8 — + * facts are retained, never dropped). */ + case OPCode_notify: + case OPCode_update: + case OPCode_setpreason: + case OPCode_clrpreason: return 0; default: return -XCE_ERR_NOT_READY;