Repository navigation
fix: keep model catalog refresh working after logging starts - #197736
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@clawsweeper re-review Please review head e22e72a. The logging owner now establishes its source-map default when logging config is applied, before catalog environment capture, while preserving explicit dotenv/config opt-in. The PR evidence records the original catalog failure, focused regression proof, and completed local checks. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR establishes the existing source-map logging default before catalog workers capture the process environment. Example: With TSLOG_SOURCE_MAPS unset, a Gateway refresh publishes the remote-next catalog row after logging starts.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR repairs a catalog refresh regression still present on main, with no actionable code findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway startup publishes logging configuration before preparing model runtimes; catalog workers fingerprint their environment and reject incompatible reuse. flowchart TD
A[Gateway startup] --> B[Apply logging configuration]
B --> C[Initialize source map policy]
C --> D[Capture catalog environment]
D --> E[Catalog worker]
C --> F[Later logger construction]
F --> G[Unchanged environment]
G --> E
Technical reviewBest possible solution: Establish the existing default through the logging owner before environment capture, retaining standalone initialization and explicit opt-ins. Do we have a high-confidence way to reproduce the issue? Source establishes the failure path: capture an environment without TSLOG_SOURCE_MAPS, initialize logging, then reuse the catalog pool with current borrowers; no target code was executed during this read-only review. Is this the best way to solve the issue? This is the smallest complete repair using existing owners: publish the default earlier instead of weakening catalog validation, rebuilding workers, or eagerly constructing a logger. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c25a8641a259. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +6. Total +11 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 12, 2026, 7:56 AM ET / 12:56 UTC. |
|
Merged via squash.
|
Preserve the exact #197736 prerequisite ancestry and its stable logging policy publication before catalog environment capture. Both remote catalog schema cases pass on the combined pricing tree. Pricing owner, benchmark, and dependency inputs remain unchanged; no default log-target changes are included.
What Problem This Solves
Fixes: remote model-catalog refresh can stop publishing new rows after logging starts.
User Impact
Users can refresh the model catalog without a later logger initialization invalidating the catalog worker's environment. Existing admitted runs keep their original catalog and pricing. Explicit source-map diagnostic opt-ins remain supported.
Why This Change Was Made
#197586 (
5358d05ca2c1dc8c8a4770704a03c1a8f89b5f78) introduced a lazyTSLOG_SOURCE_MAPSdefault inbuildLogger(). If workers already captured the environment, this assignment causes discovery to reject withGateway catalog environment changed without retiring its plugin generation.Publish that existing default when logging configuration is applied, before Gateway model runtimes capture the environment. One private initializer also serves standalone logger construction. This preserves dotenv/config precedence and avoids eager logger or filesystem initialization. Catalog validation stays intact; ordinary logging still avoids synchronous source-map probes.
Production growth is five lines for the shared initializer; the existing process fixture grows six lines to verify that logger construction preserves the published environment policy. No new configuration, cache, dependency, schema, or production export.
Evidence
TSLOG_SOURCE_MAPSas the sole changed environment key.9d8a51429d13f27be7252850f1d9ee8f72844986: the final regression assertion fails because logger construction changes the policy fromundefinedtooff.TSLOG_SOURCE_MAPS=onthrough logging configuration publication. Module-level default initialization was rejected because it would suppress that later opt-in.pnpm check:changed --base 9d8a51429d13f27be7252850f1d9ee8f72844986passed every stage except the seven unused exports introduced by refactor(decisions): share one Decision HTTP executor across providers #197615. Integrated their exact landed owner fix, fix(ci): clean up unused Decision transport exports #197679 /c06331c4b8e6f7be8ed947a43c5ab9701961fd16; the canonical dead-export replay now passes production, full-tree, and script scans with zero entries. Logging, catalog, bootstrap, UI, and dependency inputs are unchanged across that integration, and the reviewed two-file candidate is byte-identical, so focused proof is reused.