Files
Corey Zumar 18167c9d92 Backwards-compat Config 2: old runner/host -> new server (#990)
* Add Config 2 backwards-compat: old runner/host -> new server

Mirror of the server-version harness for the agent side. Runner and host are
colocated (one install, one version), so a single knob pins both while the
server, client, and tests stay on main.

- tests/_helpers/compat.py: generalize the redirect into a component-parameterized
  core; add runner helpers (OMNIGENT_COMPAT_RUNNER_PYTHON): runner_executable,
  apply_runner_env (neutralize-only — drops the inherited worktree PYTHONPATH in
  compat mode, never force-adds a prepend), compat_runner_cwd, and the
  min_runner_version skip (pinned_runner_version reads OMNIGENT_COMPAT_RUNNER_VERSION;
  runner/host have no /api/version, so the env is the only source). server_* and
  the new runner_* are thin wrappers over the shared core.
- tests/e2e/conftest.py: redirect the runner subprocess (runner_executable +
  apply_runner_env + cwd=compat_runner_cwd); add the runner_version fixture's
  min_runner_version autouse guard; re-exported into tests/integration.
- Redirect all four host-daemon spawns (test_host_e2e x2, claude-native,
  codex-native) the same way so the OLD host launches OLD runners (colocated).
- min_runner_version marker registered in pyproject.
- Composite actions gain a runner_version input (build the old runner/host venv,
  export the redirect env vars); server-compat.yml adds backcompat-runner-{e2e,
  integration} jobs and is renamed Backwards-Compat (now both directions).

The server and runner knobs are orthogonal: each spawn site consults its own,
so a run pins exactly one component.

Out of scope (documented): the 3 niche custom-fixture direct-runner spawns
(filesystem/non-git changed-files, session_resources) keep their workspace-cwd
semantics and stay on the test python; tests/e2e_ui (needs an npm build). Both
run new-runner -> new-server (normal, no breakage) in a Config-2 run.

Verified: 26 unit tests; lint/format clean; both conftests import; and the
redirect provably loads OLD runner code (import omnigent.runner._entry resolves
to the pinned old source only with both the PYTHONPATH drop and the neutral CWD;
either counterfactual loads main).

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* TEMP: enable Backwards-Compat on PR (REVERT before merge)

workflow_dispatch needs the file on the default branch (not merged yet). Add a
pull_request trigger so the backcompat jobs (server + runner directions) run on
this PR for validation. Reverted before merge.

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* Revert temporary PR trigger on Backwards-Compat workflow

Config-2 backcompat validated on the PR (old runner/host -> new server: all
e2e shards + integration green). Restore dispatch/nightly-only triggers — the
backcompat sweep is not meant to run on every PR push.

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* Clarify backcompat job labels: 'latest' -> 'latest-release'

The fallback label read as 'newest/main' but means the latest released TAG —
which is older than main (unreleased). Rename so the job name ('server
latest-release') reconciles with the step ('against old server'): same pinned
release, older than the code under test.

Signed-off-by: dbczumar <corey.zumar@databricks.com>

---------

Signed-off-by: dbczumar <corey.zumar@databricks.com>
2026-06-22 21:50:20 -07:00
..
2026-06-13 00:37:34 +00:00