[codex] Preserve weekly freshness selection state - #1915
Conversation
Automated Status SummaryHead SHA: 3ed0313
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
Pull request overview
This PR improves the reliability and debuggability of the weekly Codex freshness + weekly metrics pipelines by (1) isolating the npm cache used for the Codex CLI freshness probe and (2) persisting richer “artifact selection” state into the weekly metrics download manifest (and therefore the aggregated weekly JSON contract), with the same manifest changes synced into the consumer template copy.
Changes:
- Force
check_codex_cli_freshness.query_latest_npm_version()to always use a temporary, isolatedNPM_CONFIG_CACHEdirectory even if the runner environment provides one. - Extend weekly metrics download manifest
selectionto preserve priority-family selection details (candidate counts, family counts, statuses, latest-candidate map) via a newcompactSelectionDetailshelper. - Update/extend Python + Node tests to assert the new behaviors and exported helper; sync the manifest helper change into
templates/consumer-repo.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/check_codex_cli_freshness.py |
Always overrides NPM_CONFIG_CACHE to an isolated temp dir for npm queries. |
tests/scripts/test_check_codex_cli_freshness.py |
Adds coverage ensuring the npm cache override occurs even when NPM_CONFIG_CACHE is inherited. |
.github/scripts/weekly_metrics_download_manifest.js |
Adds compactSelectionDetails() and uses it when building the manifest selection block; exports helper. |
templates/consumer-repo/.github/scripts/weekly_metrics_download_manifest.js |
Template-synced copy of the same manifest selection compaction/preservation change. |
.github/scripts/__tests__/weekly-metrics-download-manifest.test.js |
Expands fixtures/assertions for preserved selection state and tests compactSelectionDetails(). |
tests/scripts/test_aggregate_agent_metrics.py |
Updates expected aggregated JSON contract to include richer manifest selection metadata. |
| candidate_family_counts: selection.candidate_family_counts || {}, | ||
| selected_family_counts: selection.selected_family_counts || {}, | ||
| missing_priority_families: Array.isArray(selection.missing_priority_families) |
There was a problem hiding this comment.
candidate_family_counts and selected_family_counts are passed through with || {}, which still allows non-object truthy values (e.g., arrays/strings) to leak into the manifest. Since this is part of a JSON contract, please validate these fields are plain objects (non-null, non-array) and fall back to {} (optionally shallow-clone) when the selector report is malformed; apply the same guard to latest_candidate_by_family.
| candidate_family_counts: selection.candidate_family_counts || {}, | ||
| selected_family_counts: selection.selected_family_counts || {}, | ||
| missing_priority_families: Array.isArray(selection.missing_priority_families) |
There was a problem hiding this comment.
candidate_family_counts and selected_family_counts are passed through with || {}, which still allows non-object truthy values (e.g., arrays/strings) to leak into the manifest. Since this is part of a JSON contract, please validate these fields are plain objects (non-null, non-array) and fall back to {} (optionally shallow-clone) when the selector report is malformed; apply the same guard to latest_candidate_by_family.
Related to campaign issue #1836
Automated Status Summary
Scope
Sync/Dependabot Campaign Queue
Remote GitHub Actions owns discovery for sync-generated and Dependabot PR rounds. Local Codex should only claim items from this issue when
needs-local-codexwork is queued.Summary
Context for Agent
Related Issues/PRs
Tasks
Acceptance criteria
stranske/Workflowsand opened PR: fix: address sync review feedback for verify followups #1911 Addressed all 3 active review threads from `stranske/Travel-Pla...Head SHA: 22ea4e0
Latest Runs: ⏹️ cancelled — Gate
Required: gate: ⏹️ cancelled