Repository navigation
fix(kas): import the settings reader through the skill projection facade - #33221
Conversation
kas_cli_settings imported _settings and _UNREADABLE_SETTINGS_ERRORS straight from skill_projection_parts.inheritance_overlay. That loaded one owner before the facade, so a test that patched config.paths.kiro_home left the owners binding two different kiro_home objects, and the facade's family check raised in test_kas_skill_scope. Import them through kiro_crew.acp.skill_projection, which serves the same objects.
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS One import-path change, aimed at the cause: an outside module was loading a facade owner before the facade existed. What this change shipsInventory (1 items) — 1 justifiedIntent: get main's backend tests green again after #33026, without changing any behaviour. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] b98b270 Description read[DESCRIPTION-READ] 8fb666fe9ca98a14bc767f8308c9b98bdc4226385b7db44a0f79d73e6b8ea748 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the fix imports the two names through the facade that already re-exports them, which removes the load-order split that caused the failure. [DESIGN-REVIEWED] b98b270 Description read[DESCRIPTION-READ] bdde84fca8faa2bb356b60ddf7e43f63781af67f9ef0e841fed615cc9d090ba1 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
…gs (#33347) #33026 imported a skill-projection owner directly, so a kiro_home patched before the facade's first import left the family bound two ways and the facade refused to install; #33221 fixed it. This runs that import order in a fresh interpreter, so a direct owner import coming back turns it red.
Problem / Motivation
Goal: Main's backend tests pass again after the KAS telemetry opt-out started importing a skill-projection owner module directly.
Main CI at d1a9a81 is red on Backend Tests (3.12, 3): seven tests in
test/test_kas_skill_scope.pyfail, one withRuntimeError: kiro_crew.acp.skill_projection: names bound to different objects across the family are ['kiro_home'], but the facade declares []. A local run of that file on main fails 20 of 67 tests; on the commit before #33026 it passes 67 of 67, and bisecting the range lands on #33026 (4a75e4c).Why it matters
Every PR that merges main inherits this red shard, so readiness goes red on PRs that did not cause it.
Not a goal
What changed (motivation → approach → change)
Symptom → cause → change:
src/kiro_crew/acp/kas_cli_settings.pyimported_settingsand_UNREADABLE_SETTINGS_ERRORSstraight from the ownerskill_projection_parts.inheritance_overlay. That loads one owner, which bindskiro_home, before theskill_projectionfacade exists.config.paths.kiro_homeand the facade loads later, the owners loaded after the patch bind the patched function whileinheritance_overlaykeeps the real one. The facade's family check sees two differentkiro_homeobjects and raises.kiro_crew.acp.skill_projection, which is the import path callers use. The facade serves the same two objects (_settings is inheritance_overlay._settingsis True), so behaviour does not change.Backwards compatibility
Compatible: the same two objects are imported through their public facade; no runtime behaviour changes.
Removes nothing: only the import path of two names changes.
Tests
test/test_kas_skill_scope.py,test/test_kas_cli_settings.pyandtest/test_skill_projection_facade.py: 95 passed locally on this branch; on main the first fails 20 of 67.Proof: not provable -- other: prove.py reverts production hunks and re-runs changed tests, but this PR changes no test file; the before/after numbers above are the proof.
Manual verification
N/A — import-path change; the suites above cover it.
Related Issues
Fixes main CI red at d1a9a81 (introduced by #33026).
Sibling sweep
Swept:
grep -rn "skill_projection_parts" src/kiro_crew --include="*.py"outsideacp/skill_projection*Siblings: none -- kas_cli_settings.py was the only module outside the skill-projection family importing one of its owners directly; the other hits are comments and docs
Pattern harvest
Rule candidate: lint
Pattern: a module outside a facade family importing one of the facade's owner modules directly instead of the facade
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.