Repository navigation
Conversation
…ted (failing) Four Stage 12 log calls, three in `comparison` and one in `coordinated_simulations`, pass their fields only as plain `extra=` keys, which the observability runtime's log handler never emits; and the root logger's WARNING level discards the Stage 12 runtime's INFO records. The static log-fields check now also reads `stage12_runtime` and `v2_app.py`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The result comparison's three logs and a child simulation's failed state update or cancellation now pass their fields through `log_extra`, so the observability runtime emits them. The Stage 12 runtime's logger is set to INFO when the package is imported, since the root logger's WARNING level discarded its INFO records; v1 code never imports the package. Rule `sim.observability.log-fields-through-log-extra` now covers `stage12_runtime` and `v2_app.py`. The v1 code's two plain-`extra=` logs are left as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The static check reads every executor `stage12_*` module and package and the Stage 12 and v2 Modal applications, and counts the Entrypoint's and Stage 12's calls apart, so a moved Stage 12 package is noticed. The INFO test also checks the package logger's own level, not only the effective one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Stage 12 log fields branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Stage 12 log fields branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1093
Stacked on #1092 (
v2plan/c1-34-v2-telemetry-record-ids), which addedlog_extraand used it for every Simulation Entrypoint log call. This PR does the same for Stage 12.What changes
Four Stage 12 log calls pass their fields through
log_extra, so the observability runtime's handler emits them:stage12_result_comparison_completed:evaluation_id,production_job_id,comparison_status,difference_count,production_result_sha256,stage12_result_sha256;stage12_result_comparison_state_update_failed:evaluation_id,production_job_id;stage12_result_comparison_failed:evaluation_id,production_job_id,error_type;coordinated_simulations._log_child_operation_failure):evaluation_id,simulation_execution_id,simulation_role,error_type.All are IDs, a role, a status, a count, SHA-256 digests or an exception class name.
The
stage12_runtimelogger is set to INFO when the package is imported. The root logger stays at WARNING, which discarded the package's three INFO records:stage12_result_comparison_completed, the budget-window advance message, and the stuck-run sweep's "no longer exists" message. Importing the v1 Modal app and its worker modules doesn't load the package, so v1 logging doesn't change.Rule
sim.observability.log-fields-through-log-extranow covers Stage 12: the executor'sstage12_*modules and packages, and the Stage 12 and v2 Modal applications. The static check counts the Entrypoint's and Stage 12's calls separately, so it notices if a Stage 12 package moves.Left as they are
The v1 code's two plain-
extra=log calls stay unchanged, because v1 telemetry stays as it is:log_and_redact_exceptionin the shared observability library. Its fields also reach telemetry as itsgateway_error_redactedevent.budget_window_statewarning.No Stage 12 or Entrypoint code calls either one.
A related point that predates this PR:
stage12_result_comparison_state_update_faileduseslogger.exception, so the runtime emits the store error's message and stack throughexc_info, although the next call's comment says Stage 12 failure logs carry only the error type. This PR doesn't change that.No image contents, secrets or environment variables change.
Tests
Test-first: b3068ce adds the failing tests. Only the new and affected tests were run, by node ID:
assert_log_identifies_childassertion and the seven tests that use it;One read-only review round found no bugs; its quality findings are fixed in 1ab7c3f.
🤖 Generated with Claude Code