fix: harden synced registry and keepalive helpers - #2793
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughKeepalive metrics now exclude malformed capability bundle entries. Slot loading treats stale bundled model pins as advisory while retaining strict handling for explicit runtime slot configuration. Registry selection normalization and exact consumer-template synchronization checks were also added. ChangesCapability metrics sanitization
Slot and template alignment
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Workflow source neededPR #2793 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely. Please do one of:
Once a valid source is present, this warning will not be reposted. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/tools/test_llm_registry_selection.py`:
- Around line 249-263: Update test_bundled_stale_slot_pin_is_debug_only to
capture logs at DEBUG level and assert that caplog contains the advisory message
“Ignoring advisory bundled slot model pin.” Retain the existing assertion that
“Skipping unresolved slot model pin” is absent at warning level, ensuring
coverage verifies the message is emitted specifically at DEBUG.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1b6b54d0-73a2-4e76-9023-96b8827b26a9
📒 Files selected for processing (5)
.github/scripts/__tests__/capability-bundle-contract.test.js.github/scripts/keepalive_loop.jstemplates/consumer-repo/.github/scripts/keepalive_loop.jstests/tools/test_llm_registry_selection.pytools/llm_registry.py
There was a problem hiding this comment.
Pull request overview
Hardens two consumer-facing surfaces in this repo: (1) LLM slot config resolution (bundled vs explicit allowlist semantics) and (2) keepalive metrics generation when capability bundle inputs are malformed, with corresponding test coverage.
Changes:
- Adjust
load_slot_config()to treat bundled stale slot model pins as advisory (debug-only) while keeping fail-closed behavior (and warnings) for explicit slot allowlists. - Ignore malformed capability bundle entries before computing keepalive metrics, in both the repo script and the consumer template copy.
- Add/extend Python + Node tests to lock in the new behaviors.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/llm_registry.py | Makes bundled stale slot pins advisory (debug-only) while preserving fail-closed allowlist semantics for ENV_SLOT_CONFIG. |
| tests/tools/test_llm_registry_selection.py | Adds coverage ensuring bundled stale slot pin warnings are not emitted at WARNING level. |
| .github/scripts/keepalive_loop.js | Filters out malformed capability bundle entries before emitting metrics fields. |
| templates/consumer-repo/.github/scripts/keepalive_loop.js | Mirrors the keepalive metrics hardening change for consumer template sync. |
| .github/scripts/tests/capability-bundle-contract.test.js | Adds a contract test ensuring malformed bundle entries are ignored in metrics. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9adfeb6633
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Automated Status SummaryHead SHA: f505b13
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Low Coverage Files (<50.0%)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@templates/consumer-repo/tools/llm_registry.py`:
- Around line 361-379: Add a parity test or CI sync check covering
templates/consumer-repo/tools/llm_registry.py, alongside the existing
tools/llm_registry.py synchronization coverage. Ensure the check detects drift
between the consumer template copy and its source, including the updated
unresolved slot model pin handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 77bb27a0-4bc0-4570-b864-dc0d04ad6bd4
📒 Files selected for processing (2)
templates/consumer-repo/tools/llm_registry.pytests/tools/test_llm_registry_selection.py
Fixes the source-of-truth review debt found in the current consumer sync wave.
Validated with
python -m pytest tests/tools/test_llm_registry_selection.py -qandnode --test .github/scripts/__tests__/capability-bundle-contract.test.js.Summary by CodeRabbit
Bug Fixes
Tests
Chores