fix(agents): loosen abort settle env typing#87750
Conversation
|
Codex review: needs changes before merge. Reviewed May 28, 2026, 3:18 PM ET / 19:18 UTC. Summary PR surface: Source +6, Tests +4. Total +10 across 2 files. Reproducibility: yes. the PR body gives focused Vitest and changed-gate commands for the type/test failures, and source inspection confirms the affected helper and test path. I did not rerun those commands because this review is read-only. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the env typing fix after refreshing the branch so the dynamic live-model test keeps a single narrow mock and the abort-settle timeout behavior stays unchanged. Do we have a high-confidence way to reproduce the issue? Yes, the PR body gives focused Vitest and changed-gate commands for the type/test failures, and source inspection confirms the affected helper and test path. I did not rerun those commands because this review is read-only. Is this the best way to solve the issue? Mostly yes: narrowing the helper env type is the narrow maintainable fix and preserves runtime behavior. The test-side mock should be de-duplicated against current main before merge. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 2a5a9fd7202d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +6, Tests +4. Total +10 across 2 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
8acccb5 to
a05e30b
Compare
Summary
resolveEmbeddedAbortSettleTimeoutMsto the two env keys it actually readsprocess.envdefault and runtime timeout behavior unchangedcheck:changedgenerated/test type surfaces that reject fullNodeJS.ProcessEnvas a required-keyPicklive-model-dynamic-candidates.test.tsfocused on injected dynamic-model hooks instead of loading the real provider normalization/plugin runtime pathVerification
OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=.artifacts/vitest-cache/abort-settle-env-final-$USER-$$ node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/attempt.abort-settle-timeout.test.tsOPENCLAW_VITEST_FS_MODULE_CACHE_PATH=.artifacts/vitest-cache/live-dynamic-mocked-$USER-$$ node scripts/run-vitest.mjs run --config test/vitest/vitest.agents-core.config.ts src/agents/live-model-dynamic-candidates.test.ts --reporter=verbose./node_modules/oxfmt/bin/oxfmt --check --threads=1 src/agents/live-model-dynamic-candidates.test.tsnode scripts/run-oxlint.mjs src/agents/live-model-dynamic-candidates.test.tsgit diff --check.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/mainrun_8a485e593c2e, leasecbx_ab53fb060315, slugquick-crab, provideraws:corepack pnpm check:changedpassed on amended heada05e30b1c821e69fdd4f, followed by focused Vitest, format/lint/diff checks, and autoreviewReal behavior proof
Behavior addressed:
check:changedfailed in generated/test type surfaces because the helper acceptedNodeJS.ProcessEnv, making the narrowed keys appear required at the boundary. The agentic-agents CI shard also timed out inlive-model-dynamic-candidates.test.tsbecause a hook-focused unit test paid the real provider normalization/plugin-runtime load cost.Real environment tested: focused local Codex worktree plus AWS Crabbox Linux runner.
Exact steps or command run after this patch: focused Vitest for the abort settle timeout helper, focused Vitest for
live-model-dynamic-candidates.test.ts, local format/lint/diff checks, autoreview, and remotecorepack pnpm check:changed.Evidence after fix: abort-settle focused test passed 1 file / 5 tests in the earlier branch proof;
live-model-dynamic-candidates.test.tspassed 1 file / 2 tests in 2.01s after the scoped mock; autoreview reported no actionable findings; AWS Crabboxrun_8a485e593c2eexited 0.Observed result after fix: the prior
ProcessEnvassignability failure is gone while the helper still reads the same override andOPENCLAW_TEST_FASTfallback; the dynamic live model unit test no longer spends roughly 78s loading provider normalization/runtime plugins.What was not tested: no live provider or runtime session smoke; this is a static env typing repair plus a test-only CI timeout fix.