Skip to content

Require evidence-backed feasibility checks for project performance targets - #699

Open
amy-why-3459 wants to merge 3 commits into
mainfrom
feat/required-performance-target-review
Open

amy-why-3459 wants to merge 3 commits into
mainfrom
feat/required-performance-target-review

Conversation

@amy-why-3459

@amy-why-3459 amy-why-3459 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #698

The requester asked for a mandatory reasonableness check when preparing InferRSI project performance goals after the native GLM-Image campaign. This PR changes the freeze path for both types of ordinary project campaigns. Anchors touched: none.

What changes

A new campaign start requires a target declaration and a separate workload calibration receipt. The declaration distinguishes a user-supplied gain from a derived one. AB/BA checks its included source snapshot, workload and device/topology. Service reuse checks the baseline Git commit, full service conditions and scenario definitions (including workload and request counts), objective and aggregate.

The Harness compares the frozen proposal with the observed repeated-baseline range and a conservative attainable gain from a matching measurement or calibrated projection. A target inside baseline variation or beyond supported headroom cannot start a single-objective search. Service reuse evaluates every gain objective and preserves its any-gain decision. The accepted inputs and computed decisions are retained in the plan and returned to the caller. New service reference conditions require new evidence; retries reuse their original assessment.

The calibration range is a planning heuristic. A known-good candidate establishes an achieved improvement. A target exceeding it remains unsupported by those data. The run still needs its ordinary quality, measurement and independent-final checks.

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "b82f04c6d3f478b8f0bafad85b26b73d4dabd024",
  "human_only": false,
  "material_ai_authors": [{"tool": "Codex", "model_id": "unknown", "effort": "unknown", "role": "author"}]
}

Verification

Ruff and diff checks passed. Focused CPU regressions cover missing and mismatched evidence, unsupported or noisy targets, user/derived sources, both project modes, retaining decision inputs and reading a pre-review plan. The 23-case target and workload check suite passed, including refusal of a self-referencing receipt and a different workload or request count under the same scenario ID. Six additional checks covered baseline/conditions changes and existing controls. On Linux arm64 with Python 3.12.13, the final local suite passed with 7,574 tests and 675 subtests passing, 69 skipped, and 4 deprecation warnings. Hosted full suites passed on Python 3.10 and 3.11, alongside installed-wheel, dashboard-browser, host-compatibility and issue-reference checks. CI run

The change is intentionally mandatory for newly created ordinary project campaigns. Registered benchmark tasks and previously frozen plans retain their existing contracts.

Agent-assisted-by: Codex (Harness implementation, workflow integration and tests)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex (tests and verification)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
@amy-why-3459
amy-why-3459 marked this pull request as ready for review November 25, 2026 13:58
Agent-assisted-by: Codex (implementation and regression coverage)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dot, acting for @david6666666 under delegated PR review.

The exact-head Ready jobs are green, but the AB/BA calibration binding does not yet cover the measurement protocol. I reproduced the context comparison with the exact functions and local synthetic inputs. The second note asks to clarify existing frozen-plan compatibility, not to weaken the runtime identity check.

"gain_threshold": args.min_improvement_pct, "aggregate": "median"}
if not args.device_scope or not args.device_scope.strip():
raise ValueError("--device-scope requires a device and topology description")
context = {"baseline_snapshot": baseline_identity, "scope": args.scope,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This context accepts the same calibration after the measurement command, frozen protocol contents, warmup or repetition count changes, as long as the project files and two descriptive strings stay the same. For example, I reused a receipt from one measurement command with a different command and 12→1 repetitions; the exact context builder/checker still returned supported in isolation. Bind calibration to the measurement protocol bytes and workload-relevant settings, and add a same-label/different-protocol regression.

"harness/usage.py", "harness/agent_sessions.py", "harness/task_protocol.py",
"harness/protocol_child.py",
"harness/candidates.py", "harness/project.py", "harness/measurement.py",
"harness/project_objectives.py",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please distinguish read-only historical records from running an old frozen campaign on the new wheel. Adding this key makes existing AB/BA and registered benchmark plans fail the exact map comparison in session_command before even CLI status. The “pre-review” test starts under this head, deletes target_review, and calls read_records directly, so it does not exercise that path. Use a plan produced by the old wheel to document and test the intended split (old wheel to resume if required; supported historical reader separately). Do not bypass the runtime identity check.

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