diff --git a/apps/presentation/site/public/blog/context-delivery/index.html b/apps/presentation/site/public/blog/context-delivery/index.html index cfc155b805..b97d221904 100644 --- a/apps/presentation/site/public/blog/context-delivery/index.html +++ b/apps/presentation/site/public/blog/context-delivery/index.html @@ -6,8 +6,8 @@ -
← All articles

Context delivery

An Agent needs a way to look things up, too

Read necessary facts first, reuse verified structures within a compaction cycle, and recover the complete baseline when continuity is lost.

-

Long-running work accumulates material: the original goal, later constraints, attempted routes, failed experiments and current progress. Sending everything again on each continuation repeats more and more content; keeping only a summary can make the original basis of a decision difficult to recover.

+
← All articles

Context delivery

An Agent needs a way to look things up, too

Read necessary facts first, reuse verified structures within a compaction cycle, and recover the complete baseline when continuity is lost.

+

Long-running work accumulates material: the original goal, later constraints, attempted routes, failed experiments and current progress. Sending everything again on each continuation repeats more and more content; keeping only a summary can make the original basis of a decision difficult to recover.

Selective JSON Pointer lookup by itself is straightforward—it folds long-tail history not needed for the immediate decision. The core mechanism in LoopX's context delivery is compaction-cycle-bounded structured delta context: complete sources are saved first, unchanged typed subtrees are reused exactly against a verified baseline within the active context_epoch, and any host compaction or digest mismatch atomically resets to a fresh complete baseline rather than chaining dangling deltas.

Evidence: separate context comparisons, cycle deltas and task ablation

Four mechanisms, with separate measurement baselines

@@ -111,6 +111,101 @@

