Repository navigation
[codex] test: cover codex runtime plan observability - #71201
100yenadmin wants to merge 3 commits into
Conversation
Greptile SummaryThis test-only PR adds observability assertion coverage to the existing Codex app-server Confidence Score: 5/5Safe to merge — test-only change with correct assertion values validated against the production buildAgentRuntimePlan implementation. All changes are confined to the test file. The asserted values (resolvedRef: "codex/gpt-5.4-codex", harnessId: "codex") match what buildAgentRuntimePlan's observability block computes via formatResolvedRef and the conditional harnessId spread. No P0 or P1 findings. No files require special attention. Reviews (1): Last reviewed commit: "test: cover codex runtime plan observabi..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Adds regression coverage in the Codex app-server attempt hook test to ensure llm_output events include RuntimePlan observability identity fields, preventing future adapter changes from silently dropping them.
Changes:
- Builds an
AgentRuntimePlanin the Codex app-server attempt test params. - Updates the
llm_outputhook expectation to includeresolvedRefandharnessId.
| expect(llmOutput).toHaveBeenCalledWith( | ||
| expect.objectContaining({ | ||
| runId: "run-1", | ||
| sessionId: "session-1", | ||
| provider: "codex", | ||
| model: "gpt-5.4-codex", | ||
| resolvedRef: "codex/gpt-5.4-codex", | ||
| harnessId: "codex", |
There was a problem hiding this comment.
The new resolvedRef assertion doesn’t currently prove the runtime-plan value is being forwarded, because the fallback in runCodexAppServerAttempt also uses ${provider}/${modelId} (same value as buildAgentRuntimePlan produces for these params). To ensure this test actually guards against adapters dropping/overriding RuntimePlan observability, consider overriding runtimePlan.observability.resolvedRef to a sentinel value (or otherwise making it differ from the fallback) and assert that sentinel reaches llm_output.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Superseded by #71722, which consolidates the RuntimePlan/Harness package into one review PR and preserves this PR's commits via cherry-pick -x. Keeping this PR as review/history evidence. |
Summary
Follow-up to #71096 and RFC #71004. This PR adds Codex app-server test coverage proving existing
llm_outputhooks preserve RuntimePlan observability identity: canonicalresolvedRefplus separateharnessId.No production runtime behavior changes.
RuntimePlan Package Context
This is the observability rung in the RuntimePlan package. The original Pi/Codex shift made backend choice hard to see when display names collapsed to model-only strings. This PR locks the existing event payload so future adapter changes cannot drop the resolved backend/model/harness identity.
Review package links: #71196, #71197, #71201, #71220, #71222, #71223, #71224, #71238, #71239.
Why This PR Exists
RuntimePlan already computes observability identity. Codex app-server emits
llm_outputfrom more than one path, so this PR makes both success and failure-path event emission prove they carry the plan-owned identity instead of recomputing or silently dropping it.Local Architecture
What Changed
AgentRuntimePlanin the Codex app-server run-attempt tests.llm_outputreceivesresolvedReffrom RuntimePlan observability.llm_outputreceives separateharnessId: "codex".Maintainer Review Guide
extensions/codex/src/app-server/run-attempt.test.ts.llm_outputemission sites remain covered.What Did Not Change
Verification
./node_modules/.bin/vitest run extensions/codex/src/app-server/run-attempt.test.ts --config test/vitest/vitest.extensions.config.ts./node_modules/.bin/oxlint --tsconfig tsconfig.oxlint.core.json extensions/codex/src/app-server/run-attempt.test.tsgit diff --checkLocal broad
pnpm check:changedhas previously hit unrelated repository type/dependency drift; this PR is test-only and the focused Codex app-server suite is the merge signal.