Skip to content

Move local execution, candidate preparation and trials into Harness Executor - #731

Open
Dong1017 wants to merge 1 commit into
mainfrom
codex/702-p6-executor-review
Open

Dong1017 wants to merge 1 commit into
mainfrom
codex/702-p6-executor-review

Conversation

@Dong1017

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #702

Codex, acting for @Dong1017, submits P6. Its dependencies P2 (#722) and P5 (#727) have merged. This revision is a single commit on 1c5e9d40. The public imports, old-package baseline, and target behavior follow the accepted scope and pre-migration CPU runs.

Anchors touched: none. The architecture guide updates four implementation path references. The layer, execution, cleanup and evidentiary contracts retain their existing definitions.

Public API and implementation

  • from inferrsi.harness.executor import LocalCpuTarget, prepare_generation, read_prepared_binding, project_prepared_binding, verify_prepared_binding. The existing Harness facade continues to live under inferrsi.harness.api. Executor exposes its target lazily. Importing only request_digest starts with neither SQLite, RunStore nor the execution implementation loaded.
  • Migrate local processes, launch records, trials, device leases, input binding, candidate retention, confinement and Skill Eval capture under Executor. The Manager calls its injected supervisor for the process-domain check. Update the Apps wiring, callers, architecture checks, installed checks, upgrade notes and archived replay manifest paths together.
  • Remove the legacy api.LocalCpuTarget, root harness.Verdict / harness.parse_verdict, and the old module paths. The 42 existing definitions in the four candidate/confinement/Skill Eval/sandbox modules retain identical ASTs. P7 owns ordinary workflow dispatch, P8 service lifecycle and P9 session integration.

Acceptance on the submitted commit

Normal wheel inferrsi-0.3.5.dev11+ga22636c5-py3-none-any.whl has SHA-256 f2809f74c5630b7ce634878fefce2876f67ba2320f5aaa26b4bd5aceb612fc1a. Source archive SHA-256 a446c4bb107f212e53bb945991b36fdb6f916f0b156fe0232a02687e5f19c75a. Tested from outside the checkout.

Behavior Observed result
Package and compatibility 1,029 installed package files checked against the wheel. A clean venv passed the repository's installed check with 775 resource files and all seven D007 packs. All 12 legacy root modules and the three superseded public aliases were absent.
Real local CPU and recovery One successful child launch. Replaying its attempt returned the same record. Changing the request under that ID raised RequestConflict. A changed bound candidate was rejected before launch. A real timed-out child returned confirmed termination, process exit and an empty process domain. Replaying preserved the original record.
Prepared candidate API Compared the four imports with the P5 normal wheel. The 2,069-byte request produced digest 62ce11e6d458b5c581245d0988189e1bd834f2ed1e1880d15242faf70c5b6fe9. The 2,690-byte prepared document, bound projection, error class/codes and D023 failure vectors matched. Installed preparation/bounds suite 93 passed, retained-source/replay/cleanup cases 7 passed.
Ordinary session and #693 The 53 static fingerprint paths and their bytes matched in Git, wheel, installation and persisted plan. Real arguments and benchmark children ran before a controlled interruption. benchmarks session recover and campaign recover each ran only the missing assess on its own copy. Eight status/recover calls across the two frozen sessions rejected the changed fingerprint with zero child starts and byte-identical files.

Receipt SHA-256 for the CPU/API probe fce156c89ca43fc6b9ac2c5b197f90218aca7251bfe4cc60138581ad94387f4b, prepared API comparison 7b763a00d194115d7ca477f8811fd087cee244a089ca437a7e9c367761bb6ee4, and ordinary fingerprint/replays 511d47eb0aa167191826cd3c211e0a573f134521edbf2d53017501e1f0e592c4. Pre-integration receipts and detailed inventory

Checks and dependencies

ruff check src tests tools and git diff --check passed. The submitted Git tree 08999e8fda336eac725c3d023344fa2fd79bc3cd also passed 469 architecture checks, 75 caller checks and 107 trial tests (61 platform skips). The delivery/Skill Eval group on Windows had 151 pass, five skips and 15 failures. The same 15 tests failed on the pre-migration tree: ten require Windows symlink privileges and five depend on LF fixture bytes. Linux full-suite and installed results will be recorded by this PR's CI.

At submission #699 and #709 were open. #699 shares six paths including project/session imports and tests. #709 shares nine, including the optimization and session modules, installed check and CLI migration docs. The scope and ownership of those PRs remain as recorded on their own Issues.

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "a22636c51cd9eb2d2b143c0716fd3ab57aa3f608",
  "human_only": false,
  "material_ai_authors": [
    {
      "tool": "Codex",
      "model_id": "gpt-6.2-astra",
      "effort": "max",
      "role": "author"
    }
  ]
}

