Repository navigation
refactor: split config/loader.py into loader_* owners behind a facade - #20550
Conversation
Sensitive change reviewHead: c776d25
|
Sensitive Change ReviewSensitive files changed:
|
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check that every edit listed under "Move audit" leaves behaviour unchanged. The description was cut off at 8000 bytes before that list. What this change shipsInventory (7 items) — 7 justifiedIntent: keep the config loader readable and under the 2,000-line cap the maintainers set, with no behaviour change. This is a refactor, neither a FIX nor an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 3bcd620 Description read[DESCRIPTION-READ] 8d9d9783c53e71accbda8e90ca0cbc7cfff035332855cc53ecc128075b272f39 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS One thing to check: guards that scan source by path, such as [DESIGN-REVIEWED] 3bcd620 Description read[DESCRIPTION-READ] 4eaa2098490cec188c4a671c4f4f2c2dc9e27f6cd41041d62fdfdb28ea5635ff 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: |
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: |
|
|
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS TIGHTENING: none -- this PR splits the 7958-line ADJUDICATED: 15 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: The diff adds no new path, separator, interpreter or env-var assumption. The moved
No platform the diff assumes is left unprobed. [SCOPE-REVIEWED] 3bcd620 |
c776d25 to
c3d748e
Compare
Sensitive change reviewHead commit: c3d748e
|
|
|
c3d748e to
fd774f9
Compare
Sensitive change reviewHead commit: fd774f9
|
|
iamwhatever
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at f200791. The split itself looks sound.
A read-only AST audit against merge-base b00e744 finds every moved unit identical once docstrings are set aside, with none missing. The only residual edits are the listed function-local cycle-break imports and the AcpProvider accessor in create_provider_factory (loader_config.py L1237-L1246). CI is green.
What to change: your Design disposition agrees that the boundary row goes while config still depends on the raw AcpProvider (acp_provider_class.py L17-L27). It says the agent_sdk-level factory "is logged as a maintainer follow-up", but no issue is linked. Please open one issue for that follow-up and link it in the PR description.
This also needs a human reviewer by policy, even after that. The diff moves the credential and .env handling into config/loader_credentials.py and edits security_posture.py. I did not run the tests locally.
— crew-pr-reviewer (r107)
config/loader.py (7,958 lines) becomes a 904-line facade over nine sibling owners, one responsibility each: credentials, locations, document I/O, builders, published snapshots, agent resolution, the migration write-back, KiroCrewConfig, and the load pipeline. The facade keeps its whole import block, the effective-model resolvers and build_provider_factory, and installs kiro_crew._facade_mirror, so every name callers and tests import or patch on kiro_crew.config.loader resolves to the same object and a patch reaches every owner that reads it. Code moves verbatim. KiroCrewConfig.create_provider_factory reaches AcpProvider through the new agent_sdk.acp_provider_class, read at call time, so no config module imports the ACP layer and loader.py leaves the agent-SDK boundary baseline. Two call cycles between owners are broken by function-local imports, and three moved prose lines spell the product name "Kiro Crew". Specs, docs, comments and path-keyed test rows that name where the moved code lives are updated in place. test_loader_owners_contract.py pins the owner list, the provider route, the cycle breaks and the one home of each rebound snapshot global. Part of #20192
f200791 to
3bcd620
Compare
|
Refreshed onto main Main grew Changes since
Local evidence, all under an isolated HOME. The suites ran on main
|
Sensitive change reviewHead commit: 3bcd620
|
|
@iamwhatever, on review 5550752443 (crew-pr-reviewer r107, REQUEST_CHANGES at
Re-requesting your review at |
|
|
|
HOLD at 3bcd620 for human review by policy. The split itself looks sound. My r107 request is resolved: the AcpProvider follow-up is now tracked in #21468, whose body covers the accessor removal, and the description links it. I re-ran a read-only AST audit against merge-base 23affa7. All 228 units of the old This still needs a human reviewer. The diff moves the credential and — crew-pr-reviewer (r108) |
Problem / Motivation
Goal:
src/kiro_crew/config/loader.pydrops from 7,958 lines to 904, under the 2,000-line cap. No behaviour changes, and every import path and patch target keeps working.config/loader.pywas the largest hand-written module in the config package and changed most weeks. A reviewer could not hold it in view, and the line-cap guard (scripts/check_file_line_cap.py) lists it as one of the files that must shrink.Why it matters
Every config change, from the chat, cron, crew and app paths, edits this file. While it stays at 7,958 lines, each of those changes reaches review as a diff inside a file nobody can read whole. It also keeps the repository over the 2,000-line rule the maintainers set for the campaign (#20192).
Not a goal
config/sections.pyor the other config owners. They are other scopes.kiro_crew.config.loader. It stays the import path and the patch seam.What changed (motivation → approach → change)
loader.pyis now a facade over nine sibling owners, one responsibility each. It is built onkiro_crew._facade_mirror(#20337), so the patches the suite makes onkiro_crew.config.loaderkeep reaching the moved code: 71 names, withconfig_pathandconfig_dirpatched at hundreds of sites. A write or delete through the facade lands in every owner that binds the name. The code moved verbatim. The few edits are listed under "Move audit".config/loader.pyresolve_effective_model,resolve_app_spawn_model,app_model_pin, the kiro-agent reference check),build_provider_factory, and the mirror glueconfig/loader_credentials.py.envreader and decoder, the dashboard portconfig/loader_locations.pyconfig_dir()config/loader_document.pyconfig.jsonreads, the locked writers, the meta stamp, the validated-document cache keysconfig/loader_builders.pyconfig/loader_snapshots.pyglobalhas its one home hereconfig/loader_agents.pyconfig/loader_writeback.pyconfig/loader_config.pyKiroCrewConfig, wholeconfig/loader_pipeline.pyagent_sdk/acp_provider_class.pyacp_provider_class(). It returnskiro_crew.providers.acp.AcpProvider, read at call time, so no config module imports the ACP layerTwo call cycles cross the owners. Each one is broken by a function-local import of the higher owner, the package's existing idiom for circular imports: the default-agent healer imports
KiroCrewConfig, andKiroCrewConfig._load_resolvedimports the pipeline. The owning spec,docs/system-specs/modules/config.md, is updated, and so are the docs and comments that name where moved code lives. Code is untouched outside the loader family except:security_posture.py, which re-keys its redactor-registry row toconfig/loader_locations.py;docker/entrypoint.sh,apps/routes.py, theapps/builtins/aws_controlsupervisorbackend.py,atomic_write.py,cli_commands.py,cli_help.py,context_management.py,dashboard/handlers/core.py,instances/registry.py,mcp_gateway/manager.py,messaging/registry.py,dashboard/messaging_api(feishu and imessage settings),platform_owner_compat.py,pod/runtime.py,pod/runtime_boot.py,sandbox_argv.py,security/exfil.pyandwindows_acl.py, plus the.kiro/specs/agent-workspace-bindingsrequirements status line.Backwards compatibility
Compatible: every name
kiro_crew.config.loaderbound before still resolves on it, to the same object, and a patch through it still reaches the code that reads the name.Reader: src/kiro_crew/config/loader.py:vault_channel_env_value -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:normalize_jira_host -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:jira_host_token_name -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:jira_global_token_applicable -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:env_path -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:env_bom_prefix -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:decode_env_bytes -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:read_env_file -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:read_env_text -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:undecodable_env_message -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:warn_undecodable_env -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:read_env_file_credential -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_env_credentials -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_env_credential -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:inject_kiro_cli_api_key -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:strip_kiro_cli_api_key -- chat -- served from config/loader_credentials.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:normalize_workspace_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:workspace_root -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:outbox_dir -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:config_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:read_config_text -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:overlay_pins -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:config_local_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:denied_commands_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:registry_trust_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:computer_use_state_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:oauth_endpoints_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:aws_consent_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:decisions_consent_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:file_delivery_consent_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:credential_redaction_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:ssh_auth_sock_consent_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:read_local_secret -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:materialize_workspace_dir -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:workspace_dir_for -- chat -- served from config/loader_pipeline.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:workspace_dir_from_entry -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:default_project_dir -- chat -- served from config/loader_pipeline.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_agent_config_path -- chat -- served from config/loader_locations.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:unsandboxed_exec_platform_default -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:unsandboxed_exec_declared -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:read_config_for_update -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:write_config_atomically -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:coerce_dict_section -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:coerce_config_field -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:update_config_locked -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:stamp_config_meta -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:refresh_config_meta_stamp -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:config_content_stamp -- chat -- served from config/loader_document.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:load_config_with_content_stamp -- chat -- served from config/loader_pipeline.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_loop_stall_exit_after -- release -- served from config/loader_builders.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:consume_managed_service_launch_environment -- release -- served from config/loader_builders.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:launched_as_managed_service -- release -- served from config/loader_builders.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:load_loop_stall_exit_after -- release -- served from config/loader_pipeline.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:read_config_document -- chat -- served from config/loader_pipeline.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:build_config -- chat -- served from config/loader_pipeline.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:persist_write_back -- chat -- served from config/loader_pipeline.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:refresh_materialized_agents -- app -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:reset_dangling_default_agent -- chat -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:publish_materialized_agents -- app -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:schedule_materialized_agents_refresh -- app -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:dispatch_kiro_agent -- app -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:member_template_id -- crew page -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:publish_agent_alias_snapshot -- chat -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:agent_alias_snapshot -- chat -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:next_config_load_ticket -- chat -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:publish_autocompact_pct -- chat -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:published_autocompact_pct -- chat -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:publish_config_timezone -- cron -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:published_config_timezone -- cron -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_effective_agent -- crew page -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:crew_autocompact_pct -- crew page -- served from config/loader_agents.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_crew_identity -- crew page -- served from config/loader_agents.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:default_template -- crew page -- served from config/loader_snapshots.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_agent_identity -- subagent -- served from config/loader_agents.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Reader: src/kiro_crew/config/loader.py:resolve_agent_bindings -- subagent -- served from config/loader_agents.py as the same object through the facade mirror; test_config_refactor_contract.py::TestFacadeNamespaces
Move audit
python3 move_audit.py --origin src/kiro_crew/config/loader.py(base = merge-base):295 of 301 units moved byte-for-byte in AST. In the 6 changed units, about 16 lines changed and nothing else:
create_provider_factoryfrom kiro_crew.providers.acp import (AcpProvider, ...)becomes a function-localfrom kiro_crew.agent_sdk.acp_provider_class import acp_provider_classandAcpProvider = acp_provider_class(). The nested-> AcpProviderannotation gets# type: ignore[valid-type]. Two prose "KiroCrew" become "Kiro Crew"agent_sdk/acp_provider_class.pyreturns the class read at call time, so a patch ofkiro_crew.providers.acp.AcpProviderstill reaches the factory. Brand gateKiroCrewConfig._load_resolved_TOP_LEVEL_DEFAULTS,build_config's default), so it sits above the class's ownerreset_dangling_default_agent,_locked_workspace_dirfrom kiro_crew.config.loader_config import KiroCrewConfigeachKiroCrewConfigcall each other_materialized_kiro_agentresolve_effective_agentchat_handlers" becomes "see the note inchat_api/slot_create"New files, with lines:
loader_credentials.py531,loader_locations.py590,loader_document.py1,137,loader_builders.py1,107,loader_snapshots.py1,214,loader_agents.py258,loader_writeback.py290,loader_config.py1,464,loader_pipeline.py1,393,agent_sdk/acp_provider_class.py27.acp_provider_class.pyis small on purpose:agent_sdk/is the one tree the boundary lets import the ACP layer, so the accessor is a module of its own.loader_agents.pyholds the agent-binding resolvers the healer does not need.Diff shape (L36):
git diffandgit diff --minimaladd the same lines in every changed file, for exampleloader.py+362 / +362. Whole diff: 938,195 bytes. L27 exception granted (refresh growth from doc unions).Tests
test/test_loader_owners_contract.py:divergent() == ();kiro_crew.providers.acp.AcpProviderreaches the factory, and that noloader*.pyimports the ACP layer;globalsloader_snapshotsrebinds: a write through the facade is what the owner's code reads, an owner rebind is whatconfig.loader.<name>reads, and the facade binds no copy.test_campaign_facades_base_public_names, is added:test/campaign_facade_inventories/kiro_crew.config.loader.jsonholds the 303 base public project names and the 190 the facade binds by import, each with its home. The name set equals the public names the base module bound. The shared test file is not edited.test_config_refactor_contract,test_config_module_boundariesandtest_cli_doctor_refactor_facade, the second-boot table intest/integration/test_boot_smoke.py, and the path-keyed inventories intest_agent_spec_hardened_reads,link_screen_sites,test_config_rmw_preserves_settings,test_instance_credential_pairing,test_agent_sdk_capabilities,test_argv_floor_inline_and_brace_scopeandtest_subagent_shared_scratch. No assertion is relaxed.test_facade_mirror_guards.py(from refactor: add a mirror-aware facade helper for module splits #20337) now covers this facade. Every name the test trees patch throughkiro_crew.config.loaderreaches every owner that binds it.b6e801b6e3, underenv -i: every test main changed since the last published base that touches the loader, the config sections or the source providers, plus the config, harness, facade, contract, guard and pin suites, 154 files, 13,395 passed.test_boot_smoke.pywithtest_campaign_facades_base_public_names.py: 74 passed, and adding a name the facade lacks tokiro_crew.config.loader.jsonturns the inventory test red;test/integrationunderKIROCREW_INTEGRATION=1: 62 passed. The one failure,test_owner_only_boot, also fails on the base on this host. The second-boot witness keys its five snapshot counters tokiro_crew.config.loader_snapshots;src/kiro_crew;docs_lint.py, the flake-pattern ratchet, CI's semgrep configs (0 findings) and an installed-wheel import smoke.local-gate.py --dry-runselects 2,988 backend and 1,201 frontend related files. That is over the 600-file bound, so the floor above ran instead and CI runs the full matrix.Manual verification
N/A. This is a structural move. The suites that load, save and patch the config through
kiro_crew.config.loader(860 files, below) exercise every moved path, and an installed-wheel smoke imports every new module.Related Issues
Part of #20192
Follow-up: #21468 (an agent_sdk-level provider factory, so
configstops reading the rawAcpProviderclass andagent_sdk/acp_provider_class.pycan go)CI path references
None in
.github/workflows/**.AUTOSDE.yamladdssrc/kiro_crew/config/loader_*.pybesidesrc/kiro_crew/config/loader.pyin the harness-parity and memory-store-seam rules.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)