Eight tasks: single-layer payloads (Progr

Basis and source: the published eight task rows sum to 7,285,951 B / 22,408,690 B = 32.5% for Progressive across all 213 wakes. Delta and first-screen shares of approximately 35.8% and 3.0% / 5.0% cover only the 112 in-cycle wakes. Their Full denominator was published rounded as 12.53 MB; it is not the 213-wake total. This is an aggregate recalculation, not a new experiment or an independent audit of per-wake logs. Public aggregate data and provenance.

Implementation status: #8266 remains an open C1 proposal. The final merged scope of #8304 preserves precision while reusing ordering and a verified digest. These cohort bytes do not establish a shipped unified Controller/Worker gain.

+

Ten-task controlled comparison: Context ON vs Context OFF under fixed Explore + Stride

+

Cutting packet bytes only matters if long-horizon task performance holds up or improves. From the EdgeBench 10-task evaluation (2026-11-12 22:40 CST snapshot), we isolate the controlled two-arm contrast holding the same Explore + Stride harness fixed: Explore + context-on (progressive reading + compaction-cycle structured delta enabled) vs Explore + context-off (both disabled), testing only what switching Context Delivery on vs off changes within that chassis.

+
    +
  • Ten-task tally (7 ahead or slight edge vs 3 OFF ahead): under fixed Explore + Stride, enabling Context Delivery puts Explore + context-on ahead of or slightly ahead of context-off on 7 of 10 tasks—including Borden (80 vs 45, +77.8%), ANN (7,159 vs 3,746 QPS, +91.1%), and Grid (2,197 vs 2,311 cost, −114)—while explicitly preserving all 3 counterexamples where context-off scores higher.
  • +
  • Strictly duration-matched ~18h pairs (4 tasks within the 15-minute tolerance): 3 wins to 1—Borden rises from 45 to 80 (+35 pts / +77.8%); Grid total cost (lower is better) improves from 2,311 to 2,197 (−114 / −4.9%, +2.35 normalized pts); Rust (both 17h57m) shows a slight native edge for context-on (27.1801 vs 27.1757); the matched 18h counterexample is Portfolio (both 18h00m, 13.62 vs 39.44, OFF wins).
  • +
  • Historical Stride slice & incomplete-duration pairs (6 tasks, runtimes stated explicitly): using the matching Stride pair from the historical seven-arm ANN cohort, context-on reaches 7,159 QPS vs context-off 3,746 QPS (+91.1%, +33.51 normalized pts); FFmpeg reaches 2.7086 vs 1.9929 (+35.9%, OFF stopped early pending rerun); VLIW cycles (lower is better) improve to 1,042 vs 1,097 (−55 cycles / −5.0%, OFF historical 14h45m); Ad reaches 49.67B vs 49.63B (ON 18h00m vs OFF 8h47m host-startup hang). The two remaining counterexamples are Codec (ON full 18h00m 68.89 vs OFF 70.79 in 12h38m despite a model-service block) and OpenTTD (both Explore arms <18h, ON 30,266,729 vs OFF 33,090,430).
  • +
+

Reconciling two figures with the ablation section below: (1) this section's ANN pair (3,746 vs 7,159 QPS) comes from the two Stride-enabled Explore arms in the seven-arm cohort (Explore + Stride + context-off / on); #ablation-evidence separately lists the without-Stride Explore baseline (Explore · Context off 5,766 and Explore · Context on 6,020) from that study, so the two tables describe distinct arm pairs. (2) Grid here (2,197 vs 2,311) reports the completed ~18h pair within 15-minute tolerance (with context-on via same-session continuation), whereas #ablation-evidence retains the earlier unmatched-duration “Historical Grid” counterexample (Off 2054 < On+Stride 2088) for historical continuity.

+

EdgeBench 10-task controlled score comparison (fixed Explore + Stride: Context ON vs OFF)

EdgeBench 10-task controlled Explore + Stride Context ON vs OFF scores: 7 tasks ahead or slight edge (ANN +91.1%, Borden +77.8%, Grid −114), retaining Portfolio, Codec, and OpenTTD counterexamples
A: Nine tasks with normalized EdgeBench scores (/100, direction-normalized so higher is better), ordered by ON − OFF delta, showing arm runtime status. B: Native-point summary including task #10 Borden (no /100 scale, matched ~18h: 80 vs 45), key native deltas, and counterexample disclosures.
+
Expand the 10-task controlled score and runtime table +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Task (metric & direction)Duration parityExplore + context-on
Native (/100 · duration · valid)
Explore + context-off
Native (/100 · duration · valid)
ON vs OFF delta
Borden (score ↑)Matched ~18h80 (— · 18h02m · 17 valid)45 (— · 17h59m · 17 valid)+35 (+77.8%)
Grid (total cost ↓)Matched ~18h2,197 (67.20 · 17h57m · 17 valid)2,311 (64.85 · 17h59m · 13 valid)−114 (−4.9%, +2.35 pts)
Rust (score ↑)Matched ~18h27.1801 (27.18 · 17h57m · 10 valid)27.1757 (27.18 · 17h57m · 10 valid)+0.0044 (tied / slight edge)
Portfolio (score / 100 ↑)Matched 18h counterex.13.62 (13.62 · 18h00m · 17 valid)39.44 (39.44 · 18h00m · 17 valid)−25.82 pts (OFF wins)
ANN (QPS ↑)7-arm Stride cohort7,159 (43.17 · 6 valid)3,746 (9.66 · 4 valid)+3,413 (+91.1%, +33.51 pts)
FFmpeg (score ↑)OFF early stop2.7086 (16.17 · 18h01m · 16 valid)1.9929 (11.19 · early stop · 6 valid)+0.7157 (+35.9%, +4.98 pts)
VLIW (cycles ↓)OFF 14h45m hist.1,042 (97.25 · 17h57m · 14 valid)1,097 (93.82 · 14h45m · 12 valid)−55 cycles (−5.0%, +3.43 pts)
Ad (total score ↑)OFF 8h47m hang49,673,040,827 (79.30 · 18h00m · 16 valid)49,631,904,944 (78.33 · 8h47m · 7 valid)+41.14M (+0.97 pts)
Codec (score ↑)OFF 12h38m counterex.68.89 (68.89 · 18h00m · 13 valid)70.79 (70.79 · 12h38m · 11 valid)−1.90 pts (OFF wins)
OpenTTD (score ↑)Both <18h counterex.30,266,729 (62.02 · 10h47m · 10 valid)33,090,430 (62.99 · early stop · 7 valid)−2.82M (−0.97 pts, OFF wins)
+
+

Measurement and scope boundary: these are C1 mixed-cohort exploratory observations (active solver duration accumulated after excluding downtime). This section holds Explore + Stride constant solely to examine the directional effect of toggling context delivery (Context ON vs Context OFF) within the harness; because resumed sessions and incomplete durations remain, it does not establish an isolated C2 causal proof. Whole-system iso-budget Pareto comparisons against zero-overhead external baselines belong to a separate question addressed in Layer 2 of EdgeBench feedback and memory. Structured records live in public aggregate data.

Multi-task and layered ablation: benefit chain and boundary counterexamples

In EdgeBench ANN vector search optimization (gpt-6.1-sol / xhigh, 18h, subject to Recall@10 ≥ 0.95) and cross-task ablations, we separate Context Delivery (progressive selection and cycle deltas) from Stride (evidence-conditioned experiment sizing), auditing selected control-packet bytes, main-session model input tokens, and local/early-window counterexamples side by side (reconciled from archived trajectories and receipts by @shangzh0):

Multi-task ablation and layered accounting

Progressive Context Delivery and Stride Ablation: ANN 18h Peak QPS Progression and Layered Token/Byte Savings vs Boundary Counterexamples
Top (A): ANN 18h six-arm peak valid throughput QPS (Recall@10 ≥ 0.95). Bottom (B): Layered control-packet byte and main-session input token savings vs Context off (left, negative) alongside disclosed local/early-window overhead and cross-task counterexamples (right, positive). Open image for full size.
diff --git a/apps/presentation/site/public/blog/data/long-horizon-audit.json b/apps/presentation/site/public/blog/data/long-horizon-audit.json index b13ac22357..1557febc5b 100644 --- a/apps/presentation/site/public/blog/data/long-horizon-audit.json +++ b/apps/presentation/site/public/blog/data/long-horizon-audit.json @@ -1,4 +1,5 @@ { + "updated_at": "2026-11-14", "source_revision": "9ff3b5a7628da7f7c6776bb4e1eeb011aa47eca0", "source_url": "https://github.com/loopx-project/loopx/blob/9ff3b5a7628da7f7c6776bb4e1eeb011aa47eca0/apps/presentation/site/public/blog/context-delivery/index.html", "basis": "Recalculation of the published per-task cells, not a new experiment or a per-wake raw-data audit.", @@ -155,5 +156,214 @@ }, "source_url": "https://github.com/loopx-project/loopx/blob/9ff3b5a7628da7f7c6776bb4e1eeb011aa47eca0/apps/presentation/site/public/blog/edgebench-feedback-and-memory/index.html", "uncertainty": "Published text and labels do not independently classify 1 grow, 1 verify and 5 switch outcomes. They remain unreconciled; no residual is assumed to be a regression or a flat result." + }, + "stride_context_on_off_comparison": { + "snapshot_cst": "2026-11-12 22:40 CST", + "benchmark": "EdgeBench", + "design": "Controlled two-arm comparison under fixed Explore + Stride: Explore + Stride + context-on (progressive reading and compaction-cycle structured delta enabled) vs Explore + Stride + context-off (both disabled).", + "summary": { + "total_tasks": 10, + "context_on_ahead_or_edge": 7, + "context_off_ahead": 3, + "duration_matched_18h_pairs": 4, + "duration_matched_context_on_wins": 3, + "duration_matched_context_off_wins": 1 + }, + "reconciliation_notes": [ + "ANN uses the Stride-enabled pair from the historical seven-arm cohort (Explore + Stride + context-on 7,159 QPS vs Explore + Stride + context-off 3,746 QPS); the ablation section separately records the without-Stride Explore pair (6,020 vs 5,766 QPS).", + "Grid reflects the completed ~18h Explore pair within 15m tolerance (context-on 2,197 at 17h57m vs context-off 2,311 at 17h59m); the ablation section retains an earlier unmatched-duration Historical Grid counterexample (Off 2054 < On+Stride 2088)." + ], + "tasks": [ + { + "task": "Borden", + "direction": "higher", + "metric_label_en": "Native score", + "metric_label_zh": "原生分", + "cohort_group": "matched_18h", + "context_on_duration": "18h02m", + "context_off_duration": "17h59m", + "context_on_native": 80, + "context_off_native": 45, + "context_on_norm": null, + "context_off_norm": null, + "context_on_valid": 17, + "context_off_valid": 17, + "winner_explore": "context-on", + "delta_label": "+35 (+77.8%)", + "note_en": "Matched ~18h (both within 15m tolerance).", + "note_zh": "等时长约 18h(均在 15m 容差内)。" + }, + { + "task": "Grid", + "direction": "lower", + "metric_label_en": "Total cost", + "metric_label_zh": "原生总分", + "cohort_group": "matched_18h", + "context_on_duration": "17h57m", + "context_off_duration": "17h59m", + "context_on_native": 2197, + "context_off_native": 2311, + "context_on_norm": 67.20, + "context_off_norm": 64.85, + "context_on_valid": 17, + "context_off_valid": 13, + "winner_explore": "context-on", + "delta_label": "-114 (-4.9%, +2.35 pts)", + "note_en": "Matched ~18h within 15m tolerance (same-session continuation on context-on).", + "note_zh": "等时长约 18h(容差内免补;context-on 沿同会话续跑)。" + }, + { + "task": "Rust", + "direction": "higher", + "metric_label_en": "Native score", + "metric_label_zh": "原生分", + "cohort_group": "matched_18h", + "context_on_duration": "17h57m", + "context_off_duration": "17h57m", + "context_on_native": 27.1801, + "context_off_native": 27.1757, + "context_on_norm": 27.18, + "context_off_norm": 27.18, + "context_on_valid": 10, + "context_off_valid": 10, + "winner_explore": "context-on-edge", + "delta_label": "+0.0044 (tied / slight edge)", + "note_en": "Matched 17h57m each; context-on holds slight native edge.", + "note_zh": "等时长均为 17h57m;context-on 原生分微弱占先。" + }, + { + "task": "Portfolio", + "direction": "higher", + "metric_label_en": "Score / 100", + "metric_label_zh": "原生分 / 100", + "cohort_group": "matched_18h", + "context_on_duration": "18h00m", + "context_off_duration": "18h00m", + "context_on_native": 13.62, + "context_off_native": 39.44, + "context_on_norm": 13.62, + "context_off_norm": 39.44, + "context_on_valid": 17, + "context_off_valid": 17, + "winner_explore": "context-off", + "delta_label": "-25.82 pts (OFF wins)", + "note_en": "Matched 18h00m counterexample with corrected evaluator; all evaluations drained.", + "note_zh": "修正评测器下的等时长 18h 反例;两 Explore 臂全部评分排空。" + }, + { + "task": "ANN", + "direction": "higher", + "metric_label_en": "QPS", + "metric_label_zh": "QPS", + "cohort_group": "historical_stride", + "context_on_duration": "unverified", + "context_off_duration": "unverified", + "context_on_native": 7159, + "context_off_native": 3746, + "context_on_norm": 43.17, + "context_off_norm": 9.66, + "context_on_valid": 6, + "context_off_valid": 4, + "winner_explore": "context-on", + "delta_label": "+3,413 QPS (+91.1%, +33.51 pts)", + "note_en": "Corresponding Explore + Stride pair from the historical seven-arm ANN cohort; active solver intervals unverified.", + "note_zh": "历史七臂中同开 Stride 的对应两臂配置;原生执行区间尚待核实。" + }, + { + "task": "FFmpeg", + "direction": "higher", + "metric_label_en": "Native score", + "metric_label_zh": "原生分", + "cohort_group": "incomplete_off", + "context_on_duration": "18h01m", + "context_off_duration": "stopped early", + "context_on_native": 2.7086, + "context_off_native": 1.9929, + "context_on_norm": 16.17, + "context_off_norm": 11.19, + "context_on_valid": 16, + "context_off_valid": 6, + "winner_explore": "context-on", + "delta_label": "+0.7157 (+35.9%, +4.98 pts)", + "note_en": "context-on completed 18h01m; context-off stopped early and is pending an independent 18h rerun.", + "note_zh": "context-on 已满 18h01m;context-off 旧轮早停,待独立 18h 重跑。" + }, + { + "task": "VLIW", + "direction": "lower", + "metric_label_en": "Cycles", + "metric_label_zh": "周期数", + "cohort_group": "incomplete_off", + "context_on_duration": "17h57m", + "context_off_duration": "14h45m", + "context_on_native": 1042, + "context_off_native": 1097, + "context_on_norm": 97.25, + "context_off_norm": 93.82, + "context_on_valid": 14, + "context_off_valid": 12, + "winner_explore": "context-on", + "delta_label": "-55 cycles (-5.0%, +3.43 pts)", + "note_en": "context-on reached 17h57m via same-session continuation; context-off uses historical 14h45m run.", + "note_zh": "context-on 沿同会话续跑至 17h57m;context-off 沿用 14h45m 历史未补时轮。" + }, + { + "task": "Ad", + "direction": "higher", + "metric_label_en": "Total score", + "metric_label_zh": "原生总分", + "cohort_group": "incomplete_off", + "context_on_duration": "18h00m", + "context_off_duration": "8h47m", + "context_on_native": 49673040827, + "context_off_native": 49631904944, + "context_on_norm": 79.30, + "context_off_norm": 78.33, + "context_on_valid": 16, + "context_off_valid": 7, + "winner_explore": "context-on", + "delta_label": "+41,135,883 (+0.97 pts)", + "note_en": "context-on reached 18h00m via same-session resume; context-off logged 8h47m (host-startup hang).", + "note_zh": "context-on 同会话续跑满 18h00m;context-off 因宿主启动空挂仅累计 8h47m。" + }, + { + "task": "Codec", + "direction": "higher", + "metric_label_en": "Native score", + "metric_label_zh": "原生分", + "cohort_group": "incomplete_off", + "context_on_duration": "18h00m", + "context_off_duration": "12h38m", + "context_on_native": 68.89, + "context_off_native": 70.79, + "context_on_norm": 68.89, + "context_off_norm": 70.79, + "context_on_valid": 13, + "context_off_valid": 11, + "winner_explore": "context-off", + "delta_label": "-1.90 pts (OFF leads)", + "note_en": "Counterexample: context-off achieved higher score in 12h38m despite model-service block.", + "note_zh": "反例:context-off 在模型服务拦截下仅跑 12h38m 仍高于跑满 18h00m 的 context-on。" + }, + { + "task": "OpenTTD", + "direction": "higher", + "metric_label_en": "Native score", + "metric_label_zh": "原生分", + "cohort_group": "both_incomplete", + "context_on_duration": "10h47m", + "context_off_duration": "stopped early", + "context_on_native": 30266729, + "context_off_native": 33090430, + "context_on_norm": 62.02, + "context_off_norm": 62.99, + "context_on_valid": 10, + "context_off_valid": 7, + "winner_explore": "context-off", + "delta_label": "-2,823,701 (-0.97 pts, OFF leads)", + "note_en": "Both Explore arms incomplete (<18h); context-on paused at 10h47m due to evaluator state lock mismatch.", + "note_zh": "两 Explore 臂均未满 18h;context-on 于 10h47m 因评测状态锁不匹配暂未续跑。" + } + ] } } diff --git a/apps/presentation/site/public/blog/images/context-delivery/stride-context-on-vs-off-en.svg b/apps/presentation/site/public/blog/images/context-delivery/stride-context-on-vs-off-en.svg new file mode 100644 index 0000000000..1fba6fdf83 --- /dev/null +++ b/apps/presentation/site/public/blog/images/context-delivery/stride-context-on-vs-off-en.svg @@ -0,0 +1,434 @@ + + + + + + + + image/svg+xml + + + Matplotlib v3.11.2, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 25 + + + + + + + + + 50 + + + + + + + + + 75 + + + + + + + + + 100 + + + + EdgeBench normalized score (/100, higher is better) + + + + + + + ANN (QPS↑ · 7-arm Stride) + + + + + + FFmpeg (score↑ · OFF early stop) + + + + + + VLIW (cycles↓ · OFF 14h45m) + + + + + + Grid (cost↓ · ~18h matched) + + + + + + Ad (score↑ · OFF 8h47m) + + + + + + Rust (score↑ · ~18h matched) + + + + + + OpenTTD (score↑ · both <18h) + + + + + + Codec (score↑ · OFF 12h38m) + + + + + + Portfolio (score↑ · 18h matched) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +33.51 (43.17 vs 9.66) + + + +4.98 (16.17 vs 11.19) + + + +3.43 (97.25 vs 93.82) + + + +2.35 (67.20 vs 64.85) + + + +0.97 (79.30 vs 78.33) + + + 27.18 vs 27.18 (+0.0044) + + + -0.97 (62.02 vs 62.99) + + + -1.90 (68.89 vs 70.79) + + + -25.82 (13.62 vs 39.44) + + + A. Fixed Stride: context-on vs context-off (/100) + + + + + + + + Task #10 (no /100 scale): Borden (~18h matched) + • context-on (18h02m): 80 (17 valid) + • context-off (17h59m): 45 (17 valid) + → +35 pts (+77.8%, duration-matched gain). + + + + + + Key native deltas under fixed Explore + Stride + • ANN (QPS ↑): 7,159 vs 3,746 (+91.1%, +33.51 pts) + • FFmpeg (score ↑): 2.7086 vs 1.9929 (+35.9%, OFF early stop) + • VLIW (cycles ↓): 1,042 vs 1,097 (−55 cycles / −5.0%) + • Grid (cost ↓): 2,197 vs 2,311 (−114 / −4.9%, ~18h) + + + + + + 10-task summary: 7 ON ahead/edge vs 3 OFF ahead + • Matched ~18h (4): 3 ON wins (Borden/Grid/Rust), + 1 counterexample (Portfolio 13.62 vs 39.44) + • Historical / <18h (6): 4 ON ahead, 2 OFF ahead + (Codec 68.89 vs 70.79; OpenTTD 30.27M vs 33.09M) + + + B. Native score deltas (Borden) & counterexamples + + + + EdgeBench 10-task controlled comparison: Context ON vs OFF under Explore + Stride + + + Holding Explore + Stride constant (context-on adds progressive reads + cycle deltas). Ahead on 7/10 tasks, retaining 3 counterexamples and runtime gaps. + + + Basis: EdgeBench controlled two-arm snapshot at 2026-11-12 22:40 CST. Borden has no /100 scale and appears in native points in Panel B (80 vs 45). + Grid, Borden, Rust, and Portfolio are ~18h duration-matched (within 15m); ANN uses the matching Stride pair from the 7-arm study; remaining 5 pairs have <18h runs. Checks within-harness direction only. + + + + + + + Explore + Stride + context-on + + + + + + Explore + Stride + context-off + + + + + + + + + diff --git a/apps/presentation/site/public/blog/images/context-delivery/stride-context-on-vs-off-zh.svg b/apps/presentation/site/public/blog/images/context-delivery/stride-context-on-vs-off-zh.svg new file mode 100644 index 0000000000..fcea8cf5f0 --- /dev/null +++ b/apps/presentation/site/public/blog/images/context-delivery/stride-context-on-vs-off-zh.svg @@ -0,0 +1,434 @@ + + + + + + + + image/svg+xml + + + Matplotlib v3.11.2, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + 25 + + + + + + + + + 50 + + + + + + + + + 75 + + + + + + + + + 100 + + + + EdgeBench 百分制归一分 (/100,越高越优;含 ↓ 指标已方向归一化) + + + + + + + ANN (QPS↑ · 历史7臂Stride) + + + + + + FFmpeg (原生↑ · OFF早停) + + + + + + VLIW (周期↓ · OFF 14h45m) + + + + + + Grid (总分↓ · 等时长 ~18h) + + + + + + Ad (总分↑ · OFF 8h47m) + + + + + + Rust (原生↑ · 等时长 ~18h) + + + + + + OpenTTD (原生↑ · 均<18h) + + + + + + Codec (原生↑ · OFF 12h38m) + + + + + + Portfolio (分↑ · 等时长 18h) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +33.51 (43.17 vs 9.66) + + + +4.98 (16.17 vs 11.19) + + + +3.43 (97.25 vs 93.82) + + + +2.35 (67.20 vs 64.85) + + + +0.97 (79.30 vs 78.33) + + + 27.18 vs 27.18 (+0.0044) + + + -0.97 (62.02 vs 62.99) + + + -1.90 (68.89 vs 70.79) + + + -25.82 (13.62 vs 39.44) + + + A. 固定 Stride 下 context-on vs context-off 百分制对照 + + + + + + + + 第 10 题(无 /100 标度):Borden 等时长 ~18h + • context-on(18h02m):80(17 次有效) + • context-off(17h59m):45(17 次有效) + → +35 分(+77.8%,同构等时长显著拉升)。 + + + + + + 关键原生分数增幅(固定 Explore + Stride) + • ANN (QPS ↑):7,159 vs 3,746(+91.1%, +33.51 百分分) + • FFmpeg (原生 ↑):2.7086 vs 1.9929(+35.9%, OFF 早停) + • VLIW (周期 ↓):1,042 vs 1,097(−55 周期 / −5.0%) + • Grid (代价 ↓):2,197 vs 2,311(−114 / −4.9%, ~18h) + + + + + + 10 题总盘:ON 7 项占先 vs OFF 3 项领先 + • 等时长 ~18h(4 题):3 胜(Borden/Grid/Rust 微先), + 1 反例(Portfolio 13.62 vs 39.44) + • 非等时长或历史对照(6 题):ON 领先 4 题, + OFF 领先 2 题(Codec 70.79 / OpenTTD 33.09M) + + + B. 原生关键差值(含 Borden)与反例边界 + + + + EdgeBench 十题同构效果对照:固定 Explore + Stride 下的 Context ON vs OFF + + + 固定 Explore + Stride 框架(context-on 开启 Progressive 与周期内差分)。10 题中 context-on 7 题占先,完整保留 3 项反例与真实时长差。 + + + 口径说明:截取自 EdgeBench 同构两臂实测(2026-11-12 22:40 CST 快照)。Borden 无百分制换算故在右栏 B 单列原生分(80 vs 45)。 + Grid、Borden、Rust、Portfolio 四题双臂均已跑满约 18h(15m 容差内);ANN 取自历史七臂对应 Stride 配置;其余 5 题存在至少一臂未满 18h。本图仅检验开关的组内方向性效果。 + + + + + + + Explore + Stride + context-on(开启上下文交付) + + + + + + Explore + Stride + context-off(关闭上下文交付) + + + + + + + + + diff --git a/apps/presentation/site/public/blog/index.html b/apps/presentation/site/public/blog/index.html index 48f54b102c..7fffa21f9f 100644 --- a/apps/presentation/site/public/blog/index.html +++ b/apps/presentation/site/public/blog/index.html @@ -35,8 +35,8 @@

