Autoloop PR/issue should report cumulative performance improvement

未关闭
#69 0 条评论 1 个 reaction 已指派 2 人 在 GitHub 查看

@mrjf 已经在做这个了。

开始于 2026年5月12日。

  • #70 来自 @copilot-swe-agent —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

Problem

Autoloop programs that optimize a metric over many iterations don't report the cumulative improvement anywhere visible — not in the PR body, not in the issue, not in the state file summary. A reader of tsessebe PR #297 or issue #189 can see the current best metric but has no idea where the program started or how much progress has been made.

This was observed on the tsb-perf-evolve program (41 iterations, fitness ratio optimization). The PR body says "Current best metric: 21.048" but never mentions the starting value or total improvement.

Root causes

Three gaps in autoloop.md:

1. No Initial Metric in Machine State

The state file schema tracks Best Metric but not the baseline metric from the first accepted iteration. Without this, there's no reference point to compute cumulative improvement.

Fix: Add an Initial Metric field to the Machine State table schema. Set it on the first accepted iteration and never overwrite it.

2. PR body template doesn't include cumulative improvement

Step 5c says to update the PR body with "the latest metric and a summary of the most recent accepted iteration" but never specifies showing start-to-finish improvement.

Fix: Update the Step 5c PR body template to include: "Fitness: {best_metric} (started at {initial_metric}, {improvement_pct}% improvement)" or similar.

3. pending-ci fitness values never flow back into PR/issue

When the sandbox can't run the evaluation command (e.g., bun not available), iterations are pushed as pending-ci. After CI runs the benchmark and produces a fitness number, that result never flows back into the PR body, issue status comment, or state file. The PR stays stuck showing the last sandbox-measured metric.

Fix: Either (a) add a post-CI callback step that updates the PR body/state file with the CI-measured fitness, or (b) at minimum, have the next iteration read CI results from the previous run and update the state file retroactively before proposing a new change.

Expected behavior

A reader of any Autoloop PR or program issue should be able to see at a glance:

  • Where the metric started (initial/baseline value)
  • Where it is now (current best)
  • Total improvement (absolute delta and percentage)
  • A brief improvement trajectory (e.g., in the PR body or status comment)

References

主要语言
Python
星标
72
派生
6
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

githubnext/autoloop 的其他 Issue

查看 githubnext/autoloop 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。