Skip to content

feat(harness-evolve): import HE (AHE outer loop) from the DCU dev container - #37

Merged
myrfy001 merged 1 commit into
HuangPuStar:next-appfrom
fms-zth:feat/harness-evolve-import
Sep 28, 2026
Merged

myrfy001 merged 1 commit into
HuangPuStar:next-appfrom
fms-zth:feat/harness-evolve-import

Conversation

@fms-zth

@fms-zth fms-zth commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

What this does

Imports metainfer/tasks/harness_evolve/ — the AHE outer loop (HE) — verbatim from the DCU development container, so the harness-evolution loop lives in the repository next to the DKAO task it drives.

Source: 10.8.160.17:/root/zth_agent/MetaInfer/metainfer/tasks/harness_evolve (73 files, no local modification).

Companion to #36, which brings in the DKAO side (metainfer/tasks/dcu_kernel_auto_opt/). The two are split deliberately: HE depends on DKAO, never the other way round.

What's inside

Path Contents
FLOW.md, README.md The fixed variant-round protocol. HE only launches DKAO tasks; measurement, the GPU gate and contamination handling all stay inside DKAO.
orchestrator/ pipeline, decision_engine, evolve, rounds, promotion, champion_selection, supervisor, process_control, variant, pool, attribution, publish
server/, static/ The HE web surface (routes, plugin, he-api.js / he-detail.js / he.css)
tests/ 33 tests, including test_flow_contract.py which keeps FLOW.md and the code in sync

Scope: material-only

This PR is an import, not an integration. The package is not wired into the framework and is not expected to import cleanly on this branch. Known gaps, intentionally left to follow-up PRs:

  • metainfer.orchestrator.gpu_broker — not in this tree (tracked separately).
  • metainfer.server.* (StateStore / forms / registry) — next-app lineage APIs; HE was written against the fork's master baseline.
  • metainfer.tasks.dcu_kernel_auto_opt.orchestrator.{harness_io,variant_promote} — depends on the DKAO refresh in feat(dcu-kernel-auto-opt): harness planner, gate policy and DKAO tooling #36.
  • 11 hardcoded /root/zth_agent/... paths carried over from the container.

No files outside metainfer/tasks/harness_evolve/ are touched: 73 files, +21817 / −0, one commit.

Verification performed

  • Content is byte-identical to the container tree (diff -rq → identical), __pycache__ / *.pyc excluded.
  • File modes normalized 600 → 644 (the container's root umask leaked through tar), so no spurious permission diffs.
  • git diff --cached --name-only confirms zero out-of-scope files.
  • Checked gh pr list --state all --search harness-evolve: no pre-existing or already-merged HE PR, so this cannot repeat the duplicate-content conflict seen with feat(dcu-kernel-auto-opt): harness planner, gate policy and DKAO tooling #36.

Why this source and not the local snapshot

An earlier local snapshot existed on sync/zth-agent-20260911 (48 files). It is materially older — eval.py differs by 428 lines, pipeline.py by 1434, and it lacks FLOW.md, promotion.py, rounds.py, variant.py, process_control.py and 15 tests. The container version is the current one.

…tainer

Import metainfer/tasks/harness_evolve/ verbatim from the DCU development
container, so the AHE outer loop lives in the repository alongside the
DKAO task it drives.

Source: 10.8.160.17:/root/zth_agent/MetaInfer/metainfer/tasks/harness_evolve
        73 files, imported without local modification.

What this adds:
- FLOW.md / README.md: the fixed variant-round protocol (HE only launches
  DKAO tasks; measurement, GPU gate and contamination stay inside DKAO).
- orchestrator/: pipeline, decision_engine, evolve, rounds, promotion,
  champion_selection, supervisor, process_control, variant, pool.
- server/ + static/: the HE web surface (routes, plugin, he-api/detail JS).
- tests/: 33 tests including test_flow_contract.py, which keeps FLOW.md
  and the code in sync.

Scope note: this commit is material-only. The package is NOT wired into
the framework yet and is not expected to import cleanly on this branch —
it depends on host APIs that are not part of the DKAO-only PR lineage:
- metainfer.orchestrator.gpu_broker (not in this tree)
- metainfer.server.* (StateStore / forms / registry, next-app lineage)
- metainfer.tasks.dcu_kernel_auto_opt.orchestrator.{harness_io,variant_promote}
plus 11 hardcoded /root/zth_agent/... paths carried over from the container.

Follow-up: reconcile the host API differences and drop the skipif guards
that currently stand in for this module (see the DKAO sync guide).
@fms-zth
fms-zth force-pushed the feat/harness-evolve-import branch from 6671229 to dfc84d0 Compare September 23, 2026 12:16
@myrfy001
myrfy001 merged commit 4bf45f8 into HuangPuStar:next-app Sep 28, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants