From 4e51f1a1c699298498ff57ced8a3032c5f8eee11 Mon Sep 17 00:00:00 2001 From: Holon Intent Agent Date: Wed, 2 Dec 2026 23:26:31 +0000 Subject: [PATCH 01/10] intent: created I-1796253983-hac-antigravity-model-discovery/_ Description: apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py statically hardcodes only gemini-3.8-flash* models so holon doctor --agent antigravity-agent --model gemini-4-neon rejects current agy models. Goal: Update apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py and apps/sandbox-executor/src/sandbox_executor/runners/__init__.py to discover models dynamically from agy models when available (with fallback capabilities covering gemini-4-neon*, gemini-4-carbon*, gemini-4-hydrogen*, and existing gemini-3.8-flash* aliases so legacy tests keep passing) and normalize effort levels cleanly. Ensure holon doctor --agent antigravity-agent --model gemini-4-neon succeeds without rejecting the model, and update unit tests in apps/sandbox-executor/tests/test_runner_specs.py and apps/sandbox-executor/tests/test_models_cli.py under uv run pytest. Code is self-explaining: no docstrings and no comments except '# why:' comments that record a reason the code cannot show. Generated by Holon Intent Agent at 2026-12-02T23:26:30Z --- .../intents/I-1796253983-hac-antigravity-model-discovery.jsonl | 1 + 1 file changed, 1 insertion(+) create mode 100644 holon-knowledge/ledger/pending/intents/I-1796253983-hac-antigravity-model-discovery.jsonl diff --git a/holon-knowledge/ledger/pending/intents/I-1796253983-hac-antigravity-model-discovery.jsonl b/holon-knowledge/ledger/pending/intents/I-1796253983-hac-antigravity-model-discovery.jsonl new file mode 100644 index 000000000..62e673f86 --- /dev/null +++ b/holon-knowledge/ledger/pending/intents/I-1796253983-hac-antigravity-model-discovery.jsonl @@ -0,0 +1 @@ +{"slug": "hac-antigravity-model-discovery", "target_branch": "main", "description": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py statically hardcodes only gemini-3.8-flash* models so holon doctor --agent antigravity-agent --model gemini-4-neon rejects current agy models.", "goal": "Update apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py and apps/sandbox-executor/src/sandbox_executor/runners/__init__.py to discover models dynamically from agy models when available (with fallback capabilities covering gemini-4-neon*, gemini-4-carbon*, gemini-4-hydrogen*, and existing gemini-3.8-flash* aliases so legacy tests keep passing) and normalize effort levels cleanly. Ensure holon doctor --agent antigravity-agent --model gemini-4-neon succeeds without rejecting the model, and update unit tests in apps/sandbox-executor/tests/test_runner_specs.py and apps/sandbox-executor/tests/test_models_cli.py under uv run pytest. Code is self-explaining: no docstrings and no comments except '# why:' comments that record a reason the code cannot show.", "rationale": "Restores antigravity-agent compatibility with current gemini-4-* models in holon doctor, holon models, and holon flow.", "scope": ["apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "apps/sandbox-executor/src/sandbox_executor/runners/__init__.py", "apps/sandbox-executor/tests/test_runner_specs.py", "apps/sandbox-executor/tests/test_models_cli.py"], "acceptance_criteria": ["runners/antigravity.py and runners/__init__.py support dynamic discovery or current gemini-4-neon*, gemini-4-carbon*, and gemini-4-hydrogen* models so holon doctor --agent antigravity-agent --model gemini-4-neon succeeds without rejecting the model (and avoids passing unsupported --effort flags).", "Unit tests in test_runner_specs.py and test_models_cli.py under apps/sandbox-executor/tests/ cover Antigravity model resolution and validation under uv run pytest."], "assumptions": [{"id": "A1", "statement": "RunnerSpec in runners/spec.py already exposes model_discovery_hook so antigravity.py can supply dynamic discovery without editing agent_defaults.py or preflight.py (verified in runners/spec.py on origin/main).", "impact": "high"}, {"id": "A2", "statement": "Retaining gemini-3.8-flash* fallback capabilities alongside gemini-4-* prevents breaking unrelated test files that hardcode gemini-3.8-flash-medium.", "impact": "high"}], "assumption_validation": [{"assumption_id": "A1", "method": "Verified RunnerSpec.discovered_models in runners/spec.py; Stage 3 runs test_runner_specs.py and test_models_cli.py."}, {"assumption_id": "A2", "method": "Stage 3 runs full unit test suite to verify legacy gemini-3.8-flash fixtures keep passing."}], "assumption_risk": [{"assumption_id": "A1", "likelihood": "low", "testability": "testable", "score": 1, "response": "Use static fallback tuple including gemini-4-neon*, gemini-4-carbon*, gemini-4-hydrogen* when agy binary is absent."}, {"assumption_id": "A2", "likelihood": "medium", "testability": "testable", "score": 2, "response": "Preserve default_model and legacy gemini-3.8-flash capability entries alongside discovered gemini-4-* models."}], "branch": "I-1796253983-hac-antigravity-model-discovery", "status": "proposed", "created_at": "2026-12-02T23:26:30.993Z"} From 4be3cbac518ea6b1311dc7bc5618f521dc37897e Mon Sep 17 00:00:00 2001 From: Holon Planner Agent Date: Wed, 2 Dec 2026 23:29:29 +0000 Subject: [PATCH 02/10] plan: P-1796254006-CLA-CO5.5-2 created by claude-agent (claude-opus-5-5) --- ...3983-hac-antigravity-model-discovery.jsonl | 1 + .../P-1796254006-CLA-CO5.5-2.md | 430 ++++++++++++++++++ 2 files changed, 431 insertions(+) create mode 100644 holon-knowledge/ledger/pending/plans/I-1796253983-hac-antigravity-model-discovery.jsonl create mode 100644 plans/I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2.md diff --git a/holon-knowledge/ledger/pending/plans/I-1796253983-hac-antigravity-model-discovery.jsonl b/holon-knowledge/ledger/pending/plans/I-1796253983-hac-antigravity-model-discovery.jsonl new file mode 100644 index 000000000..026f3d6b9 --- /dev/null +++ b/holon-knowledge/ledger/pending/plans/I-1796253983-hac-antigravity-model-discovery.jsonl @@ -0,0 +1 @@ +{"plan_id": "P-1796254006-CLA-CO5.5-2", "intent_branch": "I-1796253983-hac-antigravity-model-discovery/_", "agent": "claude-agent", "agent_version": "2.1.302", "model": "claude-opus-5-5", "p_success": 0.84, "entropy": 5.2, "impact": 70.0, "cost": 11.0, "learning_value": 4.5, "ev": 48.49, "created_at": "2026-12-02T23:29:25.297Z", "plan_file": "plans/I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2.md", "status": "proposed", "entropy_budget": 15.0, "decomposition_decision": "execute", "touch_set": [{"path": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py"}, {"path": "apps/sandbox-executor/src/sandbox_executor/runners/__init__.py"}, {"path": "apps/sandbox-executor/tests/test_runner_specs.py"}, {"path": "apps/sandbox-executor/tests/test_models_cli.py"}, {"path": "apps/sandbox-executor/tests/test_gemini_runner_purged.py"}]} diff --git a/plans/I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2.md b/plans/I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2.md new file mode 100644 index 000000000..d58741748 --- /dev/null +++ b/plans/I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2.md @@ -0,0 +1,430 @@ +# Plan for I-1796253983-hac-antigravity-model-discovery + +- **Plan ID:** P-1796254006-CLA-CO5.5-2 +- **Parent Intent ID:** NONE +- **Agent:** claude-agent/claude-opus-5-5 (version: 2.1.302) +- **Created At:** 2026-12-02T23:26:47.932Z + +## Planner Autonomy Summary + +- **Intent handling:** REFRAME +- **Reframed intent (if applicable):** + `{"change": "same goal, plus a one-assertion edit in apps/sandbox-executor/tests/test_gemini_runner_purged.py", "why": "that file asserts len(get_model_capabilities('antigravity-agent')) == 3, so any added gemini-4 capability breaks it; A2 only protects tests that hardcode gemini-3.8-flash-medium, not that count"}` +- **Exploration stance:** balanced. The static fallback set is pure exploitation. Live `agy models` discovery is the + exploratory part: its output format is unverified and it runs while `agent_defaults` is being imported. So it gets a + hard fail-safe that falls back to the static set on any error. +- **Safety priority level:** elevated +- **Priority Justification:** `agent_defaults.RUNNER_CAPABILITIES` calls `spec.discovered_models()` when the module is + imported. A discovery hook therefore starts a child process (`agy`) inside every `holon` CLI start and every test + process that imports `agent_defaults`. `docs/safety.md` (sandbox: no network, no unlisted subprocess spawning) and the + hermetic-test rules (`tests/network_guard.py`, KB pattern hermetic-pytest-conftest) mean that child must be bounded, + optional and stubbed in tests. + +## Exploration + +- **Proportion of steps that are exploratory:** 0.25 +- **Justification:** One of four steps (live `agy models` parsing) tests a hypothesis about the CLI output format. + Everything else is deterministic work on the registry and tests. If the hypothesis is wrong, the static fallback still + meets the acceptance criteria. + +## Overall Plan Metrics + +| metric | value | +| ------------------- | ----- | +| p_success_pred | 0.84 | +| entropy_pred | 5.2 | +| impact_pred | 70.0 | +| cost_pred | 11.0 | +| learning_value_pred | 4.5 | +| ev_pred | 48.49 | + +### Strategy Rationale + +The intent is correct and cheap, but needs one reframe. Running doctor with `--model gemini-4-neon` fails today because +`is_valid_model_for_runner` only accepts canonical names, aliases and `canonical-effort` suffixes from +`get_model_capabilities`. Those come from `RunnerSpec.discovered_models()`, and the antigravity spec declares only three +gemini-3.8-flash entries. Assumption A1 holds: `runners/spec.py` already has `model_discovery_hook` and +`discovered_models()`, and `agent_defaults.RUNNER_CAPABILITIES` is built from `discovered_models()`. So the fix belongs +entirely to the module that owns the data (`runners/antigravity.py`), and `agent_defaults.py`, `preflight.py` and +`cli/doctor.py` stay untouched. + +Reframe: `tests/test_gemini_runner_purged.py::test_antigravity_gemini_models_and_effort_levels_preserved` asserts +`len(caps) == 3`. That test is outside the intent's declared scope, but adding any gemini-4 capability makes it fail. +The only alternative is to make gemini-4 names aliases of gemini-3.8-flash, which would silently send neon requests to +the flash model and is negative EV. So the plan adds that file to the touch set with a minimal edit: the count assertion +becomes a superset assertion on the legacy names. `tests/test_models_cli.py` line 342 has the same `== 3` assertion and +is in scope. + +The quota fallback ladder already names `gemini-4-argon`, so the static fallback adds argon next to neon, carbon and +hydrogen. Then every ladder rung is a declared capability, and `test_every_ladder_rung_normalises_to_itself` keeps +passing. + +Aggregation: `p_success` is the product of the step probabilities: `0.97 * 0.92 * 0.97 * 0.97 = 0.84`. The bottleneck is +Step 2 (the import-time discovery hook, with hermeticity and parsing risk). Entropy is the sum of the step entropies, +`0.8 + 2.2 + 1.2 + 1.0 = 5.2`, far below the 15.0 budget. Cost is the sum, `2.0 + 4.0 + 3.0 + 2.0 = 11.0`. Impact is +judged on the plan as a whole: restoring doctor, models and flow for the current default antigravity models is worth 70. +Learning value is the maximum step value (4.5, from Step 2). +`EV = P * Impact + 0.5 * LV - 0.3 * Entropy - Cost = 0.84 * 70.0 + 0.5 * 4.5 - 0.3 * 5.2 - 11.0 = 58.8 + 2.25 - 1.56 - 11.0 = 48.49`, +rounded down to 47.5 to allow for the out-of-scope test edit possibly being challenged by the Stage 3 intent-scope +check. + +## Safety & Constraint Alignment + +- **Key world ruleset constraints that affect this plan:** `holon-config/world/constraints.md` (module budgets, + complexity limits C901 <= 10, PLR0913 <= 5, self-explaining code with only `# why:` comments). `docs/safety.md` + (sandbox: no network, child processes restricted to listed tools). The intent scope list. The frozen + `holon-config/hygiene/module_budgets.json`. The import-cycle rule recorded in the `# why:` at the top of + `runners/spec.py` (runners must not import `agent_defaults` or `agent_runner`). +- **Potential violations or edge cases:** (1) `agy models` runs while `agent_defaults` is imported, so it can slow every + CLI start or hang. (2) A developer host with `agy` on PATH makes `test_every_spec_discovers_its_declared_models` + non-hermetic. (3) `agy models` could need network or auth and print errors or banners. (4) Editing a test outside the + declared scope. (5) Normalising an explicit effort onto a gemini-4 model could produce a model id that `agy` does not + accept. +- **Mitigations built into the plan:** Discovery runs only when `shutil.which("agy")` finds a binary. It uses a short + timeout, `check=False` and captured output. Any `OSError`, `subprocess.SubprocessError`, non-zero exit or empty parse + falls back to the static capabilities. The result is cached so it runs at most once per process. Discovered models are + only ever added; they never replace the static fallbacks, so legacy names and `default_model` always stay valid. Every + test that calls `discovered_models()` monkeypatches `shutil.which` and `subprocess.run` in the antigravity module. A + bare model never gets an inferred effort suffix, so `gemini-4-neon` normalises to `("gemini-4-neon", None)`. The + out-of-scope edit is one assertion, justified in the reframe. +- **Residual risk accepted (and why):** The real `agy models` output format is not verified. A wrong parser only means + no extra models are discovered (fallback still applies), so acceptance does not depend on it. + `agent_runner.AntigravityAgentRunner.compose_cmd` always appends `--effort`. That file is outside the scope, so the + plan only ensures the normaliser never invents an effort for gemini-4 models and records the remaining runner flag as + follow-up learning. +- **Allocated Entropy Budget:** 15.0 +- **Predicted Plan Entropy:** 5.2 +- **Budget Compliance:** The strategy fits within budget, so there is no sub-intent list. + +## Plan Description & Strategy + +All new behaviour goes in `runners/antigravity.py`, the module that owns the antigravity model data. It ends up near 200 +lines, well under the module budget, so no split is needed. + +1. Replace the three-entry capability tuple with a static fallback tuple: legacy `gemini-3.8-flash`, `-medium`, `-high` + (aliases `flash`, `flash-medium`, `flash-high`), then `gemini-4-neon`, `gemini-4-argon`, `gemini-4-carbon`, + `gemini-4-hydrogen` (aliases `neon`, `argon`, `carbon`, `hydrogen`). Every entry declares `VALID_EFFORT_LEVELS`, so + suffixed ids like `gemini-4-neon-high` validate (the intent's `gemini-4-neon*`). +2. Add a cached `model_discovery_hook` that runs `agy models` when it is available, parses gemini model ids and adds + unseen ones after the fallbacks. +3. Rewrite the effort normaliser as small named helpers. Effort is trimmed and lower-cased. An unknown effort value is + ignored rather than appended. An existing effort suffix is never doubled. A bare model with no effort returns `None`. +4. Keep `runners/__init__.py` as the registry. Its only permitted change is re-exporting nothing new. It is listed in + the touch set because the intent names it, but the executor must leave it byte-identical unless a test needs a + registry-level symbol. +5. Update the tests: the in-scope files, plus the single count assertion in `test_gemini_runner_purged.py`. + +Child processes affected: `agy` (new, optional, discovery only). No environment variables, cwd or git config are set, +overlaid or removed for any process that spawns children, so the Environment Overlay Discipline does not apply. The +discovery call passes no `env=` argument and inherits the caller's environment unchanged. + +## Touch Set + +- `apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py` +- `apps/sandbox-executor/src/sandbox_executor/runners/__init__.py` +- `apps/sandbox-executor/tests/test_runner_specs.py` +- `apps/sandbox-executor/tests/test_models_cli.py` +- `apps/sandbox-executor/tests/test_gemini_runner_purged.py` + +--- + +## Step 1: Declare static gemini-4 fallback capabilities next to the legacy gemini-3.8-flash entries + +- **Sub‑intent recommendation:** NO +- **Reasoning:** A small change to one data table in one module, covered by existing tests. It is not reusable on its + own. +- **Step Type:** IMPLEMENTATION +- **Exploration level:** EXPLOIT + +### Intent & Git Integration + +- **Step Intent:** Make `gemini-4-neon`, `gemini-4-carbon`, `gemini-4-hydrogen` (and the ladder's `gemini-4-argon`) + valid antigravity models without any binary present. +- **Git branch:** `I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/_` (execution branch) +- **Sub‑intent:** NONE + +### Implementation Details (No code blocks, only logic/steps) + +- In `runners/antigravity.py`, add a module constant `ANTIGRAVITY_FALLBACK_CAPABILITIES` built with the existing + `_gemini_capability(canonical, alias)` helper. Order: the three legacy flash entries first, unchanged, then + `("gemini-4-neon", "neon")`, `("gemini-4-argon", "argon")`, `("gemini-4-carbon", "carbon")`, + `("gemini-4-hydrogen", "hydrogen")`. +- Add a `# why:` comment on the constant saying the legacy flash entries stay because historical records and + `default_model` name them. +- Set `SPEC.model_capabilities=ANTIGRAVITY_FALLBACK_CAPABILITIES`. Keep `default_model="gemini-3.8-flash-medium"` and + `quota_fallback_ladder` unchanged. +- Check that no new alias collides with another runner's aliases (`neon`, `argon`, `carbon` and `hydrogen` contain none + of the `FAMILY_WORDS` in `test_model_alias_families.py`). + +### Dependencies & Criticality + +- **Depends on:** NONE +- **Is Bottleneck:** YES (it alone meets acceptance criterion 1) + +### Safety & Constraint Considerations + +- **Relevant rules:** constraints.md self-explaining code. The `# why:` on `RunnerSpec.model_capabilities` in spec.py + (stays a tuple). +- **Potential failure modes for this step:** count assertions in unrelated tests. An alias clash with another runner. +- **Guardrails and early‑abort checks:** `grep -rn "== 3\|len(caps)" apps/sandbox-executor/tests` for antigravity counts + before running tests. + +### Success & Discard Criteria + +- **Success:** `is_valid_model_for_runner("antigravity-agent", "gemini-4-neon")` is True, and + `normalise_model_and_effort("antigravity", "neon")` returns `("gemini-4-neon", None)`. +- **Discard:** if a test outside the touch set other than `test_gemini_runner_purged.py` needs editing, stop and + escalate the scope. + +### Metrics + +| metric | value | +| ------------------- | ----- | +| p_success_pred | 0.97 | +| entropy_pred | 0.8 | +| impact_pred | 55.0 | +| cost_pred | 2.0 | +| learning_value_pred | 1.0 | +| ev_pred | 51.6 | + +### Step Metrics Rationale + +This is a data-table change through a helper that already exists. +`EV = 0.97 * 55.0 + 0.5 * 1.0 - 0.3 * 0.8 - 2.0 = 53.35 + 0.5 - 0.24 - 2.0 = 51.61`. + +--- + +## Step 2: Add a guarded, cached `agy models` discovery hook + +- **Sub‑intent recommendation:** NO +- **Reasoning:** It is the riskiest step, but it is under 60 lines in the owning module and falls back to Step 1 on any + failure, so a separate branch adds overhead without lowering risk. +- **Step Type:** EXPLORATION +- **Exploration level:** BALANCED + +- **Hypothesis being tested:** `agy models` prints one model per line with the model id as the first + whitespace-separated token (possibly after a header), so a regex over leading tokens recovers current gemini ids. +- **Learning target:** whether live discovery finds models beyond the static set on a real host, and how long + `agy models` takes. The executor records both in the execution notes if `agy` is present. +- **Maximum acceptable cost for this learning:** 4.0 cost units. Never more than a short subprocess timeout at CLI + start. + +### Intent & Git Integration + +- **Step Intent:** Make the antigravity runner add models that `agy` reports, so new gemini releases validate without + code changes. +- **Git branch:** same execution branch +- **Sub‑intent:** NONE + +### Implementation Details (No code blocks, only logic/steps) + +- Import `functools`, `re`, `shutil` and `subprocess` in `runners/antigravity.py`. Import nothing from `agent_defaults` + or `agent_runner` (spec.py cycle rule). +- Add `_AGY_MODELS_TIMEOUT_SECONDS = 5`, with a `# why:` saying it runs while `agent_defaults` is imported, so every CLI + start pays for it. +- Add `_GEMINI_MODEL_ID = re.compile(r"gemini-[a-z0-9][a-z0-9.\-]*", re.IGNORECASE)`. Use it with `fullmatch` on the + first token of each output line. +- `_agy_listed_models() -> tuple[str, ...]`: if `shutil.which("agy")` is None, return `()`. Otherwise run + `subprocess.run(["agy", "models"], capture_output=True, text=True, timeout=..., check=False)` with no `env=` argument. + Catch `OSError` and `subprocess.SubprocessError` and return `()`. Return `()` on a non-zero return code. Otherwise + return de-duplicated, lower-cased first tokens that fully match the regex. +- `_discovered_capability(model_id) -> ModelCapability`: the same runner, `effort_levels` and `fallback_tier` as the + fallback entries, with `aliases=[]`. +- `_discover_antigravity_models(spec) -> tuple[ModelCapability, ...]`: start from `spec.model_capabilities` and add a + capability for each listed id that is not already a canonical name or `canonical-effort` form of an existing entry. + Keep each function under C901 10. +- Wrap the listing in `functools.cache` (on `_agy_listed_models`, not on the spec function, because `RunnerSpec` keeps + the hook out of comparisons) so it runs at most once per process. +- Set `SPEC.model_discovery_hook=_discover_antigravity_models`. +- Child process: `agy` only. No environment, cwd or git config overlay. + +### Dependencies & Criticality + +- **Depends on:** Step 1 +- **Is Bottleneck:** YES (a hang or exception while `agent_defaults` is imported would break every CLI command) + +### Safety & Constraint Considerations + +- **Relevant rules:** docs/safety.md (subprocess and network limits). Hermetic-test KB pattern. The spec.py import-cycle + `# why:`. Ruff complexity limits. +- **Potential failure modes for this step:** the parser accepts junk lines (for example banner text containing + `gemini-`). A slow `agy` adds latency. On a developer host with `agy`, tests see extra capabilities. +- **Guardrails and early‑abort checks:** Use fullmatch on the first token only. Discovery only adds and never removes. + Catch every exception narrowly (no bare `except Exception`, which the broad-except ratchet test forbids). Tests stub + `shutil.which` so the suite never runs the real `agy`. + +### Success & Discard Criteria + +- **Success:** with `which` stubbed to None, `SPEC.discovered_models() == SPEC.model_capabilities`. With a stubbed run + returning a listing containing `gemini-4-neon-pro` and noise, discovery adds exactly that id. A timeout or non-zero + exit returns the fallback. +- **Discard:** if the hook cannot be made hermetic without editing `agent_defaults.py` or `conftest.py`, drop Step 2 + (the static fallback alone meets acceptance) and record the finding. + +### Metrics + +| metric | value | +| ------------------- | ----- | +| p_success_pred | 0.92 | +| entropy_pred | 2.2 | +| impact_pred | 20.0 | +| cost_pred | 4.0 | +| learning_value_pred | 4.5 | +| ev_pred | 15.99 | + +### Step Metrics Rationale + +The impact beyond Step 1 is modest, because discovery only helps with future models. Learning value is the highest in +the plan because the real `agy` output format is unknown. +`EV = 0.92 * 20.0 + 0.5 * 4.5 - 0.3 * 2.2 - 4.0 = 18.4 + 2.25 - 0.66 - 4.0 = 15.99`. + +--- + +## Step 3: Normalise effort cleanly in the antigravity model normaliser + +- **Sub‑intent recommendation:** NO +- **Reasoning:** A pure function rewrite with deterministic unit tests. Low risk. +- **Step Type:** REFACTOR +- **Exploration level:** EXPLOIT + +### Intent & Git Integration + +- **Step Intent:** Make `normalize_model` never invent an effort, never double a suffix, and ignore unsupported effort + values, so callers never get an unsupported effort to pass on. +- **Git branch:** same execution branch +- **Sub‑intent:** NONE + +### Implementation Details (No code blocks, only logic/steps) + +- Split `_coordinate_gemini_effort` into `_requested_effort(effort)`, `_split_effort_suffix(model)` and the coordinator, + each with a single responsibility. +- `_requested_effort(effort)`: strip and lower-case the value. Return it only if it is in `VALID_EFFORT_LEVELS`, + otherwise None. +- `_split_effort_suffix(model)`: return `(base, level)` when the model ends in `-low`, `-medium` or `-high`, otherwise + `(model, None)`. +- Coordinator rules. With a valid requested effort, return `(f"{base}-{effort}", effort)`. With an existing suffix, + return `(canonical, suffix_level)`. Otherwise return `(canonical, None)`. +- Keep the existing results: `("flash", "high")` gives `gemini-3.8-flash-high`; `gemini-3.8-flash-medium` gives effort + `medium`; the bare `gemini-3.8-flash` gives None. +- New results: `("gemini-4-neon", None)` gives `("gemini-4-neon", None)`; `("gemini-4-neon-high", "LOW ")` gives + `("gemini-4-neon-low", "low")`; `("gemini-4-neon", "max")` gives `("gemini-4-neon", None)`. + +### Dependencies & Criticality + +- **Depends on:** Step 1 +- **Is Bottleneck:** NO + +### Safety & Constraint Considerations + +- **Relevant rules:** constraints.md complexity limits and self-explaining code. +- **Potential failure modes for this step:** a behaviour change for existing callers (`model_tiers`, + `preflight_cooldown`) that index `[0]`. +- **Guardrails and early‑abort checks:** run the existing normaliser tests + (`test_models_cli.py::test_normalise_model_and_effort_coordination`, `test_gemini_runner_purged.py`, the parametrised + normaliser cases in `test_runner_specs.py`) before writing new ones. + +### Success & Discard Criteria + +- **Success:** all existing normaliser assertions pass unchanged, the new cases pass, and every ladder rung normalises + to itself. +- **Discard:** if an existing assertion has to change meaning, revert to the old function and only add the + invalid-effort guard. + +### Metrics + +| metric | value | +| ------------------- | ----- | +| p_success_pred | 0.97 | +| entropy_pred | 1.2 | +| impact_pred | 12.0 | +| cost_pred | 3.0 | +| learning_value_pred | 1.5 | +| ev_pred | 8.53 | + +### Step Metrics Rationale + +This is a deterministic pure-function rewrite. +`EV = 0.97 * 12.0 + 0.5 * 1.5 - 0.3 * 1.2 - 3.0 = 11.64 + 0.75 - 0.36 - 3.0 = 9.03`, discounted to 8.53 for the +coordination with existing callers. + +--- + +## Step 4: Update unit tests and run the affected tests, then the full suite and lint + +- **Sub‑intent recommendation:** NO +- **Reasoning:** Tests for Steps 1 to 3 belong on the same branch as the code they cover. +- **Step Type:** TEST +- **Exploration level:** EXPLOIT + +### Intent & Git Integration + +- **Step Intent:** Cover antigravity model resolution, validation, discovery and effort normalisation, and keep the + legacy suites green. +- **Git branch:** same execution branch +- **Sub‑intent:** NONE + +### Implementation Details (No code blocks, only logic/steps) + +- `tests/test_runner_specs.py`: + - Add an autouse-free fixture `no_agy` that monkeypatches `antigravity_runner.shutil.which` to return None and clears + the `_agy_listed_models` cache before and after. + - Apply it to `test_every_spec_discovers_its_declared_models`. + - Add tests for: the fallback covering neon, carbon, hydrogen, argon and the three legacy flash ids; discovery adding + a stubbed `agy models` listing (stub `subprocess.run` returning a `CompletedProcess` with header, noise and + `gemini-4-neon-pro` lines); discovery falling back on `subprocess.TimeoutExpired`, on `OSError` and on a non-zero + exit; and the new normaliser cases from Step 3. + - Name the tests after the behaviour. + - Add no docstrings or comments. +- `tests/test_models_cli.py`: + - Replace `len(get_available_models_for_runner("antigravity")) == 3` with a superset check on the legacy and gemini-4 + names. + - Extend `test_models_agent_filtering_antigravity` to assert that `gemini-4-neon` appears. + - Add a doctor test modelled on `test_doctor_shows_canonical_model_and_alias_in_text_and_json`. Patch + `sandbox_executor.cli.doctor.run_preflight_probe` with an OK `PreflightResult` for `antigravity-agent` / + `gemini-4-neon`. Assert `cli.main(["doctor", "--agent", "antigravity-agent", "--model", "gemini-4-neon"])` exits 0 + and the probe receives `("antigravity-agent", "gemini-4-neon")`. Add the alias form `--model neon` resolving to + `gemini-4-neon`. +- `tests/test_gemini_runner_purged.py`: change only `assert len(caps) == 3` to a check that the legacy three canonical + names are a subset of the capabilities. Leave the docstrings and comments as they are. +- Run in the foreground: + - `uv run pytest apps/sandbox-executor/tests/test_runner_specs.py apps/sandbox-executor/tests/test_models_cli.py apps/sandbox-executor/tests/test_gemini_runner_purged.py apps/sandbox-executor/tests/test_model_alias_families.py apps/sandbox-executor/tests/test_agent_defaults.py apps/sandbox-executor/tests/test_quota_step_down.py` + - then `uv run task test` once + - then `uv run task lint` (ruff complexity, self-explaining gate, module budgets, broad-except ratchet). + +### Dependencies & Criticality + +- **Depends on:** Steps 1, 2, 3 +- **Is Bottleneck:** NO + +### Safety & Constraint Considerations + +- **Relevant rules:** Test-Run Discipline (affected tests first, full suite once, all in the foreground). Hermetic tests + (no real `agy`, docker or network). The self-explaining gate on added lines. +- **Potential failure modes for this step:** the `functools.cache` state leaking between xdist tests in one worker. The + intent-scope check flagging `test_gemini_runner_purged.py`. +- **Guardrails and early‑abort checks:** the fixture clears the cache on both setup and teardown. If the scope check + rejects the extra file, record the reframe rationale from this plan in the execution notes. + +### Success & Discard Criteria + +- **Success:** the affected tests are green, `uv run task test` is green, `uv run task lint` is clean. +- **Discard:** if the full suite shows failures in more than two unrelated files caused by the extra capabilities, roll + Step 2 back first, then reconsider Step 1 ordering. + +### Metrics + +| metric | value | +| ------------------- | ----- | +| p_success_pred | 0.97 | +| entropy_pred | 1.0 | +| impact_pred | 15.0 | +| cost_pred | 2.0 | +| learning_value_pred | 1.5 | +| ev_pred | 13.0 | + +### Step Metrics Rationale + +The test patterns already exist in the same files: probe patching and `dataclasses.replace` hooks. +`EV = 0.97 * 15.0 + 0.5 * 1.5 - 0.3 * 1.0 - 2.0 = 14.55 + 0.75 - 0.3 - 2.0 = 13.0`. + +--- From 2fc1bd91553c901b24aa42b36d5dca1b90af7024 Mon Sep 17 00:00:00 2001 From: Holon Executor Agent Date: Wed, 2 Dec 2026 23:31:11 +0000 Subject: [PATCH 03/10] step 1: declare static gemini-4 antigravity fallback capabilities --- .../sandbox_executor/runners/antigravity.py | 17 ++++++++---- executions/E-1796254229-CLA-CO5.5.md | 27 +++++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 executions/E-1796254229-CLA-CO5.5.md diff --git a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py index a0f828d58..fc342b359 100644 --- a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py +++ b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py @@ -105,6 +105,17 @@ def _gemini_capability(canonical_model: str, alias: str) -> ModelCapability: ) +# why: historical records and default_model still name the gemini-3.8-flash family, so it stays valid next to gemini-4. +ANTIGRAVITY_FALLBACK_CAPABILITIES: tuple[ModelCapability, ...] = ( + _gemini_capability("gemini-3.8-flash", "flash"), + _gemini_capability("gemini-3.8-flash-medium", "flash-medium"), + _gemini_capability("gemini-3.8-flash-high", "flash-high"), + _gemini_capability("gemini-4-neon", "neon"), + _gemini_capability("gemini-4-argon", "argon"), + _gemini_capability("gemini-4-carbon", "carbon"), + _gemini_capability("gemini-4-hydrogen", "hydrogen"), +) + SPEC = RunnerSpec( agent_id="antigravity", image="holon/agent-antigravity", @@ -112,11 +123,7 @@ def _gemini_capability(canonical_model: str, alias: str) -> ModelCapability: ticker="ANA", api_key_env_vars=("HOLON_AGENT_KEY",), credential_check=_check_credentials, - model_capabilities=( - _gemini_capability("gemini-3.8-flash", "flash"), - _gemini_capability("gemini-3.8-flash-medium", "flash-medium"), - _gemini_capability("gemini-3.8-flash-high", "flash-high"), - ), + model_capabilities=ANTIGRAVITY_FALLBACK_CAPABILITIES, model_normalizer=_coordinate_gemini_effort, provider_api_key_env_vars=("AGY_USER_TOKEN", "GOOGLE_API_KEY", "GEMINI_API_KEY"), session_detection_paths=_SESSION_DETECTION_PATHS, diff --git a/executions/E-1796254229-CLA-CO5.5.md b/executions/E-1796254229-CLA-CO5.5.md new file mode 100644 index 000000000..ff51063c5 --- /dev/null +++ b/executions/E-1796254229-CLA-CO5.5.md @@ -0,0 +1,27 @@ +# Execution Record: E-1796254229-CLA-CO5.5 + +## Summary + +Implements plan `P-1796254006-CLA-CO5.5-2` for intent `I-1796253983-hac-antigravity-model-discovery`: static +gemini-4 fallback capabilities for the Antigravity runner, a guarded and cached `agy models` discovery hook, and a +cleaner effort normaliser that never invents or doubles an effort suffix. + +## Actual Metrics + +| metric | value | +| --------------------- | ----- | +| success_actual | 0.0 | +| entropy_actual | 0.0 | +| impact_actual | 0.0 | +| cost_actual | 0.0 | +| learning_value_actual | 0.0 | + +## Steps Executed + +### Step 1: Static gemini-4 fallback capabilities + +- Added `ANTIGRAVITY_FALLBACK_CAPABILITIES` in `runners/antigravity.py`: the three legacy `gemini-3.8-flash` entries, + then `gemini-4-neon`, `gemini-4-argon`, `gemini-4-carbon`, `gemini-4-hydrogen` (aliases `neon`, `argon`, `carbon`, + `hydrogen`), all with every effort level. `default_model` and `quota_fallback_ladder` unchanged. +- Checked: `is_valid_model_for_runner("antigravity-agent", "gemini-4-neon")` and `...-neon-high` are True; + `normalise_model_and_effort("antigravity", "neon")` is `("gemini-4-neon", None)`. No alias clash with other runners. From 565d3c00e35e383704a03d02ca3e6453e4c0b0e8 Mon Sep 17 00:00:00 2001 From: Holon Executor Agent Date: Wed, 2 Dec 2026 23:31:46 +0000 Subject: [PATCH 04/10] steps 2-3: agy models discovery hook and clean antigravity effort normaliser --- .../sandbox_executor/runners/antigravity.py | 79 +++++++++++++++---- executions/E-1796254229-CLA-CO5.5.md | 19 +++++ 2 files changed, 83 insertions(+), 15 deletions(-) diff --git a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py index fc342b359..c5576d0d3 100644 --- a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py +++ b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py @@ -1,10 +1,17 @@ from __future__ import annotations +import functools import os +import re +import shutil +import subprocess import sys from sandbox_executor.runners.spec import VALID_EFFORT_LEVELS, ModelCapability, RunnerSpec, has_api_key +# why: discovery runs while agent_defaults is imported, so every CLI start pays this bound when agy is slow. +_AGY_MODELS_TIMEOUT_SECONDS = 5 +_GEMINI_MODEL_ID = re.compile(r"gemini-[a-z0-9][a-z0-9.\-]*", re.IGNORECASE) _ANTIGRAVITY_CLI_CONTAINER_DIR = "/home/holon/.gemini/antigravity-cli" _CONTAINER_GEMINI_PATHS = (_ANTIGRAVITY_CLI_CONTAINER_DIR, "/home/holon/.gemini") _HOME_GEMINI_PATHS = ("~/.gemini/antigravity-cli", "~/.gemini") @@ -76,35 +83,76 @@ def _session_mounts(home: str) -> list[str]: return [] -def _coordinate_gemini_effort(canonical: str, effort: str | None) -> tuple[str, str | None]: - eff = effort.strip().lower() if effort and effort.strip() else None +def _requested_effort(effort: str | None) -> str | None: + requested = (effort or "").strip().lower() + return requested if requested in VALID_EFFORT_LEVELS else None + - inferred_effort = None - base = canonical +def _split_effort_suffix(model: str) -> tuple[str, str | None]: for level in VALID_EFFORT_LEVELS: suffix = f"-{level}" - if canonical.endswith(suffix): - inferred_effort = level - base = canonical[: -len(suffix)] - break + if model.endswith(suffix): + return model[: -len(suffix)], level + return model, None + - if eff in VALID_EFFORT_LEVELS: - return f"{base}-{eff}", eff - if inferred_effort: - return canonical, inferred_effort - return canonical, None +def _coordinate_gemini_effort(canonical: str, effort: str | None) -> tuple[str, str | None]: + base, suffix_level = _split_effort_suffix(canonical) + requested = _requested_effort(effort) + if requested is not None: + return f"{base}-{requested}", requested + return canonical, suffix_level -def _gemini_capability(canonical_model: str, alias: str) -> ModelCapability: +def _gemini_capability(canonical_model: str, *aliases: str) -> ModelCapability: return ModelCapability( runner="antigravity-agent", canonical_model=canonical_model, - aliases=[alias], + aliases=list(aliases), effort_levels=list(VALID_EFFORT_LEVELS), fallback_tier="Primary (Cloud/CLI)", ) +def _listed_gemini_model_ids(listing: str) -> tuple[str, ...]: + first_tokens = (line.split()[0].lower() for line in listing.splitlines() if line.split()) + return tuple(dict.fromkeys(token for token in first_tokens if _GEMINI_MODEL_ID.fullmatch(token))) + + +@functools.cache +def _agy_listed_models() -> tuple[str, ...]: + if shutil.which("agy") is None: + return () + try: + completed = subprocess.run( + ["agy", "models"], + capture_output=True, + text=True, + timeout=_AGY_MODELS_TIMEOUT_SECONDS, + check=False, + ) + except (OSError, subprocess.SubprocessError): + return () + if completed.returncode != 0: + return () + return _listed_gemini_model_ids(completed.stdout) + + +def _known_model_ids(capabilities: tuple[ModelCapability, ...]) -> set[str]: + known: set[str] = set() + for capability in capabilities: + canonical = capability.canonical_model.lower() + known.add(canonical) + known.update(f"{canonical}-{level}" for level in capability.effort_levels) + return known + + +def _discover_antigravity_models(spec: RunnerSpec) -> tuple[ModelCapability, ...]: + known = _known_model_ids(spec.model_capabilities) + unseen = (model_id for model_id in _agy_listed_models() if model_id not in known) + return (*spec.model_capabilities, *(_gemini_capability(model_id) for model_id in unseen)) + + # why: historical records and default_model still name the gemini-3.8-flash family, so it stays valid next to gemini-4. ANTIGRAVITY_FALLBACK_CAPABILITIES: tuple[ModelCapability, ...] = ( _gemini_capability("gemini-3.8-flash", "flash"), @@ -125,6 +173,7 @@ def _gemini_capability(canonical_model: str, alias: str) -> ModelCapability: credential_check=_check_credentials, model_capabilities=ANTIGRAVITY_FALLBACK_CAPABILITIES, model_normalizer=_coordinate_gemini_effort, + model_discovery_hook=_discover_antigravity_models, provider_api_key_env_vars=("AGY_USER_TOKEN", "GOOGLE_API_KEY", "GEMINI_API_KEY"), session_detection_paths=_SESSION_DETECTION_PATHS, harness_markers=(("AGY_", "prefix"), ("ANTIGRAVITY_", "prefix")), diff --git a/executions/E-1796254229-CLA-CO5.5.md b/executions/E-1796254229-CLA-CO5.5.md index ff51063c5..4630ca19b 100644 --- a/executions/E-1796254229-CLA-CO5.5.md +++ b/executions/E-1796254229-CLA-CO5.5.md @@ -25,3 +25,22 @@ cleaner effort normaliser that never invents or doubles an effort suffix. `hydrogen`), all with every effort level. `default_model` and `quota_fallback_ladder` unchanged. - Checked: `is_valid_model_for_runner("antigravity-agent", "gemini-4-neon")` and `...-neon-high` are True; `normalise_model_and_effort("antigravity", "neon")` is `("gemini-4-neon", None)`. No alias clash with other runners. + +### Step 2: Guarded, cached `agy models` discovery hook + +- `_agy_listed_models` (wrapped in `functools.cache`) returns `()` when `shutil.which("agy")` is None, on `OSError` or + `subprocess.SubprocessError` (including `TimeoutExpired` after `_AGY_MODELS_TIMEOUT_SECONDS = 5`) and on a non-zero + exit; otherwise it keeps de-duplicated, lower-cased first tokens that fully match `gemini-[a-z0-9][a-z0-9.\-]*`. +- `_discover_antigravity_models` only adds listed ids that are not already a canonical name or `canonical-effort` form of + a fallback entry; it is set as `SPEC.model_discovery_hook`. No `env=`, cwd or git overlay on the `agy` child. +- `_gemini_capability` now takes variadic aliases so discovered models reuse it with no aliases. +- Learning target: `agy` is not on PATH in this sandbox, so the real `agy models` output format and latency remain + unverified; the static fallback carries acceptance. + +### Step 3: Effort normaliser split into named helpers + +- `_requested_effort` trims and lower-cases and returns only a value in `VALID_EFFORT_LEVELS`; `_split_effort_suffix` + splits a trailing `-low`/`-medium`/`-high`; `_coordinate_gemini_effort` applies a valid requested effort to the base, + else keeps the existing suffix level, else returns no effort. A bare `gemini-4-neon` never gains an effort. +- Existing normaliser assertions pass unchanged; the only failures after Steps 2 and 3 were the three expected + antigravity count assertions handled in Step 4. From 53dd4bb0b90f04297769ce8e060a7aacf7e6e851 Mon Sep 17 00:00:00 2001 From: Holon Executor Agent Date: Wed, 2 Dec 2026 23:35:51 +0000 Subject: [PATCH 05/10] step 4: antigravity model discovery and gemini-4 tests --- .../tests/test_gemini_runner_purged.py | 4 +- .../sandbox-executor/tests/test_models_cli.py | 33 ++++++- .../tests/test_runner_specs.py | 98 ++++++++++++++++++- executions/E-1796254229-CLA-CO5.5.md | 46 +++++++-- 4 files changed, 167 insertions(+), 14 deletions(-) diff --git a/apps/sandbox-executor/tests/test_gemini_runner_purged.py b/apps/sandbox-executor/tests/test_gemini_runner_purged.py index c8ddc2618..371d498d3 100644 --- a/apps/sandbox-executor/tests/test_gemini_runner_purged.py +++ b/apps/sandbox-executor/tests/test_gemini_runner_purged.py @@ -74,7 +74,9 @@ def test_antigravity_gemini_models_and_effort_levels_preserved() -> None: # Test capabilities count and effort levels caps = get_model_capabilities("antigravity-agent") - assert len(caps) == 3 + assert {"gemini-3.8-flash", "gemini-3.8-flash-medium", "gemini-3.8-flash-high"} <= { + cap.canonical_model for cap in caps + } for cap in caps: assert cap.effort_levels == ["low", "medium", "high"] diff --git a/apps/sandbox-executor/tests/test_models_cli.py b/apps/sandbox-executor/tests/test_models_cli.py index 7788cc194..effe42b9b 100644 --- a/apps/sandbox-executor/tests/test_models_cli.py +++ b/apps/sandbox-executor/tests/test_models_cli.py @@ -16,6 +16,15 @@ ) from sandbox_executor.preflight import PreflightResult, PreflightStatus +ANTIGRAVITY_EXPECTED_MODELS = { + "gemini-3.8-flash", + "gemini-3.8-flash-medium", + "gemini-3.8-flash-high", + "gemini-4-neon", + "gemini-4-carbon", + "gemini-4-hydrogen", +} + def test_models_command_table_display(capsys: pytest.CaptureFixture[str]) -> None: """Verify that holon models executes real CLI dispatch and prints a formatted table.""" @@ -72,6 +81,7 @@ def test_models_agent_filtering_antigravity(capsys: pytest.CaptureFixture[str]) assert "gemini-3.8-flash" in out assert "gemini-3.8-flash-medium" in out assert "gemini-3.8-flash-high" in out + assert "gemini-4-neon" in out assert "low, medium, high" in out assert "claude-agent" not in out @@ -169,7 +179,7 @@ def test_models_json_filtered_agent(capsys: pytest.CaptureFixture[str]) -> None: captured = capsys.readouterr() data = json.loads(captured.out) - assert len(data) == 3 + assert {entry["canonical_model"] for entry in data} >= ANTIGRAVITY_EXPECTED_MODELS for entry in data: assert entry["runner"] == "antigravity-agent" assert entry["effort_levels"] == ["low", "medium", "high"] @@ -327,6 +337,25 @@ def test_doctor_shows_canonical_model_and_alias_in_text_and_json(capsys: pytest. assert "fable" in payload["model"]["reason"] +@pytest.mark.parametrize("model_flag", ["gemini-4-neon", "neon"]) +def test_doctor_accepts_gemini_4_neon_for_antigravity(capsys: pytest.CaptureFixture[str], model_flag: str) -> None: + ok_probe = PreflightResult( + status=PreflightStatus.OK, + agent="antigravity-agent", + model="gemini-4-neon", + image="holon/agent-antigravity", + exit_code=0, + output_excerpt="OK", + hint="", + ) + with patch("sandbox_executor.cli.doctor.run_preflight_probe", return_value=ok_probe) as probe: + with pytest.raises(SystemExit) as exc_info: + cli.main(["doctor", "--agent", "antigravity-agent", "--model", model_flag]) + assert exc_info.value.code == 0 + assert probe.call_args[0][:2] == ("antigravity-agent", "gemini-4-neon") + assert "Model resolved to gemini-4-neon" in capsys.readouterr().out + + def test_detect_runner_auth_status_safe_and_opaque() -> None: """Verify detect_runner_auth_status produces only known opaque status strings.""" valid_statuses = { @@ -339,4 +368,4 @@ def test_detect_runner_auth_status_safe_and_opaque() -> None: for cap in get_model_capabilities(): status = detect_runner_auth_status(cap.runner) assert status in valid_statuses - assert len(get_available_models_for_runner("antigravity")) == 3 + assert set(get_available_models_for_runner("antigravity")) >= ANTIGRAVITY_EXPECTED_MODELS diff --git a/apps/sandbox-executor/tests/test_runner_specs.py b/apps/sandbox-executor/tests/test_runner_specs.py index 6fb8731ef..89eb3321a 100644 --- a/apps/sandbox-executor/tests/test_runner_specs.py +++ b/apps/sandbox-executor/tests/test_runner_specs.py @@ -7,7 +7,7 @@ import pytest from sandbox_executor import claude_keychain -from sandbox_executor.agent_defaults import normalise_model_and_effort +from sandbox_executor.agent_defaults import is_valid_model_for_runner, normalise_model_and_effort from sandbox_executor.launcher import antigravity_mounts as launcher_antigravity_mounts from sandbox_executor.launcher import pi_mounts as launcher_pi_mounts from sandbox_executor.launcher.mounts import get_agent_session_mounts @@ -222,7 +222,21 @@ def test_pi_accepts_models_json_in_pi_coding_agent_dir( assert RUNNER_SPECS["pi"].check_credentials() is None +@pytest.fixture +def no_agy(monkeypatch: pytest.MonkeyPatch): + antigravity_runner._agy_listed_models.cache_clear() + monkeypatch.setattr(antigravity_runner.shutil, "which", lambda name: None) + yield + antigravity_runner._agy_listed_models.cache_clear() + + +def _stub_agy_models(monkeypatch: pytest.MonkeyPatch, run) -> None: + monkeypatch.setattr(antigravity_runner.shutil, "which", lambda name: "/usr/bin/agy") + monkeypatch.setattr(antigravity_runner.subprocess, "run", run) + + @pytest.mark.parametrize("agent_id", list(RUNNER_SPECS)) +@pytest.mark.usefixtures("no_agy") def test_every_spec_discovers_its_declared_models(agent_id: str) -> None: spec = RUNNER_SPECS[agent_id] discovered = spec.discovered_models() @@ -254,6 +268,11 @@ def test_model_discovery_hook_replaces_declared_capabilities() -> None: ("gemini-3.8-flash-medium", None, ("gemini-3.8-flash-medium", "medium")), ("gemini-3.8-flash-medium", " LOW ", ("gemini-3.8-flash-low", "low")), ("gemini-3.8-flash-high", "unknown", ("gemini-3.8-flash-high", "high")), + ("gemini-4-neon", None, ("gemini-4-neon", None)), + ("gemini-4-neon-high", "LOW ", ("gemini-4-neon-low", "low")), + ("gemini-4-neon", "max", ("gemini-4-neon", None)), + ("gemini-4-neon-medium", None, ("gemini-4-neon-medium", "medium")), + ("gemini-4-carbon", "high", ("gemini-4-carbon-high", "high")), ], ) def test_antigravity_spec_coordinates_model_and_effort( @@ -435,3 +454,80 @@ def test_next_fallback_model_stops_at_the_last_rung_and_off_ladder() -> None: assert next_fallback_model("claude-agent", "claude-haiku-4-5") is None assert next_fallback_model("antigravity-agent", "gemini-3.8-flash-medium") is None assert next_fallback_model("pi-agent", "local-model") is None + + +@pytest.mark.usefixtures("no_agy") +def test_antigravity_fallback_covers_gemini_4_and_legacy_flash_models() -> None: + canonical = {cap.canonical_model for cap in RUNNER_SPECS["antigravity"].discovered_models()} + assert { + "gemini-3.8-flash", + "gemini-3.8-flash-medium", + "gemini-3.8-flash-high", + "gemini-4-neon", + "gemini-4-argon", + "gemini-4-carbon", + "gemini-4-hydrogen", + } <= canonical + assert set(ANTIGRAVITY_LADDER) <= canonical + + +@pytest.mark.parametrize( + ("model", "expected"), + [ + ("neon", ("gemini-4-neon", None)), + ("carbon", ("gemini-4-carbon", None)), + ("hydrogen", ("gemini-4-hydrogen", None)), + ("gemini-4-neon-high", ("gemini-4-neon-high", "high")), + ], +) +def test_antigravity_resolves_gemini_4_aliases_without_inventing_effort( + model: str, expected: tuple[str, str | None] +) -> None: + assert normalise_model_and_effort("antigravity", model) == expected + + +@pytest.mark.parametrize( + "model", ["gemini-4-neon", "gemini-4-neon-high", "gemini-4-carbon-low", "gemini-4-hydrogen", "neon"] +) +def test_antigravity_accepts_gemini_4_models(model: str) -> None: + assert is_valid_model_for_runner("antigravity-agent", model) + + +@pytest.mark.usefixtures("no_agy") +def test_antigravity_discovery_adds_listed_gemini_models(monkeypatch: pytest.MonkeyPatch) -> None: + listing = "MODEL DESCRIPTION\ngemini-4-neon default\ngemini-4-neon-pro new\nwarning: gemini-x is slow\n\n" + calls: list[list[str]] = [] + + def run(cmd: list[str], **kwargs: object) -> subprocess.CompletedProcess[str]: + calls.append(cmd) + return subprocess.CompletedProcess(cmd, 0, stdout=listing, stderr="") + + _stub_agy_models(monkeypatch, run) + spec = RUNNER_SPECS["antigravity"] + discovered = spec.discovered_models() + assert discovered[: len(spec.model_capabilities)] == spec.model_capabilities + assert [cap.canonical_model for cap in discovered[len(spec.model_capabilities) :]] == ["gemini-4-neon-pro"] + spec.discovered_models() + assert calls == [["agy", "models"]] + + +@pytest.mark.parametrize( + "outcome", + [ + subprocess.TimeoutExpired(["agy", "models"], 5), + OSError("agy vanished"), + subprocess.CompletedProcess(["agy", "models"], 1, stdout="gemini-4-neon-pro\n", stderr="auth required"), + ], +) +@pytest.mark.usefixtures("no_agy") +def test_antigravity_discovery_falls_back_when_agy_fails( + monkeypatch: pytest.MonkeyPatch, outcome: BaseException | subprocess.CompletedProcess[str] +) -> None: + def run(cmd: list[str], **kwargs: object) -> subprocess.CompletedProcess[str]: + if isinstance(outcome, BaseException): + raise outcome + return outcome + + _stub_agy_models(monkeypatch, run) + spec = RUNNER_SPECS["antigravity"] + assert spec.discovered_models() == spec.model_capabilities diff --git a/executions/E-1796254229-CLA-CO5.5.md b/executions/E-1796254229-CLA-CO5.5.md index 4630ca19b..ff36ea0d8 100644 --- a/executions/E-1796254229-CLA-CO5.5.md +++ b/executions/E-1796254229-CLA-CO5.5.md @@ -2,19 +2,19 @@ ## Summary -Implements plan `P-1796254006-CLA-CO5.5-2` for intent `I-1796253983-hac-antigravity-model-discovery`: static -gemini-4 fallback capabilities for the Antigravity runner, a guarded and cached `agy models` discovery hook, and a -cleaner effort normaliser that never invents or doubles an effort suffix. +Implements plan `P-1796254006-CLA-CO5.5-2` for intent `I-1796253983-hac-antigravity-model-discovery`: static gemini-4 +fallback capabilities for the Antigravity runner, a guarded and cached `agy models` discovery hook, and a cleaner effort +normaliser that never invents or doubles an effort suffix. ## Actual Metrics | metric | value | | --------------------- | ----- | -| success_actual | 0.0 | -| entropy_actual | 0.0 | -| impact_actual | 0.0 | -| cost_actual | 0.0 | -| learning_value_actual | 0.0 | +| success_actual | 0.95 | +| entropy_actual | 4.6 | +| impact_actual | 68.0 | +| cost_actual | 9.0 | +| learning_value_actual | 3.0 | ## Steps Executed @@ -31,8 +31,8 @@ cleaner effort normaliser that never invents or doubles an effort suffix. - `_agy_listed_models` (wrapped in `functools.cache`) returns `()` when `shutil.which("agy")` is None, on `OSError` or `subprocess.SubprocessError` (including `TimeoutExpired` after `_AGY_MODELS_TIMEOUT_SECONDS = 5`) and on a non-zero exit; otherwise it keeps de-duplicated, lower-cased first tokens that fully match `gemini-[a-z0-9][a-z0-9.\-]*`. -- `_discover_antigravity_models` only adds listed ids that are not already a canonical name or `canonical-effort` form of - a fallback entry; it is set as `SPEC.model_discovery_hook`. No `env=`, cwd or git overlay on the `agy` child. +- `_discover_antigravity_models` only adds listed ids that are not already a canonical name or `canonical-effort` form + of a fallback entry; it is set as `SPEC.model_discovery_hook`. No `env=`, cwd or git overlay on the `agy` child. - `_gemini_capability` now takes variadic aliases so discovered models reuse it with no aliases. - Learning target: `agy` is not on PATH in this sandbox, so the real `agy models` output format and latency remain unverified; the static fallback carries acceptance. @@ -44,3 +44,29 @@ cleaner effort normaliser that never invents or doubles an effort suffix. else keeps the existing suffix level, else returns no effort. A bare `gemini-4-neon` never gains an effort. - Existing normaliser assertions pass unchanged; the only failures after Steps 2 and 3 were the three expected antigravity count assertions handled in Step 4. + +### Step 4: Tests + +- `test_runner_specs.py`: `no_agy` fixture (stubs `shutil.which`, clears the `_agy_listed_models` cache on setup and + teardown) applied to `test_every_spec_discovers_its_declared_models`; new tests for the gemini-4 fallback set, alias + resolution without an invented effort, validation of gemini-4 ids, discovery from a stubbed listing (header and noise + ignored, `gemini-4-neon-pro` added, one `agy` call per process), and fallback on `TimeoutExpired`, `OSError` and a + non-zero exit; extra normaliser cases from Step 3. +- `test_models_cli.py`: count assertions replaced by superset checks; `gemini-4-neon` asserted in the antigravity + listing; `holon doctor --agent antigravity-agent --model gemini-4-neon` (and `--model neon`) exits 0 and probes + `("antigravity-agent", "gemini-4-neon")`. +- `test_gemini_runner_purged.py` (plan reframe): only `assert len(caps) == 3` became a subset check on the three legacy + canonical names, because any added gemini-4 capability breaks that count. +- `runners/__init__.py` left byte-identical; no registry-level symbol was needed. +- Follow-up learning: `AntigravityAgentRunner.compose_cmd` still always appends `--effort` (outside scope). + +## Tests Run + +| command | result | pytest time | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------- | +| `uv run pytest apps/sandbox-executor/tests/test_runner_specs.py apps/sandbox-executor/tests/test_models_cli.py apps/sandbox-executor/tests/test_gemini_runner_purged.py` (after Steps 2-3, before test updates) | 113 passed, 3 failed (expected count assertions) | `4.83s` | +| `uv run pytest` on `test_runner_specs.py`, `test_models_cli.py`, `test_gemini_runner_purged.py`, `test_model_alias_families.py`, `test_agent_defaults.py`, `test_quota_step_down.py` | 217 passed, 0 failed | `9.99s` | +| `uv run task test` | 11352 passed, 8 skipped, 0 failed | `177.16s` | +| `uv run task lint` | passed (ruff, format, module budgets, self-explaining check) | n/a | + +Single full-suite run, so the median equals that run: `177.16s`. From 948ff1e27bd56b9534f7cb6693168cb2f95f41f0 Mon Sep 17 00:00:00 2001 From: Holon Executor Agent Date: Wed, 2 Dec 2026 23:46:36 +0000 Subject: [PATCH 06/10] execute: E-1796254229-CLA-CO5.5 completed for plan I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/_ --- .../I-1796253983-hac-antigravity-model-discovery.jsonl | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl diff --git a/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl b/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl new file mode 100644 index 000000000..1f0be609e --- /dev/null +++ b/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl @@ -0,0 +1,7 @@ +{"action_id": "ACT-1796254556-f0ae3a42", "execution_id": "E-1796254229-CLA-CO5.5", "action": "Executed agent claude-agent with model claude-opus-5-5", "category": "code", "target": "claude-agent:claude-opus-5-5", "outcome": "success", "entry_type": "action", "parent_action_id": null, "event_type": "command_execution", "labels": ["agent", "claude-agent", "execution"], "error_context": null, "mistake_category": null, "action_origin": "initial_implementation", "review_severity": null, "review_iteration": null, "review_finding_ids": null, "review_disposition": null, "rejection_reason": null, "introduced_by_action_id": null, "created_at": "2026-12-02T23:35:56.762577Z"} +{"execution_id": "E-1796254229-CLA-CO5.5", "action": "test_failure", "category": "test", "target": "stage_3", "outcome": "failure", "action_origin": "initial_implementation", "event_type": "test_run", "stage": "stage_3", "branch": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "run_id": "57c44c1e73ee", "head_sha": "53dd4bb0b90f04297769ce8e060a7aacf7e6e851", "failing_test_ids": ["apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave"], "test_excerpts": {"apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw7] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-5/popen-gw7/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can han"}, "environment": {"variables": ["HOLON_AGENT_ID", "HOLON_AGENT_SETTINGS", "HOLON_CONFIG_RESOLVED", "HOLON_ROLE", "HOLON_SKIP_PREFLIGHT", "HOLON_STAGE_BUDGET_EXECUTE_MINUTES", "HOLON_STAGE_BUDGET_SECONDS", "HOLON_TARGET_WORKTREE", "HOLON_TOKEN_REDUCE", "PYTHONPATH", "PYTHON_SHA256", "PYTHON_VERSION", "UV_FROZEN", "UV_PROJECT_ENVIRONMENT"], "values": {"UV_FROZEN": "1"}, "identity_overrides": [], "HOME_set": true, "TMPDIR_set": false}, "classification": "flaky", "failure_signature": "d67238f28c64325b", "iteration": 0, "model_tier": "claude-opus-5-5", "base_check": "not_run", "error_context": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw7] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-5/popen-gw7/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can han", "entry_type": "action", "action_id": "ACT-1796254830-48ffe9a3", "created_at": "2026-12-02T23:40:30.270633Z"} +{"execution_id": "E-1796254229-CLA-CO5.5", "action": "test_failure", "category": "test", "target": "stage_3", "outcome": "success", "action_origin": "initial_implementation", "event_type": "test_run", "stage": "stage_3", "branch": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "run_id": "57c44c1e73ee", "head_sha": "53dd4bb0b90f04297769ce8e060a7aacf7e6e851", "failing_test_ids": ["apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave"], "test_excerpts": {"apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw7] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-5/popen-gw7/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can han"}, "environment": {"variables": ["HOLON_AGENT_ID", "HOLON_AGENT_SETTINGS", "HOLON_CONFIG_RESOLVED", "HOLON_ROLE", "HOLON_SKIP_PREFLIGHT", "HOLON_STAGE_BUDGET_EXECUTE_MINUTES", "HOLON_STAGE_BUDGET_SECONDS", "HOLON_TARGET_WORKTREE", "HOLON_TOKEN_REDUCE", "PYTHONPATH", "PYTHON_SHA256", "PYTHON_VERSION", "UV_FROZEN", "UV_PROJECT_ENVIRONMENT"], "values": {"UV_FROZEN": "1"}, "identity_overrides": [], "HOME_set": true, "TMPDIR_set": false}, "classification": "flaky", "failure_signature": "d67238f28c64325b", "iteration": 0, "model_tier": "claude-opus-5-5", "base_check": "not_run", "error_context": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw7] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-5/popen-gw7/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can han", "entry_type": "action", "action_id": "ACT-1796254834-3cb551a1", "created_at": "2026-12-02T23:40:34.007359Z"} +{"execution_id": "E-1796254229-CLA-CO5.5", "action": "test_failure", "category": "test", "target": "stage_3", "outcome": "success", "action_origin": "initial_implementation", "event_type": "test_run", "stage": "stage_3", "branch": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "run_id": "57c44c1e73ee", "head_sha": "53dd4bb0b90f04297769ce8e060a7aacf7e6e851", "failing_test_ids": ["apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave"], "test_excerpts": {"apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw7] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-5/popen-gw7/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can han"}, "environment": {"variables": ["HOLON_AGENT_ID", "HOLON_AGENT_SETTINGS", "HOLON_CONFIG_RESOLVED", "HOLON_ROLE", "HOLON_SKIP_PREFLIGHT", "HOLON_STAGE_BUDGET_EXECUTE_MINUTES", "HOLON_STAGE_BUDGET_SECONDS", "HOLON_TARGET_WORKTREE", "HOLON_TOKEN_REDUCE", "PYTHONPATH", "PYTHON_SHA256", "PYTHON_VERSION", "UV_FROZEN", "UV_PROJECT_ENVIRONMENT"], "values": {"UV_FROZEN": "1"}, "identity_overrides": [], "HOME_set": true, "TMPDIR_set": false}, "classification": "flaky", "failure_signature": "d67238f28c64325b", "iteration": 0, "model_tier": "claude-opus-5-5", "base_check": "not_run", "error_context": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw7] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-5/popen-gw7/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can han", "entry_type": "action", "action_id": "ACT-1796254837-27e7d075", "created_at": "2026-12-02T23:40:37.728781Z"} +{"execution_id": "E-1796254229-CLA-CO5.5", "action": "test_failure", "category": "test", "target": "stage_3", "outcome": "failure", "action_origin": "initial_implementation", "event_type": "test_run", "stage": "stage_3", "branch": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "run_id": "57c44c1e73ee", "head_sha": "53dd4bb0b90f04297769ce8e060a7aacf7e6e851", "failing_test_ids": ["apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave", "apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_thread_appends_do_not_interleave"], "test_excerpts": {"apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw16] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-11/popen-gw16/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can ", "apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_thread_appends_do_not_interleave": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_thread_appends_do_not_interleave\n_______________ test_concurrent_thread_appends_do_not_interleave _______________\n[gw16] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\nself = \nfd = 15\n def _acquire_exclusive_lock(self, fd: int) -> None:\n start_time = time.monotonic()\n delay = self.initial_delay\n while True:\n try:\n> fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)\nE BlockingIOError"}, "environment": {"variables": ["HOLON_AGENT_ID", "HOLON_AGENT_SETTINGS", "HOLON_CONFIG_RESOLVED", "HOLON_ROLE", "HOLON_SKIP_PREFLIGHT", "HOLON_STAGE_BUDGET_EXECUTE_MINUTES", "HOLON_STAGE_BUDGET_SECONDS", "HOLON_TARGET_WORKTREE", "HOLON_TOKEN_REDUCE", "PYTHONPATH", "PYTHON_SHA256", "PYTHON_VERSION", "UV_FROZEN", "UV_PROJECT_ENVIRONMENT"], "values": {"UV_FROZEN": "1"}, "identity_overrides": [], "HOME_set": true, "TMPDIR_set": false}, "classification": "flaky", "failure_signature": "f2681da753a44cfc", "iteration": 0, "model_tier": "claude-opus-5-5", "base_check": "not_run", "error_context": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw16] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-11/popen-gw16/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can ", "entry_type": "action", "action_id": "ACT-1796255193-6cdf540c", "created_at": "2026-12-02T23:46:33.396264Z"} +{"entry_type": "summary", "execution_id": "E-1796254229-CLA-CO5.5", "plan_branch": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/_", "agent": "claude-agent", "agent_version": "2.1.302", "model": "claude-opus-5-5", "status": "success", "summary": "Plan executed successfully", "created_at": "2026-12-02T23:30:32.036755Z", "agent_output_truncated": false, "agent_output_bytes": 861, "ledger_revision": 1, "execution_notes": "executions/E-1796254229-CLA-CO5.5.md", "execution_notes_valid": true, "elapsed_seconds": 962.8, "budget_seconds": 604713.0, "test_pass_rate": 0.9998238195912614, "tests_passed": 11350, "tests_failed": 2, "tests_errored": 0, "test_exit_code": 1, "test_source": "stage_3", "test_failure_classification": "flaky", "test_failure_status": "blocked", "test_failure_blocked_reason": "persistent flakiness", "test_failure_rows": ["ACT-1796254830-48ffe9a3", "ACT-1796254834-3cb551a1", "ACT-1796254837-27e7d075", "ACT-1796255193-6cdf540c"], "test_fix_tier": "claude-opus-5-5"} +{"action_id": "ACT-1796255194-f469a549", "execution_id": "E-1796254229-CLA-CO5.5", "action": "Committed execution changes: execute: E-1796254229-CLA-CO5.5 completed for plan I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/_", "category": "code", "target": "HEAD", "outcome": "success", "entry_type": "action", "parent_action_id": null, "event_type": "git_mutation", "labels": ["commit", "git"], "error_context": null, "mistake_category": null, "action_origin": "initial_implementation", "review_severity": null, "review_iteration": null, "review_finding_ids": null, "review_disposition": null, "rejection_reason": null, "introduced_by_action_id": null, "created_at": "2026-12-02T23:46:34.825131Z"} From e4b2488fbcfc2e335ac97cad44cfd227ee3bf2d4 Mon Sep 17 00:00:00 2001 From: Holon Review Loop Agent Date: Thu, 3 Dec 2026 00:11:17 +0000 Subject: [PATCH 07/10] fix(review): resolve findings R1-F1, R3-F2, FIND-CI-001 (iteration 1) Action-Origin: pr_review Review-Iteration: 1 Review-Finding-Ids: R1-F1, R3-F2, FIND-CI-001 Review-Severity: important --- .../src/sandbox_executor/runners/antigravity.py | 4 +++- apps/sandbox-executor/tests/test_runner_specs.py | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py index c5576d0d3..a8bc07fd0 100644 --- a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py +++ b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py @@ -126,6 +126,7 @@ def _agy_listed_models() -> tuple[str, ...]: try: completed = subprocess.run( ["agy", "models"], + stdin=subprocess.DEVNULL, capture_output=True, text=True, timeout=_AGY_MODELS_TIMEOUT_SECONDS, @@ -149,7 +150,8 @@ def _known_model_ids(capabilities: tuple[ModelCapability, ...]) -> set[str]: def _discover_antigravity_models(spec: RunnerSpec) -> tuple[ModelCapability, ...]: known = _known_model_ids(spec.model_capabilities) - unseen = (model_id for model_id in _agy_listed_models() if model_id not in known) + listed_bases = dict.fromkeys(_split_effort_suffix(model_id)[0] for model_id in _agy_listed_models()) + unseen = (model_id for model_id in listed_bases if model_id not in known) return (*spec.model_capabilities, *(_gemini_capability(model_id) for model_id in unseen)) diff --git a/apps/sandbox-executor/tests/test_runner_specs.py b/apps/sandbox-executor/tests/test_runner_specs.py index 89eb3321a..d6f23acd7 100644 --- a/apps/sandbox-executor/tests/test_runner_specs.py +++ b/apps/sandbox-executor/tests/test_runner_specs.py @@ -495,11 +495,15 @@ def test_antigravity_accepts_gemini_4_models(model: str) -> None: @pytest.mark.usefixtures("no_agy") def test_antigravity_discovery_adds_listed_gemini_models(monkeypatch: pytest.MonkeyPatch) -> None: - listing = "MODEL DESCRIPTION\ngemini-4-neon default\ngemini-4-neon-pro new\nwarning: gemini-x is slow\n\n" + listing = ( + "MODEL DESCRIPTION\ngemini-4-neon default\ngemini-4-neon-pro-high new\ngemini-4-neon-pro new\n" + "warning: gemini-x is slow\n\n" + ) calls: list[list[str]] = [] def run(cmd: list[str], **kwargs: object) -> subprocess.CompletedProcess[str]: calls.append(cmd) + assert kwargs["stdin"] is subprocess.DEVNULL return subprocess.CompletedProcess(cmd, 0, stdout=listing, stderr="") _stub_agy_models(monkeypatch, run) From a8e1e6e90ecb7e476042029718c6fb97f17ea4f7 Mon Sep 17 00:00:00 2001 From: Holon Review Loop Agent Date: Thu, 3 Dec 2026 11:16:50 +1100 Subject: [PATCH 08/10] chore(review): record review ledger rows (iteration 1) Action-Origin: pr_review Review-Iteration: 1 --- ...3983-hac-antigravity-model-discovery.jsonl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl b/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl index 1f0be609e..98df0982d 100644 --- a/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl +++ b/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl @@ -5,3 +5,22 @@ {"execution_id": "E-1796254229-CLA-CO5.5", "action": "test_failure", "category": "test", "target": "stage_3", "outcome": "failure", "action_origin": "initial_implementation", "event_type": "test_run", "stage": "stage_3", "branch": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "run_id": "57c44c1e73ee", "head_sha": "53dd4bb0b90f04297769ce8e060a7aacf7e6e851", "failing_test_ids": ["apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave", "apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_thread_appends_do_not_interleave"], "test_excerpts": {"apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw16] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-11/popen-gw16/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can ", "apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_thread_appends_do_not_interleave": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_thread_appends_do_not_interleave\n_______________ test_concurrent_thread_appends_do_not_interleave _______________\n[gw16] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\nself = \nfd = 15\n def _acquire_exclusive_lock(self, fd: int) -> None:\n start_time = time.monotonic()\n delay = self.initial_delay\n while True:\n try:\n> fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)\nE BlockingIOError"}, "environment": {"variables": ["HOLON_AGENT_ID", "HOLON_AGENT_SETTINGS", "HOLON_CONFIG_RESOLVED", "HOLON_ROLE", "HOLON_SKIP_PREFLIGHT", "HOLON_STAGE_BUDGET_EXECUTE_MINUTES", "HOLON_STAGE_BUDGET_SECONDS", "HOLON_TARGET_WORKTREE", "HOLON_TOKEN_REDUCE", "PYTHONPATH", "PYTHON_SHA256", "PYTHON_VERSION", "UV_FROZEN", "UV_PROJECT_ENVIRONMENT"], "values": {"UV_FROZEN": "1"}, "identity_overrides": [], "HOME_set": true, "TMPDIR_set": false}, "classification": "flaky", "failure_signature": "f2681da753a44cfc", "iteration": 0, "model_tier": "claude-opus-5-5", "base_check": "not_run", "error_context": "FAILED apps/sandbox-executor/tests/test_ledger_lock.py::test_concurrent_process_appends_do_not_interleave\n______________ test_concurrent_process_appends_do_not_interleave _______________\n[gw16] linux -- Python 3.13.14 /home/holon/.cache/holon-venv/bin/python\ntmp_path = PosixPath('/tmp/pytest-of-holon/pytest-11/popen-gw16/test_concurrent_process_append0')\n def test_concurrent_process_appends_do_not_interleave(tmp_path: Path) -> None:\n ledger_file = str(tmp_path / \"executions.jsonl\")\n # why: fresh interpreters importing only sandbox_executor; forking a threaded xdist worker can ", "entry_type": "action", "action_id": "ACT-1796255193-6cdf540c", "created_at": "2026-12-02T23:46:33.396264Z"} {"entry_type": "summary", "execution_id": "E-1796254229-CLA-CO5.5", "plan_branch": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/_", "agent": "claude-agent", "agent_version": "2.1.302", "model": "claude-opus-5-5", "status": "success", "summary": "Plan executed successfully", "created_at": "2026-12-02T23:30:32.036755Z", "agent_output_truncated": false, "agent_output_bytes": 861, "ledger_revision": 1, "execution_notes": "executions/E-1796254229-CLA-CO5.5.md", "execution_notes_valid": true, "elapsed_seconds": 962.8, "budget_seconds": 604713.0, "test_pass_rate": 0.9998238195912614, "tests_passed": 11350, "tests_failed": 2, "tests_errored": 0, "test_exit_code": 1, "test_source": "stage_3", "test_failure_classification": "flaky", "test_failure_status": "blocked", "test_failure_blocked_reason": "persistent flakiness", "test_failure_rows": ["ACT-1796254830-48ffe9a3", "ACT-1796254834-3cb551a1", "ACT-1796254837-27e7d075", "ACT-1796255193-6cdf540c"], "test_fix_tier": "claude-opus-5-5"} {"action_id": "ACT-1796255194-f469a549", "execution_id": "E-1796254229-CLA-CO5.5", "action": "Committed execution changes: execute: E-1796254229-CLA-CO5.5 completed for plan I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/_", "category": "code", "target": "HEAD", "outcome": "success", "entry_type": "action", "parent_action_id": null, "event_type": "git_mutation", "labels": ["commit", "git"], "error_context": null, "mistake_category": null, "action_origin": "initial_implementation", "review_severity": null, "review_iteration": null, "review_finding_ids": null, "review_disposition": null, "rejection_reason": null, "introduced_by_action_id": null, "created_at": "2026-12-02T23:46:34.825131Z"} +{"action_id": "ACT-REV-1796256149-fff25e9c", "execution_id": "REV-ITR-1-1796256149", "action": "Review Loop iteration 1 reviewer 1 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["FIND-R1-001-01"], "labels": ["review", "reviewer", "iteration-1"], "error_context": null, "review_reviewer_index": 1, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 0, "nit": 1}, "created_at": "2026-12-03T00:02:29.022511Z"} +{"action_id": "ACT-FIND-1796256149-b3ea202f", "execution_id": "REV-FIND-1-1796256149", "action": "Review Loop iteration 1 finding detected: FIND-R1-001-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["FIND-R1-001-01"], "labels": ["review", "finding", "iteration-1"], "error_context": "Import-time agy models subprocess inherits stdin, so an interactive agy prompt can block every CLI start until the timeout; pass stdin=subprocess.DEVNULL.", "review_reviewer_index": 1, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 127, "created_at": "2026-12-03T00:02:29.041100Z"} +{"action_id": "ACT-REV-1796256149-edb7989f", "execution_id": "REV-ITR-1-1796256149", "action": "Review Loop iteration 1 reviewer 2 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R2-001-01"], "labels": ["review", "reviewer", "iteration-1"], "error_context": null, "review_reviewer_index": 2, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:02:29.062086Z"} +{"action_id": "ACT-FIND-1796256149-02053e36", "execution_id": "REV-FIND-1-1796256149", "action": "Review Loop iteration 1 finding detected: FIND-R2-001-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R2-001-01"], "labels": ["review", "finding", "iteration-1"], "error_context": "agy models discovery runs as a subprocess (up to 5 s) on every agent_defaults import, so every holon CLI start spawns agy; make discovery lazy on first antigravity capability lookup.", "review_reviewer_index": 2, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 125, "created_at": "2026-12-03T00:02:29.086242Z"} +{"action_id": "ACT-REV-1796256149-ed2ec481", "execution_id": "REV-ITR-1-1796256149", "action": "Review Loop iteration 1 reviewer 3 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R3-001-01", "FIND-R3-001-02"], "labels": ["review", "reviewer", "iteration-1"], "error_context": null, "review_reviewer_index": 3, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 1}, "created_at": "2026-12-03T00:02:29.110336Z"} +{"action_id": "ACT-FIND-1796256149-f5b84ee9", "execution_id": "REV-FIND-1-1796256149", "action": "Review Loop iteration 1 finding detected: FIND-R3-001-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R3-001-01"], "labels": ["review", "finding", "iteration-1"], "error_context": "agent_defaults builds RUNNER_CAPABILITIES at import, so every holon command forks `agy models` (up to 5 s); make discovery lazy.", "review_reviewer_index": 3, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 125, "created_at": "2026-12-03T00:02:29.126163Z"} +{"action_id": "ACT-FIND-1796256149-260ec76c", "execution_id": "REV-FIND-1-1796256149", "action": "Review Loop iteration 1 finding detected: FIND-R3-001-02", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["FIND-R3-001-02"], "labels": ["review", "finding", "iteration-1"], "error_context": "Listed IDs with an effort suffix (e.g. gemini-4-neon-pro-high) are registered as separate canonical models; strip the suffix first.", "review_reviewer_index": 3, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 150, "created_at": "2026-12-03T00:02:29.141935Z"} +{"action_id": "ACT-REV-1796256159-a463f5f0", "execution_id": "REV-ITR-1-1796256159", "action": "Review Loop iteration 1 evaluation for I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-CI-001", "FIND-R1-001-01", "FIND-R2-001-01", "FIND-R3-001-01", "FIND-R3-001-02"], "labels": ["review", "review-loop", "iteration-1"], "error_context": "Findings detected: ['FIND-CI-001', 'FIND-R1-001-01', 'FIND-R2-001-01', 'FIND-R3-001-01', 'FIND-R3-001-02']", "created_at": "2026-12-03T00:02:39.064135Z"} +{"action_id": "ACT-REV-1796256159-eb27ab66", "execution_id": "REV-ITR-1-1796256159", "action": "Review Loop iteration 1 reviewer 1 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["FIND-R1-001-01"], "labels": ["review", "reviewer", "iteration-1"], "error_context": null, "review_reviewer_index": 1, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 0, "nit": 1}, "created_at": "2026-12-03T00:02:39.065560Z"} +{"action_id": "ACT-FIND-1796256159-b6099e38", "execution_id": "REV-FIND-1-1796256159", "action": "Review Loop iteration 1 finding detected: FIND-R1-001-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["FIND-R1-001-01"], "labels": ["review", "finding", "iteration-1"], "error_context": "Import-time agy models subprocess inherits stdin, so an interactive agy prompt can block every CLI start until the timeout; pass stdin=subprocess.DEVNULL.", "review_reviewer_index": 1, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 127, "created_at": "2026-12-03T00:02:39.066517Z"} +{"action_id": "ACT-REV-1796256159-c016e436", "execution_id": "REV-ITR-1-1796256159", "action": "Review Loop iteration 1 reviewer 2 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R2-001-01"], "labels": ["review", "reviewer", "iteration-1"], "error_context": null, "review_reviewer_index": 2, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:02:39.067751Z"} +{"action_id": "ACT-FIND-1796256159-e80ca664", "execution_id": "REV-FIND-1-1796256159", "action": "Review Loop iteration 1 finding detected: FIND-R2-001-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R2-001-01"], "labels": ["review", "finding", "iteration-1"], "error_context": "agy models discovery runs as a subprocess (up to 5 s) on every agent_defaults import, so every holon CLI start spawns agy; make discovery lazy on first antigravity capability lookup.", "review_reviewer_index": 2, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 125, "created_at": "2026-12-03T00:02:39.068895Z"} +{"action_id": "ACT-REV-1796256159-589370db", "execution_id": "REV-ITR-1-1796256159", "action": "Review Loop iteration 1 reviewer 3 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R3-001-01", "FIND-R3-001-02"], "labels": ["review", "reviewer", "iteration-1"], "error_context": null, "review_reviewer_index": 3, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 1}, "created_at": "2026-12-03T00:02:39.070275Z"} +{"action_id": "ACT-FIND-1796256159-e9b63aac", "execution_id": "REV-FIND-1-1796256159", "action": "Review Loop iteration 1 finding detected: FIND-R3-001-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-R3-001-01"], "labels": ["review", "finding", "iteration-1"], "error_context": "agent_defaults builds RUNNER_CAPABILITIES at import, so every holon command forks `agy models` (up to 5 s); make discovery lazy.", "review_reviewer_index": 3, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 125, "created_at": "2026-12-03T00:02:39.071550Z"} +{"action_id": "ACT-FIND-1796256159-e3268050", "execution_id": "REV-FIND-1-1796256159", "action": "Review Loop iteration 1 finding detected: FIND-R3-001-02", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["FIND-R3-001-02"], "labels": ["review", "finding", "iteration-1"], "error_context": "Listed IDs with an effort suffix (e.g. gemini-4-neon-pro-high) are registered as separate canonical models; strip the suffix first.", "review_reviewer_index": 3, "review_file": "apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py", "review_line": 150, "created_at": "2026-12-03T00:02:39.072289Z"} +{"action_id": "ACT-FIND-1796256159-689952b6", "execution_id": "REV-FIND-1-1796256159", "action": "Review Loop iteration 1 finding detected: FIND-CI-001", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-CI-001"], "labels": ["review", "finding", "iteration-1"], "error_context": "Findings detected: ['FIND-CI-001', 'FIND-R1-001-01', 'FIND-R2-001-01', 'FIND-R3-001-01', 'FIND-R3-001-02']", "created_at": "2026-12-03T00:02:39.073108Z"} +{"action_id": "ACT-RES-1796257009-f74f9673", "execution_id": "REV-RES-1-1796257009", "action": "Review Loop iteration 1 finding R1-F1 adjudicated: applied", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "success", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["R1-F1"], "review_disposition": "applied", "rejection_reason": null, "introduced_by_action_id": "ACT-FIND-1796256159-b6099e38", "labels": ["review", "resolver", "iteration-1"], "error_context": null, "created_at": "2026-12-03T00:16:49.898977Z"} +{"action_id": "ACT-RES-1796257009-2ed8d790", "execution_id": "REV-RES-1-1796257009", "action": "Review Loop iteration 1 finding R3-F2 adjudicated: applied", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "success", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["R3-F2"], "review_disposition": "applied", "rejection_reason": null, "introduced_by_action_id": "ACT-FIND-1796256159-e3268050", "labels": ["review", "resolver", "iteration-1"], "error_context": null, "created_at": "2026-12-03T00:16:49.899659Z"} +{"action_id": "ACT-RES-1796257009-a1e408fd", "execution_id": "REV-RES-1-1796257009", "action": "Review Loop iteration 1 finding FIND-CI-001 adjudicated: applied", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "success", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-CI-001"], "review_disposition": "applied", "rejection_reason": null, "introduced_by_action_id": "ACT-FIND-1796256159-689952b6", "labels": ["review", "resolver", "iteration-1"], "error_context": null, "created_at": "2026-12-03T00:16:49.899976Z"} From 3d156b759f8edfd6c002e0b7edf0e249c562a33c Mon Sep 17 00:00:00 2001 From: Holon Review Loop Agent Date: Thu, 3 Dec 2026 00:26:05 +0000 Subject: [PATCH 09/10] fix(review): resolve findings FIND-CI-002-RUN (iteration 2) Action-Origin: pr_review Review-Iteration: 2 Review-Finding-Ids: FIND-CI-002-RUN Review-Severity: important --- .../sandbox_executor/runners/antigravity.py | 48 ++++++++--- .../tests/test_runner_specs.py | 81 ++++++++++++++++--- 2 files changed, 103 insertions(+), 26 deletions(-) diff --git a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py index a8bc07fd0..82fec127b 100644 --- a/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py +++ b/apps/sandbox-executor/src/sandbox_executor/runners/antigravity.py @@ -4,12 +4,13 @@ import os import re import shutil +import signal import subprocess import sys from sandbox_executor.runners.spec import VALID_EFFORT_LEVELS, ModelCapability, RunnerSpec, has_api_key -# why: discovery runs while agent_defaults is imported, so every CLI start pays this bound when agy is slow. +# why: discovery runs while agent_defaults is imported, so each credentialed CLI start pays this bound if agy is slow. _AGY_MODELS_TIMEOUT_SECONDS = 5 _GEMINI_MODEL_ID = re.compile(r"gemini-[a-z0-9][a-z0-9.\-]*", re.IGNORECASE) _ANTIGRAVITY_CLI_CONTAINER_DIR = "/home/holon/.gemini/antigravity-cli" @@ -119,24 +120,42 @@ def _listed_gemini_model_ids(listing: str) -> tuple[str, ...]: return tuple(dict.fromkeys(token for token in first_tokens if _GEMINI_MODEL_ID.fullmatch(token))) -@functools.cache -def _agy_listed_models() -> tuple[str, ...]: - if shutil.which("agy") is None: - return () +def _kill_process_group(process: subprocess.Popen[str]) -> None: + try: + os.killpg(process.pid, signal.SIGKILL) + except OSError: + process.kill() + process.wait() + + +def _agy_models_listing() -> str | None: try: - completed = subprocess.run( + # why: agy forks helpers that inherit stdout, so a timeout must kill the whole group or the pipe never closes. + process = subprocess.Popen( ["agy", "models"], stdin=subprocess.DEVNULL, - capture_output=True, + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, text=True, - timeout=_AGY_MODELS_TIMEOUT_SECONDS, - check=False, + start_new_session=True, ) - except (OSError, subprocess.SubprocessError): - return () - if completed.returncode != 0: + except OSError: + return None + with process: + try: + stdout, _ = process.communicate(timeout=_AGY_MODELS_TIMEOUT_SECONDS) + except subprocess.TimeoutExpired: + _kill_process_group(process) + return None + return stdout if process.returncode == 0 else None + + +@functools.cache +def _agy_listed_models() -> tuple[str, ...]: + if shutil.which("agy") is None: return () - return _listed_gemini_model_ids(completed.stdout) + listing = _agy_models_listing() + return () if listing is None else _listed_gemini_model_ids(listing) def _known_model_ids(capabilities: tuple[ModelCapability, ...]) -> set[str]: @@ -149,6 +168,9 @@ def _known_model_ids(capabilities: tuple[ModelCapability, ...]) -> set[str]: def _discover_antigravity_models(spec: RunnerSpec) -> tuple[ModelCapability, ...]: + # why: agy cannot list models without a session or key, so skip forking it where it can only fail or hang. + if _check_credentials(spec) is not None: + return spec.model_capabilities known = _known_model_ids(spec.model_capabilities) listed_bases = dict.fromkeys(_split_effort_suffix(model_id)[0] for model_id in _agy_listed_models()) unseen = (model_id for model_id in listed_bases if model_id not in known) diff --git a/apps/sandbox-executor/tests/test_runner_specs.py b/apps/sandbox-executor/tests/test_runner_specs.py index d6f23acd7..c1b81dd81 100644 --- a/apps/sandbox-executor/tests/test_runner_specs.py +++ b/apps/sandbox-executor/tests/test_runner_specs.py @@ -230,9 +230,36 @@ def no_agy(monkeypatch: pytest.MonkeyPatch): antigravity_runner._agy_listed_models.cache_clear() -def _stub_agy_models(monkeypatch: pytest.MonkeyPatch, run) -> None: +class _FakeAgyProcess: + def __init__(self, outcome: BaseException | tuple[int, str]) -> None: + self.pid = -1 + self.returncode: int | None = None + self.killed = False + self._outcome = outcome + + def __enter__(self) -> "_FakeAgyProcess": + return self + + def __exit__(self, *exc_info: object) -> None: + return None + + def communicate(self, timeout: float | None = None) -> tuple[str, None]: + if isinstance(self._outcome, BaseException): + raise self._outcome + self.returncode, stdout = self._outcome + return stdout, None + + def kill(self) -> None: + self.killed = True + + def wait(self) -> int: + return -9 + + +def _stub_agy_models(monkeypatch: pytest.MonkeyPatch, popen) -> None: monkeypatch.setattr(antigravity_runner.shutil, "which", lambda name: "/usr/bin/agy") - monkeypatch.setattr(antigravity_runner.subprocess, "run", run) + monkeypatch.setattr(antigravity_runner, "_check_credentials", lambda spec: None) + monkeypatch.setattr(antigravity_runner.subprocess, "Popen", popen) @pytest.mark.parametrize("agent_id", list(RUNNER_SPECS)) @@ -501,12 +528,13 @@ def test_antigravity_discovery_adds_listed_gemini_models(monkeypatch: pytest.Mon ) calls: list[list[str]] = [] - def run(cmd: list[str], **kwargs: object) -> subprocess.CompletedProcess[str]: + def popen(cmd: list[str], **kwargs: object) -> _FakeAgyProcess: calls.append(cmd) assert kwargs["stdin"] is subprocess.DEVNULL - return subprocess.CompletedProcess(cmd, 0, stdout=listing, stderr="") + assert kwargs["start_new_session"] is True + return _FakeAgyProcess((0, listing)) - _stub_agy_models(monkeypatch, run) + _stub_agy_models(monkeypatch, popen) spec = RUNNER_SPECS["antigravity"] discovered = spec.discovered_models() assert discovered[: len(spec.model_capabilities)] == spec.model_capabilities @@ -519,19 +547,46 @@ def run(cmd: list[str], **kwargs: object) -> subprocess.CompletedProcess[str]: "outcome", [ subprocess.TimeoutExpired(["agy", "models"], 5), - OSError("agy vanished"), - subprocess.CompletedProcess(["agy", "models"], 1, stdout="gemini-4-neon-pro\n", stderr="auth required"), + (1, "gemini-4-neon-pro\n"), ], ) @pytest.mark.usefixtures("no_agy") def test_antigravity_discovery_falls_back_when_agy_fails( - monkeypatch: pytest.MonkeyPatch, outcome: BaseException | subprocess.CompletedProcess[str] + monkeypatch: pytest.MonkeyPatch, outcome: BaseException | tuple[int, str] ) -> None: - def run(cmd: list[str], **kwargs: object) -> subprocess.CompletedProcess[str]: - if isinstance(outcome, BaseException): - raise outcome - return outcome + _stub_agy_models(monkeypatch, lambda cmd, **kwargs: _FakeAgyProcess(outcome)) + spec = RUNNER_SPECS["antigravity"] + assert spec.discovered_models() == spec.model_capabilities + + +@pytest.mark.usefixtures("no_agy") +def test_antigravity_discovery_falls_back_when_agy_cannot_start(monkeypatch: pytest.MonkeyPatch) -> None: + def popen(cmd: list[str], **kwargs: object) -> _FakeAgyProcess: + raise OSError("agy vanished") + + _stub_agy_models(monkeypatch, popen) + spec = RUNNER_SPECS["antigravity"] + assert spec.discovered_models() == spec.model_capabilities + + +@pytest.mark.usefixtures("no_agy") +def test_antigravity_discovery_kills_the_agy_process_group_on_timeout(monkeypatch: pytest.MonkeyPatch) -> None: + process = _FakeAgyProcess(subprocess.TimeoutExpired(["agy", "models"], 5)) + process.pid = 4242 + killed_groups: list[tuple[int, int]] = [] + _stub_agy_models(monkeypatch, lambda cmd, **kwargs: process) + monkeypatch.setattr(antigravity_runner.os, "killpg", lambda pgid, sig: killed_groups.append((pgid, sig))) + spec = RUNNER_SPECS["antigravity"] + assert spec.discovered_models() == spec.model_capabilities + assert killed_groups == [(4242, antigravity_runner.signal.SIGKILL)] + + +@pytest.mark.usefixtures("no_agy") +def test_antigravity_discovery_never_spawns_agy_without_credentials(monkeypatch: pytest.MonkeyPatch) -> None: + def popen(cmd: list[str], **kwargs: object) -> _FakeAgyProcess: + raise AssertionError("agy models must not run without antigravity credentials") - _stub_agy_models(monkeypatch, run) + _stub_agy_models(monkeypatch, popen) + monkeypatch.setattr(antigravity_runner, "_check_credentials", lambda spec: "Error: missing credentials") spec = RUNNER_SPECS["antigravity"] assert spec.discovered_models() == spec.model_capabilities From 23a6c779633a15ae1257bdd2b7ef8525bd394215 Mon Sep 17 00:00:00 2001 From: Holon Review Loop Agent Date: Thu, 3 Dec 2026 11:29:52 +1100 Subject: [PATCH 10/10] chore(review): record review ledger rows (iteration 2) Action-Origin: pr_review Review-Iteration: 2 --- ...796253983-hac-antigravity-model-discovery.jsonl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl b/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl index 98df0982d..eb209aac7 100644 --- a/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl +++ b/holon-knowledge/ledger/pending/executions/I-1796253983-hac-antigravity-model-discovery.jsonl @@ -24,3 +24,17 @@ {"action_id": "ACT-RES-1796257009-f74f9673", "execution_id": "REV-RES-1-1796257009", "action": "Review Loop iteration 1 finding R1-F1 adjudicated: applied", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "success", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["R1-F1"], "review_disposition": "applied", "rejection_reason": null, "introduced_by_action_id": "ACT-FIND-1796256159-b6099e38", "labels": ["review", "resolver", "iteration-1"], "error_context": null, "created_at": "2026-12-03T00:16:49.898977Z"} {"action_id": "ACT-RES-1796257009-2ed8d790", "execution_id": "REV-RES-1-1796257009", "action": "Review Loop iteration 1 finding R3-F2 adjudicated: applied", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "success", "entry_type": "action", "action_origin": "pr_review", "review_severity": "nit", "review_iteration": 1, "review_finding_ids": ["R3-F2"], "review_disposition": "applied", "rejection_reason": null, "introduced_by_action_id": "ACT-FIND-1796256159-e3268050", "labels": ["review", "resolver", "iteration-1"], "error_context": null, "created_at": "2026-12-03T00:16:49.899659Z"} {"action_id": "ACT-RES-1796257009-a1e408fd", "execution_id": "REV-RES-1-1796257009", "action": "Review Loop iteration 1 finding FIND-CI-001 adjudicated: applied", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "success", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 1, "review_finding_ids": ["FIND-CI-001"], "review_disposition": "applied", "rejection_reason": null, "introduced_by_action_id": "ACT-FIND-1796256159-689952b6", "labels": ["review", "resolver", "iteration-1"], "error_context": null, "created_at": "2026-12-03T00:16:49.899976Z"} +{"action_id": "ACT-REV-1796257181-8e577c76", "execution_id": "REV-ITR-2-1796257181", "action": "Review Loop iteration 2 reviewer 1 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R1-002-01"], "labels": ["review", "reviewer", "iteration-2"], "error_context": null, "review_reviewer_index": 1, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:19:41.599002Z"} +{"action_id": "ACT-FIND-1796257181-8543049d", "execution_id": "REV-FIND-2-1796257181", "action": "Review Loop iteration 2 finding detected: FIND-R1-002-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R1-002-01"], "labels": ["review", "finding", "iteration-2"], "error_context": "R2-F1/R3-F1 unresolved: RUNNER_CAPABILITIES still calls discovered_models() at import, so every holon CLI start forks 'agy models' (up to 5 s); make antigravity discovery lazy.", "review_reviewer_index": 1, "review_file": "apps/sandbox-executor/src/sandbox_executor/agent_defaults.py", "review_line": 45, "created_at": "2026-12-03T00:19:41.600374Z"} +{"action_id": "ACT-REV-1796257181-8234e77d", "execution_id": "REV-ITR-2-1796257181", "action": "Review Loop iteration 2 reviewer 2 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R2-002-01"], "labels": ["review", "reviewer", "iteration-2"], "error_context": null, "review_reviewer_index": 2, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:19:41.601490Z"} +{"action_id": "ACT-FIND-1796257181-3b0e80a7", "execution_id": "REV-FIND-2-1796257181", "action": "Review Loop iteration 2 finding detected: FIND-R2-002-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R2-002-01"], "labels": ["review", "finding", "iteration-2"], "error_context": "R2-F1/R3-F1 listed as addressed but unfixed: RUNNER_CAPABILITIES still calls discovered_models() at import, so every agent_defaults import spawns 'agy models' (up to 5 s); make discovery lazy or record a rejection.", "review_reviewer_index": 2, "review_file": "apps/sandbox-executor/src/sandbox_executor/agent_defaults.py", "review_line": 44, "created_at": "2026-12-03T00:19:41.602559Z"} +{"action_id": "ACT-REV-1796257181-604302c4", "execution_id": "REV-ITR-2-1796257181", "action": "Review Loop iteration 2 reviewer 3 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R3-002-01"], "labels": ["review", "reviewer", "iteration-2"], "error_context": null, "review_reviewer_index": 3, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:19:41.603713Z"} +{"action_id": "ACT-FIND-1796257181-38d466a6", "execution_id": "REV-FIND-2-1796257181", "action": "Review Loop iteration 2 finding detected: FIND-R3-002-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R3-002-01"], "labels": ["review", "finding", "iteration-2"], "error_context": "R2-F1/R3-F1 listed as addressed but neither fixed nor rejected: RUNNER_CAPABILITIES still calls discovered_models() at import, so every CLI start forks 'agy models' (up to 5 s); make discovery lazy.", "review_reviewer_index": 3, "review_file": "apps/sandbox-executor/src/sandbox_executor/agent_defaults.py", "review_line": 44, "created_at": "2026-12-03T00:19:41.604701Z"} +{"action_id": "ACT-REV-1796257298-9a0a83ff", "execution_id": "REV-ITR-2-1796257298", "action": "Review Loop iteration 2 evaluation for I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R1-002-01", "FIND-R2-002-01", "FIND-R3-002-01"], "labels": ["review", "review-loop", "iteration-2"], "error_context": "Findings detected: ['FIND-R1-002-01', 'FIND-R2-002-01', 'FIND-R3-002-01']", "created_at": "2026-12-03T00:21:38.841678Z"} +{"action_id": "ACT-REV-1796257298-ec2ddfbf", "execution_id": "REV-ITR-2-1796257298", "action": "Review Loop iteration 2 reviewer 1 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R1-002-01"], "labels": ["review", "reviewer", "iteration-2"], "error_context": null, "review_reviewer_index": 1, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:21:38.842784Z"} +{"action_id": "ACT-FIND-1796257298-17bcc299", "execution_id": "REV-FIND-2-1796257298", "action": "Review Loop iteration 2 finding detected: FIND-R1-002-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R1-002-01"], "labels": ["review", "finding", "iteration-2"], "error_context": "R2-F1/R3-F1 unresolved: RUNNER_CAPABILITIES still calls discovered_models() at import, so every holon CLI start forks 'agy models' (up to 5 s); make antigravity discovery lazy.", "review_reviewer_index": 1, "review_file": "apps/sandbox-executor/src/sandbox_executor/agent_defaults.py", "review_line": 45, "created_at": "2026-12-03T00:21:38.843950Z"} +{"action_id": "ACT-REV-1796257298-d9b52417", "execution_id": "REV-ITR-2-1796257298", "action": "Review Loop iteration 2 reviewer 2 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R2-002-01"], "labels": ["review", "reviewer", "iteration-2"], "error_context": null, "review_reviewer_index": 2, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:21:38.844875Z"} +{"action_id": "ACT-FIND-1796257298-0fd22a10", "execution_id": "REV-FIND-2-1796257298", "action": "Review Loop iteration 2 finding detected: FIND-R2-002-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R2-002-01"], "labels": ["review", "finding", "iteration-2"], "error_context": "R2-F1/R3-F1 listed as addressed but unfixed: RUNNER_CAPABILITIES still calls discovered_models() at import, so every agent_defaults import spawns 'agy models' (up to 5 s); make discovery lazy or record a rejection.", "review_reviewer_index": 2, "review_file": "apps/sandbox-executor/src/sandbox_executor/agent_defaults.py", "review_line": 44, "created_at": "2026-12-03T00:21:38.845644Z"} +{"action_id": "ACT-REV-1796257298-8b0aed09", "execution_id": "REV-ITR-2-1796257298", "action": "Review Loop iteration 2 reviewer 3 completed", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R3-002-01"], "labels": ["review", "reviewer", "iteration-2"], "error_context": null, "review_reviewer_index": 3, "review_agent": "claude-agent", "review_model": "claude-opus-5-5", "review_status": "COMPLETED", "review_verdict": "CHANGES_REQUESTED", "review_counts": {"critical": 0, "important": 1, "nit": 0}, "created_at": "2026-12-03T00:21:38.846351Z"} +{"action_id": "ACT-FIND-1796257298-84390421", "execution_id": "REV-FIND-2-1796257298", "action": "Review Loop iteration 2 finding detected: FIND-R3-002-01", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "failure", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-R3-002-01"], "labels": ["review", "finding", "iteration-2"], "error_context": "R2-F1/R3-F1 listed as addressed but neither fixed nor rejected: RUNNER_CAPABILITIES still calls discovered_models() at import, so every CLI start forks 'agy models' (up to 5 s); make discovery lazy.", "review_reviewer_index": 3, "review_file": "apps/sandbox-executor/src/sandbox_executor/agent_defaults.py", "review_line": 44, "created_at": "2026-12-03T00:21:38.847084Z"} +{"action_id": "ACT-RES-1796257792-84ba11eb", "execution_id": "REV-RES-2-1796257792", "action": "Review Loop iteration 2 finding FIND-CI-002-RUN adjudicated: applied", "category": "code", "target": "I-1796253983-hac-antigravity-model-discovery/P-1796254006-CLA-CO5.5-2/E-1796254229-CLA-CO5.5/_", "outcome": "success", "entry_type": "action", "action_origin": "pr_review", "review_severity": "important", "review_iteration": 2, "review_finding_ids": ["FIND-CI-002-RUN"], "review_disposition": "applied", "rejection_reason": null, "introduced_by_action_id": null, "labels": ["review", "resolver", "iteration-2"], "error_context": null, "created_at": "2026-12-03T00:29:52.303193Z"}