Repository navigation
fix(integration): repair the full L0–L3 workflow + ready-to-merge codex auto-trigger - #806
Conversation
The L2/L3 plan jobs sparse-checked-out only .github + tests/integration, then ran
`pip install .` for the credential filter — which failed with "Directory '.' is
not installable. Neither 'setup.py' nor 'pyproject.toml' found." This broke the
FIRST live L3 dispatch (plan red -> run-matrix + review-pack skipped). It slipped
through pre-merge because the credential-filter install path was never exercised
(L1 has no filter; L2 plan only runs on the medium label; L3 is dispatch-only).
- add pyproject.toml + README.md + src to the plan job's sparse-checkout so
hatchling can build benchflow.
- switch the install from pip to uv (astral-sh/setup-uv + uv pip install --system),
consistent with the rest of the workflows.
- make the install non-fatal (|| ::warning) so the fail-open credential filter is
never blocked by an install hiccup — matching its documented fail-open design.
Verified end-to-end: benchflow builds from {pyproject.toml, README.md, src} via
uv pip install and resolve_agent_env imports with its real deps.
| # uv pip install into the setup-python interpreter (--system). The filter | ||
| # is fail-open by design, so a failed install must NOT block the plan — | ||
| # warn and let the filter pass the matrix through unfiltered. | ||
| run: uv pip install --system --quiet . || echo "::warning::benchflow install failed; credential filter will fail-open (matrix unfiltered)" |
There was a problem hiding this comment.
Fail-open guarantee depends on
filter_credentialed_cells.py exit code
The || echo "::warning::" makes the install non-fatal, but the very next step (Filter uncredentialed cells) runs under set -euo pipefail and calls filter_credentialed_cells.py directly. If that script raises an unhandled ImportError when benchflow is missing and exits non-zero, the plan job fails — negating the fail-open intent here. The comments assert "Fails OPEN: if benchflow import fails the matrix passes through unchanged", but this only holds if filter_credentialed_cells.py catches the ImportError, passes the matrix through unmodified, and exits 0. This is the same concern in both integration-final-review.yml (line 178) and integration-scope.yml (line 230).
…y-to-merge label Add a `pull_request: [labeled]` trigger to integration-final-review.yml so that applying the `ready-to-merge` label to an INTERNAL PR runs the FULL final review (plan -> matrix -> deterministic review pack + codex equivalence reviewer) automatically, instead of only via manual workflow_dispatch. - plan job gated `if: workflow_dispatch OR (pull_request && label == 'ready-to-merge')`; any other label is a no-op (plan + dependent jobs skip, workflow stays green). - PR resolved from github.event.inputs.pr_number || github.event.pull_request.number (resolve, plan, and comment steps); concurrency keyed the same way. - plain pull_request (NEVER pull_request_target): fork PRs get no secrets, and the resolve step still refuses any non-internal head repo. Only write-access users can label. Codex stays fail-closed as the L3 gate; L3 is not a required check, so a red final-review informs without blocking the merge.
Summary
Scope: make the full integration test workflow actually runnable end-to-end, plus add an automatic trigger for the codex final review. Two parts:
1. Fix the plan-job credential-filter install (the blocker)
The first live dispatch of L3
integration-final-review(against #803) failed at theplanjob:The L2/L3 plan jobs sparse-checkout only
.github+tests/integration, thenpip install .to makebenchflow.agents.envimportable for the credential filter — but the sparse checkout omitspyproject.toml/src, so the build fails and the whole plan job goes red (→run-matrix+review-packskipped). It slipped past #802's own CI because that path was never exercised (L1 has no filter; L2 plan only runs on theintegration:mediumlabel; L3 is dispatch-only).pyproject.toml+README.md+srcto the plan job's sparse-checkout so hatchling can build benchflow.pip install .→uv pip install --system(astral-sh/setup-uv) — consistent with the rest of the workflows, nopip.|| ::warning) so the fail-open credential filter is never blocked by an install hiccup.(The only remaining
pip installis release-notes text ininternal-preview-release.yml, not a CI step.)2. Auto-trigger the codex final review on
ready-to-mergeToday the codex equivalence reviewer runs only in L3, which is
workflow_dispatch-only (manual). This adds apull_request: [labeled]trigger so that applying theready-to-mergelabel to an internal PR runs the full final review (plan → matrix → deterministic review pack + codex) automatically.if: workflow_dispatch OR (pull_request && label == 'ready-to-merge'); any other label is a no-op (plan + dependent jobs skip, workflow stays green — no rollout spun up).inputs.pr_number || pull_request.number(resolve / plan / comment steps); concurrency keyed the same way (cancel-in-progress: false).pull_request(neverpull_request_target) → fork PRs get no secrets; the resolve step still refuses any non-internal head repo; only write-access users can apply labels. Codex stays fail-closed as the L3 gate, but L3 is not a required status check, so a red final-review informs without blocking the merge (mitigates the dead-OPENAI_API_KEYred-block concern).The
ready-to-mergelabel has been created in the repo.Test plan
{pyproject.toml, README.md, src}viauv pip install .andresolve_agent_envimports with real depson= {workflow_dispatch, pull_request[labeled]}, planifgates on the label, PR resolved from both event shapesready-to-merge→ L3 auto-runs (plan reaches the credential filter, matrix runs, review pack + codex verdict post)