Remaining Issue work

P6 is ready for independent review. P7–P9 and the final installed main acceptance remain under #702. The accepted closure owner is @Dong1017.

…xecutor

Move local CPU execution, trials, leases, generation bindings and candidate evidence into Executor. Migrate the public callers and Apps wiring, keep cleanup through the injected supervisor, and verify the retired imports and retained sessions.

Signed-off-by: dongxinwen <[email protected]>
Agent-assisted-by: Codex (author)
Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (author)
Signed-off-by: dongxinwen <[email protected]>
@Dong1017 Dong1017 added the area:harness Harness module: profile, A/B loop, quality gates, evidence reports label Nov 26, 2026
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex 代表 @Dong1017 请求复核 P6 当前提交 a22636c51cd9eb2d2b143c0716fd3ab57aa3f608。P2、P5 已合入;PR 正文列出了这个提交的正常 wheel、回执摘要和 Windows 基线差异。

@david6666666 请核对 Executor 的四个 prepared-binding 包层入口以及 retained candidate 变化时的拒绝路径。重点是旧 RunStore 固定版本的读取、异常类型身份和冷导入 request_digest 的依赖。

@zengchuang-hw 请核对本地 target、进程组清理、同一 attempt 重放及普通会话的 53 份静态指纹。两个恢复入口分别在自己的检查点副本上仅补 assess。请在这个提交上提交正式评审。

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Skill evaluation

PLANNED: not executed; there are no task outcomes yet.
No approval, model efficacy or current-head test result is implied.

  • Next: resolve check applicability at head a22636c51cd9eb2d2b143c0716fd3ab57aa3f608.
  • Task selection: no supported automatic comparison; choose a relevant source/content check and disposition uncovered claims.
  • Selected comparisons: 0 · Estimated task calls: 0. Uncovered/unsupported changes: 133; Canonical library paths: 0; Generated projection paths: 0; Other paths: 133. These are paths, not independent claims.
  • Return: command, input/source pin, exit status, outputs/failures and untested claims for independent verified/refuted/unverified disposition.
Author verification steps (nonpaid; not yet run)
  1. Bind the checkout. Run git rev-parse HEAD; it must equal a22636c51cd9eb2d2b143c0716fd3ab57aa3f608. If it differs, obtain a current plan; do not reuse old results.
  2. Choose an applicable check. Match each changed behavior to the task below or a source/content check; a path match alone does not establish relevance.
    No supported automatic comparison is selected. Review the canonical changes and explain which claims need evidence, are unaffected, or remain unverified; do not treat generated records as separate behavioral claims.
    Uncovered scope by location: Canonical library paths: 0; Generated projection paths: 0; Other paths: 133. Path counts are not claim counts; no metadata-only conclusion is inferred.
  3. Return evidence for independent review: head, check/task/source pin, command, environment, exit status, outputs/failures and untested claims. Label scripted controls. Request each claim's disposition: verified, refuted or unverified; this plan proves neither model provenance nor benefit.
    Check recipes and evidence limits

Evidence and logs · Retention: 30 days.
Retained artifacts are verifiable only before Unix time 1798317808 while the linked artifact is available. Expired evidence is unverified.

Plan bindings, budget, frozen exam and advisory details

Advisory: obtain missing evidence

Retained evidence availability: planned / unexecuted. No approval or merge authorization is issued.
Applicable only while these revisions and inputs match the current PR.
Paid execution requires trusted label authorization and cumulative PR reservation. Unknown accounting blocks new paid calls; planning is not execution.
Pipeline evidence only; offline fixed outputs do not establish skill efficacy.
Unchanged-correct is valid neutral evidence, not incremental benefit.
Content/source review and authorship admission remain separate.
Trusted regrading checks retained answers, not model/hardware provenance or a hostile executor; this is not an efficacy certification.

  • Retained evidence is planned / unexecuted.
  • No supported comparison cases were selected.
  • Uncovered/unsupported scope needs a case or explicit reviewer disposition.
    Plan SHA-256: 56abeee3e3481889c60f26104548fabd2f2e09e0e883c2bc12b48e55f26bdb15
    Base: 1c5e9d40de9b56f29a01d27b7f329245b56599b7 · Head: a22636c51cd9eb2d2b143c0716fd3ab57aa3f608
    Trusted implementation: 1c5e9d40de9b56f29a01d27b7f329245b56599b7