LoopX · Blog

Engineering the long run.

Design, engineering, and field notes on long-horizon agents.

-

Context delivery · Mechanisms and examples

· Updated November 12

-

An Agent needs a way to look things up, too

Read progressive views and compaction-cycle deltas with their own measurement baselines: 32.5% across 213 wakes, −74.25% on ANN in-cycle wakes, and ≈ 3.0% / 5.0% eight-task first-read entry. Compaction resets the complete baseline; these cohorts are separate comparisons.

Read article
+

Context delivery · Mechanisms and examples

· Updated November 14

+

An Agent needs a way to look things up, too

Compare 10-task controlled Explore + Stride scores under Context ON vs OFF (7/10 ahead or edged out—Borden 80 vs 45, ANN 7,159 vs 3,746—with Portfolio/Codec/OpenTTD counterexamples retained), alongside separate 32.5% Progressive, −74.25% ANN in-cycle delta, and ≈ 3.0% / 5.0% first-read baselines.

Read article

Research notes · EdgeBench and LHTB

diff --git a/apps/presentation/site/public/blog/zh/context-delivery/index.html b/apps/presentation/site/public/blog/zh/context-delivery/index.html index 5c7d831090..33f1f5e126 100644 --- a/apps/presentation/site/public/blog/zh/context-delivery/index.html +++ b/apps/presentation/site/public/blog/zh/context-delivery/index.html @@ -6,8 +6,8 @@ -
← 全部文章

