Repository navigation
refactor(models): fail closed on invalid saved routing - #408
Alan-TheGentleman merged 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthrough
ChangesSaved routing apply
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The saved-routing change is covered by passing focused and full checks, and no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Alan-TheGentleman
left a comment
There was a problem hiding this comment.
Verified against current main at head cc46e6a: on main the global-invalid path already failed closed but a project-invalid models.json collapsed to a valid empty config and applied silently, and this slice makes applySavedModelConfig consume the shared status-carrying authority so exactly that case now returns invalidPath before any profile mutation. Downstream consumers session_start and ensureSddPreflight already handle invalidPath. Tests pin invalid project and global shapes with zero mutator calls and byte-identical profiles through the real mutator. Merging. The remaining silent-fallback consumers (module wrappers, export, models panel, status doctor) are #395's scope as the issue declares.
400930f
into
Gentleman-Programming:main
Reviewer path
Review this bounded slice in this order:
extensions/gentle-ai.ts: verify that saved-routing apply consumes the shared status-carrying authority and returns invalid source status and path before any profile mutation.tests/model-routing-authority.test.ts: verify invalid project and global sources, no fallback, zero mutator calls, unchanged profile bytes and mtime, and unchanged missing and valid behavior.tests/gentle-ai.test.ts: verify the same fail-closed behavior through the production startup path.Closes #396
Type
Summary
Current-main baseline
mainiseb8448e3c9e8d2367eefe34fc731f06655e6d539.cc46e6a9c288d4233fa626d7008d4c65eb6fd802.f9498e9d0b189196aad81117a0e00862e9017412andeb8448e3c9e8d2367eefe34fc731f06655e6d539.type:refactor.Changes
extensions/gentle-ai.tstests/model-routing-authority.test.tstests/gentle-ai.test.tsChain context
main.Out of scope
Strict TDD evidence
tests/model-routing-authority.test.tspassed 3/3 andtests/gentle-ai.test.tspassed 9/9. The fullpnpm testresult is recorded below.inherit, omission, startup reachability, profile bytes and mtime preservation, and zero invalid mutator calls.applyModelConfigAsyncdefault. No consumer migration or write redesign was introduced.Verification
cc46e6a9c288d4233fa626d7008d4c65eb6fd802verified againstmainateb8448e3c9e8d2367eefe34fc731f06655e6d539with the ordered parents abovegentle-aifocused testspnpm testpnpm run check:runtime-modulesgit diff --checkverifypassReview workload
size:exception.AI assistance
Material assistance was used.
Contributor checklist
Closes #396.type:refactor.Co-Authored-Bytrailers.Readiness and merge boundary
Ready status is not merge approval. Normal maintainer review and merge controls still apply, and this body makes no merge claim.
Summary by CodeRabbit
Bug Fixes
Tests