Model/settings: {"effort":"not_applicable","name":"claude-opus-5-5"}
Budget: {"comparisons":0,"estimated_calls":0,"limits_per_comparison":{"campaign_seconds":600,"max_task_calls":2,"repeats":1,"timeout_seconds":180,"token_stop_new_trials":200000},"provider_config_sha256":"b28d80f8194fbe0f5a9f01515efb24b218979fd45f702776560da276f4b30d04","reservation":null}

Skill Comparison Cases Estimated calls

Automatic execution / cumulative PR budget:

{"reason":"Trusted configuration or pricing missing, invalid or expired","remaining_usd":"unknown","reserved_or_unresolved_usd":"unknown","spent_or_legacy_usd":"unknown","state":"blocked"}

Provider/settings: {"client":{"api_version":"2023-06-01","endpoint":"https://yibuapi.com/v1/messages","kind":"anthropic-messages-full-context-v1","max_output_tokens":4096,"max_read_bytes":32768,"max_request_bytes":262144,"max_requests":1,"max_tool_calls":12,"provider":"yibuapi"},"limits":{"token_stop_new_trials":200000},"model":{"effort":"not_applicable","name":"claude-opus-5-5"},"pricing":{"currency":"USD","expires_at":1793271228,"group":"default","max_input_tokens":1000000,"model":"claude-opus-5-5","rate_evidence":"https://github.com/InferMatrixLab/InferRSI/issues/215#issuecomment-6467531341","rates":{"cache_read":"0.4","cache_write":"10","input":"8","output":"40"},"request_fee":"0","unit":"per_million_tokens"},"spend_limit":{"amount":"200","currency":"USD"}}

