Skip to content

refactor(dashboard): split updates and knowledge handlers into owners - #22073

Merged
bolichen97 merged 1 commit into
mainfrom
refactor/linecap-s36-updates
Oct 19, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
refactor/linecap-s36-updates

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: dashboard/handlers/updates.py and dashboard/handlers/knowledge.py each fit under the 2,000-line cap, with every route, import path and test patch working exactly as before.

updates.py had grown to 3,468 lines and knowledge.py to 3,361, both over the repository's 2,000-line rule for hand-written files (both are rows of .github/file-line-cap-baseline.txt, and updates.py had already grown past its row).

Why it matters

A file this size is hard to review and easy to merge-conflict, and the line cap only shrinks: until these files are split, every change to the update, log and status-stream routes or to the Knowledge Library routes adds to two of the largest handler modules the dashboard has. Splitting them by responsibility gives each new piece of work an obvious home.

Not a goal

  • No behaviour change: every moved definition is AST-identical apart from the edits listed under "Move audit".
  • No change to any route, status code, response body or SEL audit row.
  • No new public API, and no rename of anything callers import.
  • Not splitting the tests of these modules (they belong to the test-split scopes).

What changed (motivation → approach → change)

Both modules become pure-glue mirror facades (kiro_crew/_facade_mirror.py, the campaign's shared mechanism): the original path stays the only import and patch path, the moved code lives in sibling owner modules, and a patch through the facade still reaches every module that reads the name. Neither facade keeps code of its own.

Facade (lines) Owners (lines)
handlers/updates.py 3,468 → 207 updates_verdict 510 (the cached verdict, version display and compare, the forced-update floor, the auto-update effect), updates_check 909 (the shared check task, the git/provider/feed checks, status_update_fields, GET /api/update/check), updates_apply 822 (POST /api/update, cancel, simulate, tracked policy installs, the restart and POST /api/restart), updates_streams 418 (log ring, log level, GET /api/logs, GET /api/stream), updates_step_up 538 (arm, arm status, disarm, approve and their audit), updates_channel 444 (auto-update policy, release channel, revalidate, changelog, releases)
handlers/knowledge.py 3,361 → 238 knowledge_access 113 (owner gate, SEL audit, the app's store, pipeline and task registry), knowledge_library 752 (namespaces, items, entities, graph, source-scoped list, /source-counts, stats), knowledge_sync 573 (sync status and claim, the sync route and its tasks), knowledge_sources 803 (source CRUD with its off-loop path probe, pause/confirm/resume, folder picker, file rows, config), knowledge_ingest 433 (agent-fetched text, uploads, archives, the job row), knowledge_bundles 284 (export, import, bundle validation), knowledge_embeddings 293 (status, the batch embed that fills missing vectors, the rebuild job), knowledge_agent_context 186 (the chat context-injection search, the agent's document add), knowledge_lifecycle 354 (setup_knowledge_routes, watcher, artifact ingest, config reloads, pool shutdown)

updates.py rebinds module globals with global (the check's clock, generation and task, the auto-update effect, the changelog cache, the log ring's handler). Each such name sits in exactly one owner together with every function that reads or rebinds it, so the facade serves it from there and a write through the facade lands where every reader looks. knowledge_access is under 150 lines on purpose: it is the lowest layer, which the route owners import for the owner gate, the SEL audit and the app handles (owners never import their facade). Specs gain owner maps; definition-site citations name the owners; path-keyed guards are re-keyed (see "Guard changes").

Backwards compatibility

Compatible: every name each facade bound at the merge-base still resolves on it as the same object (test/campaign_facade_inventories/kiro_crew.dashboard.handlers.{updates,knowledge}.json, test_campaign_facades_base_public_names); the mirror serves owner-bound names and routes writes to every holder (test_updates_handlers_facade, test_knowledge_handlers_facade, test_facade_mirror_guards).

Logger (L25): every owner that logs binds logging.getLogger("kiro_crew.dashboard.handlers.updates") / ("...knowledge") by literal name, so record.name is unchanged and the mirror installs under python -m.

Class __module__: _PolicyApplyStopped keeps the facade's __module__ (pinned by test_the_moved_exception_keeps_the_facade_module). _QueueLogHandler and _RingLogHandler take their owner's module (updates_streams); nothing in src or tests reads their __module__, __qualname__ or pickles them (isinstance and identity checks go through the facade's served object).

Reader: src/kiro_crew/dashboard/handlers/updates.py:get_update_info -- chat -- still resolves through the facade, served from updates_verdict.py by the mirror (test_get_update_info, test_dashboard_status_snapshot)
Reader: src/kiro_crew/dashboard/handlers/updates.py:remediation_command -- chat -- still resolves through the facade, served from updates_verdict.py by the mirror (test_get_update_info, test_dashboard_status_snapshot)
Reader: src/kiro_crew/dashboard/handlers/updates.py:record_auto_update_effect -- chat -- still resolves through the facade, served from updates_verdict.py by the mirror (test_get_update_info, test_dashboard_status_snapshot)
Reader: src/kiro_crew/dashboard/handlers/updates.py:prime_status_auto_update_effect -- chat -- still resolves through the facade, served from updates_verdict.py by the mirror (test_get_update_info, test_dashboard_status_snapshot)
Reader: src/kiro_crew/dashboard/handlers/updates.py:status_update_fields -- crew page -- still resolves through the facade, served from updates_check.py by the mirror (test_update_check_install_aware, test_dashboard_status_snapshot)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_check -- crew page -- still resolves through the facade, served from updates_check.py by the mirror (test_update_check_install_aware, test_dashboard_status_snapshot)
Reader: src/kiro_crew/dashboard/handlers/updates.py:policy_applies_in_flight -- chat -- still resolves through the facade, served from updates_apply.py by the mirror (test_update_venv_detection, test_update_channel_and_restart)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_auto -- crew page -- still resolves through the facade, served from updates_channel.py by the mirror (test_update_channel_and_restart, test_changelog_handler)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_changelog -- crew page -- still resolves through the facade, served from updates_channel.py by the mirror (test_update_channel_and_restart, test_changelog_handler)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_releases -- crew page -- still resolves through the facade, served from updates_channel.py by the mirror (test_update_channel_and_restart, test_changelog_handler)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_apply -- crew page -- still resolves through the facade, served from updates_apply.py by the mirror (test_update_venv_detection, test_update_channel_and_restart)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_cancel -- crew page -- still resolves through the facade, served from updates_apply.py by the mirror (test_update_venv_detection, test_update_channel_and_restart)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_simulate -- crew page -- still resolves through the facade, served from updates_apply.py by the mirror (test_update_venv_detection, test_update_channel_and_restart)
Reader: src/kiro_crew/dashboard/handlers/updates.py:apply_log_level -- crew page -- still resolves through the facade, served from updates_streams.py by the mirror (test_dashboard_updates_coverage, test_cli_logging)
Reader: src/kiro_crew/dashboard/handlers/updates.py:apply_log_level_from_config -- chat -- still resolves through the facade, served from updates_streams.py by the mirror (test_dashboard_updates_coverage, test_cli_logging)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_log_level -- crew page -- still resolves through the facade, served from updates_streams.py by the mirror (test_dashboard_updates_coverage, test_cli_logging)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_log_level_get -- crew page -- still resolves through the facade, served from updates_streams.py by the mirror (test_dashboard_updates_coverage, test_cli_logging)
Reader: src/kiro_crew/dashboard/handlers/updates.py:install_log_ring_handler -- chat -- still resolves through the facade, served from updates_streams.py by the mirror (test_dashboard_updates_coverage, test_cli_logging)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_logs -- crew page -- still resolves through the facade, served from updates_streams.py by the mirror (test_dashboard_updates_coverage, test_cli_logging)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_stream -- chat -- still resolves through the facade, served from updates_streams.py by the mirror (test_dashboard_updates_coverage, test_cli_logging)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_channel -- crew page -- still resolves through the facade, served from updates_channel.py by the mirror (test_update_channel_and_restart, test_changelog_handler)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_revalidate -- crew page -- still resolves through the facade, served from updates_channel.py by the mirror (test_update_channel_and_restart, test_changelog_handler)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_gateway_restart -- crew page -- still resolves through the facade, served from updates_apply.py by the mirror (test_update_venv_detection, test_update_channel_and_restart)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_arm -- crew page -- still resolves through the facade, served from updates_step_up.py by the mirror (test_update_stepup)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_arm_status -- crew page -- still resolves through the facade, served from updates_step_up.py by the mirror (test_update_stepup)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_disarm -- crew page -- still resolves through the facade, served from updates_step_up.py by the mirror (test_update_stepup)
Reader: src/kiro_crew/dashboard/handlers/updates.py:api_update_approve -- crew page -- still resolves through the facade, served from updates_step_up.py by the mirror (test_update_stepup)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:list_namespaces -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:list_items -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_item -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:update_item -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:delete_item -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_item_content -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:list_entities -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_entity_graph -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_entity_items -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_related_items -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_full_graph -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:source_counts -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:list_sources -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:pick_folder -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:add_source -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:sync_source -- crew page -- still resolves through the facade, served from knowledge_sync.py by the mirror (test_knowledge_sync_local_file, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:delete_source -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:rename_source -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:confirm_source -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:pause_source -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:resume_source -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:list_source_files -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:retry_file -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:skip_file -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:ingest_text -- crew page -- still resolves through the facade, served from knowledge_ingest.py by the mirror (test_knowledge_ingest_magic_byte, test_upload_size_limit)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_config -- crew page -- still resolves through the facade, served from knowledge_sources.py by the mirror (test_folder_watch_handlers, test_knowledge_add_source)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_stats -- crew page -- still resolves through the facade, served from knowledge_library.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_items_source_filter)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:ingest_file -- crew page -- still resolves through the facade, served from knowledge_ingest.py by the mirror (test_knowledge_ingest_magic_byte, test_upload_size_limit)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_job -- crew page -- still resolves through the facade, served from knowledge_ingest.py by the mirror (test_knowledge_ingest_magic_byte, test_upload_size_limit)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:export_item -- crew page -- still resolves through the facade, served from knowledge_bundles.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:export_all -- crew page -- still resolves through the facade, served from knowledge_bundles.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:import_bundle -- crew page -- still resolves through the facade, served from knowledge_bundles.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:get_embedding_status -- crew page -- still resolves through the facade, served from knowledge_embeddings.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:batch_embed_items -- crew page -- still resolves through the facade, served from knowledge_embeddings.py by the mirror (test_knowledge_handlers_coverage, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:search_for_context -- chat -- still resolves through the facade, served from knowledge_agent_context.py by the mirror (test_knowledge_search_upgrade, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:add_agent_document_route -- chat -- still resolves through the facade, served from knowledge_agent_context.py by the mirror (test_knowledge_search_upgrade, test_knowledge_owner_gate)
Reader: src/kiro_crew/dashboard/handlers/knowledge.py:setup_knowledge_routes -- crew page -- still resolves through the facade, served from knowledge_lifecycle.py by the mirror (test_knowledge_effort_pools, test_knowledge_handlers_facade)

Move audit

src/kiro_crew/dashboard/handlers/updates.py: 3468 -> 207 lines; moved 100.0% (python-ast)
src/kiro_crew/dashboard/handlers/knowledge.py: 3361 -> 238 lines; moved 98.76% (python-ast)
   changed: _run_folder_dialog [FunctionDef] 27 lines
   changed: _create_embedder [FunctionDef] 10 lines
  • knowledge.py _run_folder_dialog: the folder-dialog subprocess.run gains encoding="utf-8", errors="replace" (L57: a moved subprocess-encoding offender is fixed, not carried; osascript writes UTF-8, the same way file_api/desktop.py and the design-tweak picker already decode it). .github/subprocess-encoding-baseline.txt loses the knowledge.py row. This is the PR's one behaviour-adjacent line: on a host whose locale is not UTF-8 a non-ASCII folder path now decodes as UTF-8 instead of the locale code page.
  • knowledge.py _create_embedder: docstring "KiroCrew config" → "Kiro Crew config" (brand gate on moved prose).
  • Comment-only edits (no AST change): updates_check.py two "no longer follows" → "has left" (comment-history gate); positional wording that named the one-module layout: api_update_check "this module's handlers" → "the update handlers", _changelog_path "updates.py lives at" → "This module lives at", _restart_gateway "re-exports this module" → "re-exports the updates facade", _venv_pip_install "the log ring handler below" → "the log ring handler in updates_streams", knowledge_library.py list_items "search_for_context below" → "search_for_context in knowledge_agent_context", knowledge_sync.py _ingest_local_file_task "this file's precedent" → "the precedent in knowledge_embeddings".
  • Glue: logger = logging.getLogger(__name__) becomes the literal facade name in each logging owner (the audit pairs the BASE line with an identical line in another touched file, so it is not listed above); _PolicyApplyStopped.__module__ restore; the facade glue and its two TYPE_CHECKING manifests (owner-defined names; names served from outside the family, L42).
  • Formatting: knowledge.py was black-baselined; the statements black re-wraps in the knowledge owners are AST-identical, and knowledge.py leaves .github/black-baseline.txt.

L36 (default vs --minimal added lines): identical for every changed file except the two glue-only facades: updates.py +202/-3463 default vs +198/-3459 --minimal (2 blank lines and 2 ) closers of wrapped TYPE_CHECKING imports), knowledge.py +226/-3349 vs +224/-3347 (2 blank lines). No kept BASE line is re-shown and no gate token sits on those lines (L41 addendum, glue-only parity). The owners are new files.

Guard changes

Each re-pointed pin is a path or row change only (or an L30 facade+owners join), with the assertions unchanged; each has a mutation proof that turns it red.

Pin Before After
test_json_object_body_guard._CAP_REGISTER 9 handlers/knowledge.py::<fn> rows the same rows keyed by knowledge_{library,sources,ingest,bundles,embeddings,agent_context}.py
test_spawn_audit.BENIGN_SPAWNS knowledge.py::_run_folder_dialog, updates.py::{_apply,_check_git_checkout,api_update_apply} knowledge_sources.py, updates_apply.py, updates_check.py, updates_apply.py
test_no_config_dir_in_async._ASYNC_CHECKED_FILES handlers/knowledge.py the facade plus the 9 knowledge owners (L40(8))
test_sandbox_install_root_seal._UPDATER_MODULES handlers/updates.py the facade plus the 6 updates owners (L40(8))
test_cse_2026_08_05_fixes path .../knowledge.py .../knowledge_agent_context.py (the search_for_context clamp its docstring names)
test_dashboard_updates_coverage::test_neither_chat_message_door_builds_the_frame_by_hand row dashboard/handlers/updates.py dashboard/handlers/updates_streams.py
test_build_version_override::test_the_feed_check_source_folds_the_stamp path .../updates.py .../updates_check.py
test_cpp_seam_failclosed::test_knowledge_extra_connectors_site_uses_safe_context_call module ...handlers.knowledge ...handlers.knowledge_lifecycle
test_gateway_restart_uses_respawn_executable::TestDashboardResolverIsLoadedBeforeTheApply getsource(updates) the facade joined with every _OWNERS module
test_config_rmw_preserves_settings::test_the_dispatch_cannot_regress_to_a_one_lock_offload getsourcefile(updates) the facade joined with every _OWNERS file
test_serving_loop_unified (2 ratchets) Path(updates.__file__) plus the updates_*.py siblings
test_knowledge_onloop_fs._module_coroutines getsourcefile(knowledge) the facade joined with every _OWNERS file, through a new _owner_files() beside it (the shape test_dashboard_files_onloop_fs already uses for file_api)
test/integration/test_boot_smoke._KNOWN_SECOND_BOOT_CHANGES ("...handlers.updates", "_last_update_check") ("...handlers.updates_check", "_last_update_check"), the module that now binds the clock
security_posture.NON_EGRESS_REDACTION_MODULES handlers/knowledge.py, handlers/updates.py the owners whose text holds the redactor calls: knowledge_{agent_context,bundles,ingest,sources,sync}.py, updates_apply.py (the facades no longer match)

Mutation proofs (17, all red, then restored): onloop-ratchet-reaches-owners, json-body-row-reaches-owner, spawn-row-reaches-owner, spawn-row-updates-check, config-dir-rows-reach-owner, updater-modules-reach-owner, cse-limit-clamp-path, chat-message-door-row, feed-check-literal-path, cpp-seam-module-string, respawn-import-join-apply, rmw-dispatch-join, serving-loop-attr-join, serving-loop-local-join, posture-rows-reach-owner, rebound-global-pin, route-table-served. The boot-smoke row runs only with KIROCREW_INTEGRATION=1; it passes with the new key (and locally with the old one too, since this boot does not move the clock), so the re-key keeps the row truthful for CI's integration lane.

Granted edit outside the claim (Master grant): test/test_update_channel_and_restart.py:772 patch.multiple(updates, **patches) → patch.multiple(updates, create=False, **patches). test_facade_mirror_guards::test_no_test_patches_a_mirrored_facade_name_with_create_true reads **patches as a possible create=True on the now-mirrored facade (scan verdict create=<dynamic>); an explicit create=False lets the scan read the call statically (verdict create=False), and a duplicate key in patches would raise, so behaviour is identical. That guard and the file's 52 tests pass.

Tests

  • New test/test_updates_handlers_facade.py and test/test_knowledge_handlers_facade.py: every name the test trees patch through each facade (scanned with test/facade_mirror_scan.py, with a known-seams non-vacuity floor) reaches every module holding it and the undo restores them; the owners are exactly the updates_*.py / knowledge_*.py siblings, loaded lowest layer first; the facade forwards no table and defines no code; each global-rebound updates name lives in one owner with every function that reads it (bytecode scan, with a known-rebinders self-test); the knowledge route table registers the very objects the facade serves; names served from outside the family are visible to type checkers (L42); one logger under the facade name; the moved exception keeps the facade module; python -m still runs; corpus-gate self-test.
  • test/campaign_facade_inventories/kiro_crew.dashboard.handlers.updates.json (93 names, 65 re-bound) and ...knowledge.json (94, 54), generated from the merge-base text; check_inventory.py reports no missing name.
  • Upstream ports (L16, reports/S36/port-table.md): the recipe re-cut carries fix: honor proxy settings when checking for updates #21880's fetch_feed_bytes delegation into updates_check.py and fix(knowledge): run request-path filesystem checks off the event loop #21791's off-loop path probe into knowledge_sources.py (five new units add_source / retry_file / skip_file read) and knowledge_sync.py (_resolved_is_sensitive, read only by _ingest_local_file_task); both owners import _run_path_probe and _PathProbeBusy from handlers/files.py, so one patch through the facade reaches both.
  • Floor: 189 test files at -n 3: every test file that imports, patches or names either facade or a moved name (the slack gateway helpers' importers included), every source-reading pin re-pointed here, the facade, mirror and inventory guards, and the error-code, posture, line-cap, flake, wait-discipline, black and subprocess-encoding ratchets: 7,490 passed, 31 skipped, 1 failed, on main 2375643f7d, then green after the one fix that red asked for: upstream's new test_knowledge_onloop_fs static ratchet scans the handlers module's coroutines, which now live in the owners, so it reads the facade joined with them (L30/L40(8), mutation-proved). test/integration/test_boot_smoke.py::test_a_second_boot_touches_only_known_module_globals passes with KIROCREW_INTEGRATION=1. scripts/local-gate.py --dry-run selects 1,167 backend + 830 frontend related files, over the campaign's 600-file local cap, so the floor above ran instead; CI owns the full matrix. mypy src/kiro_crew/ is clean (3,108 files).
  • SAST: semgrep 1.78 with the CI configs over every changed file finds nothing in any new owner, facade or test; the 10 results on edited test files are identical at BASE (same path and line), so CI's baseline drops them. No file fails to parse.
  • Determinism (new tests): 5 runs at -n0 and one at -n 3: 22 passed each time.

Manual verification

N/A: a pure move; the facade, mirror and composition guards, the importer floor and an installed-wheel import of every new module cover it (a wheel built from a git archive export, each new module imported from the installed copy under an isolated HOME).

Docs, citations and source-text pins

  • Specs: owner map paragraph in docs/system-specs/modules/learn-cron-dashboard.md (updates); owner rows, a facade paragraph and the §5 heading in docs/system-specs/modules/knowledge.md; docs/feature-map/README.md facade note names both facades and their owners.
  • L29 citation edits (path or name only), file:line old -> new:
    • setup.py:129 handlers/updates.py:_changelog_path -> handlers/updates_channel.py:_changelog_path
    • src/kiro_crew/dashboard/kiro_readiness.py:190 handlers/updates.py:1381 (a stale line cite) -> handlers/updates_streams.py::_log_ring
    • src/kiro_crew/cli_logging.py:271 handlers/updates.py::apply_log_level -> handlers/updates_streams.py::apply_log_level
    • src/kiro_crew/dashboard/ws.py:1349 handlers/updates._safe_ws_send -> handlers/updates_streams._safe_ws_send
    • src/kiro_crew/slack/gateway_runtime/update_schedule.py:551 dashboard/handlers/updates.py::_update_info -> dashboard/handlers/updates_verdict.py::_update_info
    • src/kiro_crew/dashboard/state_parts/transcript_rows.py:62 handlers/updates.py:api_stream -> handlers/updates_streams.py:api_stream
    • src/kiro_crew/dashboard/state_parts/status_payload.py:229 handlers/updates.py) -> handlers/updates_verdict.py)
    • src/kiro_crew/dashboard/status_counts.py:227 handlers/updates.py imports this module -> handlers/updates_streams.py imports this module
    • src/kiro_crew/changelog.py:8 dashboard/handlers/updates.py -> dashboard/handlers/updates_channel.py
    • src/kiro_crew/platform/feed_trust.py:5 dashboard/handlers/updates.py -> dashboard/handlers/updates_check.py
    • src/kiro_crew/validation_parts/messaging_session_schemas.py:258 (handlers/knowledge.py) -> (handlers/knowledge_sources.py)
    • src/kiro_crew/knowledge/store.py:248 dashboard/handlers/knowledge.py takes -> The dashboard/handlers/knowledge_*.py owners take
    • test/test_cpp_seam_failclosed.py:777 merge in dashboard/handlers/knowledge.py -> merge in dashboard/handlers/knowledge_lifecycle.py
    • test/test_cpp_seam_failclosed.py:948 """dashboard/handlers/knowledge.py must route -> """dashboard/handlers/knowledge_lifecycle.py must route
    • test/test_cse_2026_08_05_fixes.py:29 clamp from knowledge.py source -> clamp from knowledge_agent_context.py source
    • test/test_dashboard_updates_coverage.py:2011 the SSE arm in handlers/updates.py -> the SSE arm in handlers/updates_streams.py
    • test/test_knowledge_cross_thread.py:4 (dashboard/handlers/knowledge.py -> (dashboard/handlers/knowledge_agent_context.py
    • test/test_build_version_override.py:11 dashboard/handlers/updates.py::_local_version -> dashboard/handlers/updates_verdict.py::_local_version, updates_check.py (re-wrapped onto :12)
    • src/kiro_crew/dashboard/handlers/__init__.py:621 (see updates.py) -> (see updates_streams.py)
    • src/kiro_crew/slack/gateway_runtime/update_schedule.py:1179 handlers/updates.py -> handlers/updates_check.py
    • src/kiro_crew/dashboard/handlers/sessions_parts/live_turn.py:212 handlers/updates.py -> handlers/updates_step_up.py
    • src/kiro_crew/dashboard/part_stream.py:5 handlers/knowledge.py -> handlers/knowledge_ingest.py
    • docs/system-specs/modules/knowledge.md:624 Source-scoped list API (dashboard/handlers/knowledge.py) -> Source-scoped list API (dashboard/handlers/knowledge_library.py)
    • docs/system-specs/modules/knowledge.md:786 _NO_SOURCE in dashboard/handlers/knowledge.py -> _NO_SOURCE in dashboard/handlers/knowledge_library.py
    • docs/system-specs/modules/knowledge.md:608 dashboard/handlers/knowledge.py takes -> The knowledge_<role>.py owners of dashboard/handlers/knowledge.py take
    • docs/system-specs/modules/platform-context.md:966 dashboard/handlers/knowledge.py — the SyncScheduler -> dashboard/handlers/knowledge_lifecycle.py — the SyncScheduler
    • docs/system-specs/modules/platform-context.md:448 dashboard/handlers/updates.py, -> dashboard/handlers/updates_verdict.py, dashboard/handlers/updates_check.py,
    • docs/system-specs/modules/app-kit-platform.md:897 dashboard/handlers/knowledge.py), and neither -> dashboard/handlers/knowledge_sources.py), and neither
    • docs/system-specs/modules/app-kit-platform.md:1778 handlers/updates._safe_ws_send -> handlers/updates_streams._safe_ws_send
    • docs/system-specs/modules/config.md:2662 handlers/updates.py::apply_log_level_from_config -> handlers/updates_streams.py::apply_log_level_from_config
    • docs/system-specs/modules/learn-cron-dashboard.md:230 handlers/updates.py::_restart_gateway. -> handlers/updates_apply.py::_restart_gateway. It coalesces
    • docs/system-specs/modules/learn-cron-dashboard.md:4520 _resolve_restart_target in dashboard/handlers/updates.py -> _resolve_restart_target in dashboard/handlers/updates_apply.py
    • docs/system-specs/modules/instances.md:533 dashboard/handlers/updates.py::_restart_gateway -> dashboard/handlers/updates_apply.py::_restart_gateway
    • docs/system-specs/modules/mcp-gateway-daemon-lifecycle.md:19 dashboard/handlers/updates.py::_restart_gateway -> dashboard/handlers/updates_apply.py::_restart_gateway
    • docs/system-specs/modules/sel.md:188 dashboard/handlers/updates.py | -> dashboard/handlers/updates_step_up.py |
    • docs/system-specs/modules/governance.md:3685 dashboard/handlers/updates.py, -> the update handler owners (dashboard/handlers/updates_verdict.py
    • docs/build/release.md:110 src/kiro_crew/dashboard/handlers/updates.py folds -> src/kiro_crew/dashboard/handlers/updates_verdict.py folds
    • docs/request-for-change/rfc-update-architecture.md:215 dashboard/handlers/updates.py (_do_update_check) -> dashboard/handlers/updates_check.py (_do_update_check)
    • docs/request-for-change/rfc-update-architecture.md:216 dashboard/handlers/updates.py (api_update_apply) -> dashboard/handlers/updates_apply.py (api_update_apply)
    • docs/request-for-change/rfc-update-architecture.md:801 api_update_auto in dashboard/handlers/updates.py -> api_update_auto in dashboard/handlers/updates_channel.py
  • Rows: .github/file-line-cap-baseline.txt rows for both targets deleted (L45); .github/black-baseline.txt row for knowledge.py deleted; .github/subprocess-encoding-baseline.txt row for knowledge.py deleted (L57); error-code-baseline.json redistributed with --update, own rows only: totals unchanged (1044 / 18 / 38), _compliant keeps main's value (2,767).
  • Baselined growth (L56 addendum 1b): src/kiro_crew/security_posture.py main row 3,181, main 3,443 lines, HEAD 3,447 (+4): exact-path NON_EGRESS_REDACTION_MODULES rows the drift guard requires, with no comment. The row stays as main has it.
  • References not edited (cost, L50): website/src/types/index.ts:195 (_update_info → handlers/updates_verdict.py), website/src/utils/displayVersion.ts:2 (_display_version → handlers/updates_verdict.py), website/src/pages/knowledge/SourceGroup.tsx:11 and website/src/pages/knowledge/index.tsx:41 (list_items → handlers/knowledge_library.py), website/scripts/lib/stub-dashboard-api.mjs:86 (get_stats → handlers/knowledge_library.py), website/scripts/capture-session-start-repeat.mjs:103 (the restart refusal → handlers/updates_apply.py); website/playwright/logs.spec.ts:24 is a test-file comment and stays.

CI path references

None: no workflow path filter or explicit file list names dashboard/handlers/updates.py or dashboard/handlers/knowledge.py; AUTOSDE.yaml's src/kiro_crew/dashboard/handlers/** globs already cover the owners, and no SENSITIVE_GLOBS entry matches them. The edit to src/kiro_crew/security_posture.py (a SENSITIVE_GLOBS path) brings in Sensitive Change Review; its template is posted as a PR comment for the head.

Related Issues

Part of #20192
Follow-up: #21320 (comment citations in website/** deferred under L50)

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; see the Licensing section of CONTRIBUTING.md.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners October 19, 2026 05:01
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/security_posture.py

  • @bolichen97 posted a complete reasoning template for 37a3eff.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 37a3effef4b690c6c74f5c484506ea3e4ac1ba04 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 37a3effef4b690c6c74f5c484506ea3e4ac1ba04 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the conftest reset of updates._log_ring_handler_installed (conftest.py:2589) still reaches the updates_streams owner through the mirror, which is where the handler-installed flag now lives.

[DESIGN-REVIEWED] 37a3eff

Description read

[DESCRIPTION-READ] 6e339c6e6324d5cc6573d682a040483f934db8933c7a5e86338f37f410019d6e

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 Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 37a3effef4b690c6c74f5c484506ea3e4ac1ba04 — 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/CONCERNS are advisory.

First-Principles-Verdict: PASS

Check that the re-keyed path lists (the security_posture.py allow-list and error-code-baseline.json) name only owners that actually contain the matched pattern.

What this change ships

Inventory (6 items) — 6 justified

Intent: let maintainers keep changing the update and Knowledge Library routes without breaking the 2,000-line file cap. This is a REFACTOR, so neither FIX nor ADDITION. It reuses the existing _facade_mirror.py mechanism (157 src references on base).

  1. updates.py split into six owners behind a facade, no route or behavior change — justified
  2. knowledge.py split into nine owners behind a facade, no route or behavior change — justified
  3. Two oversize rows dropped from the line-cap baseline — justified
  4. Path-keyed guard lists (security_posture.py, error-code-baseline.json, subprocess and black baselines) re-keyed to the owner files — justified
  5. Comments and specs that cite a definition site now name the owner file — justified
  6. Facade inventories and facade tests pin that every base name still resolves — justified

[FIRST-PRINCIPLES-REVIEWED] 37a3eff

Description read

[DESCRIPTION-READ] 3e8ce3fc8d3a00b1577e704b9e19528bd0a6f1a0085a6b893c1e123c27d67f20

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 added the readiness: checking Automated validation is still running label Oct 19, 2026
@bolichen97

bolichen97 commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: 37a3eff
  • What rule changed: no rule changed; the NON_EGRESS_REDACTION_MODULES rows in src/kiro_crew/security_posture.py follow redactor call sites that this split moves into new owner modules.
  • Before -> after: the rows dashboard/handlers/knowledge.py and dashboard/handlers/updates.py become the owners whose text holds those calls (knowledge_agent_context.py, knowledge_bundles.py, knowledge_ingest.py, knowledge_sources.py, knowledge_sync.py, updates_apply.py); the two facades no longer contain a redactor call, so their rows would be stale.
  • Worst case if wrong: the posture drift guard in test_security_posture would name an unclassified or stale module; the classification itself is unchanged, since every moved call is the same non-egress handler code that the facade rows covered.
  • Evidence checked: test/test_security_posture.py passes; a mutation that removes the _redact( call from knowledge_ingest.py turns test_allowlist_has_no_stale_entries red; the redactor regex matches exactly these six owners and neither facade.
  • No regression:
    • Tools still work: the set is classification data for the posture panel only; the moved handlers run AST-identical code behind the same routes.
    • Backward compatible: no route, response, SEL row or redaction behaviour changes; the facades still serve every name they served.
    • Existing tests: test_security_posture and the 175-file floor pass unchanged apart from the listed row re-points.
  • How to undo: revert this PR's commit, which restores the two facade rows together with the code they describe.

@bolichen97
bolichen97 enabled auto-merge (squash) October 19, 2026 05:05
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 37a3eff

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 37a3effef4b690c6c74f5c484506ea3e4ac1ba04: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 37a3eff

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 37a3effef4b690c6c74f5c484506ea3e4ac1ba04: <one-sentence reason>

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • Every path-keyed guard list names the new owner files

Answered, with the lists enumerated. Six guards key on a path or a module name that this split moves, and each was re-pointed or joined in this commit, with a mutation proof that turns it red (17 proofs in all, listed in the PR body):
test_json_object_body_guard._CAP_REGISTER 9 rows -> the knowledge owners; test_spawn_audit.BENIGN_SPAWNS 4 rows -> knowledge_sources, updates_apply, updates_check; test_no_config_dir_in_async._ASYNC_CHECKED_FILES -> the facade plus all 9 knowledge owners; test_sandbox_install_root_seal._UPDATER_MODULES -> the facade plus all 6 updates owners; test_knowledge_onloop_fs._module_coroutines -> the facade joined with every _OWNERS file; security_posture.NON_EGRESS_REDACTION_MODULES -> the 6 owners whose text calls a redactor.
No updater or knowledge coroutine sits outside a ratchet: _ASYNC_CHECKED_FILES and the on-loop ratchet both read the whole family, not a subset, so a coroutine added to any owner is scanned. The sync-io gate, the flake and wait-discipline ratchets and the error-code contract are whole-tree or per-file scans, so they follow the code without a row; the error-code rows were redistributed with the test's own --update (totals unchanged).
Proof the lists are not vacuous: deleting the probe hop in knowledge_sources reddens the on-loop ratchet, planting a config_dir() call in knowledge_library reddens the config-dir list, and adding a sandbox wrapper name to updates_apply reddens the updater list.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • The shorter NON_EGRESS_REDACTION_MODULES lists match where the redaction sites now live

Answered, re-measured at this head with the drift guard's own regex (\bStreamRedactor\(|\b\w*redact\w*\(|\.redact\(, which matches text, comments included). Matching owners and their counts: updates_apply.py 4 (the two redactor pairs in _build_frontend and _venv_pip_install); knowledge_agent_context.py 20, knowledge_bundles.py 12, knowledge_ingest.py 1, knowledge_sources.py 1, knowledge_sync.py 1. Those six are exactly the six rows this PR adds, and the other nine owners plus both facades do not match, which is why the two facade rows are deleted rather than kept: a row whose file no longer matches fails test_allowlist_has_no_stale_entries.
So 1 of 6 and 5 of 9 is the measurement, not a narrowing: the classification of every site is unchanged (the same non-egress handler code, same routes), only the file it is keyed by moved. test_security_posture passes, and a mutation that drops the _redact( call from knowledge_ingest.py turns the stale-entry test red.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 19, 2026
handlers/updates.py (3,479 lines) and handlers/knowledge.py (3,271)
were over the 2,000-line cap for hand-written files. Each keeps its
path as the only import path and patch surface and becomes a pure-glue
mirror facade (kiro_crew._facade_mirror); the moved code lives in
sibling owners by responsibility.

updates.py (207) serves updates_{verdict,check,apply,streams,step_up,
channel}; each global a function rebinds sits in one owner with every
function that reads it. knowledge.py (229) serves knowledge_{access,
library,sync,sources,ingest,bundles,embeddings,agent_context,
lifecycle}.

Moved bodies are AST-identical apart from a brand-gate docstring
reword and the folder dialog's explicit UTF-8 decode (a moved
subprocess-encoding offender, fixed rather than carried); comments
reworded for the comment-history gate and for wording that named the
one-module layout. Path-keyed rows and pins follow the moved code,
specs gain owner maps, and new facade tests pin patch reach, owner
order, the rebound globals' homes and the served route table.

Part of #20192
@bolichen97
bolichen97 force-pushed the refactor/linecap-s36-updates branch from 904d84b to 37a3eff Compare October 19, 2026 06:13
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 19, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • The conftest reset of updates._log_ring_handler_installed still reaches the updates_streams owner through the mirror

Answered. conftest.py:2589 only names the flag in prose (it explains why handlers are deliberately NOT restored); no fixture writes it. The writers are test_dashboard_updates_coverage.py:1855-1856, which monkeypatch.setattr both _log_ring_handler_installed and _log_ring_handler on the facade.
That reach is pinned twice in this PR. test_updates_handlers_facade::test_each_rebound_global_lives_in_one_owner_with_its_readers proves the flag is bound by exactly one family member (updates_streams), that the facade does not bind it, that updates._log_ring_handler_installed is vars(updates_streams)["_log_ring_handler_installed"], and that no other owner reads it as a global (bytecode scan); its companion self-test proves the scan sees install_log_ring_handler rebinding it, so it cannot pass vacuously. test_updates_handlers_facade::test_a_facade_patch_of_every_scanned_name_reaches_every_module_holding_it then writes a sentinel through the facade for every name the test trees patch, including this one, and requires every holder to see it and the undo to restore them (_index().divergent() == ()).
Mutation proof rebound-global-pin: adding a reader of a rebound global to another owner turns that test red. The owning test file passes 5x at -n0 and once at -n 3.

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • The re-keyed path lists name only owners that actually contain the matched pattern

Answered, re-measured at this head.
security_posture.NON_EGRESS_REDACTION_MODULES: running the drift guard's own regex (\bStreamRedactor\(|\b\w*redact\w*\(|\.redact\(, text-matching, comments included) over the 17 family files matches exactly the six rows this PR adds and nothing else: updates_apply.py 4, knowledge_agent_context.py 20, knowledge_bundles.py 12, knowledge_ingest.py 1, knowledge_sources.py 1, knowledge_sync.py 1. Both facades and the other nine owners do not match, which is why their rows are deleted: test_security_posture::test_allowlist_has_no_stale_entries fails a row whose file stopped matching, and test_every_redactor_call_site_is_a_registered_sink_or_allowlisted fails an unlisted matching file. Both pass.
error-code-baseline.json: the rows are not hand-written. They are what test/test_error_code_contract.py --update computes by scanning each file, so each row equals the owner's real missing_code count; only the per-file distribution changed and the totals are untouched (1044 / 18 / 38, _compliant 2767, equal to main's). test_baseline_is_not_stale fails a row above the live count and test_no_new_error_response_without_a_code fails one below it; both pass, and test_baseline_file_is_parseable_and_shaped refuses a zero row, which is why the two facade rows are gone.
Mutation proof posture-rows-reach-owner (drop a redactor call from an owner) turns the posture guard red.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 19, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every review lane on the head is clean (only runner notices and PR Scope / Opus size warnings); held by the triage cron on size, path or lane-note rules alone. Approved on the watch holder's request.

@bolichen97
bolichen97 merged commit 26729d9 into main Oct 19, 2026
113 of 115 checks passed
@bolichen97
bolichen97 deleted the refactor/linecap-s36-updates branch October 19, 2026 08:14
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 19, 2026
bolichen97 added a commit that referenced this pull request Oct 19, 2026
…22222)

search_for_context stat'ed and read the gateway's config.json inside the
coroutine. #22084's fs gate flags that call; its baseline row named
handlers/knowledge.py, but #22073 had already moved search_for_context into
knowledge_agent_context.py, so main's ratchet lane reads one new offender
plus one stale row (red since 28ee969).

The read now runs in _read_knowledge_config on asyncio.to_thread (the path
is the gateway's own, not the request's). The stale knowledge.py row is
pruned with --update-baseline, and test_knowledge_onloop_fs.py drops the
on-loop allowance for that call and proves the read leaves the loop thread.

Refs #22209

Co-authored-by: Bolin Chen <bolichen@amazon.com>
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.

2 participants