Skip to content

fix(members): honour the inherited-resources opt-out in snapshots - #14413

Merged
iamwhatever merged 1 commit into
kirodotdev:mainfrom
unstablebrainiac:fix/member-essentials-inherit-opt-out
Sep 27, 2026
Merged

iamwhatever merged 1 commit into
kirodotdev:mainfrom
unstablebrainiac:fix/member-essentials-inherit-opt-out

Conversation

@unstablebrainiac

@unstablebrainiac unstablebrainiac commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A crew member whose workspace turns off kiro-cli's inherited resources works from the context its template declares, as its native agent does, instead of getting the operator's global steering back in every turn.

A member bound to a workspace that sets chat.disableInheritingDefaultResources: true still received the operator's global steering (~/.kiro/steering), the workspace AGENTS.md and undeclared workspace steering in its per-turn essential snapshot. The native agent in the same workspace loads none of them. The member therefore works from two rule sets: the one its launch gave it and the one the snapshot adds back on every turn.

Why it matters

The setting is how an operator gives a member its own rules. Global steering is usually the operator's personal rules for their own assistant, and some of them contradict what a member is set up to do: an operator rule that every ticket comment needs approval, given to a member meant to post on its own, is one example. There is no way to keep those rules out of a member today, because the snapshot undoes the workspace opt-out without saying so. It also costs context, since every global steering file is sent again on every turn.

Not a goal

  • Adding a new Crew setting: this honours kiro-cli's existing one.
  • Changing anything for workspaces that inherit, the default.
  • Changing how the skill projection writes and restores its overlay.

What changed (motivation → approach → change)

A member whose workspace opts out of kiro-cli's default resources gets the same context in its snapshot as its native agent: its prompt, its declared resources and SOUL.md, plus any steering its chat folder declares. The opt-out is kiro-cli's own setting, so it changes only sessions kiro-cli serves; a member on any other harness keeps inheriting.

Piece Behaviour
Member turn (context.py, _build_v2_essentials) reads the decision once per turn, only when kiro-cli serves the session, and hands it to the snapshot and the folder-steering dedup; a profile validation pass reads nothing and measures the inheriting envelope
Member essential snapshot (member_essential_context.py, documents_for_member) takes the decision as an argument; when it says opt out, skips the implicit global steering, root AGENTS.md and undeclared .kiro/steering scans
Kiro launch-document model (kiro_launch_documents, same file) follows the same decision, so it keeps describing what kiro-cli loads
Folder steering for members and plain kiro chats (context.py, collect_folder_steering in folder_steering.py) treats a folder's .kiro/steering roots as already delivered only while the workspace inherits; under the opt-out the folder reader skips, before reading it, a document whose canonical path the member's snapshot already holds
Inheritance decision (acp/skill_projection.py) one function decides for the projection and every path above, reached through the agent SDK driver, agent_sdk/drivers/acp.py, and for a member through member_inherits_default_resources

The snapshot mirrors what the native agent loads, but it listed the default sources itself and never read the opt-out. The skill projection does read it. It also pins the native key to true in every workspace it manages and records the user's real choice beside it, so a reader of the raw key would see an opt-out wherever Crew runs. Every path therefore asks the projection's own decision, which reads the recorded choice. Settings that cannot be read keep inheritance: malformed or deeply nested JSON, and a KIRO_HOME that is a symlink loop.

The folder-steering dedup assumed kiro-cli always sent both .kiro/steering trees, for members and plain kiro chats alike. It follows the same decision, so an opted-out chat gets those trees once, through its folder, instead of from nowhere. The template can still declare some of those files, so the folder reader skips a file whose canonical path the member's snapshot already carries. It compares that path as a string, before the file's label is folded for the prompt, so it resolves no path again and two different files whose labels look alike both arrive. Each document reaches the session exactly once whichever way the workspace chooses.

A profile validation pass cannot know which harness the member's next session uses, so it measures the inheriting envelope, the largest any harness can build.

The system specs (modules/memory-skills-hooks.md, modules/providers.md) and the skip_delivered_roots docstring in folder_steering.py name the opt-out and where it applies.

Backwards compatibility

Compatible: nothing is rejected, renamed or removed. A workspace that inherits, the default, builds the same snapshot and the same folder steering. Only a workspace or user that set chat.disableInheritingDefaultResources to true sees a difference, and only on sessions kiro-cli serves; that difference is the documented meaning of the setting. Profile validation measures the same inheriting envelope it measures today.

Tests

  • test/test_member_essential_context.py: an opted-out kiro workspace keeps only declared sources and still loads steering its template declares; the same workspace changes nothing for a member on another harness (claude_code, codex, a config-authored harness); a kiro member turn reads the setting exactly once and another harness never reads it; documents_for_member takes the decision and never reads the setting; a profile validation pass reads no setting and measures the inheriting envelope; Crew's overlay is not read as an opt-out, for local and global sources; a global opt-out applies unless the workspace overrides it; only the literal true opts out; malformed and deeply nested settings keep inheritance, the deep case running with cyclic GC paused as the testing conventions require; a KIRO_HOME symlink loop keeps inheritance and the snapshot still builds; the kiro launch documents follow the opt-out; a folder that declares both .kiro/steering trees, while the template declares the project tree too, delivers their always-inclusion documents exactly once, to an opted-out member, to an inheriting one and on another harness; the opted-out dedup resolves no label, a file name the label fold changes still matches, and two different files whose labels fold alike both arrive, whichever of them the template declares.
  • test/test_folder_steering.py: a delivered canonical path is neither read nor returned while a sibling whose label folds the same is returned, and no delivered path is ever resolved or validated.
  • test/test_folder_steering_provider_dedup.py: the opt-out removes only the kiro-cli path from _project_steering_delivered, whose kiro-cli verdict is the agent SDK driver's reading of the setting; an opted-out kiro chat receives the project, global and folder rules exactly once, in the fresh section and after a compaction; an inheriting kiro chat still skips the trees after a compaction; an opted-out workspace changes nothing for another harness.
  • test/test_native_skill_projection.py: the shared reader agrees with the projection before and after its overlay, across workspace, global and malformed values, and follows a live global preference under the overlay.

With the production change reverted, the opt-out cases fail on their assertions and the reader's parity cases fail because the reader does not exist. Without the kiro-only gate the other-harness member loses its steering; without the decision in _project_steering_delivered the opted-out kiro chat gets the trees zero times; without the validation guard the validation envelope misses the operator rule. Without the RecursionError catch the deeply nested case raises, and without the RuntimeError catch the KIRO_HOME loop case raises. With the folder roots always skipped, the opted-out folder case gets its operator rule zero times; without the canonical-path skip it gets the template's always guide twice; a label comparison in its place drops one of two files whose labels fold alike; and a realpath in that check fails the no-resolution tests.

Manual verification

Unit coverage runs the snapshot, the launch documents, the folder dedup and the projection against real settings files on disk. A live member session in an opted-out workspace is still to be checked.

Related Issues

no linked issue: found while giving a crew member its own rules; no open issue tracks it.

Pattern harvest

Not generalizable: the member snapshot and the folder-steering dedup were the loaders that decided about kiro-cli's inherited resources without the projection's decision; every one of them now reads one function.

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

@unstablebrainiac
unstablebrainiac requested a review from a team as a code owner September 27, 2026 07:43
@github-actions github-actions Bot added the fork Pull request from a fork (external contributor) label Sep 27, 2026
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Intent: A crew member whose workspace turns off kiro-cli's inherited resources works from the context its template declares, as its native agent does, instead of getting the operator's global steering back in every turn.
Not a goal: adding a new Crew setting (this honours kiro-cli's existing one), changing anything for workspaces that inherit (the default), or changing how the skill projection writes and restores its overlay.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 27, 2026
@unstablebrainiac
unstablebrainiac force-pushed the fix/member-essentials-inherit-opt-out branch from 4f2adb1 to e62eb73 Compare September 27, 2026 07:54
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of 58a07fd6753aa7d55780703d69e97d7950fcbd58 via the fork AI-review pipeline — 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

Confirm on kiro-cli itself that the opt-out skips exactly the implicit scan (global steering, root AGENTS.md, undeclared steering) while declared resources still load — the whole fix mirrors that external behaviour.

The defect has checkable provenance: base documents_for_member scans ~/.kiro/steering unconditionally, so the added opt-out tests fail on base. The setting's semantics (is not True, workspace-over-global) are not a new claim — base prepare_native_skill_projection already encoded them, and the fix extracts that exact logic into _inheritance_preference rather than spelling it twice. The driver wrapper follows the existing seam (agent_sdk/drivers/acp.py already wraps census_projected_aliases, drain_stale_aliases; nothing outside acp/ imports skill_projection directly — grepped, 0 hits). Sibling check: greps for kiro_launch_documents, _project_steering_delivered and collect_folder_steering find every delivery-assumption site touched or reached through the one decision; no unfixed sibling. Defaults unchanged for inheriting workspaces, so not product shape.

What this change ships

Inventory (8 items) — 8 justified

Intent: a member in a workspace that opts out of kiro-cli's inherited resources works from its template's context, not the operator's global rules — a FIX.

  1. Opted-out kiro member no longer receives operator global steering, AGENTS.md, undeclared workspace steering — justified
  2. Declared resources and SOUL.md still load under the opt-out — justified
  3. Kiro launch-document model follows the same opt-out — justified
  4. Opted-out non-member kiro chat now gets folder-declared steering trees once (was zero) — justified
  5. Under opt-out, a template-delivered folder document is not sent twice — justified
  6. Members on any other harness are unchanged; the setting is never read there — justified
  7. New readable inheritance verdict (inherits_default_resources, driver and member wrappers) other code may call — justified
  8. Two system specs updated in the same commit — justified

[FIRST-PRINCIPLES-REVIEWED] 58a07fd

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/context.py and 42 other files the green-age check links to this PR (75b52f1 -> 6978ac0, #11121); none of this PR's files changed and the patch is identical. CI re-running.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of 58a07fd6753aa7d55780703d69e97d7950fcbd58 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify the live opted-out member session end-to-end — the PR's Manual verification section itself flags that as still unchecked.

Suggestions

  • _build_v2_essentials's new provider_type param defaults to PROVIDER_ACP, so a future caller that omits it silently gets kiro-only opt-out semantics — steering dropped with nothing delivering it on another harness; make the param required so the compiler of call sites, not a default, decides.

[DESIGN-REVIEWED] 58a07fd

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed 58a07fd6753aa7d55780703d69e97d7950fcbd58 via the fork AI-review pipeline; updated in place on each push.

Review details

FINDING -- src/kiro_crew/agent_sdk/drivers/acp.py:616 -- function-local "from kiro_crew.acp.skill_projection import" lacks the required circular-import explanation -> Fix: add a # circular import comment explaining the cycle.
[GPT-REVIEWED] 58a07fd

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review (fork) — ✅ no blocking findings

Reviewed 58a07fd6753aa7d55780703d69e97d7950fcbd58 via the fork AI-review pipeline; updated in place on each push.

Review details

Opted-out kiro non-member chats re-send the project .kiro/steering tree kiro-cli still loads from the agent spec's declared resources.

FINDING — src/kiro_crew/context.py:2245 — (provider_type == PROVIDER_ACP and acp_driver.inherits_default_resources(project)) switches the folder dedup off wholesale for an opted-out kiro workspace, but the opt-out only suppresses kiro-cli's default resources while the shipped spec's own "resources": ["file://.kiro/steering/**/*.md"] (config/defaults.json:40, re-seeded at agent.py:3832) is still loaded natively — and the non-member _render_folder_steering_section → collect_folder_steering call passes no delivered_sources (only the member path gets them) and native_context_documents is empty for non-member sessions (acp/harness/kiro.py:126 gates on ctx.member_context), so every always-inclusion project steering document arrives twice, defeating the "so they are not sent twice" contract of this very function → Fix: hand the non-member call the natively-declared project sources as delivered_sources, or keep the project entry of _double_load_roots under the opt-out and drop only the home entry, since only the global tree is genuinely undelivered.

[OPUS-REVIEWED] 58a07fd

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=1cd3abf81733 rebutted: the opt-out narrows a member's snapshot on every harness, by design

Intended, not a defect. The intent is harness-neutral: a crew member whose workspace turns off kiro-cli's inherited resources works from the context its template declares, instead of getting the operator's global steering back in every turn.
Crew itself supplies these three sources to members: the V2 snapshot does on every backend, and kiro_launch_documents applies the same decision to kiro's native launch view. As the finding notes, nothing else delivers them on other backends, so Crew is the only place the workspace's opt-out can take effect.
Gating on kiro identity would give one member in one workspace different rules per backend: a non-kiro harness would restore exactly the global steering the workspace opted out of.
The code comment names kiro-cli because the setting and its default-resource list are kiro-cli's. The documented contract is harness-neutral: memory-skills-hooks.md says that when the workspace opts out, "the snapshot omits them".
Workspaces that inherit (the default) keep every source on every harness.

@unstablebrainiac
unstablebrainiac force-pushed the fix/member-essentials-inherit-opt-out branch from e62eb73 to 9cf1d3a Compare September 27, 2026 09:00
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: no

  • span=7390b84e664b fixed in 9cf1d3a: the deep-recursion case runs with the cyclic collector held off

Confirmed: the deeply-nested case of test_unreadable_settings_keep_inherited_guides drove json.loads to the recursion limit with cyclic GC live, the combination testing-conventions.md records as aborting a worker when an inherited finalizer runs at that depth.
Fixed as the convention prescribes: a per-file cyclic_gc_quiesced fixture collects at depth zero, disables the collector for the walk, then restores it and collects again in finally, the same shape as no_cyclic_gc_at_the_recursion_limit in test_mcp_preflight.py.
Both parametrized cases and their assertion are unchanged, and the production RecursionError handling the case exercises is untouched.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: no
mechanism: member_inherits_default_resources is the one opt-out verdict for the snapshot scans, kiro_launch_documents and the member folder-steering dedup.

  • span=1cd3abf81733 fixed in 9cf1d3a: a folder's steering trees are skipped as delivered only while the snapshot delivered them

Confirmed: under the opt-out the snapshot skipped both .kiro/steering trees while _build_v2_essentials kept collect_folder_steering's default skip_delivered_roots=True, so a folder that declares one of them reached the member zero times.
Fixed: _build_v2_essentials passes member_inherits_default_resources(project) as skip_delivered_roots, the same verdict the snapshot's scans use. The folder block runs under the same project-group condition as the snapshot's include_project, so the two always agree.
Inheriting workspaces get the old default, True, so their output is unchanged.
Tests: a folder that declares both trees delivers each always-inclusion document exactly once, to an opted-out member and to an inheriting one; the opted-out case failed first with 0 == 1.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=1cd3abf81733 rebutted: the opt-out narrows a member's snapshot on every harness, by design

Same class as the ruling on e62eb73, restated for this head: intended, not a defect. The frozen intent is harness-neutral: a member whose workspace turns off kiro-cli's inherited resources works from the context its template declares.
The finding confirms that on non-kiro backends nothing but this snapshot delivers these sources. So the snapshot is the only place the workspace's opt-out can take effect, and the native agent on those backends does not load kiro-cli's ~/.kiro/steering either.
The proposed kiro-only gate would give an opted-out member on another harness the global steering its workspace turned off. That is the defect this PR fixes, moved to a second backend, and it needs a new backend set and argument the intent does not call for.
Workspaces that inherit (the default) keep every source on every harness. memory-skills-hooks.md states "the snapshot omits them" with no harness qualifier.

@unstablebrainiac
unstablebrainiac force-pushed the fix/member-essentials-inherit-opt-out branch from 9cf1d3a to 3a389a5 Compare September 27, 2026 10:10
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=2299889fe35b fixed in 3a389a5: a looping KIRO_HOME no longer crashes member turns

inherits_default_resources now catches RuntimeError beside OSError, ValueError, RecursionError and FileTooLargeError. Before Python 3.13, Path.resolve() reports a symlink loop as RuntimeError; the reader now treats that like any other settings it cannot read and keeps inheritance, its documented fallback.
test_cyclic_kiro_home_keeps_inherited_guides points KIRO_HOME at a self-loop. It raised RuntimeError: Symlink loop on 9cf1d3a and passes now, and the member snapshot still carries the operator's steering.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: under the opt-out, _build_v2_essentials drops folder documents whose realpath is already a snapshot source

  • span=451b2d4903f8 fixed in 3a389a5: a steering file the template and the folder both declare reaches an opted-out member once

The inheritance verdict is read once. Under an opt-out, folder documents whose realpath is already a source in documents are dropped before fitting, so they are not repeated and do not spend the envelope's document and character budget twice.
Inheriting workspaces take the unchanged path. The collector already skips conditional steering, so the #selection stubs the snapshot writes have no folder twin.
The opted-out folder test now declares the project tree in the template too. The always guide appeared twice on 9cf1d3a and appears once now; the inheriting twin is unchanged.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: under the opt-out, _build_v2_essentials drops folder documents whose realpath is already a snapshot source

  • span=d376a52403ca fixed in 3a389a5: a folder no longer re-sends a steering file the template already delivered

The fix is the candidate filter the finding proposed. Under the opt-out, folder documents whose realpath is already a source in documents are dropped before _fit_folder_steering_into_envelope runs. They no longer spend a slot and bytes twice, or push the folder tail out early.
Inheriting workspaces are untouched: the delivered-roots skip still covers them.
The opted-out folder test now declares the project tree in the template as well. The always guide appeared twice on 9cf1d3a and appears once now.

@unstablebrainiac
unstablebrainiac force-pushed the fix/member-essentials-inherit-opt-out branch from 3a389a5 to 147d0cd Compare September 27, 2026 12:07
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: the opted-out folder dedup compares reader-produced labels instead of resolving paths

  • span=dc2d7de999a7 fixed in 147d0cd: the opted-out dedup no longer resolves any path

The dedup in _build_v2_essentials no longer calls os.path.realpath. It compares os.path.normcase(_source_label(source)) for snapshot sources with os.path.normcase(label) for folder documents: labels both readers already produced from validated, pinned reads. _source_label is a pure per-character fold and normcase is pure casing, so the path does no filesystem I/O and reaches no junction or UNC target.
test_opted_out_folder_dedup_does_not_resolve_source_labels records realpath calls after the reads: seven on the realpath comparator, none now. The duplicate-delivery tests still pass, and a file name the label fold changes still matches.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: no
mechanism: the member verdict is computed once per turn in _build_v2_essentials, only for sessions kiro-cli serves

  • span=1cd3abf81733 fixed in 147d0cd: kiro-cli's opt-out binds only sessions kiro-cli serves

This span has been raised on 3 heads. The two earlier rebuttals (5854208909, 5854709731) were wrong on the code: the overlay keys exist only under kiro, so on codex, claude or opencode the raw kiro key governed a harness that never reads it.
_build_v2_essentials now reads the verdict only when provider_type == PROVIDER_ACP, the label provider_label gives kiro-cli alone; every other harness keeps inheriting. documents_for_member takes the verdict as an argument and reads nothing.
test_opt_out_binds_only_a_session_kiro_cli_serves (claude_code, codex, a config-authored harness) failed on the old code, where the other-harness member lost its steering, and passes now.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: no
mechanism: _project_steering_delivered takes the session project and requires the inheritance verdict on its kiro-cli disjunct

  • span=d376a52403ca fixed in 147d0cd: an opted-out kiro chat receives the steering trees through its folder

_project_steering_delivered(provider_type, native_steering, project) returns (provider_type == PROVIDER_ACP and workspace_inherits_default_resources(project)) or is_claude_code(...) or native_steering. Both non-member call sites pass the project: the fresh-session folder section and the post-compaction reinjection. KAS (native_steering) and claude_code are unchanged, and an inheriting workspace takes the same branch as before.
test_an_opted_out_kiro_chat_receives_the_trees_once_through_the_folder got the trees zero times on the old code and exactly once now, in the fresh section and in the reinjected block.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=4095e234c2e1 fixed in 147d0cd: the decision lives in _project_steering_delivered, not only in its member caller

Clears-when met: the ACP branch of _project_steering_delivered reads the inheritance verdict (workspace_inherits_default_resources(project)), so the delivered-roots skip holds only where kiro-cli actually delivers those trees, for members and plain kiro chats alike.
The member envelope passes the same per-turn verdict to its folder call, so one decision governs every consumer of the "already delivered" claim.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=7e38e2ecb258 fixed in 147d0cd: one verdict per member turn

_build_v2_essentials reads the setting once and passes the verdict to documents_for_member, which now takes it as an argument and reads nothing, and to the folder-steering dedup. Exactly-once delivery rests on a single read instead of two agreeing ones.
test_a_kiro_member_turn_reads_the_setting_exactly_once counted three reads on the old code and one now; a profile validation pass reads none.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 27, 2026
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • span=1fa3f375cf6b fixed in c00d20c: the workspace_inherits_default_resources alias is deleted

_project_steering_delivered (context.py) and member_inherits_default_resources (member_essential_context.py) now call acp_driver.inherits_default_resources directly. Both modules import the agent SDK driver at top level, and nothing names the alias any more.
The non-member path still asks the driver about the raw project with no admission check, so it cannot raise. The member path still admits the project first.
test_the_kiro_cli_verdict_is_the_drivers pins that the non-member kiro verdict is the driver's reading of the setting.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: yes

  • span=451b2d4903f8 fixed in c00d20c: member_inherits_default_resources is imported at module top level

It moved out of the function-local import block in ContextBuilder._build_v2_essentials into context.py's top-level from kiro_crew.member_essential_context import (...) block. That block already imports the module, so there is no import cycle to avoid.
The names that function-local block imported on main stay where they were. The alias removal in the same commit put the agent SDK driver import at top level in both modules, so this change adds no function-local import.

@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 Sep 27, 2026
@unstablebrainiac
unstablebrainiac force-pushed the fix/member-essentials-inherit-opt-out branch from c00d20c to 3371864 Compare September 27, 2026 14:04
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/system-specs/modules/security.md, scripts/measure_path_gate_ttl.py, src/kiro_crew/dashboard/handlers/files.py, src/kiro_crew/executors.py, src/kiro_crew/security/paths.py, test/test_pathres_loop_starvation.py, test/test_security.py, test/test_security_gate_liveness.py, test/test_security_path_resolve_bounded.py since this head went green (19b157d -> c203fac); CI re-running.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 27, 2026
A member whose workspace sets chat.disableInheritingDefaultResources
still received the operator's global steering, AGENTS.md and undeclared
workspace steering in its V2 essential snapshot, because the snapshot
scanned them unconditionally. kiro-cli gives such an agent only the
resources it declares, so the snapshot re-added the very rules the
member was configured without.

The opt-out is kiro-cli's own setting, so it binds only sessions
kiro-cli serves; every other harness keeps inheriting. Each member turn
reads the verdict once, from the preference the native skill projection
records (Crew's own overlay included), and hands it to the snapshot,
the kiro harness's launch-document model and the folder-steering dedup.
Settings that cannot be read keep inheritance. A profile validation
pass reads no setting and measures the inheriting envelope, the largest
any harness can build. The snapshot skips the implicit scans when it
opts out, and a folder that declares one of the skipped steering trees
delivers those documents itself, once: the folder reader skips a file
whose canonical path the template already delivered, compared as a
string before its label is folded, so no path is resolved again and
two files whose labels fold alike both arrive. Non-member kiro chats
follow the same verdict, so their folder steering no longer skips trees
kiro-cli will not load. The projection routes its existing decision
through the same function.
@unstablebrainiac
unstablebrainiac force-pushed the fix/member-essentials-inherit-opt-out branch from 3371864 to 58a07fd Compare September 27, 2026 15:41
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Sep 27, 2026
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: no

  • span=c21bf0a763ee fixed in 58a07fd: the folder-steering dedup is no longer described as if kiro-cli always loads .kiro/steering

docs/system-specs/modules/providers.md:184 now says kiro-cli loads those trees natively while the workspace inherits kiro-cli's default resources, matching the launch-contract sentence at providers.md:165-166.
The skip_delivered_roots docstring in src/kiro_crew/folder_steering.py made the same unconditional claim and carries the same qualifier, so the parameter's contract matches _project_steering_delivered.

@unstablebrainiac

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: collect_folder_steering(delivered_sources=...) skips a candidate by its unfolded canonical path before reading it

  • span=451b2d4903f8 fixed in 58a07fd: _source_label collisions in the opted-out folder dedup; supersedes the rebuttal in 5855891521

That rebuttal was wrong. Two distinct files whose names fold to the same label lost one body, and a shared prompt label does not make dropping it correct.
The post-read label comparison in _build_v2_essentials is gone. Under the opt-out the member passes its snapshot's source paths to collect_folder_steering(delivered_sources=...), which skips a candidate only when os.path.normcase of its unfolded canonical key is in that set. The check is string membership before the read, and no path is resolved.
The same control-character file reached by both readers still arrives once. Two distinct files whose labels fold alike both arrive, in either direction: test_opted_out_folder_dedup_keeps_distinct_fold_colliding_sources failed 0 == 1 before the fix.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 27, 2026
@unstablebrainiac

Copy link
Copy Markdown
Contributor Author
  • span=98e9746c12cd rebutted in 58a07fd: function-local skill_projection import has no circular-import comment

No cycle exists. src/kiro_crew/acp/skill_projection.py never references kiro_crew.agent_sdk, so a # circular import comment here would state something false.
The import follows this module's documented convention (agent_sdk/drivers/acp.py:29-35). kiro_crew.acp and kiro_crew.sandbox imports stay function-local, so a dashboard handler on the boot path does not load the ACP runtime at gateway startup, and tests can patch at the defining module.
The file has 36 function-local kiro_crew imports on this head and none carries that comment. On origin/main it already had three function-local skill_projection imports (lines 617, 628, 639).
top-level-imports is blocking: false, and its listed exceptions do not name boot-path cost. Hoisting this one import would break the documented design, and changing that convention file-wide is outside this PR.

@iamwhatever
iamwhatever enabled auto-merge (squash) September 27, 2026 17:31
@iamwhatever
iamwhatever merged commit fccc6b8 into kirodotdev:main Sep 27, 2026
100 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants