Skip to content

Official Codebase of 3DCodeVerse

Python

docs: the refine row's outcome names match the code

ziyao050b1b91c950
diff --git a/harness/codeverse/flywheel/refine.py b/harness/codeverse/flywheel/refine.py
index 0c1bfc36..49954b74 100644
--- a/harness/codeverse/flywheel/refine.py
+++ b/harness/codeverse/flywheel/refine.py
@@ -68,6 +68,8 @@ class RefineTransition(BaseModel):
score_after: float | None
score_delta: float | None
outcome: str = Field(description="improved | unchanged | regressed | unscored")
+ #: --with-code: the WHOLE tree before (the state the brief describes) and only the
+ #: files the round changed after (the answer), so a converter needs no run access
before_files: dict[str, str] | None = None
after_files: dict[str, str] | None = None
diff --git a/harness/docs/ARCHITECTURE.md b/harness/docs/ARCHITECTURE.md
index 76ecffd6..9c4b0844 100644
--- a/harness/docs/ARCHITECTURE.md
+++ b/harness/docs/ARCHITECTURE.md
@@ -556,10 +556,11 @@ vendor CLIs log raw stdout, not structured tool turns); `flywheel refine` emits
i+1) where the harness asked for a change: the failing round's gate findings and
judge complaint, the refine instructions the harness wrote, both code snapshots (git
`before`/`after` commits, `--with-code` inlines the files), the score before and
-after, and `outcome` (`improved` when the judge gained ≥ 0.05, `regressed` when it
-lost as much, `flat` otherwise, `build_failed` when the after-round did not build).
-Rows are dropped, with the reason recorded, when a predecessor has no commit, no
-verdict or did not build. That is the supervision the harness produces that a
+after, and `outcome` (`improved` when the judge gained ≥ 0.05 — the same threshold
+`flywheel/pairs.py` calls a preference — `regressed` when it lost as much,
+`unchanged` in between, `unscored` when either side has no verdict). Rows are
+dropped, with the reason recorded, when a predecessor has no commit, no verdict or
+did not build. That is the supervision the harness produces that a
one-shot corpus cannot: what a failing artefact looked like, what was wrong with it
in the harness's own words, and what the fix changed. `toolkits/llamafactory/`
turns those rows into training files; the harness writes the measurement, not the
diff --git a/harness/docs/INTERFACES.md b/harness/docs/INTERFACES.md
index 9bc8a2b3..7ce57407 100644
--- a/harness/docs/INTERFACES.md
+++ b/harness/docs/INTERFACES.md
@@ -523,9 +523,9 @@ from codeverse.flywheel.export import export_samples # (runs_dir, out_dir, *,
from codeverse.flywheel.quality import quality_tier, prompt_hash, find_duplicates # tiers: A passed & 0 gate errors, B passed,
# C best ≥ 0.6, D else; dedupe = (code fingerprint, prompt)
from codeverse.flywheel.pairs import build_pairs # (runs_dir, out_jsonl, *, min_delta=0.05) -> n
-from codeverse.flywheel.refine import build_refine, transitions, RefineTransition, REFINE_KINDS
+from codeverse.flywheel.refine import build_refine, transitions, RefineTransition, REFINE_KINDS, outcome_of
# build_refine(runs_dir, out_jsonl, *, with_code=False) -> n; transitions(rec, ws, *, with_code) -> list[RefineTransition]
- # one row per round i -> i+1 the harness asked to change; outcome improved|regressed|flat|build_failed
+ # one row per round i -> i+1 the harness asked to change; outcome improved|regressed|unchanged|unscored
# (threshold: pairs.MIN_PREFERENCE_DELTA); dropped rows carry the reason (no_predecessor / no_commit /
# predecessor_build_failed / predecessor_unjudged / git_read_failed / duplicate_run)
from codeverse.flywheel._git import read_tree_at, diff_between, changed_files_between, commit_exists, GitReadError
diff --git a/harness/docs/RUNBOOK.md b/harness/docs/RUNBOOK.md
index 1efeb6b7..7d1d7454 100644
--- a/harness/docs/RUNBOOK.md
+++ b/harness/docs/RUNBOOK.md
@@ -162,8 +162,8 @@ unless you type `--host` yourself; it never serves a path outside the declared r
# one row per round i -> i+1 the harness asked to change:
# gate findings + judge complaint + the refine instructions,
# before/after commits (--with-code inlines the files),
- # score_before/score_after, outcome improved|regressed|flat|
- # build_failed, and dropped rows with the reason
+ # score_before/score_after, outcome improved|regressed|
+ # unchanged|unscored, and dropped rows with the reason
# (no_predecessor / no_commit / predecessor_unjudged / ...).
# Training formats live in toolkits/llamafactory/, not here.
3dcv flywheel caption <slug> [--model …] [--out caps/] # --out = side-car mode, run untouched