Uncovered / unsupported paths (133)
  • uncovered: "CHANGELOG.md"
  • uncovered: "docs/apps-module-migrations.json"
  • uncovered: "docs/architecture.md"
  • uncovered: "docs/assets/modular-directory-map-en.svg"
  • uncovered: "docs/benchmarks/moe-forward-benchmark.md"
  • uncovered: "docs/contracts/function-owners.md"
  • uncovered: "docs/contracts/gate-policy-runstore-and-first-prs.md"
  • uncovered: "docs/contracts/generation-bounds.md"
  • uncovered: "docs/contracts/generation-feedback-policy.md"
  • uncovered: "docs/contracts/generation-feedback.md"
  • uncovered: "docs/contracts/harness-entry-verification.md"
  • uncovered: "docs/contracts/harness-evaluation-replay.md"
  • uncovered: "docs/contracts/harness-prepared-binding.md"
  • uncovered: "docs/contributing.md"
  • uncovered: "docs/guides/module-layout.md"
  • uncovered: "docs/guides/operations.md"
  • uncovered: "docs/guides/skill-evaluation/README.md"
  • uncovered: "docs/guides/skill-evaluation/local-skill-evaluation.md"
  • uncovered: "docs/guides/skill-evaluation/skill-eval-cloud-replay.md"
  • uncovered: "docs/guides/speculative-search.md"
  • uncovered: "evidence/qwen-vats-gvo-910b1-20261124/plan/retained-sha256.json"
  • uncovered: "evidence/qwen-vats-gvo-910b1-20261124/validator/check.py"
  • uncovered: "src/inferrsi/apps/cli/evaluate.py"
  • uncovered: "src/inferrsi/apps/delivery/snapshot.py"
  • uncovered: "src/inferrsi/apps/legacy/run.py"
  • uncovered: "src/inferrsi/apps/workflows/search_benchmarks.py"
  • uncovered: "src/inferrsi/apps/workflows/skill_eval_engineering.py"
  • uncovered: "src/inferrsi/apps/workflows/skill_evaluation.py"
  • uncovered: "src/inferrsi/harness/README.md"
  • uncovered: "src/inferrsi/harness/init.py"
  • uncovered: "src/inferrsi/harness/api/init.py"
  • uncovered: "src/inferrsi/harness/api/_harness.py"
  • uncovered: "src/inferrsi/harness/artifact_sandbox.py"
  • uncovered: "src/inferrsi/harness/attempt_recovery.py"
  • uncovered: "src/inferrsi/harness/candidates.py"
  • uncovered: "src/inferrsi/harness/confinement.py"
  • uncovered: "src/inferrsi/harness/device_lease.py"
  • uncovered: "src/inferrsi/harness/entry_code.py"
  • uncovered: "src/inferrsi/harness/evidence_capture.py"
  • uncovered: "src/inferrsi/harness/execution_service.py"
  • uncovered: "src/inferrsi/harness/executor/init.py"
  • uncovered: "src/inferrsi/harness/executor/_entry_code.py"
  • uncovered: "src/inferrsi/harness/executor/_evidence_capture.py"
  • uncovered: "src/inferrsi/harness/executor/_execution.py"
  • uncovered: "src/inferrsi/harness/executor/_generation.py"
  • uncovered: "src/inferrsi/harness/executor/_generation_feedback.py"
  • uncovered: "src/inferrsi/harness/executor/_generation_lineage.py"
  • uncovered: "src/inferrsi/harness/executor/_input_binding.py"
  • uncovered: "src/inferrsi/harness/executor/_prepared_binding.py"
  • uncovered: "src/inferrsi/harness/executor/_target.py"
  • uncovered: "src/inferrsi/harness/executor/artifact_sandbox.py"
  • uncovered: "src/inferrsi/harness/executor/candidates.py"
  • uncovered: "src/inferrsi/harness/executor/confinement.py"
  • uncovered: "src/inferrsi/harness/executor/device_lease.py"
  • uncovered: "src/inferrsi/harness/executor/launch_records.py"
  • uncovered: "src/inferrsi/harness/executor/local_process.py"
  • uncovered: "src/inferrsi/harness/executor/skill_evaluation.py"
  • uncovered: "src/inferrsi/harness/executor/trials/init.py"
  • uncovered: "src/inferrsi/harness/executor/trials/external.py"
  • uncovered: "src/inferrsi/harness/generation.py"
  • uncovered: "src/inferrsi/harness/generation_feedback.py"
  • uncovered: "src/inferrsi/harness/generation_lineage.py"
  • uncovered: "src/inferrsi/harness/input_binding.py"
  • uncovered: "src/inferrsi/harness/launch_records.py"
  • uncovered: "src/inferrsi/harness/local_process.py"
  • uncovered: "src/inferrsi/harness/manager/_runner.py"
  • uncovered: "src/inferrsi/harness/manager/search/_engine.py"
  • uncovered: "src/inferrsi/harness/manager/search/search_adapter.py"
  • uncovered: "src/inferrsi/harness/optimization.py"
  • uncovered: "src/inferrsi/harness/optimization_session.py"
  • uncovered: "src/inferrsi/harness/parallel_round.py"
  • uncovered: "src/inferrsi/harness/prepared_binding.py"
  • uncovered: "src/inferrsi/harness/project_service.py"
  • uncovered: "src/inferrsi/harness/skill_evaluation.py"
  • uncovered: "src/inferrsi/harness/task_protocol.py"
  • uncovered: "src/inferrsi/harness/trials/init.py"
  • uncovered: "src/inferrsi/harness/trials/external.py"
  • uncovered: "tests/apps/test_anthropic_agent.py"
  • uncovered: "tests/apps/test_apps_evaluate_cli.py"
  • uncovered: "tests/apps/test_apps_evidence_capture.py"
  • uncovered: "tests/apps/test_apps_fixed_cpu_views.py"
  • uncovered: "tests/apps/test_apps_generation_plan.py"
  • uncovered: "tests/apps/test_apps_generation_views.py"
  • uncovered: "tests/apps/test_apps_module_migrations.py"
  • uncovered: "tests/apps/test_apps_port_validation.py"
  • uncovered: "tests/apps/test_apps_production_cli.py"
  • uncovered: "tests/apps/test_legacy_run_split.py"
  • uncovered: "tests/apps/test_optimization_session.py"
  • uncovered: "tests/apps/test_project_optimization.py"
  • uncovered: "tests/apps/test_project_service_reuse.py"
  • uncovered: "tests/apps/test_search_benchmarks.py"
  • uncovered: "tests/apps/test_trial_checks.py"
  • uncovered: "tests/apps/test_yibuapi_runtime.py"
  • uncovered: "tests/benchmark/test_benchmark_cpu_smoke.py"
  • uncovered: "tests/benchmark/test_benchmark_operations.py"
  • uncovered: "tests/benchmark/test_moe_benchmark.py"
  • uncovered: "tests/campaigns/test_qwen_gvo_diagnostic.py"
  • uncovered: "tests/contracts/test_contracts_package.py"
  • uncovered: "tests/harness/test_confinement.py"
  • uncovered: "tests/harness/test_harness_entry_verification.py"
    Additional paths omitted; see retained evidence.

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Dong-bot (authorized delegate) PTAL on head a22636c51cd9eb2d2b143c0716fd3ab57aa3f608, base 1c5e9d40de9b56f29a01d27b7f329245b56599b7. This is a self-review (PR author is Dong1017), so this COMMENT is not an independent approval.

Blockers

  1. Incomplete diff seed. pr/meta.json has diffComplete: false, so the seeded diff does not show the whole change. pr/diff.patch is a single ~151 KB line that I could not page here, so I did not review the patch text line by line. Under the review policy this cannot PASS. Needed: a complete diff for this head, or a complete per-file review of the part that is missing.
  2. No independent approval on this head. pr/prior-reviews.md lists no formal review on a22636c5. The thread asks @david6666666 (prepared-binding entries, retained-candidate rejection, cold import of request_digest) and @zengchuang-hw (local target, process-group cleanup, same-attempt replay, 53 static fingerprints) to review. Neither has posted. Merge needs two eligible approvals from accounts that are not the author or accountable parent.
  3. CI and baseline not in evidence. The PR body says Linux full-suite and installed results "will be recorded by this PR's CI". The seed has no check results. The Windows delivery/Skill Eval group shows 15 failures (151 pass, 5 skip). The body says the same 15 fail on the pre-migration tree (10 symlink-privilege, 5 LF fixture). That baseline is the author's claim and I did not verify it.
  4. Skill evaluation plan not executed. Plan 56abeee3e3481889c60f26104548fabd2f2e09e0e883c2bc12b48e55f26bdb15 is planned/unexecuted: 0 comparisons, budget state blocked, 133 uncovered paths with no reviewer disposition. The uncovered scope needs an explicit disposition for each claim (verified, refuted or unverified).

What I checked at head a22636c5

  • src/inferrsi/harness/executor/__init__.py lines 18-31: LocalCpuTarget, prepare_generation, read_prepared_binding, project_prepared_binding and verify_prepared_binding are exposed lazily through __getattr__, matching the body's import line. Lines 55-57 define request_digest with only hashlib, os, sys, importlib.resources and json_v1 loaded at module top. The parent packages' __init__.py files were not read, so the cold-import claim is only partly checked.
  • src/inferrsi/harness/api/__init__.py lines 1-19: LocalCpuTarget is no longer exported from api, and Harness stays lazily loaded. This matches the body's removal of the legacy api.LocalCpuTarget.
  • The harness root no longer contains local_process, launch_records, device_lease, candidates, confinement, artifact_sandbox or skill_evaluation. They now live under executor/. attempt_recovery.py is still at the root, and the body does not list it as migrated. The author should say whether it is in scope.

Not verified here

  • The diff contents (see blocker 1).
  • Governing issue #702 and its accepted scope. The issue read overflowed and could not be opened in full. The gating in decision #702 (the records export mechanism and a leaf errors module) is therefore not confirmed. The errors module likely sits at src/inferrsi/contracts/_harness_errors.py (imported at harness/api/__init__.py line 3), which I did not open.
  • Wheel and source SHA-256 values, receipt digests, the 469/75/107 check counts and the 93/7 test counts. Nothing was re-run.
  • No tests were run.

Next step

The author should restore a complete diff, post the Linux CI results, show the Windows baseline, and give the uncovered-path disposition. The two named reviewers should post formal reviews on the head. Dong-bot will re-read after the author pushes.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:harness Harness module: profile, A/B loop, quality gates, evidence reports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant