Skip to content

fix(kas): import the settings reader through the skill projection facade - #33221

Merged
buluoray merged 1 commit into
mainfrom
fix/kas-cli-settings-facade-import
Nov 8, 2026
Merged

buluoray merged 1 commit into
mainfrom
fix/kas-cli-settings-facade-import

Conversation

@buluoray

@buluoray buluoray commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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.py fail, one with RuntimeError: 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

  • Changing what the telemetry opt-out reads or sends to KAS.
  • Changing the skill-projection facade or its mirror check.

What changed (motivation → approach → change)

Symptom → cause → change:

  • src/kiro_crew/acp/kas_cli_settings.py imported _settings and _UNREADABLE_SETTINGS_ERRORS straight from the owner skill_projection_parts.inheritance_overlay. That loads one owner, which binds kiro_home, before the skill_projection facade exists.
  • When a test then patches config.paths.kiro_home and the facade loads later, the owners loaded after the patch bind the patched function while inheritance_overlay keeps the real one. The facade's family check sees two different kiro_home objects and raises.
  • The import now goes through the facade, kiro_crew.acp.skill_projection, which is the import path callers use. The facade serves the same two objects (_settings is inheritance_overlay._settings is 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.py and test/test_skill_projection_facade.py: 95 passed locally on this branch; on main the first fails 20 of 67.
  • The wider skill-projection suites were not run locally; CI covers them.

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" outside acp/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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

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.
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of b98b2706904f302ab14ab47f96a2cca84abb7102 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b98b270

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b98b2706904f302ab14ab47f96a2cca84abb7102 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision b98b2706904f302ab14ab47f96a2cca84abb7102 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of b98b2706904f302ab14ab47f96a2cca84abb7102 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ships

Inventory (1 items) — 1 justified

Intent: get main's backend tests green again after #33026, without changing any behaviour. This is a FIX.

  1. kas_cli_settings now gets _settings and _UNREADABLE_SETTINGS_ERRORS through the skill_projection facade, not the inheritance_overlay owner. — justified

[FIRST-PRINCIPLES-REVIEWED] b98b270

Description read

[DESCRIPTION-READ] 8fb666fe9ca98a14bc767f8308c9b98bdc4226385b7db44a0f79d73e6b8ea748

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b98b2706904f302ab14ab47f96a2cca84abb7102 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed b98b2706904f302ab14ab47f96a2cca84abb7102 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b98b270

Verdict parsed from the review's SHA-scoped output markers for commit b98b2706904f302ab14ab47f96a2cca84abb7102.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b98b2706904f302ab14ab47f96a2cca84abb7102 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 8, 2026
@buluoray
buluoray merged commit 0826d05 into main Nov 8, 2026
98 of 106 checks passed
@buluoray
buluoray deleted the fix/kas-cli-settings-facade-import branch November 8, 2026 15:32
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
…ade (#33221)

Original author: Ray Xu
(cherry picked from commit 0826d05)
buluoray added a commit that referenced this pull request Nov 8, 2026
…ade (#33221)

Original author: Ray Xu
(cherry picked from commit 0826d05)
buluoray added a commit that referenced this pull request Nov 8, 2026
#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.
KiroCrewCaptain pushed a commit that referenced this pull request Nov 8, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant