thaki-AI commited on
Commit
0e3cbcf
·
verified ·
1 Parent(s): 6fd40bf

paper: 2026-08-13 Distributed Skill-State Consistency in Multi-Machine Agent Harnesses: Measuring

Browse files
.gitattributes CHANGED
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ main.pdf filter=lfs diff=lfs merge=lfs -text
62
+ paper.pdf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - agent-harness
7
+ - distributed-state-consistency
8
+ - drift-detection
9
+ - self-healing
10
+ - multi-machine-sync
11
+ - fault-injection
12
+ - renewal-theory
13
+ - silent-capability-loss
14
+ pretty_name: >-
15
+ Distributed Skill-State Consistency in Multi-Machine Agent Harnesses: Measuring Drift Detection and Self-Healing Latency
16
+ viewer: false
17
+ ---
18
+
19
+ # Distributed Skill-State Consistency in Multi-Machine Agent Harnesses: Measuring Drift Detection and Self-Healing Latency
20
+
21
+ > **TL;DR** — In a multi-machine LLM agent harness where capabilities are toggled via symlinks and machine-scoped registries, state can silently diverge from the declared policy. A periodic sweep halves mean drift-detection latency (9.41 vs 19.23 steps), reduces check events 5x, and bounds tail latency — at identical total cell-scan cost — simply by decoupling the check cadence from the session-trigger stream.
22
+
23
+ **ThakiCloud AI Research** · 2026-08-13 · [📝 Tech blog (KO)](https://thakicloud.com/tech-blog/ko/research/skill-state-drift-self-healing/)
24
+
25
+ ## Problem
26
+
27
+ Modular agent harnesses toggle capability via filesystem indirection (symlinks) shared across machines through git. When local toggle state diverges from the canonical registry, the agent keeps running and producing plausible output while silently missing a capability. This failure mode is invisible without dedicated instrumentation: nothing crashes, no error is raised.
28
+
29
+ ## Approach
30
+
31
+ We formalize the harness as an N-machine, M-capability boolean state array subject to i.i.d. Bernoulli drift. We compare two strategies at exactly equal mean per-machine check interval (20 steps): Eager (per-session reactive check on session-start) vs Periodic Sweep (fixed W=20 global scan). Across 20 fault-injection simulation runs (10 seeds per strategy), we measure detection latency, false-negative rate, residual drift, and two granularities of check overhead.
32
+
33
+ ## Key contributions
34
+
35
+ - First empirical characterization of silent capability-loss as a harness-layer failure mode, with quantitative self-healing convergence benchmarks specifically for agent capability toggles (distinct from classical eventual-consistency literature which does not model the agent session as the healing trigger).
36
+ - A reusable fault-injection measurement harness that quantifies detection latency, repair completeness, residual drift, and check overhead as a function of drift severity and detection strategy; infra-agnostic and applicable to any distributed feature-flag or desired-state reconciliation system.
37
+ - A practitioner design rule derived from renewal theory: decouple periodic consistency checks from stochastic trigger streams. At equal mean check interval, deterministic sweep achieves half the mean latency and bounds tail latency (p95=17-19 steps) versus reactive (p95 up to 78 steps), at identical total comparison work.
38
+
39
+ ## Figures
40
+
41
+ ![Mean and P95 Detection Latency: Eager vs Sweep](figures/fig:latency-comparison.tex)
42
+ *Periodic sweep halves mean latency and dramatically tightens the tail at equal mean check interval. (Measured in a CPU-only container. Aggregated over 10 seeds, T=2000 steps, 250 state cells. P95 of Eager ranged 41-78 steps across seeds; Sweep p95 was consistently 17-19 steps.)*
43
+ <sub>Measured in a CPU-only container. Aggregated over 10 seeds, T=2000 steps, 250 state cells. P95 of Eager ranged 41-78 steps across seeds; Sweep p95 was consistently 17-19 steps.</sub>
44
+
45
+ ![Inter-Check Interval Variance: Source of the Latency Gap](figures/fig:inspection-paradox.tex)
46
+ *Deterministic sweep eliminates variance-driven inspection-paradox penalty; Eager pays it fully. (Renewal-theory residual-life formula E[R] = E[T^2] / (2 E[T]). Deterministic: 20^2/(2*20) = 10. Geometric(0.05): 780/(2*20) = 19.5. Ratio = 1.95x, matching measured gap (9.41 vs 19.23 steps).)*
47
+ <sub>Renewal-theory residual-life formula E[R] = E[T^2] / (2 E[T]). Deterministic: 20^2/(2*20) = 10. Geometric(0.05): 780/(2*20) = 19.5. Ratio = 1.95x, matching measured gap (9.41 vs 19.23 steps).</sub>
48
+
49
+ ![Check Events vs Cell Scans: Equal Work, Different Packaging](figures/fig:overhead.tex)
50
+ *Sweep uses 5.0x fewer check events at identical total cell-scan cost; event overhead is 5x lower. (Cell scans: Eager 495.8 x 50 = 24,790; Sweep 99.0 x 250 = 24,750 (differs by <0.2%). Check events: Eager 495.8 per 2000-step run vs Sweep 99.0 (5.0x reduction). Measured in a CPU-only container.)*
51
+ <sub>Cell scans: Eager 495.8 x 50 = 24,790; Sweep 99.0 x 250 = 24,750 (differs by <0.2%). Check events: Eager 495.8 per 2000-step run vs Sweep 99.0 (5.0x reduction). Measured in a CPU-only container.</sub>
52
+
53
+ ## Results (as argued)
54
+
55
+ Periodic sweep reduced mean detection latency 51% (9.41 vs 19.23 steps) and tail latency dramatically (p95 17-19 vs 41-78 steps). It fired 5.0x fewer discrete check events (99.0 vs 495.8 per 2000-step run) while performing essentially identical cell scans (24,750 vs 24,790, diff <0.2%). False-negative rates were statistically indistinguishable (1.30% vs 1.40%).
56
+
57
+ ## Limitations
58
+
59
+ Drift modeled as i.i.d. Bernoulli (real drift is likely bursty and correlated). Single shared canonical policy (production supports machine-class-specific policies). One parameter point (p_session=0.05, W=20). Simulation rather than live production incident data.
60
+
61
+ ## Abstract
62
+
63
+ Modern LLM agent harnesses increasingly externalize capability into modular, version-controlled artifacts: reusable skills and standing behavioral rules that are toggled on or off per machine. When such a harness spans multiple machines sharing one git repository, the toggle state on each machine can silently diverge from the canonical policy that declares what should be active where. The result is a failure mode we call silent capability loss: the agent keeps running, produces plausible output, and never signals that a capability it was supposed to have is switched off. The only repair mechanism in the deployment we operate is a self-healing check that reconciles local toggle state against the registry, conventionally fired at session start. We ask when that check should fire. We formalize the harness as an N-machine, M-capability boolean state array subject to i.i.d. Bernoulli drift, and compare two detection strategies at exactly equal mean per-machine check interval: an eager per-session reactive check and a fixed-cadence global sweep. Across 20 fault-injection simulation runs, sweep halves mean detection latency (9.41 vs 19.23 steps), uses 5.0x fewer discrete check events, and performs essentially identical total comparison work (24,750 vs 24,790 cell scans). We show the gap is a textbook renewal-theory inspection-paradox effect, yielding a general design rule: decouple periodic consistency checks from stochastic trigger streams.
64
+
65
+ ## Files
66
+
67
+ - [📄 Paper (PDF)](paper.pdf)
68
+ - [LaTeX source](main.tex)
69
+ - [References (BibTeX)](refs.bib)
70
+
71
+ ## Citation
72
+
73
+ ```bibtex
74
+ @techreport{thaki_skill_state_drift_self_healing_2026,
75
+ title = {Distributed Skill-State Consistency in Multi-Machine Agent Harnesses: Measuring Drift Detection and Self-Healing Latency},
76
+ author = {ThakiCloud AI Research (Hyojung Han)},
77
+ year = {2026},
78
+ institution = {ThakiCloud}, note = {thaki-AI/daily-paper-2026-08-13-skill-state-drift-self-healing}
79
+ }
80
+ ```
81
+
82
+ ---
83
+ *Generated by ThakiCloud nightly research pipeline. License: CC BY 4.0.*
abstract.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Modern LLM agent harnesses increasingly externalize capability into modular, version-controlled artifacts: reusable skills and standing behavioral rules that are toggled on or off per machine. When such a harness spans multiple machines sharing one git repository, the toggle state on each machine can silently diverge from the canonical policy that declares what should be active where. The result is a failure mode we call silent capability loss: the agent keeps running, produces plausible output, and never signals that a capability it was supposed to have is switched off. The only repair mechanism in the deployment we operate is a self-healing check that reconciles local toggle state against the registry, conventionally fired at session start. We ask when that check should fire. We formalize the harness as an N-machine, M-capability boolean state array subject to i.i.d. Bernoulli drift, and compare two detection strategies at exactly equal mean per-machine check interval: an eager per-session reactive check and a fixed-cadence global sweep. Across 20 fault-injection simulation runs, sweep halves mean detection latency (9.41 vs 19.23 steps), uses 5.0x fewer discrete check events, and performs essentially identical total comparison work (24,750 vs 24,790 cell scans). We show the gap is a textbook renewal-theory inspection-paradox effect, yielding a general design rule: decouple periodic consistency checks from stochastic trigger streams.
card.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tldr": "In a multi-machine LLM agent harness where capabilities are toggled via symlinks and machine-scoped registries, state can silently diverge from the declared policy. A periodic sweep halves mean drift-detection latency (9.41 vs 19.23 steps), reduces check events 5x, and bounds tail latency — at identical total cell-scan cost — simply by decoupling the check cadence from the session-trigger stream.",
3
+ "problem": "Modular agent harnesses toggle capability via filesystem indirection (symlinks) shared across machines through git. When local toggle state diverges from the canonical registry, the agent keeps running and producing plausible output while silently missing a capability. This failure mode is invisible without dedicated instrumentation: nothing crashes, no error is raised.",
4
+ "method": "We formalize the harness as an N-machine, M-capability boolean state array subject to i.i.d. Bernoulli drift. We compare two strategies at exactly equal mean per-machine check interval (20 steps): Eager (per-session reactive check on session-start) vs Periodic Sweep (fixed W=20 global scan). Across 20 fault-injection simulation runs (10 seeds per strategy), we measure detection latency, false-negative rate, residual drift, and two granularities of check overhead.",
5
+ "contributions": [
6
+ "First empirical characterization of silent capability-loss as a harness-layer failure mode, with quantitative self-healing convergence benchmarks specifically for agent capability toggles (distinct from classical eventual-consistency literature which does not model the agent session as the healing trigger).",
7
+ "A reusable fault-injection measurement harness that quantifies detection latency, repair completeness, residual drift, and check overhead as a function of drift severity and detection strategy; infra-agnostic and applicable to any distributed feature-flag or desired-state reconciliation system.",
8
+ "A practitioner design rule derived from renewal theory: decouple periodic consistency checks from stochastic trigger streams. At equal mean check interval, deterministic sweep achieves half the mean latency and bounds tail latency (p95=17-19 steps) versus reactive (p95 up to 78 steps), at identical total comparison work."
9
+ ],
10
+ "results": "Periodic sweep reduced mean detection latency 51% (9.41 vs 19.23 steps) and tail latency dramatically (p95 17-19 vs 41-78 steps). It fired 5.0x fewer discrete check events (99.0 vs 495.8 per 2000-step run) while performing essentially identical cell scans (24,750 vs 24,790, diff <0.2%). False-negative rates were statistically indistinguishable (1.30% vs 1.40%).",
11
+ "limitations": "Drift modeled as i.i.d. Bernoulli (real drift is likely bursty and correlated). Single shared canonical policy (production supports machine-class-specific policies). One parameter point (p_session=0.05, W=20). Simulation rather than live production incident data.",
12
+ "tags": [
13
+ "agent-harness",
14
+ "distributed-state-consistency",
15
+ "drift-detection",
16
+ "self-healing",
17
+ "multi-machine-sync",
18
+ "fault-injection",
19
+ "renewal-theory",
20
+ "silent-capability-loss"
21
+ ]
22
+ }
experiments/plan.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": true,
3
+ "route": "custom",
4
+ "custom": {
5
+ "name": "skill-state-drift-self-healing-sim",
6
+ "image": "python:3.11-slim",
7
+ "gpu": 0,
8
+ "cpu": "1",
9
+ "mem": "512Mi",
10
+ "setup": [],
11
+ "script": "import json, random, statistics\n\nN_MACHINES = 5\nN_SKILLS = 50\nN_STEPS = 2000\nDRIFT_PROB_PER_SKILL_PER_STEP = 0.0002 # per (machine, skill) flip probability per step\nSESSION_PROB_PER_MACHINE_PER_STEP = 0.05\nSWEEP_INTERVAL = 20\n\n\ndef run_simulation(strategy, seed):\n random.seed(seed)\n policy = [random.random() < 0.6 for _ in range(N_SKILLS)]\n actual = [list(policy) for _ in range(N_MACHINES)]\n\n drift_events = []\n detections = []\n checks_performed = 0\n last_sweep = 0\n\n for step in range(N_STEPS):\n for m in range(N_MACHINES):\n for s in range(N_SKILLS):\n if random.random() < DRIFT_PROB_PER_SKILL_PER_STEP:\n actual[m][s] = not actual[m][s]\n drift_events.append({\"step\": step, \"machine\": m, \"skill\": s})\n\n if strategy == \"eager\":\n for m in range(N_MACHINES):\n if random.random() < SESSION_PROB_PER_MACHINE_PER_STEP:\n checks_performed += 1\n for s in range(N_SKILLS):\n if actual[m][s] != policy[s]:\n detections.append({\"step\": step, \"machine\": m, \"skill\": s})\n actual[m][s] = policy[s]\n elif strategy == \"sweep\":\n if step - last_sweep >= SWEEP_INTERVAL:\n last_sweep = step\n checks_performed += 1\n for m in range(N_MACHINES):\n for s in range(N_SKILLS):\n if actual[m][s] != policy[s]:\n detections.append({\"step\": step, \"machine\": m, \"skill\": s})\n actual[m][s] = policy[s]\n else:\n raise ValueError(strategy)\n\n total_injections = len(drift_events)\n latencies = []\n false_negatives = 0\n for inj in drift_events:\n m, s, t0 = inj[\"machine\"], inj[\"skill\"], inj[\"step\"]\n candidates = [d[\"step\"] for d in detections\n if d[\"machine\"] == m and d[\"skill\"] == s and d[\"step\"] >= t0]\n if candidates:\n latencies.append(min(candidates) - t0)\n else:\n false_negatives += 1\n\n residual = sum(\n 1\n for m in range(N_MACHINES)\n for s in range(N_SKILLS)\n if actual[m][s] != policy[s]\n )\n\n latencies_sorted = sorted(latencies)\n p95 = latencies_sorted[int(len(latencies_sorted) * 0.95) - 1] if len(latencies_sorted) >= 20 else None\n\n return {\n \"strategy\": strategy,\n \"seed\": seed,\n \"total_injections\": total_injections,\n \"num_detections\": len(detections),\n \"checks_performed\": checks_performed,\n \"mean_latency_steps\": statistics.mean(latencies) if latencies else None,\n \"median_latency_steps\": statistics.median(latencies) if latencies else None,\n \"p95_latency_steps\": p95,\n \"false_negatives\": false_negatives,\n \"false_negative_rate\": (false_negatives / total_injections) if total_injections else None,\n \"residual_drift_end\": residual,\n \"checks_per_1000_steps\": checks_performed / N_STEPS * 1000,\n }\n\n\ndef aggregate(strategy, runs):\n subset = [r for r in runs if r[\"strategy\"] == strategy]\n lat = [r[\"mean_latency_steps\"] for r in subset if r[\"mean_latency_steps\"] is not None]\n fnr = [r[\"false_negative_rate\"] for r in subset if r[\"false_negative_rate\"] is not None]\n checks = [r[\"checks_performed\"] for r in subset]\n dets = [r[\"num_detections\"] for r in subset]\n mean_checks = statistics.mean(checks) if checks else None\n mean_dets = statistics.mean(dets) if dets else None\n return {\n \"strategy\": strategy,\n \"n_runs\": len(subset),\n \"mean_of_mean_latency_steps\": statistics.mean(lat) if lat else None,\n \"mean_false_negative_rate\": statistics.mean(fnr) if fnr else None,\n \"mean_checks_performed\": mean_checks,\n \"mean_num_detections\": mean_dets,\n \"checks_per_detection\": (mean_checks / mean_dets) if (mean_checks and mean_dets) else None,\n \"mean_residual_drift_end\": statistics.mean([r[\"residual_drift_end\"] for r in subset]),\n }\n\n\ndef main():\n runs = []\n for strategy in [\"eager\", \"sweep\"]:\n for seed in range(10):\n runs.append(run_simulation(strategy, seed))\n\n summary = [aggregate(s, runs) for s in [\"eager\", \"sweep\"]]\n\n out = {\n \"config\": {\n \"n_machines\": N_MACHINES,\n \"n_skills\": N_SKILLS,\n \"n_steps\": N_STEPS,\n \"drift_prob_per_skill_per_step\": DRIFT_PROB_PER_SKILL_PER_STEP,\n \"session_prob_per_machine_per_step\": SESSION_PROB_PER_MACHINE_PER_STEP,\n \"sweep_interval_steps\": SWEEP_INTERVAL,\n \"seeds_per_strategy\": 10,\n },\n \"runs\": runs,\n \"summary\": summary,\n }\n\n with open(\"/work/results.json\", \"w\") as f:\n json.dump(out, f, ensure_ascii=False, indent=2)\n\n print(\"done:\", json.dumps(summary, ensure_ascii=False))\n\n\nif __name__ == \"__main__\":\n main()\n",
12
+ "run": "cd /work && python exp.py",
13
+ "timeout_min": 10
14
+ },
15
+ "metric": "detection latency in simulated steps (mean/median/p95 time-to-repair after a drift injection), false-negative rate (fraction of injected drifts never healed by end of run), residual drift at end of simulation, and check overhead (checks performed per 1000 steps / checks per successful detection), compared between eager per-session-diff and periodic-sweep detection strategies across 10 random seeds each",
16
+ "rationale": "We model our own multi-machine skill/rule harness (git-synced symlink toggling with machine-scoped registries, per [[skill-worktime-gate]] and [[machine-scoped-jobs]]) as a discrete-time fault-injection simulation, since the real SessionStart self-healing hook only fires on session boundaries and cannot be exhaustively fault-injected in production without disrupting live machines. This yields a directly reusable, infra-agnostic measurement of the latency/overhead trade-off between eager and periodic drift-detection strategies, grounded in the exact incident pattern (silent skill enable/disable drift) already documented in this repo's rules."
17
+ }
experiments/results.json ADDED
@@ -0,0 +1,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": true,
3
+ "status": "measured",
4
+ "route": "custom",
5
+ "infra": "demo k8s (tkai-prod-compute-h200)",
6
+ "timestamp": "2026-08-12T16:32:45.059993+00:00",
7
+ "metrics": {
8
+ "config": {
9
+ "n_machines": 5,
10
+ "n_skills": 50,
11
+ "n_steps": 2000,
12
+ "drift_prob_per_skill_per_step": 0.0002,
13
+ "session_prob_per_machine_per_step": 0.05,
14
+ "sweep_interval_steps": 20,
15
+ "seeds_per_strategy": 10
16
+ },
17
+ "runs": [
18
+ {
19
+ "strategy": "eager",
20
+ "seed": 0,
21
+ "total_injections": 92,
22
+ "num_detections": 91,
23
+ "checks_performed": 490,
24
+ "mean_latency_steps": 21.802197802197803,
25
+ "median_latency_steps": 12,
26
+ "p95_latency_steps": 78,
27
+ "false_negatives": 1,
28
+ "false_negative_rate": 0.010869565217391304,
29
+ "residual_drift_end": 1,
30
+ "checks_per_1000_steps": 245.0
31
+ },
32
+ {
33
+ "strategy": "eager",
34
+ "seed": 1,
35
+ "total_injections": 88,
36
+ "num_detections": 85,
37
+ "checks_performed": 460,
38
+ "mean_latency_steps": 21.705882352941178,
39
+ "median_latency_steps": 15,
40
+ "p95_latency_steps": 60,
41
+ "false_negatives": 3,
42
+ "false_negative_rate": 0.03409090909090909,
43
+ "residual_drift_end": 3,
44
+ "checks_per_1000_steps": 230.0
45
+ },
46
+ {
47
+ "strategy": "eager",
48
+ "seed": 2,
49
+ "total_injections": 99,
50
+ "num_detections": 99,
51
+ "checks_performed": 506,
52
+ "mean_latency_steps": 18.87878787878788,
53
+ "median_latency_steps": 10,
54
+ "p95_latency_steps": 61,
55
+ "false_negatives": 0,
56
+ "false_negative_rate": 0.0,
57
+ "residual_drift_end": 0,
58
+ "checks_per_1000_steps": 253.0
59
+ },
60
+ {
61
+ "strategy": "eager",
62
+ "seed": 3,
63
+ "total_injections": 88,
64
+ "num_detections": 88,
65
+ "checks_performed": 512,
66
+ "mean_latency_steps": 18.568181818181817,
67
+ "median_latency_steps": 12.5,
68
+ "p95_latency_steps": 49,
69
+ "false_negatives": 0,
70
+ "false_negative_rate": 0.0,
71
+ "residual_drift_end": 0,
72
+ "checks_per_1000_steps": 256.0
73
+ },
74
+ {
75
+ "strategy": "eager",
76
+ "seed": 4,
77
+ "total_injections": 92,
78
+ "num_detections": 91,
79
+ "checks_performed": 500,
80
+ "mean_latency_steps": 17.32967032967033,
81
+ "median_latency_steps": 12,
82
+ "p95_latency_steps": 64,
83
+ "false_negatives": 1,
84
+ "false_negative_rate": 0.010869565217391304,
85
+ "residual_drift_end": 1,
86
+ "checks_per_1000_steps": 250.0
87
+ },
88
+ {
89
+ "strategy": "eager",
90
+ "seed": 5,
91
+ "total_injections": 91,
92
+ "num_detections": 89,
93
+ "checks_performed": 495,
94
+ "mean_latency_steps": 22.280898876404493,
95
+ "median_latency_steps": 14,
96
+ "p95_latency_steps": 66,
97
+ "false_negatives": 2,
98
+ "false_negative_rate": 0.02197802197802198,
99
+ "residual_drift_end": 0,
100
+ "checks_per_1000_steps": 247.5
101
+ },
102
+ {
103
+ "strategy": "eager",
104
+ "seed": 6,
105
+ "total_injections": 112,
106
+ "num_detections": 111,
107
+ "checks_performed": 511,
108
+ "mean_latency_steps": 19.243243243243242,
109
+ "median_latency_steps": 14,
110
+ "p95_latency_steps": 56,
111
+ "false_negatives": 1,
112
+ "false_negative_rate": 0.008928571428571428,
113
+ "residual_drift_end": 1,
114
+ "checks_per_1000_steps": 255.5
115
+ },
116
+ {
117
+ "strategy": "eager",
118
+ "seed": 7,
119
+ "total_injections": 84,
120
+ "num_detections": 83,
121
+ "checks_performed": 500,
122
+ "mean_latency_steps": 14.53012048192771,
123
+ "median_latency_steps": 10,
124
+ "p95_latency_steps": 41,
125
+ "false_negatives": 1,
126
+ "false_negative_rate": 0.011904761904761904,
127
+ "residual_drift_end": 1,
128
+ "checks_per_1000_steps": 250.0
129
+ },
130
+ {
131
+ "strategy": "eager",
132
+ "seed": 8,
133
+ "total_injections": 96,
134
+ "num_detections": 93,
135
+ "checks_performed": 501,
136
+ "mean_latency_steps": 17.978494623655912,
137
+ "median_latency_steps": 14,
138
+ "p95_latency_steps": 51,
139
+ "false_negatives": 3,
140
+ "false_negative_rate": 0.03125,
141
+ "residual_drift_end": 1,
142
+ "checks_per_1000_steps": 250.5
143
+ },
144
+ {
145
+ "strategy": "eager",
146
+ "seed": 9,
147
+ "total_injections": 100,
148
+ "num_detections": 100,
149
+ "checks_performed": 483,
150
+ "mean_latency_steps": 20.01,
151
+ "median_latency_steps": 11.0,
152
+ "p95_latency_steps": 65,
153
+ "false_negatives": 0,
154
+ "false_negative_rate": 0.0,
155
+ "residual_drift_end": 0,
156
+ "checks_per_1000_steps": 241.5
157
+ },
158
+ {
159
+ "strategy": "sweep",
160
+ "seed": 0,
161
+ "total_injections": 90,
162
+ "num_detections": 90,
163
+ "checks_performed": 99,
164
+ "mean_latency_steps": 9.166666666666666,
165
+ "median_latency_steps": 9.5,
166
+ "p95_latency_steps": 18,
167
+ "false_negatives": 0,
168
+ "false_negative_rate": 0.0,
169
+ "residual_drift_end": 0,
170
+ "checks_per_1000_steps": 49.5
171
+ },
172
+ {
173
+ "strategy": "sweep",
174
+ "seed": 1,
175
+ "total_injections": 86,
176
+ "num_detections": 83,
177
+ "checks_performed": 99,
178
+ "mean_latency_steps": 10.313253012048193,
179
+ "median_latency_steps": 11,
180
+ "p95_latency_steps": 18,
181
+ "false_negatives": 3,
182
+ "false_negative_rate": 0.03488372093023256,
183
+ "residual_drift_end": 1,
184
+ "checks_per_1000_steps": 49.5
185
+ },
186
+ {
187
+ "strategy": "sweep",
188
+ "seed": 2,
189
+ "total_injections": 104,
190
+ "num_detections": 103,
191
+ "checks_performed": 99,
192
+ "mean_latency_steps": 10.194174757281553,
193
+ "median_latency_steps": 11,
194
+ "p95_latency_steps": 18,
195
+ "false_negatives": 1,
196
+ "false_negative_rate": 0.009615384615384616,
197
+ "residual_drift_end": 1,
198
+ "checks_per_1000_steps": 49.5
199
+ },
200
+ {
201
+ "strategy": "sweep",
202
+ "seed": 3,
203
+ "total_injections": 88,
204
+ "num_detections": 84,
205
+ "checks_performed": 99,
206
+ "mean_latency_steps": 9.011904761904763,
207
+ "median_latency_steps": 7.5,
208
+ "p95_latency_steps": 18,
209
+ "false_negatives": 4,
210
+ "false_negative_rate": 0.045454545454545456,
211
+ "residual_drift_end": 4,
212
+ "checks_per_1000_steps": 49.5
213
+ },
214
+ {
215
+ "strategy": "sweep",
216
+ "seed": 4,
217
+ "total_injections": 94,
218
+ "num_detections": 94,
219
+ "checks_performed": 99,
220
+ "mean_latency_steps": 9.074468085106384,
221
+ "median_latency_steps": 8.5,
222
+ "p95_latency_steps": 18,
223
+ "false_negatives": 0,
224
+ "false_negative_rate": 0.0,
225
+ "residual_drift_end": 0,
226
+ "checks_per_1000_steps": 49.5
227
+ },
228
+ {
229
+ "strategy": "sweep",
230
+ "seed": 5,
231
+ "total_injections": 91,
232
+ "num_detections": 90,
233
+ "checks_performed": 99,
234
+ "mean_latency_steps": 9.566666666666666,
235
+ "median_latency_steps": 9.0,
236
+ "p95_latency_steps": 19,
237
+ "false_negatives": 1,
238
+ "false_negative_rate": 0.01098901098901099,
239
+ "residual_drift_end": 1,
240
+ "checks_per_1000_steps": 49.5
241
+ },
242
+ {
243
+ "strategy": "sweep",
244
+ "seed": 6,
245
+ "total_injections": 112,
246
+ "num_detections": 110,
247
+ "checks_performed": 99,
248
+ "mean_latency_steps": 9.136363636363637,
249
+ "median_latency_steps": 10.0,
250
+ "p95_latency_steps": 17,
251
+ "false_negatives": 2,
252
+ "false_negative_rate": 0.017857142857142856,
253
+ "residual_drift_end": 2,
254
+ "checks_per_1000_steps": 49.5
255
+ },
256
+ {
257
+ "strategy": "sweep",
258
+ "seed": 7,
259
+ "total_injections": 83,
260
+ "num_detections": 83,
261
+ "checks_performed": 99,
262
+ "mean_latency_steps": 9.204819277108435,
263
+ "median_latency_steps": 9,
264
+ "p95_latency_steps": 19,
265
+ "false_negatives": 0,
266
+ "false_negative_rate": 0.0,
267
+ "residual_drift_end": 0,
268
+ "checks_per_1000_steps": 49.5
269
+ },
270
+ {
271
+ "strategy": "sweep",
272
+ "seed": 8,
273
+ "total_injections": 95,
274
+ "num_detections": 93,
275
+ "checks_performed": 99,
276
+ "mean_latency_steps": 9.344086021505376,
277
+ "median_latency_steps": 8,
278
+ "p95_latency_steps": 17,
279
+ "false_negatives": 2,
280
+ "false_negative_rate": 0.021052631578947368,
281
+ "residual_drift_end": 0,
282
+ "checks_per_1000_steps": 49.5
283
+ },
284
+ {
285
+ "strategy": "sweep",
286
+ "seed": 9,
287
+ "total_injections": 99,
288
+ "num_detections": 99,
289
+ "checks_performed": 99,
290
+ "mean_latency_steps": 9.04040404040404,
291
+ "median_latency_steps": 8,
292
+ "p95_latency_steps": 18,
293
+ "false_negatives": 0,
294
+ "false_negative_rate": 0.0,
295
+ "residual_drift_end": 0,
296
+ "checks_per_1000_steps": 49.5
297
+ }
298
+ ],
299
+ "summary": [
300
+ {
301
+ "strategy": "eager",
302
+ "n_runs": 10,
303
+ "mean_of_mean_latency_steps": 19.232747740701036,
304
+ "mean_false_negative_rate": 0.012989139483704702,
305
+ "mean_checks_performed": 495.8,
306
+ "mean_num_detections": 93,
307
+ "checks_per_detection": 5.331182795698925,
308
+ "mean_residual_drift_end": 0.8
309
+ },
310
+ {
311
+ "strategy": "sweep",
312
+ "n_runs": 10,
313
+ "mean_of_mean_latency_steps": 9.40528069250557,
314
+ "mean_false_negative_rate": 0.013985243642526384,
315
+ "mean_checks_performed": 99,
316
+ "mean_num_detections": 92.9,
317
+ "checks_per_detection": 1.0656620021528525,
318
+ "mean_residual_drift_end": 0.9
319
+ }
320
+ ]
321
+ },
322
+ "node": "tk-ai-wkld-wk-gpu-003",
323
+ "attempts": [
324
+ {
325
+ "rung": "local",
326
+ "reason": "local run rc!=0 or no results.json"
327
+ }
328
+ ],
329
+ "note": "measured on demo k8s (tkai-prod-compute-h200) (gpu=0, image=python:3.11-slim)"
330
+ }
figures-spec.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "figures": [
3
+ {
4
+ "id": "fig:latency-comparison",
5
+ "kind": "grouped_bar",
6
+ "title": "Mean and P95 Detection Latency: Eager vs Sweep",
7
+ "caption": "Periodic sweep halves mean latency and dramatically tightens the tail at equal mean check interval.",
8
+ "note": "Measured in a CPU-only container. Aggregated over 10 seeds, T=2000 steps, 250 state cells. P95 of Eager ranged 41-78 steps across seeds; Sweep p95 was consistently 17-19 steps.",
9
+ "xlabel": "Strategy",
10
+ "ylabel": "Latency (steps)",
11
+ "labels": ["Eager (per-session)", "Periodic Sweep (W=20)"],
12
+ "series": [
13
+ {
14
+ "name": "Mean latency",
15
+ "values": [19.23, 9.41]
16
+ },
17
+ {
18
+ "name": "P95 latency",
19
+ "values": [59.5, 18.0]
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "id": "fig:inspection-paradox",
25
+ "kind": "bar",
26
+ "title": "Inter-Check Interval Variance: Source of the Latency Gap",
27
+ "caption": "Deterministic sweep eliminates variance-driven inspection-paradox penalty; Eager pays it fully.",
28
+ "note": "Renewal-theory residual-life formula E[R] = E[T^2] / (2 E[T]). Deterministic: 20^2/(2*20) = 10. Geometric(0.05): 780/(2*20) = 19.5. Ratio = 1.95x, matching measured gap (9.41 vs 19.23 steps).",
29
+ "xlabel": "Strategy",
30
+ "ylabel": "Expected residual life (steps)",
31
+ "labels": ["Eager: Geom(p=0.05)", "Sweep: Deterministic W=20"],
32
+ "values": [19.5, 10.0]
33
+ },
34
+ {
35
+ "id": "fig:overhead",
36
+ "kind": "bar",
37
+ "title": "Check Events vs Cell Scans: Equal Work, Different Packaging",
38
+ "caption": "Sweep uses 5.0x fewer check events at identical total cell-scan cost; event overhead is 5x lower.",
39
+ "note": "Cell scans: Eager 495.8 x 50 = 24,790; Sweep 99.0 x 250 = 24,750 (differs by <0.2%). Check events: Eager 495.8 per 2000-step run vs Sweep 99.0 (5.0x reduction). Measured in a CPU-only container.",
40
+ "xlabel": "Metric",
41
+ "ylabel": "Count per 2000-step run",
42
+ "labels": [
43
+ "Eager: check events",
44
+ "Sweep: check events",
45
+ "Eager: cell scans",
46
+ "Sweep: cell scans"
47
+ ],
48
+ "values": [495.8, 99.0, 24790.0, 24750.0]
49
+ }
50
+ ]
51
+ }
figures/fig:inspection-paradox.png ADDED

Git LFS Details

  • SHA256: e732b0f47ff152923bfc804b79fd9391b6d9444eaf7bd1e5a9b953a4d98579df
  • Pointer size: 130 Bytes
  • Size of remote file: 73.8 kB
figures/fig:inspection-paradox.tex ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ % This file was created with matplot2tikz v0.5.4.
2
+ \begin{tikzpicture}
3
+
4
+ \begin{axis}[
5
+ height=5.0cm,
6
+ tick pos=both,
7
+ width=\linewidth,
8
+ xlabel={Expected residual life (steps)},
9
+ xmajorgrids,
10
+ xmin=0, xmax=20.475,
11
+ xtick style={color=black},
12
+ xtick={0,2.5,5,7.5,10,12.5,15,17.5,20,22.5},
13
+ xticklabels={
14
+ \(\displaystyle {0.0}\),
15
+ \(\displaystyle {2.5}\),
16
+ \(\displaystyle {5.0}\),
17
+ \(\displaystyle {7.5}\),
18
+ \(\displaystyle {10.0}\),
19
+ \(\displaystyle {12.5}\),
20
+ \(\displaystyle {15.0}\),
21
+ \(\displaystyle {17.5}\),
22
+ \(\displaystyle {20.0}\),
23
+ \(\displaystyle {22.5}\)
24
+ },
25
+ y dir=reverse,
26
+ ylabel={Strategy},
27
+ ymajorgrids,
28
+ ymin=-0.49, ymax=1.49,
29
+ ytick style={color=black},
30
+ ytick={0,1},
31
+ yticklabels={Eager: Geom(p=0.05),Sweep: Deterministic W=20}
32
+ ]
33
+ \draw[draw=black,line width=0.36pt,pattern=north east lines,pattern color=black] (axis cs:0,-0.4) rectangle (axis cs:19.5,0.4);
34
+ \draw[draw=black,line width=0.36pt,pattern=north east lines,pattern color=black] (axis cs:0,0.6) rectangle (axis cs:10,1.4);
35
+ \end{axis}
36
+
37
+ \end{tikzpicture}
figures/fig:latency-comparison.png ADDED

Git LFS Details

  • SHA256: 8306a9cbd21e39f26a80c6bd5caeed5f7524fcfd4a9a937229f0ec2befa28a90
  • Pointer size: 130 Bytes
  • Size of remote file: 51.8 kB
figures/fig:latency-comparison.tex ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ % This file was created with matplot2tikz v0.5.4.
2
+ \begin{tikzpicture}
3
+
4
+ \begin{axis}[legend entries={{Mean latency},{P95 latency}},
5
+ height=6.8cm,
6
+ legend cell align={left},
7
+ legend columns=2,
8
+ legend style={
9
+ fill opacity=1.0,
10
+ draw opacity=1,
11
+ text opacity=1,
12
+ at={(0.5,-0.18)},
13
+ anchor=north,
14
+ draw=none
15
+ },
16
+ tick pos=both,
17
+ width=\linewidth,
18
+ xlabel={Strategy},
19
+ xmajorgrids,
20
+ xmin=-0.49, xmax=1.49,
21
+ xtick style={color=black},
22
+ xtick={0,1},
23
+ xticklabels={Eager (per-session),Periodic Sweep (W=20)},
24
+ ylabel={Latency (steps)},
25
+ ymajorgrids,
26
+ ymin=0, ymax=62.475,
27
+ ytick style={color=black},
28
+ ytick={0,10,20,30,40,50,60,70},
29
+ yticklabels={
30
+ \(\displaystyle {0}\),
31
+ \(\displaystyle {10}\),
32
+ \(\displaystyle {20}\),
33
+ \(\displaystyle {30}\),
34
+ \(\displaystyle {40}\),
35
+ \(\displaystyle {50}\),
36
+ \(\displaystyle {60}\),
37
+ \(\displaystyle {70}\)
38
+ }
39
+ ]
40
+ \draw[draw=black,line width=0.36pt] (axis cs:-0.4,0) rectangle (axis cs:0,19.23);
41
+ \addlegendimage{ybar,ybar legend,draw=black,line width=0.36pt}
42
+
43
+ \draw[draw=black,line width=0.36pt] (axis cs:0.6,0) rectangle (axis cs:1,9.41);
44
+ \draw[draw=black,line width=0.36pt] (axis cs:-2.77555756156289e-17,0) rectangle (axis cs:0.4,59.5);
45
+ \addlegendimage{ybar,ybar legend,draw=black,line width=0.36pt}
46
+
47
+ \draw[draw=black,line width=0.36pt] (axis cs:1,0) rectangle (axis cs:1.4,18);
48
+ \end{axis}
49
+
50
+ \end{tikzpicture}
figures/fig:overhead.png ADDED

Git LFS Details

  • SHA256: 2a194f4621f338077e2ee808c4a2ff40ba529de63aec26624c2738579dd2f1ef
  • Pointer size: 130 Bytes
  • Size of remote file: 74.3 kB
figures/fig:overhead.tex ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ % This file was created with matplot2tikz v0.5.4.
2
+ \begin{tikzpicture}
3
+
4
+ \begin{axis}[
5
+ height=5.0cm,
6
+ tick pos=both,
7
+ width=\linewidth,
8
+ xlabel={Count per 2000-step run},
9
+ xmajorgrids,
10
+ xmin=0, xmax=26029.5,
11
+ xtick style={color=black},
12
+ xtick={0,5000,10000,15000,20000,25000,30000},
13
+ xticklabels={
14
+ \(\displaystyle {0}\),
15
+ \(\displaystyle {5000}\),
16
+ \(\displaystyle {10000}\),
17
+ \(\displaystyle {15000}\),
18
+ \(\displaystyle {20000}\),
19
+ \(\displaystyle {25000}\),
20
+ \(\displaystyle {30000}\)
21
+ },
22
+ y dir=reverse,
23
+ ylabel={Metric},
24
+ ymajorgrids,
25
+ ymin=-0.59, ymax=3.59,
26
+ ytick style={color=black},
27
+ ytick={0,1,2,3},
28
+ yticklabels={Eager: check events,Sweep: check events,Eager: cell scans,Sweep: cell scans}
29
+ ]
30
+ \draw[draw=black,line width=0.36pt,pattern=north east lines,pattern color=black] (axis cs:0,-0.4) rectangle (axis cs:495.8,0.4);
31
+ \draw[draw=black,line width=0.36pt,pattern=north east lines,pattern color=black] (axis cs:0,0.6) rectangle (axis cs:99,1.4);
32
+ \draw[draw=black,line width=0.36pt,pattern=north east lines,pattern color=black] (axis cs:0,1.6) rectangle (axis cs:24790,2.4);
33
+ \draw[draw=black,line width=0.36pt,pattern=north east lines,pattern color=black] (axis cs:0,2.6) rectangle (axis cs:24750,3.4);
34
+ \end{axis}
35
+
36
+ \end{tikzpicture}
figures/manifest.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": "fig:latency-comparison",
4
+ "type": "tex",
5
+ "file": "figures/fig:latency-comparison.tex",
6
+ "image": "figures/fig:latency-comparison.png",
7
+ "include": "\\input{figures/fig:latency-comparison.tex}",
8
+ "title": "Mean and P95 Detection Latency: Eager vs Sweep",
9
+ "caption": "Periodic sweep halves mean latency and dramatically tightens the tail at equal mean check interval. (Measured in a CPU-only container. Aggregated over 10 seeds, T=2000 steps, 250 state cells. P95 of Eager ranged 41-78 steps across seeds; Sweep p95 was consistently 17-19 steps.)",
10
+ "note": "Measured in a CPU-only container. Aggregated over 10 seeds, T=2000 steps, 250 state cells. P95 of Eager ranged 41-78 steps across seeds; Sweep p95 was consistently 17-19 steps."
11
+ },
12
+ {
13
+ "id": "fig:inspection-paradox",
14
+ "type": "tex",
15
+ "file": "figures/fig:inspection-paradox.tex",
16
+ "image": "figures/fig:inspection-paradox.png",
17
+ "include": "\\input{figures/fig:inspection-paradox.tex}",
18
+ "title": "Inter-Check Interval Variance: Source of the Latency Gap",
19
+ "caption": "Deterministic sweep eliminates variance-driven inspection-paradox penalty; Eager pays it fully. (Renewal-theory residual-life formula E[R] = E[T^2] / (2 E[T]). Deterministic: 20^2/(2*20) = 10. Geometric(0.05): 780/(2*20) = 19.5. Ratio = 1.95x, matching measured gap (9.41 vs 19.23 steps).)",
20
+ "note": "Renewal-theory residual-life formula E[R] = E[T^2] / (2 E[T]). Deterministic: 20^2/(2*20) = 10. Geometric(0.05): 780/(2*20) = 19.5. Ratio = 1.95x, matching measured gap (9.41 vs 19.23 steps)."
21
+ },
22
+ {
23
+ "id": "fig:overhead",
24
+ "type": "tex",
25
+ "file": "figures/fig:overhead.tex",
26
+ "image": "figures/fig:overhead.png",
27
+ "include": "\\input{figures/fig:overhead.tex}",
28
+ "title": "Check Events vs Cell Scans: Equal Work, Different Packaging",
29
+ "caption": "Sweep uses 5.0x fewer check events at identical total cell-scan cost; event overhead is 5x lower. (Cell scans: Eager 495.8 x 50 = 24,790; Sweep 99.0 x 250 = 24,750 (differs by <0.2%). Check events: Eager 495.8 per 2000-step run vs Sweep 99.0 (5.0x reduction). Measured in a CPU-only container.)",
30
+ "note": "Cell scans: Eager 495.8 x 50 = 24,790; Sweep 99.0 x 250 = 24,750 (differs by <0.2%). Check events: Eager 495.8 per 2000-step run vs Sweep 99.0 (5.0x reduction). Measured in a CPU-only container."
31
+ }
32
+ ]
main.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5829f771852ecdb5f1feb96890cf2be7f6b985ad2ad1f7365664f61ec069ebb6
3
+ size 122544
main.tex ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \documentclass[10pt]{article}
2
+
3
+ \usepackage[margin=1in]{geometry}
4
+ \usepackage{enumitem}
5
+ \setlist{nosep}
6
+ \usepackage{amsmath}
7
+ \usepackage{amssymb}
8
+ \usepackage{booktabs}
9
+ \usepackage{hyperref}
10
+ \usepackage{natbib}
11
+
12
+ \hypersetup{
13
+ colorlinks=true,
14
+ linkcolor=black,
15
+ citecolor=black,
16
+ urlcolor=blue
17
+ }
18
+
19
+ \title{Distributed Skill-State Consistency in Multi-Machine Agent Harnesses:\\
20
+ Measuring Drift Detection and Self-Healing Latency}
21
+ \author{ThakiCloud AI Research (Hyojung Han)}
22
+ \date{}
23
+
24
+ \usepackage{graphicx}
25
+ \usepackage{pgfplots}\pgfplotsset{compat=1.18}
26
+ \usetikzlibrary{patterns}
27
+
28
+ \begin{document}
29
+
30
+ \maketitle
31
+
32
+ \begin{abstract}
33
+ Modern LLM agent harnesses increasingly externalize capability into modular, version-controlled artifacts: reusable skills and standing behavioral rules that are toggled on or off per machine. When such a harness spans multiple machines sharing one git repository, the toggle state on each machine can silently diverge from the canonical policy that declares what should be active where. The result is a failure mode we call silent capability loss: the agent keeps running, produces plausible output, and never signals that a capability it was supposed to have is switched off. The only repair mechanism in the deployment we operate is a self-healing check that reconciles local toggle state against the registry, conventionally fired at session start. We ask when that check should fire. We formalize the harness as an $N$-machine, $M$-capability boolean state array subject to i.i.d.\ Bernoulli drift, and compare two detection strategies at exactly equal mean per-machine check interval: an eager per-session reactive check and a fixed-cadence global sweep. Across 20 fault-injection simulation runs, sweep halves mean detection latency (9.41 vs 19.23 steps), uses $5.0\times$ fewer discrete check events, and performs essentially identical total comparison work (24{,}750 vs 24{,}790 cell scans). We show the gap is a textbook renewal-theory inspection-paradox effect, yielding a general design rule: decouple periodic consistency checks from stochastic trigger streams.
34
+ \end{abstract}
35
+
36
+ \section{Introduction}
37
+
38
+ An increasingly common architecture for LLM agent deployments moves capability out of the model prompt and into a version-controlled artifact layer. Reusable capability modules---\emph{skills}---and standing behavioral policies---\emph{rules}---live as files in a repository, and the harness decides at run time which subset of them the agent can see. In a single-machine deployment this decision is trivial: whatever is in the repository is available. In a multi-machine deployment it is not. The same repository may be cloned onto a personal workstation and an organizational workstation with materially different requirements: a capability that is appropriate on one machine may be inappropriate, distracting, or policy-violating on the other. The natural design is therefore a two-layer one. A machine-scoped registry---a small, version-controlled manifest---declares which capabilities \emph{should} be active on which machine class. A per-machine toggle layer records which capabilities \emph{are} active, implemented not by deleting content (which would destroy auditability and make reversal expensive) but by the presence or absence of a lightweight filesystem indirection, in our deployment a symbolic link pointing at the real artifact.
39
+
40
+ This design is attractive because it is cheap, reversible, and inspectable. It has one structural weakness: the two layers can diverge. The registry is git-synced and converges quickly; the toggle layer is machine-local, is deliberately excluded from version control (committing it would cause one machine's disabling action to propagate as a deletion to the other), and can be perturbed by manual intervention, partial synchronization, hostname changes, or races between concurrent sessions on the same machine. When divergence happens, nothing crashes. The agent still starts, still answers, still produces plausible work. It simply does so without a capability it was supposed to have, or with one it was supposed to lack. We call this \emph{silent capability loss}, and its defining property is that it is invisible unless the system is specifically instrumented to look for it.
41
+
42
+ The repair mechanism in our deployment is a self-healing reconciliation: at some opportunity, the harness diffs local toggle state against the registry and repairs every mismatch it finds. The conventional and seemingly obvious placement of that opportunity is session start---the agent is booting anyway, the cost is amortized into an event that is already happening, and every session therefore begins from a known-good configuration. That reasoning is intuitive and, as we show, wrong in an interesting and generalizable way.
43
+
44
+ This paper asks: in a git-synced, multi-machine agent harness where skill and rule availability is toggled via symlinks and machine-scoped registries, how quickly and reliably does a session-start self-healing protocol detect and repair state drift (skills silently enabled or disabled on the wrong machine), and which detection strategy---eager per-session diff versus periodic sweep---minimizes the window of silent capability loss at the lowest token and compute overhead?
45
+
46
+ We answer with a controlled fault-injection study. We build a discrete-time simulation of the exact scenario above, inject drift at a fixed per-cell rate, and race two detection strategies against each other under a deliberately fair comparison: the reactive strategy's mean inter-check interval per machine is set exactly equal to the sweep's fixed interval. Under that equalization, naive intuition predicts a tie. The measurement shows a factor of two.
47
+
48
+ Our contributions are:
49
+
50
+ \begin{itemize}
51
+ \item \textbf{An empirical characterization of a harness-layer consistency failure mode.} We give what is, to our knowledge, the first quantitative account of state-consistency failure and self-healing convergence time for agent \emph{capability} harnesses. This is not a restatement of classical eventual-consistency results: the classical literature does not model the agent \emph{session} itself as the healing trigger, which is precisely the design choice under examination here and precisely where the surprise lives.
52
+
53
+ \item \textbf{A reusable fault-injection measurement harness.} We specify an open-system simulation model that quantifies detection latency, repair completeness (false-negative rate), residual drift, and check overhead as a function of drift severity and check strategy. Nothing in the model is agent-specific below the naming layer; it applies unchanged to any distributed feature-flag, configuration-toggle, or desired-state reconciliation system.
54
+
55
+ \item \textbf{A counter-intuitive result with a closed-form explanation and a cheap design rule.} At equal mean per-machine check interval, a machine-agnostic periodic sweep achieves roughly half the mean detection latency of the reactive per-session strategy, fires roughly one fifth as many discrete check events, and performs essentially the same total number of comparisons. We show the latency gap is exactly the classical inspection-paradox / mean-residual-life result of renewal theory, and distill it into a practitioner rule: for periodic system-health checks, decouple the check cadence from the variable event stream that would otherwise trigger it.
56
+ \end{itemize}
57
+
58
+ \section{Related Work}
59
+
60
+ \paragraph{Agent harness reliability as a first-class object.}
61
+ A body of recent work has begun to treat the scaffolding around an LLM---the harness---as an independent source of defects, distinct from the model itself. \citet{chen2026harnessfix} make this explicit, diagnosing and repairing flaws in the agent harness rather than in the model, which establishes harness-level defects as a recognized failure class deserving its own tooling. \citet{bensghaier2026dontblame} supply the longitudinal complement: in coding agents, measured quality changes over time track the evolution of harness middleware rather than the evolution of the underlying model, so improvements and regressions that practitioners attribute to model releases are frequently attributable to the scaffolding. Together these motivate our premise that configuration-state integrity is a first-class, independently measurable axis of agent-system quality, not an implementation detail beneath the level at which agent behavior should be studied. Methodologically, \citet{tan2026agentchaos} argue for chaos engineering---programmatic fault injection at the API layer---as the appropriate instrument for measuring reliability properties of LLM agent systems, on the grounds that such properties cannot be safely elicited on live systems. We adopt exactly that stance and for exactly that reason: deliberately desynchronizing capability state on a live multi-machine deployment would corrupt real sessions in a way that is neither ethical nor recoverable, so the failure must be reproduced synthetically to be measured at all. The broader trend our work sits inside is the diagnosis of latent, silent failure modes that are invisible until instrumented for; \citet{mehta2026premature} exemplify this for a different mechanism, showing that long-horizon agents commit prematurely to representations in ways that degrade downstream behavior without ever surfacing an error, structurally parallel to the silent capability loss we study here.
62
+
63
+ \paragraph{State consistency, behavioral consistency, and drift detection outside agent harnesses.}
64
+ The word ``consistency'' is heavily overloaded in this literature, and the distinctions matter for positioning. \citet{yagubyan2026consistent} measure \emph{behavioral} consistency: whether an agent issues the same tool calls across repeated runs of the same task. That is a property of the model's stochastic policy. What we measure is \emph{state} consistency: whether the configuration substrate on which the agent runs matches its declared desired state, a property that would exist even if the model were perfectly deterministic. The two are orthogonal and can fail independently; an agent can be perfectly reproducible while reproducibly missing a capability. Adjacent again is \citet{niu2026reliability}, which models reliability and error contagion across the communication topology of multi-agent LLM networks; the shared concern is reliability of a multi-node agent system, but the propagating object there is a claim or error, whereas ours is configuration state that does not propagate at all---its failure is precisely that it fails to propagate. \citet{margalit2026governed} come closest on the state axis, proposing governance primitives such as provenance, scoped access, and temporal consistency for shared memory across multi-agent systems; our scope is deliberately narrower and correspondingly more measurable, treating a binary capability toggle rather than rich shared memory, which is what makes a clean latency measurement possible. The declarative framing we use---a desired-state manifest reconciled against observed state---is imported from container orchestration, and \citet{mouzouni2026context} perform the closest analogous import, proposing Kubernetes-style declarative orchestration with formal verification for enterprise knowledge access in agentic systems; their target is access-control policy rather than capability-toggle drift, and critically they do not measure detection latency or compare reconciliation-triggering strategies, which is the gap this paper fills. Finally, the classical distributed-systems literature frames both the problem and our contribution statement. \citet{nikolic2020selfhealing} articulate the fault-correction-versus-fault-tolerance dilemma and show that fault detection inherits the uncertainty of the underlying network; that is the classical framing against which our claim---that the eventual-consistency literature does not model the agent session as the healing trigger---is positioned. \citet{dobre2009robust} provide the classical precedent for the strategy we ultimately recommend, a gossip-based hierarchical architecture built on periodic checking; our ``periodic sweep'' is a specialization of that heartbeat tradition to the agent-harness setting, and part of our contribution is showing quantitatively what is lost when a system abandons that tradition in favor of piggybacking checks on application events.
65
+
66
+ \paragraph{Positioning relative to our own prior work on this production system.}
67
+ This paper is the third measurement study of the same production agent-skill ecosystem, each targeting a different axis of the same artifact layer. Our prior work \citep{thaki2026skillrouter} addresses skill \emph{routing}: an autonomous nightly repair loop that improves retrieval coverage so that the right skill is selected when a request arrives. That work assumes the skill is available and asks whether it is found; the present work asks whether it is available at all, which is logically upstream---a routing improvement is worthless for a capability that has been silently toggled off on the machine handling the request. Our prior work \citep{thaki2026skillbirth} studies the skill \emph{synthesis-versus-reuse} decision boundary through git-history survival analysis, characterizing when a new skill is authored rather than an existing one reused; that is the birth process feeding the same population of artifacts whose per-machine availability we study here. Our prior work \citep{thaki2026verifygated} maps the cost--quality Pareto frontier of adversarial verification in multi-agent fan-out within the same harness, and it is the direct methodological ancestor of this paper: it establishes the house practice of taking a production rule that is normally asserted on intuition and instead subjecting it to a controlled synthetic benchmark. The rule under test there was ``close every fan-out with a verification stage''; the rule under test here is ``reconcile state at session start.'' In both cases the contribution is converting a plausible-sounding operational convention into a measured quantity, and in both cases the measurement changes the recommendation.
68
+
69
+ \section{System Model and Problem Formulation}
70
+
71
+ We formalize the harness as a reconciliation problem over a binary state array.
72
+
73
+ \paragraph{State.}
74
+ There are $N$ machines indexed $m = 1,\dots,N$ and $M$ capabilities (skills or rules) indexed $s = 1,\dots,M$. Each machine holds a local boolean state vector over capabilities,
75
+ \[
76
+ \mathrm{actual}[m][s] \in \{0,1\},
77
+ \]
78
+ where $1$ denotes ``available to the agent on this machine'' and $0$ denotes ``not available.'' In the deployment this bit is materialized as the presence or absence of a symbolic link to the underlying artifact; the artifact itself is never removed, which is what makes both directions of drift (spuriously enabled and spuriously disabled) equally possible and equally silent.
79
+
80
+ \paragraph{Policy.}
81
+ A single canonical policy vector
82
+ \[
83
+ \mathrm{policy}[s] \in \{0,1\}
84
+ \]
85
+ is shared across all machines via the version-controlled registry and defines the value to which every machine's state should converge. In the production system the registry is in principle machine-class-specific: a capability may legitimately be active on a personal machine and inactive on an organizational one. We deliberately scope the simulation to the single-policy case. This is a modeling choice, not an oversight: a shared policy isolates the pure detection-latency question from any confound introduced by policy heterogeneity, and detection latency is what the two competing strategies actually differ on. Cross-machine-class registry conflicts are a distinct problem and out of scope (Section~\ref{sec:limitations}).
86
+
87
+ \paragraph{Drift process.}
88
+ Time is discrete, $t = 0,\dots,T-1$. At each step, each cell $(m,s)$ independently flips its value with fixed probability $p_{\mathrm{drift}}$, modeling uncoordinated local perturbation: manual edits during debugging, partial synchronization, hostname changes that invalidate machine-class resolution, and races between concurrent sessions on one machine. This is a memoryless Bernoulli injection process and is by construction uncorrelated across cells. We make that assumption deliberately, to isolate the detection-strategy comparison from drift-correlation effects, and we revisit its realism in Section~\ref{sec:limitations}.
89
+
90
+ \paragraph{Check and repair.}
91
+ A \emph{check} event, whenever it fires under the active strategy, scans some subset of cells, compares $\mathrm{actual}$ against $\mathrm{policy}$, and immediately repairs every mismatch it finds by resetting the cell to the policy value. Repair is atomic and always succeeds; we model detection, not repair failure.
92
+
93
+ \paragraph{Strategies.}
94
+ We compare two strategies for deciding when checks fire.
95
+
96
+ \begin{description}
97
+ \item[\textsc{Eager}.] At every step, independently for each machine $m$, a session starts on that machine with fixed probability $p_{\mathrm{session}}$. When a session starts, a check fires that scans only that machine's $M$ cells. This is the reactive, session-triggered design: the check rides on an event the system is already generating.
98
+ \item[\textsc{Sweep}.] A single global check fires deterministically every $W$ steps, scanning all $N \times M$ cells of the fleet in one event. This is the dedicated-clock design: the check is decoupled from the session stream entirely.
99
+ \end{description}
100
+
101
+ \paragraph{Metrics.}
102
+ We record four families of quantity.
103
+
104
+ \begin{enumerate}
105
+ \item \emph{Detection latency}: for each injected drift event, the number of steps elapsed between injection and the first subsequent check that scans that exact cell and repairs it. We report the mean and the 95th percentile over all drift events that are eventually caught.
106
+ \item \emph{False-negative rate}: the fraction of injected drift events never caught before the run ends.
107
+ \item \emph{Residual drift}: the number of cells still mismatched at $t = T$, out of $N \times M$.
108
+ \item \emph{Check overhead}: reported at two granularities that must not be conflated. \emph{Check events} counts discrete check firings, and normalized as checks per $1000$ steps; this is the quantity that carries per-invocation fixed cost (process startup, filesystem traversal setup, and in the real harness, session-start hook latency and its token overhead). \emph{Cell scans} counts the total number of individual $(m,s)$ comparisons performed, computed as (check events) $\times$ (cells scanned per check), which is $M$ for \textsc{Eager} and $N \times M$ for \textsc{Sweep}. We introduce this second metric explicitly because it is the axis on which the two strategies turn out to be equivalent, and that equivalence is central to the analysis in Section~\ref{sec:analysis}.
109
+ \end{enumerate}
110
+
111
+ \section{Method and Experimental Setup}
112
+
113
+ We implement the model of Section~3 as a pure Python discrete-event simulation of roughly one hundred lines with no dependencies beyond the standard library. Each run initializes the policy by activating each of the $M$ capabilities independently with probability $0.6$, initializes every machine in exact agreement with the policy at $t=0$, and then advances $T$ steps, at each step first injecting drift and then firing whatever checks the active strategy dictates. Every injected drift event is tagged with its injection time and cell so that detection latency can be attributed exactly; events still outstanding at $t=T$ are counted as false negatives rather than being assigned an imputed latency, which keeps the latency statistics conditioned on successful detection as specified.
114
+
115
+ Parameters are given in Table~\ref{tab:params}. The choice of $p_{\mathrm{session}} = 0.05$ and $W = 20$ is not incidental: it makes the mean per-machine inter-check interval of \textsc{Eager} equal to $1/p_{\mathrm{session}} = 20$ steps, exactly matching \textsc{Sweep}'s fixed interval of $W = 20$. The comparison is therefore rate-fair by construction, which is what makes the observed gap interpretable as something other than one strategy simply checking more often. With these parameters the expected number of drift events per run is $N \cdot M \cdot T \cdot p_{\mathrm{drift}} = 5 \cdot 50 \cdot 2000 \cdot 0.0002 = 100$, giving each seed a comparable population of detection events to average over.
116
+
117
+ \begin{table}[t]
118
+ \centering
119
+ \caption{Simulation parameters. The pairing of $p_{\mathrm{session}}$ and $W$ equalizes the mean per-machine inter-check interval at 20 steps for both strategies.}
120
+ \label{tab:params}
121
+ \begin{tabular}{llr}
122
+ \toprule
123
+ Symbol & Meaning & Value \\
124
+ \midrule
125
+ $N$ & Machines & 5 \\
126
+ $M$ & Capabilities (skills/rules) per machine & 50 \\
127
+ $N \times M$ & Total state cells & 250 \\
128
+ $T$ & Simulation steps per run & 2000 \\
129
+ $p_{\mathrm{drift}}$ & Drift probability, per cell per step & 0.0002 \\
130
+ $p_{\mathrm{session}}$ & Session-start probability, per machine per step (\textsc{Eager}) & 0.05 \\
131
+ $W$ & Sweep interval in steps (\textsc{Sweep}) & 20 \\
132
+ --- & Initial activation probability per capability & 0.6 \\
133
+ --- & Random seeds per strategy & 10 \\
134
+ --- & Total simulation runs & 20 \\
135
+ \bottomrule
136
+ \end{tabular}
137
+ \end{table}
138
+
139
+ Runs execute on a single CPU core with 512\,MiB of memory in a lightweight containerized environment. No GPU is used or required: this is a control-plane and state-management experiment, not a model-inference experiment, and nothing in the measurement depends on the behavior of any language model. We stress that this is a controlled simulation rather than a live production A/B test. Injecting synthetic capability drift into live multi-machine harnesses cannot be done safely, because the failure being injected is by definition invisible to the running agent and would silently corrupt the output of whatever real work those sessions were performing. This is exactly the situation for which \citet{tan2026agentchaos} argue fault injection is the appropriate methodology: reliability properties that cannot be safely provoked in production must be provoked in a faithful model of production instead.
140
+
141
+ \section{Results}
142
+
143
+ Table~\ref{tab:results} reports the headline comparison, aggregated over ten seeds per strategy.
144
+
145
+ \begin{table}[t]
146
+ \centering
147
+ \small
148
+ \caption{Detection and overhead, aggregated over 10 seeds per strategy ($T=2000$ steps, 250 state cells).}
149
+ \label{tab:results}
150
+ \begin{tabular}{lrrrrrr}
151
+ \toprule
152
+ Strategy & \begin{tabular}[c]{@{}r@{}}Mean\\latency\\(steps)\end{tabular} & \begin{tabular}[c]{@{}r@{}}Mean\\false-neg.\\rate\end{tabular} & \begin{tabular}[c]{@{}r@{}}Mean checks\\per 2000-step\\run\end{tabular} & \begin{tabular}[c]{@{}r@{}}Checks per\\1000 steps\end{tabular} & \begin{tabular}[c]{@{}r@{}}Mean checks\\per successful\\detection\end{tabular} & \begin{tabular}[c]{@{}r@{}}Mean residual\\drift at end\\(of 250)\end{tabular} \\
153
+ \midrule
154
+ Eager (per-session) & 19.23 & 1.30\% & 495.8 & 247.9 & 5.33 & 0.8 \\
155
+ Periodic sweep ($W{=}20$) & 9.41 & 1.40\% & 99.0 & 49.5 & 1.07 & 0.9 \\
156
+ \bottomrule
157
+ \end{tabular}
158
+ \end{table}
159
+
160
+ The normalized check rates follow directly from the raw counts: for \textsc{Eager}, $495.8 / 2000 \times 1000 \approx 247.9$ checks per 1000 steps, and for \textsc{Sweep}, $99.0 / 2000 \times 1000 = 49.5$ checks per 1000 steps. \textsc{Sweep} therefore fires roughly one fifth as many discrete check events while detecting drift in roughly half the time.
161
+
162
+ \paragraph{Mean latency.}
163
+ \textsc{Sweep} detects and repairs drift in $9.41$ steps on average against $19.23$ for \textsc{Eager}, a reduction of $51\%$, despite the two strategies having identical mean per-machine check intervals of 20 steps. Section~\ref{sec:analysis} shows this is not noise and not an artifact of the parameterization but a structural consequence of interval variance.
164
+
165
+ \paragraph{Tail latency and variance.}
166
+ The second finding is distinct from the first and, for operational purposes, arguably more important. Per-seed, \textsc{Eager}'s mean latency ranged from $14.53$ to $22.28$ steps across the ten seeds, and its 95th-percentile latency ranged from $41$ all the way to $78$ steps. \textsc{Sweep}'s per-seed mean latency ranged only from $9.01$ to $10.31$ steps, and its 95th-percentile latency was consistently $17$--$19$ steps across every seed. \textsc{Sweep} is thus not merely lower on average but dramatically tighter in its tail, and the reason is structural rather than statistical. \textsc{Eager}'s worst case is unbounded: a machine that happens to start no sessions can in principle remain unchecked, and therefore silently misconfigured, for arbitrarily long, because the only thing that would trigger a check is the very activity that is absent. \textsc{Sweep}'s worst case is bounded by construction at $W = 20$ steps, the maximum span from an injection immediately after one sweep to detection at the following one, and the measured p95 of $17$--$19$ steps sits just inside that bound. For a reliability property whose whole hazard is silence, a bounded worst-case exposure window is a qualitatively different guarantee from a merely better average.
167
+
168
+ \paragraph{Completeness.}
169
+ The honest counterweight is that \textsc{Sweep} does not win on every axis. False-negative rates are $1.30\%$ for \textsc{Eager} and $1.40\%$ for \textsc{Sweep}, and residual drift at run end is $0.8$ versus $0.9$ cells out of $250$. At ten seeds these differences are statistically indistinguishable, and the direction of the (non-)difference does not favor \textsc{Sweep}. Periodic sweeping is not ``safer'' in the sense of catching a larger fraction of injected faults; both strategies eventually catch approximately $98.6$--$98.7\%$ of drift events within the run horizon, and the residual in both cases is dominated by events injected near $t=T$ that simply had no opportunity to be detected before measurement stopped. The win is in latency and in the variance of latency, not in detection completeness. Section~\ref{subsec:boundary} explains why this is exactly what the theory predicts.
170
+
171
+ \section{Analysis}
172
+ \label{sec:analysis}
173
+
174
+ This section explains why \textsc{Sweep} achieves roughly half the mean latency of \textsc{Eager} when the two have identical mean per-machine check intervals ($1/p_{\mathrm{session}} = 1/0.05 = 20$ steps, exactly equal to $W = 20$).
175
+
176
+ \subsection{Equal work, fewer events}
177
+ \label{subsec:equalwork}
178
+
179
+ The first observation dissolves a plausible objection: perhaps \textsc{Sweep} simply does more work. It does not. \textsc{Eager} fires approximately $495.8$ checks per run, each scanning $M = 50$ cells belonging to one machine, for a total of
180
+ \[
181
+ 495.8 \times 50 = 24{,}790 \quad \text{cell scans.}
182
+ \]
183
+ \textsc{Sweep} fires approximately $99.0$ checks per run, each scanning $N \times M = 5 \times 50 = 250$ cells across the whole fleet, for a total of
184
+ \[
185
+ 99.0 \times 250 = 24{,}750 \quad \text{cell scans.}
186
+ \]
187
+ These totals differ by $40$ scans, under $0.2\%$. The two strategies perform essentially identical total comparison work; \textsc{Sweep} simply packages that work into $5.0\times$ fewer discrete check events ($99.0$ versus $495.8$).
188
+
189
+ The general implication is worth stating cleanly. For a fixed-size registry, coalescing checks along the machine dimension trades event count for nothing at all in total comparison work. Every real system attaches some fixed cost to each check \emph{event} independent of the number of cells it scans: process invocation, filesystem stat setup, lock acquisition, and---in the harness we operate---session-start hook latency and the tokens consumed reporting the reconciliation result into the agent's context. A strategy that does the same number of comparisons in one fifth as many events pays one fifth of that fixed cost. Any argument that reactive checking is cheaper because it ``only checks what it needs to'' confuses cell scans with check events; per cell scan, reactive checking is not cheaper, and per event it is five times more expensive.
190
+
191
+ \subsection{Why sweep is also faster: the inspection paradox}
192
+
193
+ The latency result requires a different argument, because equal mean interval would naively predict equal latency. It does not, and the reason is variance.
194
+
195
+ \textsc{Sweep}'s inter-check interval for the fleet is deterministic: exactly $W = 20$ steps, every cycle, with zero variance. \textsc{Eager}'s inter-check interval for a given machine is the waiting time between successes of independent Bernoulli trials with $p = p_{\mathrm{session}} = 0.05$, i.e., a Geometric random variable $T_e \sim \mathrm{Geom}(0.05)$, with
196
+ \[
197
+ \mathbb{E}[T_e] = \frac{1}{p} = 20, \qquad
198
+ \mathrm{Var}(T_e) = \frac{1-p}{p^2} = \frac{0.95}{0.0025} = 380 .
199
+ \]
200
+ The means match exactly, by design. The second moments do not:
201
+ \[
202
+ \mathbb{E}[T_e^2] = \mathrm{Var}(T_e) + \mathbb{E}[T_e]^2 = 380 + 400 = 780,
203
+ \]
204
+ whereas for the deterministic sweep interval $T_s \equiv 20$ we have $\mathbb{E}[T_s^2] = 400$.
205
+
206
+ Second moments are what matter here, because a drift event is not injected at a check boundary. It is injected at an essentially arbitrary point inside whatever inter-check interval happens to be in progress, and the quantity we measure is the \emph{forward recurrence time}: the residual wait from that arbitrary insertion point to the next check. Renewal theory gives the expected residual life as seen from a randomly inserted point in a renewal process with inter-event gaps $T$ as
207
+ \begin{equation}
208
+ \mathbb{E}[R] \;=\; \frac{\mathbb{E}[T^2]}{2\,\mathbb{E}[T]} .
209
+ \label{eq:mrl}
210
+ \end{equation}
211
+ This is not half the mean interval except in the degenerate deterministic case. Evaluating \eqref{eq:mrl} for each strategy:
212
+ \begin{align}
213
+ \text{\textsc{Sweep}:} \quad \mathbb{E}[R_s] &= \frac{\mathbb{E}[T_s^2]}{2\,\mathbb{E}[T_s]} = \frac{20^2}{2 \cdot 20} = \frac{400}{40} = 10, \label{eq:sweep}\\[2pt]
214
+ \text{\textsc{Eager}:} \quad \mathbb{E}[R_e] &= \frac{\mathbb{E}[T_e^2]}{2\,\mathbb{E}[T_e]} = \frac{780}{2 \cdot 20} = \frac{780}{40} = 19.5. \label{eq:eager}
215
+ \end{align}
216
+ The measured values were $9.41$ and $19.23$. The agreement is close in both cases; the small shortfall relative to the continuous-time prediction is a discrete-time boundary correction, since drift injection and checking occur at integer steps and a cell drifting in the same step a check fires is resolved within that step's ordering rather than waiting a full residual interval.
217
+
218
+ This is the classical inspection paradox, also familiar as the bus-waiting-time paradox. An irregular, memoryless arrival process is size-biased from the point of view of an arbitrary observer: the observer is more likely to land inside a long interval than a short one, precisely because long intervals occupy more of the timeline. The expected wait is therefore inflated above half the mean interval, even though the mean interval is identical to a deterministic schedule's. For the Geometric case the inflation factor is
219
+ \[
220
+ \frac{\mathbb{E}[R_e]}{\mathbb{E}[R_s]} = \frac{780/40}{400/40} = \frac{780}{400} = 1.95,
221
+ \]
222
+ which is essentially the factor of two we measured. It is not a coincidence, not a simulation artifact, and not a property of agent systems---it is arithmetic.
223
+
224
+ The practitioner rule that follows is cheap and general. For periodic system-health or consistency checks, decoupling the check cadence from a memoryless (Bernoulli or Poisson-like) triggering event stream---that is, using a fixed-interval sweep instead of a same-mean-rate reactive trigger---roughly halves expected detection latency for free, using exactly the same total amount of check work, purely by eliminating the variance-driven inspection-paradox penalty. This generalizes well past agent harnesses. Any configuration-drift detector, feature-flag reconciler, certificate-expiry scanner, or health check that is currently piggybacked on a stochastic event---a request arrival, a session start, a deploy, a user login---is paying this penalty, and paying it invisibly, because the mean trigger rate looks correct on a dashboard while the residual-life distribution that actually governs exposure does not appear anywhere.
225
+
226
+ \subsection{Where this explanation stops}
227
+ \label{subsec:boundary}
228
+
229
+ The inspection-paradox argument explains the latency gap and nothing else, and it is worth being explicit about its boundary. False-negative rate and residual drift at run end are governed by a different mechanism: whether \emph{any} check scanning a given cell fires between the drift event and the end of the run. For both strategies that probability is dominated by the run length relative to the check frequency, not by the shape of the inter-check distribution, because both strategies check each cell roughly $T/20 = 100$ times over the horizon and the residual population in both cases consists of events injected in the final few steps. This is exactly why the measured false-negative rates ($1.30\%$ versus $1.40\%$) are statistically indistinguishable even though the mean latencies differ by a factor of two. The theory predicts a latency gap and no completeness gap, and that is what the measurement shows. We flag this because it constrains the claim: \textsc{Sweep} is faster and more predictable, not more thorough, and a reader who generalizes the inspection-paradox result into a claim about detection completeness will be generalizing it past where it holds.
230
+
231
+ \section{Discussion and Practical Implications}
232
+
233
+ Two implications follow directly from what was measured, and we restrict ourselves to those.
234
+
235
+ \paragraph{Prefer a fixed-cadence sweep as the primary mechanism; keep the session check as a secondary layer.}
236
+ Because \textsc{Sweep} dominates \textsc{Eager} on mean latency, on tail latency, and on cell-scan-normalized event cost at equal mean interval, the primary detection mechanism in a harness of this shape should be a fixed-cadence sweep rather than a session-triggered check. Critically, the two strategies are not mutually exclusive. A real deployment can retain the session-start reconciliation as a cheap opportunistic layer while adding the fixed-cadence sweep as the mechanism that actually bounds worst-case exposure. The opportunistic layer is close to free on machines with high session frequency---the machine is already active, the process is already starting, and the marginal cost of the diff is small---and it provides the useful property that a session never begins from a state that a check has already had the opportunity to correct. What it must not be is the only mechanism, because its worst case is unbounded exactly on the machines where it matters most: a machine that is used rarely is a machine that is checked rarely, and it is precisely the rarely-used machine whose configuration is most likely to have drifted since anyone last looked at it. The sweep supplies the bound the session check structurally cannot.
237
+
238
+ \paragraph{The tax is measurable without instrumenting the live system.}
239
+ The broader implication is diagnostic rather than architectural. Any distributed system that currently ties a consistency or health check to a stochastic triggering event---deploys, requests, logins, sessions---rather than to a dedicated timer is paying an inspection-paradox latency tax, and in our experience that tax is unmeasured because the trigger's mean rate is the number that gets monitored. The combination of the cell-scan-equivalence observation from Section~\ref{subsec:equalwork} and the renewal-theory identity in \eqref{eq:mrl} gives a way to estimate that tax without instrumenting anything: take the empirical inter-arrival distribution of the existing trigger, compute $\mathbb{E}[T^2]/(2\mathbb{E}[T])$, and compare it to $\mathbb{E}[T]/2$, the value a fixed interval with the same mean would give. The ratio is the multiplier on expected detection latency being paid for the convenience of piggybacking, and it can be computed from logs that most systems already keep.
240
+
241
+ \section{Limitations}
242
+ \label{sec:limitations}
243
+
244
+ We are explicit about what this study does not establish.
245
+
246
+ \paragraph{Drift is modeled as i.i.d.\ Bernoulli.} Our injection process treats each cell independently, with no correlation across skills or machines. Real drift is very likely bursty and correlated: a single bad merge, an interrupted synchronization, or a hostname change that invalidates machine-class resolution could desynchronize many capabilities on one machine simultaneously. Correlated drift changes the structure of the problem---under bursty drift, a sweep that scans all machines at once may find many faults per event while a per-machine reactive check finds them only on the affected machine---and could plausibly change the relative comparison in either direction. Extending the injection model to correlated and bursty regimes is the most important piece of future work.
247
+
248
+ \paragraph{Single shared canonical policy.} The simulation studies one policy vector shared by all machines, whereas the production system supports machine-class-specific policies. As stated in Section~3, this scoping choice isolates detection latency, but it means the study does not exercise the conflict cases that arise when the registry itself disagrees across machine classes, or when a machine's class assignment is ambiguous. Those cases are out of scope here.
249
+
250
+ \paragraph{One point in the parameter space.} We chose $p_{\mathrm{session}} = 0.05$ and $W = 20$ specifically so the two strategies have exactly equal mean intervals, which is what isolates the inspection-paradox effect from any confound of check frequency. Real session-arrival rates and desired sweep cadences will differ, and we do not sweep this parameter space. The natural extension is to replicate the comparison across a grid of $p_{\mathrm{session}}/W$ ratios to map where, if anywhere, a crossover occurs---in particular whether a sweep interval substantially longer than the mean session interval still wins on tail latency.
251
+
252
+ \paragraph{Simulation, not production incident data.} The results come from a controlled simulation, not from measured live incidents. The simulation's claim to realism rests on the qualitative pattern being an accurate abstraction of the real system---silent per-machine capability drift, repaired by a reconciliation check whose firing schedule is the design variable---and not on matching real drift rates, which we do not separately measure. Consequently the absolute latencies here should be read as ratios and shapes, not as predicted production numbers. The obvious next step is to instrument the production self-healing reconciliation to log every detected mismatch with its cell and detection time, fit $p_{\mathrm{drift}}$ and the empirical session-arrival distribution from that log, and re-run this comparison with fitted parameters.
253
+
254
+ \paragraph{Only two strategies.} We compare eager and sweep only. Hybrid schedules, adaptive cadences (exponential backoff on a fleet that has been clean for a long time), and drift-severity-triggered escalation are all plausible and none are evaluated here. The hybrid recommended in Section~7 follows from the dominance relation we measured, but it was not itself simulated.
255
+
256
+
257
+
258
+ The rendered figures for this work (Figures~\ref{fig:fig-latency-comparison},~\ref{fig:fig-inspection-paradox},~\ref{fig:fig-overhead}) are collected here.
259
+
260
+ \begin{figure}[htbp]
261
+ \centering
262
+ \input{figures/fig:latency-comparison.tex}
263
+ \caption{Periodic sweep halves mean latency and dramatically tightens the tail at equal mean check interval. (Measured in a CPU-only container. Aggregated over 10 seeds, T=2000 steps, 250 state cells. P95 of Eager ranged 41-78 steps across seeds; Sweep p95 was consistently 17-19 steps.)}
264
+ \label{fig:fig-latency-comparison}
265
+ \end{figure}
266
+
267
+ \begin{figure}[htbp]
268
+ \centering
269
+ \input{figures/fig:inspection-paradox.tex}
270
+ \caption{Deterministic sweep eliminates variance-driven inspection-paradox penalty; Eager pays it fully. (Renewal-theory residual-life formula E[R] = E[T\textasciicircum{}2] / (2 E[T]). Deterministic: 20\textasciicircum{}2/(2*20) = 10. Geometric(0.05): 780/(2*20) = 19.5. Ratio = 1.95x, matching measured gap (9.41 vs 19.23 steps).)}
271
+ \label{fig:fig-inspection-paradox}
272
+ \end{figure}
273
+
274
+ \begin{figure}[htbp]
275
+ \centering
276
+ \input{figures/fig:overhead.tex}
277
+ \caption{Sweep uses 5.0x fewer check events at identical total cell-scan cost; event overhead is 5x lower. (Cell scans: Eager 495.8 x 50 = 24,790; Sweep 99.0 x 250 = 24,750 (differs by <0.2\%). Check events: Eager 495.8 per 2000-step run vs Sweep 99.0 (5.0x reduction). Measured in a CPU-only container.)}
278
+ \label{fig:fig-overhead}
279
+ \end{figure}
280
+
281
+ \section{Conclusion}
282
+
283
+ Multi-machine agent harnesses that toggle capabilities through a git-synced, machine-scoped state layer face a genuine and, until now, unquantified risk: capability state can silently diverge from the canonical policy, and because nothing crashes, the divergence is invisible without dedicated instrumentation. We built a controlled fault-injection simulation grounded in this real failure pattern and raced two self-healing detection strategies against each other under a deliberately rate-fair comparison. A periodic, fixed-cadence sweep cut mean detection latency roughly in half relative to a same-mean-rate reactive session-triggered strategy ($9.41$ versus $19.23$ steps), used roughly one fifth as many discrete check events ($99.0$ versus $495.8$ per run), bounded its tail latency at $17$--$19$ steps against a reactive tail ranging to $78$ steps, and did all of this while performing essentially identical total comparison work ($24{,}750$ versus $24{,}790$ cell scans). It did not improve detection completeness, and we do not claim it does: false-negative rates were statistically indistinguishable at $1.30\%$ and $1.40\%$. The mechanism behind the latency result is a textbook renewal-theory inspection-paradox effect, with the measured values matching the closed-form residual-life prediction $\mathbb{E}[T^2]/(2\mathbb{E}[T])$ to within a discrete-time boundary correction. That correspondence turns an empirical observation into a cheap, generalizable design rule for any distributed system with the same shape: decouple periodic consistency checks from stochastic trigger events, because a schedule with the same mean rate but zero variance detects faults twice as fast, for free.
284
+
285
+ \bibliographystyle{plainnat}
286
+ \bibliography{refs}
287
+
288
+ \end{document}
paper.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5829f771852ecdb5f1feb96890cf2be7f6b985ad2ad1f7365664f61ec069ebb6
3
+ size 122544
refs.bib ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @misc{tan2026agentchaos,
2
+ title = {AgentChaos: Chaos Engineering for Agent Systems via Programmatic Fault Injection},
3
+ author = {Tan, Gou and Sun, Zhensu and Shi, Jieke and Zhang, Ting and He, Zilong and Wu, Qingfu and Liang, Shuai and Sun, Weifeng and He, Junda and Chen, Pengfei and Zhang, Chuanfu and Shar, Lwin Khin and Lo, David},
4
+ year = {2026},
5
+ eprint = {2608.06790},
6
+ archivePrefix = {arXiv},
7
+ primaryClass = {cs.SE},
8
+ note = {arXiv:2608.06790}
9
+ }
10
+
11
+ @misc{chen2026harnessfix,
12
+ title = {From Failed Trajectories to Reliable LLM Agents: Diagnosing and Repairing Harness Flaws},
13
+ author = {Chen, Mengzhuo and Wang, Junjie and Liu, Zhe and Wang, Yawen and Zheng, Haiming and Wang, Qing},
14
+ year = {2026},
15
+ eprint = {2606.06324},
16
+ archivePrefix = {arXiv},
17
+ primaryClass = {cs.SE},
18
+ note = {arXiv:2606.06324}
19
+ }
20
+
21
+ @misc{yagubyan2026consistent,
22
+ title = {How Consistent Are LLM Agents? Measuring Behavioral Reproducibility in Multi-Step Tool-Calling Pipelines},
23
+ author = {Yagubyan, Abel},
24
+ year = {2026},
25
+ eprint = {2605.28840},
26
+ archivePrefix = {arXiv},
27
+ primaryClass = {cs.AI},
28
+ note = {arXiv:2605.28840}
29
+ }
30
+
31
+ @misc{niu2026reliability,
32
+ title = {Reliability--Contagion Feasibility in LLM Multi-Agent Networks},
33
+ author = {Niu, Ruiwu and Shu, Xincheng and Zhao, Ying},
34
+ year = {2026},
35
+ eprint = {2607.21912},
36
+ archivePrefix = {arXiv},
37
+ primaryClass = {cs.MA},
38
+ note = {arXiv:2607.21912}
39
+ }
40
+
41
+ @misc{margalit2026governed,
42
+ title = {Governed Shared Memory for Multi-Agent LLM Systems},
43
+ author = {Margalit, Yanki and Cohen-Inger, Nurit and Avram, Erni and Taig, Ran and Margalit, Oded},
44
+ year = {2026},
45
+ eprint = {2606.24535},
46
+ archivePrefix = {arXiv},
47
+ primaryClass = {cs.MA},
48
+ note = {arXiv:2606.24535}
49
+ }
50
+
51
+ @misc{bensghaier2026dontblame,
52
+ title = {Don't Blame the Large Language Model: How Agent Harness Evolution Shapes Coding Agent Quality},
53
+ author = {Ben Sghaier, Oussama and Li, Hao and Adams, Bram and Hassan, Ahmed E.},
54
+ year = {2026},
55
+ eprint = {2607.03691},
56
+ archivePrefix = {arXiv},
57
+ primaryClass = {cs.SE},
58
+ note = {arXiv:2607.03691}
59
+ }
60
+
61
+ @misc{mehta2026premature,
62
+ title = {When Agents Commit Too Soon: Diagnosing Premature Commitment in LLM Agents},
63
+ author = {Mehta, Aman},
64
+ year = {2026},
65
+ eprint = {2606.22936},
66
+ archivePrefix = {arXiv},
67
+ primaryClass = {cs.AI},
68
+ note = {arXiv:2606.22936}
69
+ }
70
+
71
+ @misc{mouzouni2026context,
72
+ title = {Context Kubernetes: Declarative Orchestration of Enterprise Knowledge for Agentic AI Systems},
73
+ author = {Mouzouni, Charafeddine},
74
+ year = {2026},
75
+ eprint = {2604.11623},
76
+ archivePrefix = {arXiv},
77
+ primaryClass = {cs.DC},
78
+ note = {arXiv:2604.11623}
79
+ }
80
+
81
+ @misc{nikolic2020selfhealing,
82
+ title = {Self-healing Dilemmas in Distributed Systems: Fault Correction vs. Fault Tolerance},
83
+ author = {Nikolic, Jovan and Jubatyrov, Nursultan and Pournaras, Evangelos},
84
+ year = {2020},
85
+ eprint = {2007.05261},
86
+ archivePrefix = {arXiv},
87
+ primaryClass = {cs.DC},
88
+ note = {arXiv:2007.05261}
89
+ }
90
+
91
+ @misc{dobre2009robust,
92
+ title = {Robust Failure Detection Architecture for Large Scale Distributed Systems},
93
+ author = {Dobre, Ciprian Mihai and Pop, Florin and Costan, Alexandru and Andreica, Mugurel Ionut and Cristea, Valentin},
94
+ year = {2009},
95
+ eprint = {0910.0708},
96
+ archivePrefix = {arXiv},
97
+ primaryClass = {cs.DC},
98
+ note = {arXiv:0910.0708}
99
+ }
100
+
101
+ @misc{thaki2026skillrouter,
102
+ title = {Closing the Loop on Compositional Skill Routing: A Nightly Autonomous Repair Loop for Agent Harnesses},
103
+ author = {{ThakiCloud AI Research}},
104
+ year = {2026},
105
+ howpublished = {ThakiCloud AI Research technical report},
106
+ note = {\url{https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-10-autonomous-skill-router-repair-loop}}
107
+ }
108
+
109
+ @misc{thaki2026skillbirth,
110
+ title = {Skill Birth: Calibrating the Synthesis-versus-Reuse Decision Boundary in Self-Evolving Agent Skill Ecosystems},
111
+ author = {{ThakiCloud AI Research}},
112
+ year = {2026},
113
+ howpublished = {ThakiCloud AI Research technical report},
114
+ note = {\url{https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-31-skill-birth-synthesis-boundary}}
115
+ }
116
+
117
+ @misc{thaki2026verifygated,
118
+ title = {Verify-Gated Fan-Out: Measuring the Cost-Quality Pareto Frontier of Adversarial Verification in Tiered Multi-Agent Skill Workflows},
119
+ author = {{ThakiCloud AI Research}},
120
+ year = {2026},
121
+ howpublished = {ThakiCloud AI Research technical report},
122
+ note = {\url{https://huggingface.co/datasets/thaki-AI/daily-paper-2026-07-11-verify-gated-fanout-pareto}}
123
+ }