Context delivery

Agent 读上下文,也需要一套“查书”的方法

先读必要事实,在有效 compaction 周期内复用已验证的结构;连续性丢失时恢复完整基线。

-

Agent 做长任务,资料会越来越多:原目标、后来追加的约束、试过的方案、失败的实验、当前做到哪里。每次继续都把整份材料再塞一遍,重复会不断累积;只留一段摘要,又可能找不回决定所依赖的原话。

+
← 全部文章

Context delivery

Agent 读上下文,也需要一套“查书”的方法

先读必要事实,在有效 compaction 周期内复用已验证的结构;连续性丢失时恢复完整基线。

+

Agent 做长任务,资料会越来越多:原目标、后来追加的约束、试过的方案、失败的实验、当前做到哪里。每次继续都把整份材料再塞一遍,重复会不断累积;只留一段摘要,又可能找不回决定所依赖的原话。

按 JSON Pointer 渐进选读本身并不复杂,主要用来折叠当前决定暂不需要的历史长尾;LoopX 上下文交付真正的机制重心,是受 compaction 周期约束的结构化差分上下文(compaction-cycle structured delta):完整来源先落盘存证,在同一个已核验的 context_epoch 内精确复用未变化的结构子树、只编码本轮结构增删改;一旦宿主发生上下文压缩或基线摘要失配,立即原子切换回新的完整基线,绝不悬空叠加旧差分。

先看数据:独立上下文对照、周期内结构化差分与任务消融

四种机制,分别核对测量基线

@@ -111,6 +111,101 @@

八题对照:区分单层载荷(Progr

口径与来源:上表逐题数据复算自已公开的八题表,Progressive 合计为 7,285,951 B / 22,408,690 B = 32.5%,覆盖全部 213 次唤醒。Delta 与首屏的 35.8%、3.0% / 5.0% 仅对应 112 次周期内唤醒;其 Full 分母原文仅报告约 12.53 MB,不能与 213 次总量混用。这里没有新增实验,也未独立核对逐 wake 原始记录。公开聚合数据与来源。

实现状态:#8266 仍是开放的 C1 提案;#8304 的最终合入范围是保留精度的排序与摘要复用。上述字节数据不归因为统一 Controller/Worker 已上线的收益。

+

十题同构两臂效果对比:固定 Explore + Stride 下的 Context ON 与 Context OFF

+

在压降上下文传输载荷的同时,我们进一步检验这套交付机制在长程求解中的实际得分表现:从 EdgeBench 十题实测(2026-11-12 22:40 CST 快照)中取出固定同一 Explore + Stride 框架的两臂对照:Explore + context-on(开启 Progressive 按需读取与周期内结构化 Delta)对比 Explore + context-off(两项均关闭),专门检验 Context Delivery 单一开关在同构底盘下的组内表现。

+
    +
  • 十题整体盘面(7 题领先或微弱占先 vs 3 题 OFF 领先):固定 Explore + Stride 开启 Context Delivery 后,10 题中有 7 题取得更高或微弱占先的成绩(包括 Borden 80 vs 45 [+77.8%]、ANN 7,159 vs 3,746 QPS [+91.1%]、Grid 2,197 vs 2,311 [−114 代价]);同时完整保留 3 项 Context OFF 领先的反例,不做选择性截取。
  • +
  • 严格等时长约 18h 配对(4 题,15 分钟容差内):3 胜 1 负——Borden 从 45 升至 80(+35 分 / +77.8%);Grid 代价(越低越好)从 2,311 降至 2,197(−114 / −4.9%,+2.35 百分分);Rust(均 17h57m)维持在 27.1801 vs 27.1757 的微弱占先;等时长反例则是 Portfolio(均为 18h00m,13.62 vs 39.44,OFF 领先)。
  • +
  • 历史同构与非等时长对照(6 题,逐题标明实际运行时间):ANN 取历史七臂中同开 Stride 的两臂配置,context-on 达 7,159 QPS 对 context-off 3,746 QPS(+91.1%,+33.51 百分分);FFmpeg 2.7086 vs 1.9929(+35.9%,OFF 早停待重跑);VLIW 周期数(越低越好)1,042 vs 1,097(−55 周期 / −5.0%,OFF 沿用 14h45m 历史轮);Ad 49.67B vs 49.63B(ON 满 18h00m,OFF 因宿主启动空挂仅累计 8h47m)。另外两项反例为 Codec(ON 满 18h00m 得 68.89,不敌模型服务拦截下仅跑 12h38m 的 OFF 70.79)与 OpenTTD(两臂均未满 18h,ON 30,266,729 vs OFF 33,090,430)。
  • +
+

与下方消融表两处口径衔接说明:(1)本节 ANN 对照 3,746 vs 7,159 QPS 来自历史七臂里同开 Stride 的两臂(Explore + Stride + context-off / on);下文 #ablation-evidence 另行列出该研究中未开 Stride 的 Explore 基线(Explore · Context off 5,766 与 Explore · Context on 6,020),二者对照条件不同,互不冲突。(2)本节 Grid(2,197 vs 2,311)反映 15 分钟容差内均跑满 ~18h 的最新完成对比(其中 context-on 沿同一会话续跑);下文仍保留更早一轮未匹配时长与资源的「Historical Grid」反例(Off 2054 < On+Stride 2088)作历史记录。

+

EdgeBench 十题同构两臂效果对照(固定 Explore + Stride:Context ON vs OFF)

EdgeBench 十题同构 Explore + Stride 下 Context ON vs OFF 分数对照:7 题领先或占先(ANN +91.1%、Borden +77.8%、Grid −114),完整保留 Portfolio、Codec、OpenTTD 三项反例
A:9 道有 EdgeBench 百分制归一分的题目按 ON − OFF 分差排序(已方向归一化为越高越优),标出各自时长状态。B:无百分制标度的第 10 题 Borden(等时长 ~18h,80 vs 45)、关键原生分增幅,以及 3 项负向反例口径。
+
展开十题同构两臂逐题分数与运行时长明细 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
题目(指标与方向)时长配对状态Explore + context-on
原生(/100 · 时长 · 有效次)
Explore + context-off
原生(/100 · 时长 · 有效次)
ON vs OFF 差值
Borden(原生分 ↑)等时长 ~18h80(— · 18h02m · 17 次)45(— · 17h59m · 17 次)+35(+77.8%)
Grid(原生总分 ↓)等时长 ~18h2,197(67.20 · 17h57m · 17 次)2,311(64.85 · 17h59m · 13 次)−114(−4.9%, +2.35 分)
Rust(原生分 ↑)等时长 ~18h27.1801(27.18 · 17h57m · 10 次)27.1757(27.18 · 17h57m · 10 次)+0.0044(微先 / 持平)
Portfolio(原生分 / 100 ↑)等时长 18h 反例13.62(13.62 · 18h00m · 17 次)39.44(39.44 · 18h00m · 17 次)−25.82 分(OFF 胜)
ANN(QPS ↑)历史七臂 Stride7,159(43.17 · 6 次)3,746(9.66 · 4 次)+3,413(+91.1%, +33.51 分)
FFmpeg(原生分 ↑)OFF 早停待重跑2.7086(16.17 · 18h01m · 16 次)1.9929(11.19 · 早停 · 6 次)+0.7157(+35.9%, +4.98 分)
VLIW(周期数 ↓)OFF 14h45m 历史1,042(97.25 · 17h57m · 14 次)1,097(93.82 · 14h45m · 12 次)−55 周期(−5.0%, +3.43 分)
Ad(原生总分 ↑)OFF 8h47m 空挂49,673,040,827(79.30 · 18h00m · 16 次)49,631,904,944(78.33 · 8h47m · 7 次)+41.14M(+0.97 分)
Codec(原生分 ↑)OFF 12h38m 反例68.89(68.89 · 18h00m · 13 次)70.79(70.79 · 12h38m · 11 次)−1.90 分(OFF 胜)
OpenTTD(原生分 ↑)两臂均未满 反例30,266,729(62.02 · 10h47m · 10 次)33,090,430(62.99 · 早停 · 7 次)−2.82M(−0.97 分, OFF 胜)
+
+

实验口径与边界说明:以上属于 C1 多轮探索观测(有效运行时间按求解进程扣除停机后累计)。本节固定 Explore + Stride 框架,仅隔离检验开启上下文交付(Context ON vs Context OFF)在组内的方向性表现;因存在续跑会话与部分未补满时长差异,不单独构成剥离全部交互项后的纯 C2 因果证明。控制面整体相对零协议税外部基线的等预算帕累托对比属另一层独立议题,详见 《EdgeBench 反馈与记忆》中的第二层目标讨论。原始聚合结构化数据见 公开聚合数据。

真实模型与多题消融实证:收益链路与边界反例

在 EdgeBench ANN 向量检索优化(gpt-6.1-sol / xhigh,18h,约束 Recall@10 ≥ 0.95)与跨题消融中,我们将 Context Delivery(渐进读取与周期差分)与 Stride(基于证据差分的步长控制)拆开对照,同时统计控制包选中字节、主会话模型输入 Token 与局部/早窗反例(基于 @shangzh0 归档轨迹与控制面回执复算):

多题消融与分层计量审计

Context 渐进式交付与 Stride 步幅控制消融:ANN 18h 峰值吞吐 QPS 对比与分层 Token/字节节省及边界反例
上图(A):ANN 18h 六臂峰值有效吞吐 QPS(Recall@10 ≥ 0.95)。下图(B):相对 Context off 的分层字节与主会话输入 Token 节省(左,负值)及诚实披露的局部/早窗开销与跨题反例(右,正值)。点击查看原图。
diff --git a/apps/presentation/site/public/blog/zh/index.html b/apps/presentation/site/public/blog/zh/index.html index b2d02fc689..f2b74e838c 100644 --- a/apps/presentation/site/public/blog/zh/index.html +++ b/apps/presentation/site/public/blog/zh/index.html @@ -35,8 +35,8 @@

LoopX · 博客

长程工作的工程实践。

关于长程 Agent 的设计、工程与实践。

-

Context delivery · 机制与实例

· 11 月 12 日更新

-

Agent 读上下文,也需要一套“查书”的方法

分别核对渐进视图与周期内差分的测量基线:213 次唤醒保留 32.5%,ANN 周期内增量轮再减 74.25%,八题首读入口约 3.0% / 5.0%。这些队列独立比较,压缩或失配即恢复完整基线。

阅读全文
+

Context delivery · 机制与实例

· 11 月 14 日更新

+

Agent 读上下文,也需要一套“查书”的方法

拆解十题同构两臂(固定 Explore + Stride)下的 Context ON vs OFF 跑分对比(7/10 题占先、Borden 80 vs 45、ANN 7,159 vs 3,746,并保留 Portfolio/Codec/OpenTTD 反例),同时核对渐进视图 32.5%、ANN 周期内增量轮 −74.25% 与首读 3.0% / 5.0% 的载荷基线。

阅读全文

研究札记 · EdgeBench 与 LHTB

diff --git a/apps/presentation/site/scripts/generate-long-horizon-audit.py b/apps/presentation/site/scripts/generate-long-horizon-audit.py index 4acda82a8c..48d837c18a 100644 --- a/apps/presentation/site/scripts/generate-long-horizon-audit.py +++ b/apps/presentation/site/scripts/generate-long-horizon-audit.py @@ -323,3 +323,166 @@ def save(fig, relative): "v2: 372 records, 249 reported transitions; 7 outcomes unreconciled from published counts. Latest: 25 reviews, 17 scored transitions.\nRow counts: improved / flat / reported regression / unreconciled. Published aggregates do not establish causal benefit.") fig.text(.03,.025,footer,fontsize=10,color="#475569",linespacing=1.6) save(fig, f"images/edgebench-feedback-and-memory/stride-yardstick-closed-loop-{language}.svg") + + # 4. EdgeBench Controlled Two-Arm Explore + Stride: context-on vs context-off score comparison (10 tasks) + two_arm = DATA["stride_context_on_off_comparison"] + arm_tasks = {row["task"]: row for row in two_arm["tasks"]} + ordered_norm_names = ["ANN", "FFmpeg", "VLIW", "Grid", "Ad", "Rust", "OpenTTD", "Codec", "Portfolio"] + norm_rows = [arm_tasks[name] for name in ordered_norm_names] + + fig = plt.figure(figsize=(14.6, 7.8)) + gs = fig.add_gridspec( + 1, 2, width_ratios=[1.25, 1.05], + left=.18, right=.98, bottom=.175, top=.805, wspace=.11, + ) + left = fig.add_subplot(gs[0, 0]) + right = fig.add_subplot(gs[0, 1]) + + y_pos = list(range(len(norm_rows))) + on_vals = [r["context_on_norm"] for r in norm_rows] + off_vals = [r["context_off_norm"] for r in norm_rows] + off_bar_color = "#94a3b8" + + left.barh([y - .18 for y in y_pos], on_vals, height=.32, + color=TEAL, label=("Explore + Stride + context-on" if not zh else "Explore + Stride + context-on(开启上下文交付)")) + left.barh([y + .18 for y in y_pos], off_vals, height=.32, + color=off_bar_color, label=("Explore + Stride + context-off" if not zh else "Explore + Stride + context-off(关闭上下文交付)")) + + tag_map_zh = { + "ANN": "ANN (QPS↑ · 历史7臂Stride)", + "FFmpeg": "FFmpeg (原生↑ · OFF早停)", + "VLIW": "VLIW (周期↓ · OFF 14h45m)", + "Grid": "Grid (总分↓ · 等时长 ~18h)", + "Ad": "Ad (总分↑ · OFF 8h47m)", + "Rust": "Rust (原生↑ · 等时长 ~18h)", + "OpenTTD": "OpenTTD (原生↑ · 均<18h)", + "Codec": "Codec (原生↑ · OFF 12h38m)", + "Portfolio": "Portfolio (分↑ · 等时长 18h)", + } + tag_map_en = { + "ANN": "ANN (QPS↑ · 7-arm Stride)", + "FFmpeg": "FFmpeg (score↑ · OFF early stop)", + "VLIW": "VLIW (cycles↓ · OFF 14h45m)", + "Grid": "Grid (cost↓ · ~18h matched)", + "Ad": "Ad (score↑ · OFF 8h47m)", + "Rust": "Rust (score↑ · ~18h matched)", + "OpenTTD": "OpenTTD (score↑ · both <18h)", + "Codec": "Codec (score↑ · OFF 12h38m)", + "Portfolio": "Portfolio (score↑ · 18h matched)", + } + left.set_yticks(y_pos, [(tag_map_zh if zh else tag_map_en)[r["task"]] for r in norm_rows], fontsize=9.7) + left.invert_yaxis() + left.set_xlim(0, 134) + left.set_xticks([0, 25, 50, 75, 100]) + left.set_xlabel("EdgeBench 百分制归一分 (/100,越高越优;含 ↓ 指标已方向归一化)" if zh else "EdgeBench normalized score (/100, higher is better)", fontsize=9.5) + left.set_title( + "A. 固定 Stride 下 context-on vs context-off 百分制对照" if zh else "A. Fixed Stride: context-on vs context-off (/100)", + loc="left", pad=14, fontsize=11.0, fontweight="bold", + ) + left.set_axisbelow(True) + left.grid(axis="x", color="#e2e8f0", linewidth=.7) + left.tick_params(axis="both", length=0) + + for idx, r in enumerate(norm_rows): + diff = r["context_on_norm"] - r["context_off_norm"] + anchor = max(r["context_on_norm"], r["context_off_norm"]) + if r["task"] == "Rust": + txt = f"{r['context_on_norm']:.2f} vs {r['context_off_norm']:.2f} (+0.0044)" + col = TEAL + fw = "bold" + elif diff > 0: + txt = f"+{diff:.2f} ({r['context_on_norm']:.2f} vs {r['context_off_norm']:.2f})" + col = TEAL + fw = "bold" + else: + txt = f"{diff:.2f} ({r['context_on_norm']:.2f} vs {r['context_off_norm']:.2f})" + col = "#b45309" + fw = "bold" + left.text(anchor + 2.2, idx, txt, va="center", fontsize=8.8, fontweight=fw, color=col) + + right.axis("off") + right.set_title( + "B. 原生关键差值(含 Borden)与反例边界" if zh else "B. Native score deltas (Borden) & counterexamples", + loc="left", pad=14, fontsize=11.0, fontweight="bold", + ) + borden = arm_tasks["Borden"] + cards_two_arm = ( + [ + ( + "第 10 题(无 /100 标度):Borden 等时长 ~18h\n" + f"• context-on(18h02m):{borden['context_on_native']}(17 次有效)\n" + f"• context-off(17h59m):{borden['context_off_native']}(17 次有效)\n" + "→ +35 分(+77.8%,同构等时长显著拉升)。", + "#f0fdfa", "#99f6e4", + ), + ( + "关键原生分数增幅(固定 Explore + Stride)\n" + "• ANN (QPS ↑):7,159 vs 3,746(+91.1%, +33.51 百分分)\n" + "• FFmpeg (原生 ↑):2.7086 vs 1.9929(+35.9%, OFF 早停)\n" + "• VLIW (周期 ↓):1,042 vs 1,097(−55 周期 / −5.0%)\n" + "• Grid (代价 ↓):2,197 vs 2,311(−114 / −4.9%, ~18h)", + "#f8fafc", "#cbd5e1", + ), + ( + "10 题总盘:ON 7 项占先 vs OFF 3 项领先\n" + "• 等时长 ~18h(4 题):3 胜(Borden/Grid/Rust 微先),\n" + " 1 反例(Portfolio 13.62 vs 39.44)\n" + "• 非等时长或历史对照(6 题):ON 领先 4 题,\n" + " OFF 领先 2 题(Codec 70.79 / OpenTTD 33.09M)", + "#fffbeb", "#fcd34d", + ), + ] + if zh else + [ + ( + "Task #10 (no /100 scale): Borden (~18h matched)\n" + f"• context-on (18h02m): {borden['context_on_native']} (17 valid)\n" + f"• context-off (17h59m): {borden['context_off_native']} (17 valid)\n" + "→ +35 pts (+77.8%, duration-matched gain).", + "#f0fdfa", "#99f6e4", + ), + ( + "Key native deltas under fixed Explore + Stride\n" + "• ANN (QPS ↑): 7,159 vs 3,746 (+91.1%, +33.51 pts)\n" + "• FFmpeg (score ↑): 2.7086 vs 1.9929 (+35.9%, OFF early stop)\n" + "• VLIW (cycles ↓): 1,042 vs 1,097 (−55 cycles / −5.0%)\n" + "• Grid (cost ↓): 2,197 vs 2,311 (−114 / −4.9%, ~18h)", + "#f8fafc", "#cbd5e1", + ), + ( + "10-task summary: 7 ON ahead/edge vs 3 OFF ahead\n" + "• Matched ~18h (4): 3 ON wins (Borden/Grid/Rust),\n" + " 1 counterexample (Portfolio 13.62 vs 39.44)\n" + "• Historical / <18h (6): 4 ON ahead, 2 OFF ahead\n" + " (Codec 68.89 vs 70.79; OpenTTD 30.27M vs 33.09M)", + "#fffbeb", "#fcd34d", + ), + ] + ) + y_starts = [.98, .63, .28] + for y_box, (txt, face, edge) in zip(y_starts, cards_two_arm): + right.text(.01, y_box, txt, transform=right.transAxes, va="top", fontsize=9.1, + linespacing=1.50, bbox={"boxstyle": "round,pad=.60", "facecolor": face, "edgecolor": edge}) + + fig.suptitle( + "EdgeBench 十题同构效果对照:固定 Explore + Stride 下的 Context ON vs OFF" + if zh else + "EdgeBench 10-task controlled comparison: Context ON vs OFF under Explore + Stride", + fontsize=14.6, fontweight="bold", y=.955, + ) + sub_two_arm = ( + "固定 Explore + Stride 框架(context-on 开启 Progressive 与周期内差分)。10 题中 context-on 7 题占先,完整保留 3 项反例与真实时长差。" + if zh else + "Holding Explore + Stride constant (context-on adds progressive reads + cycle deltas). Ahead on 7/10 tasks, retaining 3 counterexamples and runtime gaps." + ) + fig.text(.5, .88, sub_two_arm, ha="center", fontsize=9.9, color="#475569") + fig.legend(*left.get_legend_handles_labels(), loc="lower center", ncol=2, frameon=False, bbox_to_anchor=(.45, .078), fontsize=9.6) + footer_two_arm = ( + "口径说明:截取自 EdgeBench 同构两臂实测(2026-11-12 22:40 CST 快照)。Borden 无百分制换算故在右栏 B 单列原生分(80 vs 45)。\n" + "Grid、Borden、Rust、Portfolio 四题双臂均已跑满约 18h(15m 容差内);ANN 取自历史七臂对应 Stride 配置;其余 5 题存在至少一臂未满 18h。本图仅检验开关的组内方向性效果。" + if zh else + "Basis: EdgeBench controlled two-arm snapshot at 2026-11-12 22:40 CST. Borden has no /100 scale and appears in native points in Panel B (80 vs 45).\n" + "Grid, Borden, Rust, and Portfolio are ~18h duration-matched (within 15m); ANN uses the matching Stride pair from the 7-arm study; remaining 5 pairs have <18h runs. Checks within-harness direction only." + ) + fig.text(.03, .018, footer_two_arm, fontsize=8.9, color="#475569", linespacing=1.45) + save(fig, f"images/context-delivery/stride-context-on-vs-off-{language}.svg") diff --git a/examples/blog-bilingual-index-smoke.mjs b/examples/blog-bilingual-index-smoke.mjs index d99c731653..1c2235fdb6 100644 --- a/examples/blog-bilingual-index-smoke.mjs +++ b/examples/blog-bilingual-index-smoke.mjs @@ -132,6 +132,52 @@ export async function validateBilingualBlog(blogDir) { "utf8", ); assertIncludes(multitaskSvg, "100.0%", `Eight-task byte audit chart must anchor at 100% Full: ${langSuffix}`); + const twoArm = audit.stride_context_on_off_comparison; + deepStrictEqual( + [ + twoArm?.summary?.total_tasks, + twoArm?.summary?.context_on_ahead_or_edge, + twoArm?.summary?.context_off_ahead, + twoArm?.tasks?.length, + ], + [10, 7, 3, 10], + "Controlled two-arm comparison summary must match the 10-task tally (7 ahead/edge, 3 OFF ahead)", + ); + assertIncludes( + article, + '

', + `Both published editions must expose the controlled Context ON vs OFF score section: ${locale}`, + ); + assertIncludes( + article, + `stride-context-on-vs-off-${langSuffix}.svg`, + `Both published editions must embed the controlled Context ON vs OFF chart: ${langSuffix}`, + ); + const twoArmSvg = await readFile( + resolve(blogDir, `images/context-delivery/stride-context-on-vs-off-${langSuffix}.svg`), + "utf8", + ); + const twoArmSection = article.split('

')[1]?.split('

')[0] ?? ""; + const twoArmTable = twoArmSection.match(/([\s\S]*?)<\/tbody>/)?.[1]; + const twoArmRows = [...(twoArmTable ?? "").matchAll(/([\s\S]*?)<\/tr>/g)]; + deepStrictEqual( + twoArmRows.length, + twoArm.tasks.length, + `Controlled two-arm score table must retain all 10 task rows including counterexamples: ${locale}`, + ); + for (const requiredToken of ["7,159", "3,746", "2,197", "2,311", "27.1801", "13.62", "39.44", "68.89", "70.79"]) { + assertIncludes(twoArmSection, requiredToken, `Controlled score section must preserve ${requiredToken} (${locale})`); + } + for (const isolatedText of [twoArmSection, twoArmSvg, JSON.stringify(twoArm)]) { + if (/four-arm|four arm|四臂/i.test(isolatedText)) { + throw new Error(`Controlled two-arm section must remain isolated without four-arm framing (${locale})`); + } + } + for (const publicText of [article, twoArmSvg, JSON.stringify(audit)]) { + if (/sforge/i.test(publicText)) { + throw new Error(`Internal benchmark name leaked into public context-delivery blog artifact (${locale})`); + } + } if (/7,479,469|33\.4%|69\.9 KB|57\.1ms/.test(article)) throw new Error("Unreconciled totals or unsupported C1 attribution reappeared"); }