Repository navigation
evidence assets for kirodotdev#11863 (keep open) - #6
billygerhard wants to merge 5521 commits into
Conversation
kirodotdev#12476) An opt-in Crew server (kirocrew-dashboard, kirocrew-work, kirocrew-crew-log, kirocrew-panel) granted by a spec on the kiro backend was mounted straight from the spec with no session-valued environment, and gatewayd handed the per-frame token only to kirocrew-core, kirocrew-cron and (since kirodotdev#12459) kirocrew-dashboard. Since the tool-policy read requires an attestation, every call on any other such server refused as identity_unattested, and on the kiro backend the dashboard itself still did. kiro_control_plane_servers now re-emits every IDENTITY_BOUND_SERVERS element the spec grants, so the token attach reaches them; CONTROL_PLANE_BACKENDS is the same set, read from the mcp_cleanup leaf. Both paths resolve a granted opt-in name with managed_mcp_spec_entry(name, include_opt_in=True), the form kirodotdev#12459 introduced for the pooled check. The grant itself is unchanged: the spec's tools allowlist still decides what is mounted. Fixes kirodotdev#12464 Co-authored-by: Nicholas Bowers <NicholasRBowers@users.noreply.github.com>
…th (kirodotdev#12403) Five smoke scenarios for P1 backlog rows: settings-tab-rail-navigation, settings-chat-toggle-show-timestamps, settings-developer-panel-dev-mode-toggle, settings-shortcuts and notifications-center-empty-state. dashboard-token-login-gate is not writable on the shared browser session and stays in the backlog. Part of kirodotdev#9578.
…e cap (kirodotdev#12616) `test_private_workflow_memory.py` waits for nine workflow runs, and each `_finished` call opened its own 120-second deadline. Nine independent 120-second budgets ask for up to 1080 seconds inside a lane that caps the whole test at 300, so the per-wait deadlines never governed anything: on a slow runner the outer pytest cap fired first and reported `Failed: Timeout >300.0s`, naming no run and no progress, while the diagnostic `_finished` exists to print was never reached. That is what reddened the lane on an unrelated pull request, at 297.47s, still polling a replayed run. Give the whole test one waiting budget instead. `_TEST_BUDGET_SECONDS` (570) is anchored at test start by an autouse fixture, and `_wait_deadline()` hands each wait the earlier of its own 120-second cap and what is left of that budget. The sum of the waits can no longer exceed the lane's cap, and the last wait a stalled run reaches still fails inside `_finished`, naming the run and its progress summary. `_finished` also tolerates a budget that is already spent on entry, which previously would have raised `NameError` on an unbound `run`. Raise the lane's `--timeout` from 300 to 600 so it is a backstop rather than the thing that fires: it now sits above the module's budget and below the job's `timeout-minutes: 15`. Two gateway boots plus nine workflow waits need more room than the ~3.5-minute typical run leaves under a 300-second cap. `test/test_e2e_ci_scheduling.py` and `test/test_ci_nonroot_boundary.py` both pin this lane's exact pytest command, so both carry the new `--timeout=600`. Those pins exist to stop the gate being weakened, and raising a timeout leaves their real subjects untouched: the command still runs `-n0 --no-cov`, still carries `KIROCREW_E2E_REQUIRE=1`, and still has no `continue-on-error`. `test/test_e2e_private_namespace_budget.py` pins the arithmetic so it cannot drift back: the per-wait cap must not exceed the budget, the budget must sit under the lane's `--timeout`, that must sit under `timeout-minutes`, and every wait must take its deadline from the shared helper rather than a bare clock read. It also pins the reason the shared budget is load-bearing, asserting that the per-wait caps alone still overrun the lane's cap. The tests read both files without importing the E2E module, so they run everywhere rather than only under `KIROCREW_E2E`.
… documents (kirodotdev#12600) DenyInteractiveSessionDocuments closed the interactive Session Manager documents by naming four of them. An enumeration cannot reach a document that does not exist yet, so a document AWS ships later fell outside the Deny entirely -- and it would fall outside on exactly the day an added Allow made the Deny load-bearing. Invert it. DenyStartSessionOutsideTheLane denies ssm:StartSession against everything NOT named in NotResource, and what it names is this lane's whole legitimate authorisation context: the port-forward document (the only document start_session ever names), the EC2 and Fargate targets, and the session resource. A future interactive document is now denied because it is absent from that list, rather than reachable because nobody added it to one. Because every resource a real port-forward presents is named, the Deny cannot match a legitimate call -- which holds whichever subset of them IAM evaluates. AWS-RunShellScript is deliberately not exempted. It is a SendCommand document and this Deny's Action is StartSession alone, so SendCommand is untouched while the StartSession half of SsmSessionDocuments' pairing stops having effect. Direction is load-bearing: NotResource narrows in a Deny and would widen in an Allow, which is what the Fargate templates forbid. That asymmetry is pinned by test_no_allow_statement_inverts_its_resource_list rather than left to prose, and NotAction stays banned in either effect. Accepted risk, stated rather than papered over: a new resource type in the StartSession authorisation context, or a future StartSession Allow whose resource is not also exempted, denies the call. Both fail closed, but present as an outage rather than a refusal, which is why this trade was filed as its own issue instead of being taken inside the Fargate connect PR. Closes kirodotdev#12104
…from (kirodotdev#12588) * fix(cloud): check the launch record's alias on the inode it was read from The launch record's tag is what `kirocrew cloud destroy --yes` deletes, so its read is a security decision. Two things made the alias refusal weaker than it reads. The refusal was a check-then-use. `LaunchState.load` called `require_unaliased_launch_state(str(p))`, which `lstat`s the NAME, and then `_read_document` opened that name again -- two resolutions, so the judged inode and the consumed inode were not the same object and an alias appearing in between was judged by nobody. The read is now one pinned `os.open`, and the check is re-asked on that descriptor with `fstat` AFTER the bytes are read, so the answer is about what was consumed. The by-name call stays: it is the only one that can refuse a symlinked leaf and print its remedy. `try_clear_tag` read the record with no alias check at all. The exemption it used was written for the POST-DESTROY clear, whose stack is already gone and which therefore must not raise. Its other caller, `wizard._clear_prior_pointer`, runs BEFORE provisioning and already aborts on failure, and it provisions or aborts on what this read reports -- so a forged empty pointer turned a deliberate abort into a launch leaving a live stack named by a pointer its operator never wrote. That read now refuses, `require_unaliased` defaults to True so a consume point added later inherits the refusal, and `clear_tag` carries the one documented opt-out. `launch_state.py` predicted this: "a second consume point appearing later would otherwise be unguarded with nothing saying so". `O_NOFOLLOW` is applied only on the pinned read, so the exempt post-destroy clear resolves the name exactly as before and still clears a pointer on a host whose record is a symlink. Not closed, and stated where the guard is defined: an alias that existed earlier, was written through in place and was unlinked before the read leaves a lone regular file holding forged bytes, and no `lstat` or `fstat` rule can see that an inode once had a second name. Closing that needs the tag verified through a channel the sandbox cannot reach, or the unbounded verb requiring an explicit `--tag`. Both are launch-lane design choices rather than something this seam decides. Tests: an alias planted in the window between the by-name check and the read is refused; both checks are proven to run, so the pin cannot be silently dropped; the pre-provision clear and `wizard._clear_prior_pointer` refuse an aliased record in both shapes. The bounded-read instrumentation moved from `builtins.open` to `os.read` with the reader, keeping its "this measures nothing" assertion so the same drift stays loud. Refs kirodotdev#12123 * fix(cloud): refuse a pinned record read it could not judge, not report it absent Design review's finding on `8e8e2f5dad`, verified against the code and correct: the pinned `os.open` swallowed every failure into `except OSError: return None`. `O_NOFOLLOW` reports a symlinked leaf as `ELOOP`, so the kernel's own alias refusal became the ABSENT answer. Absent is not neutral on this path. On the `try_clear_tag` route it reads as "nothing saved", which is exactly the forged-empty result that lets `wizard._clear_prior_pointer` provision where it was written to abort -- the sharper of the two harms this PR is about. So the hardlink shape was closed by the `fstat` pin while the raced-symlink shape leaked out through the error branch, in the same check-to-consume window the rest of the change exists to remove. A pre-existing symlink was already refused by the by-name call; only one planted inside the window leaked. Now only `ENOENT` means "no record" on the pinned path, and that covers the READ as well as the `open`. Both handlers go through `_refuse_or_absent`, which is the only place the rule is written. Two separate `except` bodies is how the first version of this change got it wrong: the rule was applied to the `open` and simply absent from the read, so an `os.read` failure still answered "no record" on the pinned path. That is reachable rather than theoretical -- a directory swapped in at the name opens fine under `O_RDONLY` and fails the read with `EISDIR`, and a swap at that name is the aliasing race this function defends. `_unreadable_record_detail` names the errno, because the shapes an operator can act on differ: `ELOOP` is a link they can replace, anything else is a permission or device fault on a file the product owns. The unpinned post-destroy caller keeps degrading quietly -- its irreversible work is done and it has nothing left to protect -- so the refusal is conditional rather than blanket. Content stays tolerant, which is a different question: a document that is not a record means there is no record, which is a truthful answer about a file that was read successfully. Platform boundary, declared rather than implied: the in-window symlink refusal IS `O_NOFOLLOW`, and Windows defines no such flag, so the pinned open follows a link there. What Windows retains is the by-name refusal for a link that is already present. The window test is gated on the capability rather than a platform name, and the everywhere-test for the pre-existing shape is named in its skip reason. Tests, both directions, because a conditional guard verified in one direction cannot be told from a blanket break: - a symlink planted in the window refuses instead of reading as absent (POSIX: it is the flag); - a pinned read that fails AFTER the open refuses too, via an injected `EISDIR`; - the post-destroy clear still DECLINES BY RETURNING when the record cannot be opened at all. The last test injects `ELOOP` at the record's own `os.open`. A plain symlinked record does not reach that branch: the unpinned open carries no `O_NOFOLLOW`, so it follows the link and succeeds. An earlier version used one, and a mutation making the refusal blanket survived it -- the fixture, not the code, was wrong. A real symlink loop yields the same errno on POSIX either way (measured), and injecting it keeps the branch measured on Windows too, where a platform skip would have scored as a pass. Refs kirodotdev#12123
…hod review (kirodotdev#12558) Three verified fixes for advisory review findings on kirodotdev#12510 were held out of that PR by ruling once its board was green, because a new head would have re-rolled every non-deterministic review lane. The PR then merged without them. This carries them onto main as one change. - shortenEcsTarget (website/src/utils/remoteCrew.ts) captured the cluster with `[^_]+`. A legal ECS cluster name may contain `_`, and for such a target the old regex fails in one of two ways: when the segment after the first underscore is not all hex, nothing matches and the Remote Crew row renders the full target, whose right-cut truncation then hides the task-distinguishing suffix; when that segment happens to be hex (a cluster such as `prod_dead`), the match lands on the wrong underscore, the cluster's second segment fills the task-id slot and the real task id is dropped, so two tasks in that cluster render identically. The regex now mirrors the backend's `_ECS_TARGET_RE`: a greedy `[A-Za-z0-9][A-Za-z0-9_-]{0,254}` cluster anchored by the fixed-width 32-hex task id and `32hex-digits` runtime id. One truth-table row added to fargatePaneExclusion.test.tsx; restoring the old regex reddens exactly that row. - SshTunnelManager._resolve_transport's ssm arm now refuses an ECS-shaped target with SsmValidationError naming the fargate method. The registry has refused that shape on write since kirodotdev#12510, but Instance.validate runs only on add and update, never on load, so a record stored by a build between kirodotdev#12106 (which taught validate_ssm_target the ECS shape) and kirodotdev#12510 still resolves as ssm, forwards over SSM to a task with no agent, and fails at the mint with a generic error. Two tests in test_instances_fargate.py: the arm directly, and the public connect path, which must answer an error status naming fargate, spawn no forwarder and mint nothing. Disabling the raise reddens exactly those two. docs/system-specs/modules/instances.md 16.1 and 16.2 now describe the connect-time mirror instead of saying an on-disk record is refused only when next written. - turn_url_note on the Remote Crew card names the next step instead of restating the mechanism: "Point your chat client or script at this URL while connected. There is no dashboard to open." in en, with the eleven translations updated to match (de in the du register of the adjacent keys, fr without a colon, hi and bn informal) and en-XA regenerated. Closes kirodotdev#12537
…kirodotdev#12550) A reader that folds state passes known=KNOWN_TYPES to iter_from, which refuses an entry whose type it does not know and which is not marked ignorable. The emitter writes subagent/spawned, subagent/steered, subagent/completed, subagent/failed and background/completed non-ignorable, and entry_types.py declared none of them. So any session that dispatched a child, or that the gateway made one background model call for, held a crew log that could never be folded again: session_ledger.read_state caught the refusal and answered with the empty record for the rest of that session's life. plan/updated is the sixth. Its write stays ignorable=True and is left alone, so it was never part of the refusal above -- but an undeclared ignorable type is SKIPPED by a folding reader, and a skip leaves a gap in the seqs the class fold receives, which marks that history damaged and makes the reader refuse on it. Declaring it removes the skip, so there is no gap and no damage. Declaring it also lets the new pin be a set equality rather than a one-way containment: a declared type with no writer is now as loud as a written type with no declaration. The six types are declared with the field specs their emit call sites actually produce, cross-checked against docs/reference/crew-log/session-types.md, which has documented all six as live since their writers landed. Only the registry was out of sync. background/completed's tokens members are optional, unlike turn/completed's, because its writer drops every zero dimension. subagent/failed has a second writer, the crash-repair closer in store._closer_entries, which supplies only agent_id and outcome, so every other field of that type stays optional. plan/updated's item state is the one closed enum added here: the writer computes it as done-or-open from a single boolean, so no caller can produce a third value. Declaring rather than flipping the writes to ignorable: the timeline projection consumes subagent/spawned, subagent/completed and subagent/failed, so skipping them would trade a broken fold for missing timeline rows. Three pins. A derived-set test parses BOTH writers' syntax trees -- the emitter and the crash-repair closer -- for every type they append, and asserts that set equals the declared set, so a new wired emitter and an orphaned declaration each fail loudly and name the offending type. The old test could not catch the first direction because it walked the declared set and so could never see a type missing from it, and its hand-written companion list went further and asserted these types stay undeclared. A regression test drives the real session_ledger fold past a subagent/spawned entry end to end. The real-turn emitter test now exercises all six types and asserts dropped_writes() == 0, which is what proves the new declarations do not narrow what production already writes -- declaring a type turns validation on for it, and a too-narrow spec drops writes silently rather than raising. The declared-type count moves 22 -> 28 with the roles it names, and the markdown dump's ignorable-marker count is now derived from the registry instead of hardcoded. No migration: declaring a type is reader-side, so an already-broken log recovers on its next fold attempt.
…r store-canonicalised paths (kirodotdev#12514) Two readers dropped healthy files under load: the artifact store's file helpers and the agent-spec reader each canonicalised their path and then asked the bounded is_sensitive_path, which submits the same path to the two-worker resolver pool again and fails closed when the pool misses its budget. Artifacts vanished from listings with a wrong "sensitive path" line; agent specs vanished at DEBUG and surfaced downstream as "no prepared skill discovery view". Both readers now ask security.is_sensitive_canonical_path, one entry point that answers with is_sensitive_resolved_path off the event loop and keeps the bounded gate on it; GET /api/artifacts runs store.list() on a worker. The fence's decision is unchanged. Reads after the fence are pinned to the descriptor they open through pinned_fs.open_fenced_for_read: a link at the final name is refused, the inode must be a regular file with one link, and the fence judges the kernel's path for the opened inode when it differs from the judged path. The spec reader keeps hooks.MAX_FILE_BYTES and FileTooLargeError, runs the Windows UNC trusted-root screen before and after resolve as hooks.validate_file_path did, and reports a refused open at WARNING. Tests that inject a verdict at the spec readers' gate now inject it at is_sensitive_canonical_path, and tests that stubbed the readers' read step stub _read_spec_bytes, the names the readers call; their assertions are unchanged. Two tests refuse a link to a real crew secret leaf and to a real keystone temp with no injected verdict and no home redirect. The two spec sentences describing the fence are amended.
…usal site (kirodotdev#12534) The dispatch scope view was folded from SessionTree.records(), which drops whether the scan faulted, while both of its consumers DECIDE on an edge: the per-unit read door and the unit listing. dispatched_by() answers False for a missing node whatever put it there, so an edge the scan never read and a real absence of lineage were the same answer, and nothing anywhere recorded which one had happened. Three reachable causes set that bit: a unit whose segment stat or head read raises, a unit whose announce record is present and unreadable (cached as a judged fault, and permanent because the log is append-only), and a population past TREE_UNIT_CAP. dispatch_view now reads through SessionTree.reading(), the same accessor ReferenceScanner already uses for this reason, so the fault reaches a decider through one mechanism rather than two spellings of it. TreeReading carries the scan's own records so the sid->slot map, the nodes and the flag all come from one scan under one take of the tree's lock; asking records() separately would be a second scan whose population could differ. DispatchView carries incomplete. The fault is surfaced to the OPERATOR, never to the caller. A caller-visible refusal text would be an existence oracle: the door passes the requested unit as the scan's preferred, a named unit is admitted first, and its own read fault feeds the scan's flag -- so a guessed id that exists and cannot be read would be told apart from one that does not exist, on exactly the boundary _OUT_OF_SCOPE_REFUSAL exists to keep closed. One refusal text for both cases, with a warning at the refusal site naming the incomplete scan. The listing gets no field of its own either. It sets truncated, which every caller already reads as "this is not the whole set" -- the safety property -- and a separate lineage_incomplete key would be a response contract with no consumer in the product. The cause is available to an operator in the refusal door's log. The per-unit re-check is deliberately untouched: it re-folds the target's class and never re-runs dispatched_by, so it has no lineage verdict to word.
… bound (kirodotdev#12549) A version record is the only thing that lets a sweep retire an archive, and it was trimmed to the keys `uploads` still held under MAX_REMEMBERED_UPLOADS -- a number chosen for a 20-per-kind panel. With retention shipping off, an install pushing nightly dropped its oldest version record at push 201, so a keep count enabled later could not reach anything behind that point: no recorded version, the ownership test refused it, and its bytes were billed permanently. The bound kept minting that floor rather than only inheriting legacy data. Bound `upload_versions` separately. A record now ends when a listing the sweep TRUSTED proves its object is gone, and MAX_RECORDED_VERSIONS (5000) is a backstop rather than a horizon. The prune is eligible only past the gate that accepted the listing (which raises rather than returning partial data), only under `<kind subpath>/<install id>/`, and only for records that existed before the listing began, so an in-flight push is never pruned. It deletes state, never an object. The sweep's ownership set becomes `retention_owned_keys` -- `uploads` union the recorded versions -- because a recorded version id is stronger evidence than an `uploads` entry; every admitted key still has to pass `_current_version_is_ours`, so nothing is retired on weaker proof. The restore path keeps reading the fingerprint record alone. Count the rest without claiming it. `retentionUnrecorded` reports, per kind, the objects the listing showed under this install's folder that it holds no record of. `retentionUnclaimed` deliberately reads 0 for those, so they were counted nowhere. The leaf is `objects` rather than `archives` and nothing acts on the number: the keys are skipped before ownership is tested, hold no keep slot, and are never deleted. Whether any could be proven ours and reclaimed is a separate design. Refs kirodotdev#12274
…irodotdev#12592) A slot outlives its ACP session, so a supersede gives it a new log under a new id. The new log already names the one it replaced, on `session/opened.previous`, but the only reader that looks across logs dropped that key: it read `parent` off the same entry and nothing else. So the recorded edge had no reader, and three places said so in the present tense -- two spec passages and the served route's own docstring all stated that a whole-life figure needs the pointer and a fold that follows it and that neither exists. `OpenedRecord` now carries `previous_sid`, and `fold_slot_chain` walks it: pure over the same records the tree folds, newest log first, bounded by `SLOT_CHAIN_CAP` visits, never visiting an id twice, and stepping only onto a log whose immutable header slot equals the slot the walk started on. That last rule is the reader's own enforcement of what the edge means rather than a re-check of the emitter's, because the id reaches the emitter from an agent-writable mapping and logs written before that check existed are still on disk; following a foreign edge would join another slot's turns, costs and approvals into this slot's whole-life figure. The walk reports WHY it stopped, because the ids alone cannot say whether they are a slot's whole life -- a chain cut short looks exactly like a complete one. Exactly one reason holds, which is why it is one field and not a set of flags that could represent impossible combinations: `first` reached the slot's first log and is the only complete answer, and `missing`, `foreign`, `cycle`, `cap` and `unknown` each mean there is more the walk could not reach. `SessionTree.chain` pairs the walk with the scan's own completeness for a sharper version of the reason `TreeReading` is a pair: a predecessor the scan never admitted is absent from the records, so the walk reports `missing` for a log that is on disk and readable. The walk cannot tell those apart; only the scan can. Order comes from the edges, never from `header.createdAt`: that stamp is wall clock, so a backward step across a restart gives the newer log the earlier stamp and two creates inside one millisecond tie. The edge inverts in neither case, which is why it was recorded. The prose is rewritten rather than annotated, so a reader meets one statement rather than a false sentence beside its own correction. Section 6's claim that two readers look across logs is narrowed to the PARENT edge, which keeps it true now that the same module walks a second edge, and subsection 6.1 specifies the walk. What stays true and is now said precisely is that no shipped route calls it: a caller that joins the folds owes the `ended` reason as well as the ids, and folding one unit and reading nothing else is the property FR-4 pins on the projection module. No served payload changes. The inherited replay-pending gap stays attributed to kirodotdev#12148 -- the walk cannot detect a skipped link, which is what that passage already says -- and closing a superseded log's own interrupted turn and tool calls is a WRITE into another log, so it stays there too. Refs kirodotdev#12015
…irodotdev#12187) The queue drain rebuilt a combined turn from the envelope that opened the finished turn, so under dm_scope=unified -- where every allow-listed direct chat collapses into one session key, and therefore one queue -- a turn could run in one person's chat under one person's identity while its text was a union of several people's messages. Each queued message now records its own sender, chat and activity id, the drain collapses only messages that share one origin, and it rebuilds both the replayed envelope and the receipt flip from that origin instead of from the opener. An entry carrying no recorded origin falls back to the opener whole, so a reply always has a reachable address. Closes kirodotdev#10393
…-log root (kirodotdev#12020) Extracted from kirodotdev#11964 as the ledger half: the member event log, its projections, the Members page live updates, and the move of the per-member log under the already-fenced crew-log/ root. The contribution protocol and the plugin importer are deliberately NOT here -- they are separate PRs, which is what both reviewers asked for.
…#12594) A workflow ctx.agent() step starts a child agent session. That is a spawn, but the workflow path did not ask the two questions every other spawn entrypoint asks. It never checked whether the parent surface is allowed to spawn at all, and it never checked the directory the step names. Both agent_fn builders now call the existing helpers before allocating anything: _vet_spawn_governance for the capabilities.spawn ceiling and its agents scope, and validate_cwd for agent.subagent_cwd_allowed_roots. The arguments match what the subagent admission gate passes. A refused step raises WorkflowSpawnRefused, which the runner already records as that call's error, so no child session is created and the run keeps its own shape. admitted_agent_fn settles that refusal terminally before the dependency adapters read it. The refusal text names configured roots, and the generic text adapters read a status token out of any exception, so a root spelled with one would otherwise park rejected work as a retryable outage. The gate needs the parent surface, so service.py hands each builder the run's originating session_key. It already had it for the task-queue lane. An allowed step is unchanged: same get_or_create keywords, same warm pool reuse. A step that names no directory reaches no await, so the pooled fan-out keeps its scheduling. The cwd that launches is now the resolved realpath, as on the spawn path. Co-authored-by: zejiangg <zejiangg@amazon.com>
…rodotdev#12584) Three additions the cluster-D docs audit listed as missing content, each verified against the code on this base. `docker-troubleshooting.md` gains a section for the channel bot that never authenticates. `docker/entrypoint.sh` moves every credential it finds into the data home's `.env` (mode 600), unsets it, and exports `_KIROCREW_CREDS_SCRUBBED=1`; `KiroCrewConfig.load_credentials` reads that marker and refuses to re-inject those keys. So an empty `docker exec kirocrew env | grep SLACK_BOT_TOKEN` is the healthy result, and the guide now says so before sending anyone to `docker logs`. It also names the two log lines that decide the case: the per-key "Stored ... and removed it from the environment" line, and the warning that abandons the move and keeps the credential in the environ when `.env` is unreadable. `docker.md` and `remote-and-mobile.md` each gain one short note on the two channels their deployment cannot run. WhatsApp needs the optional `neonize` dependency, the `whatsapp` extra, which the image's bare-wheel install does not bring; on a remote host it needs that extra plus a one-time pairing from the dashboard. iMessage drives Messages.app locally and needs macOS 14 or newer with Full Disk Access and Automation grants, so no Linux container or Linux VPS can serve it. Docs only. No source or test change. Co-authored-by: Joe Guo <zejiangg@amazon.com>
…v#12591) Steering was named across nine shipped docs and explained in none of them, and hooks had one sentence in `dashboard.md`. A reader who found the Steering files / Prompts / Hooks tabs had nothing to read about what a steering document is, what an inclusion mode does, or which of the five lifecycle events can block a tool call. Adds `src/kiro_crew/docs/steering-and-hooks.md`, covering the two steering roots and what loads each, the `inclusion` vocabulary and the fact that Kiro Crew reports the declaration rather than acting on it, how to write a document an agent actually follows, the five hook events with their exit-code contract, the environment allowlist that makes a working terminal command fail as a hook, create / test / enable / delete, skills-only hooks, the read-only provider table, `agent.kiro_hooks`, the prompt library and its two scopes. `register_hook` gets its own section because the name collides: it registers a webhook listener, not a lifecycle hook, and the only prior mention treated it as resume context. On precedence, the page states what the code does: context layers are injected in a fixed order and an earlier layer outranks a later one, so steering lands ahead of thread history, memory and lessons. It does NOT claim the workspace root outranks the global one -- nothing in this repo ranks them, and which documents load when is the harness's decision. `test/test_steering_and_hooks_doc.py` pins the page's closed vocabularies and numeric bounds to the constants that implement them: the five events against `HOOK_EVENTS`, the timeout bounds and default, the matcher modes, the skills-only events against `validate_hook_fields`, the steering sources and `inclusion` modes, the listing caps, and `register_hook`'s required arguments. Each check parses the doc, so it reds on drift and stays green through a rewording -- probed both ways before commit. Co-authored-by: Joe Guo <zejiangg@amazon.com>
Remote Instances had no shipped doc: the only writing about it was the internal module spec and three repo guides, so a user wanting to reach another machine had nowhere to read what the feature is or how to turn it on. The new page covers the opt-in and the restart it needs, SSH vs SSM with a table of what each one costs you, adding a machine field by field, the header switcher and its pinned chips, a session that runs on a peer, a peer's own sessions merged into the Sessions list and what those rows cannot do, federated history search, tuning, and the Diagnose codes. It also carries one disambiguation table for the four things this product calls "crew" -- the product, a Remote Instance, a Crew Member, and an Issue Radar crew -- which until now only the internal spec stated. test/test_remote_instances_doc.py pins the claims a reader copies: the nine instances.* keys, their defaults, the three connection methods, the two Feature Previews toggles, the registry filename, the diagnosis codes, and the reconnecting refusal. Prose is matched with whitespace collapsed, so re-wrapping a paragraph is never a failure. Co-authored-by: Joe Guo <zejiangg@amazon.com>
A cron tool refusal is a plain string beginning "Error:". The SEL audit half already derives its outcome from that prefix, but the wire frame carried no signal, so a client could only tell a refusal from an answer by matching prose. build_tool_response gains an opt-in is_error keyword, the stdio loop gains an opt-in error_prefix_is_error, and the cron server is the one server that sets it. The refusal prose is byte-identical and the audit outcome is unchanged; every other MCP server frames its answers exactly as before. Both dispatch branches flip the flag through one helper, so the POSIX worker path and the Windows synchronous path cannot diverge. McpToolClient.call_tool already raised RuntimeError on isError, so the one in-tree consumer needed no change -- it simply never saw the flag set. Taskei: Mesh-3725 Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
…irodotdev#11851) A rejected folder icon (text, two emoji) surfaced post-submit as the raw English server message in the folder modal's top alert, naming no field. Route the icon_invalid / regenerate_icon_invalid error codes to a localized error line rendered directly under the Icon field instead, cleared the moment the user edits the icon. Every other failure keeps the top alert. New icon_invalid_hint catalog key across en.manual + 11 locales + generated en-XA; Bengali uses the informal register. Part of kirodotdev#7992 (item 1).
…dev#12628) The two ghosts in crew-member-mark.svg started at y=6.3 on the 24-unit grid while the Lucide glyphs beside them (Sessions, Schedule) start at y=3, so the mark rendered ~3px shorter with empty space on top and read smaller than its neighbours at the rail's 16px. Scale the art x1.15 about its own centre and re-centre it on (12,12); the stroke stays 2 so the optical weight is unchanged.
…irodotdev#12435) * test(gui-user-test): scenario batch 2a -- chat and sidebar P1 flows Five smoke scenarios for the P1 chat and sidebar records: rename a session title inline and restore it, read the elapsed-time footer under a reply, open and close the Activity side panel, collapse and expand the nav rail, and search the /sessions chooser and open a row. All run against the rich seed the lane boots; the two that flip persisted UI state put it back. Pins the smoke tier totals (150 steps / 3960 s) and the catalog line to the shipped set. Part of kirodotdev#9578. * test(gui-user-test): name the live smoke totals in the tier pin messages The pinned smoke totals conflict across the companion scenario batches; binding each sum to a name and printing it in the assertion message makes the last-lander's re-pin mechanical.
…irodotdev#12626) Two unrelated things were both called "Channels": the Settings tab that connects Slack, Discord, WeChat and the other chat apps, and the Channels app where several agents share one room. The Settings tab is now "Messaging Channels" so the two stop colliding. Every place that named the tab follows: the tab label, the mobile back bar, the System > Services section, the Teams setup hint, the Slack owner-not-configured guidance, the CLI setup/doctor hints, the four channel integration docs, two spec docs and the GUI user-test feature map. Translations were rewritten around "chat platforms" (zh-CN "聊天平台", ja "チャットプラットフォーム", de "Chat-Plattformen", ...) instead of a literal "message channels", which read as a marketing term. The Channels app and the /settings/channels URL are unchanged.
…irodotdev#12524) Adds @shadcn/lint (0.1.0, the first release older than the .npmrc min-release-age window) to the blocking `eslint src/ --max-warnings 0` gate with three rules at hard zero: no-raw-colors, no-unknown-classes and require-static-classes. no-restyle stays off (~300 call sites restyle ui/ primitives; enabling it is a design decision, not a lint toggle), and no-inline-styles / no-arbitrary-values are off by design (apps are styled inline; translucent theme surfaces are color-mix arbitrary values). Burning the tree down to zero: - Raw palette classes become theme tokens (green->ok, red->danger, amber/yellow->warn, the manual-trigger pill purple->accent-subtle), and DagView's page-wide hex palette becomes tokens, with running following the theme accent like every other running state and typed nodes tinting via fillOpacity instead of a color-mix string. - Dead classes go: font-inherit (Preflight already gives controls `font: inherit`), prose-sm (no typography plugin), streaming-indicator, focus-peek-strip, and ft-stream-block together with the `streaming` prop chain that only fed it (DiffBlock <- FoldableDiffBlock <- MarkdownRenderer), left behind when the pierre migration removed its CSS. resize-vertical becomes resize-y. - Class strings the linter could not read move to where it can: the filter-menu class constants become FilterMenuLabel / FilterMenuContent wrappers in SearchFilterBar, SearchableSelect joins through cn(), and SettingsView's `+`-concatenated constant becomes one literal. - Real-but-invisible classes (app stylesheets authored as TS template strings, Playwright selector hooks) are allowed by name next to the file that owns them; the Mochi renderer (no Tailwind, no tokens), tests and the KiroGhost artwork get file overrides. Seven destructuring sites carry a reasoned suppression for shadcn-ui/lint#38. capture/design-token-classes.* shoots before/after frames of the recolored surfaces (LogEntry pill, approval dot, DagView) and asserts the class/hex state of each frame.
…ailure (kirodotdev#11243) * fix(channels): replay a turn abandoned after a transient compaction failure Extend the transient-compaction retry to the two remaining surfaces. When the ACP layer records `last_compaction_transient` as True, nothing was emitted this turn and the per-surface budget is unspent, the abandoned message runs again instead of being dropped; a permanent verdict keeps the give-up behaviour. Slack native handler: reset, respawn the session, and put the message back on the thread's own queue (`sessions.enqueue`), which the gateway's `_on_done` drain replays through `_dispatch_queued`. Budget per thread. Shared messaging pipeline (`drive_turn`): the driver renders through a guard that holds back the abandoned attempt's DONE, the session is reset, and the message runs again into the same still-open renderer. Budget per turn. Closes kirodotdev#8256 * fix(channels): keep a replay dropped on Stop; make the Slack replay a nested call A Stop landing between the abandoned attempt's reset and the successor's acquire finds no live session, so nothing recorded it and the replay would run the prompt the user just stopped. The session manager now records Stops for a key inside a "replay gap" the pipeline opens around that window (`open_replay_gap` / `close_replay_gap`, `note_stop`), the direct-cancel channel stop paths (Teams via `stop_running_turn`, Webex, WeCom, Weixin) record before their busy check, and both replay sites re-read the count right before running the message again. The Slack replay is a nested `handle_message` call with every argument unchanged instead of a queue entry: the interaction dispatch paths have no queue drain, a queue entry loses the attachment temp files to the outer task's cleanup, and the abandoned attempt must persist nothing so the conversation log carries the message once. The retry notice is posted directly and never recorded; the budget travels with the message.
kirodotdev#11425) The five slot-switch handlers (agent, model, bulk model, reasoning effort, workspace) refuse a switch before committing when a turn is in flight. Their refusal read two per-slot signals -- slot.running and the registered provider's has_active_turn() -- and both are blind to a sibling alias slot on the same shared session whose task is set but whose provider.start() has not registered yet. A switch through the other alias in that window committed and reported success while the session came up on the sibling's captured bindings. Hoist the refusal into one helper, _switch_target_busy, and add the third signal every site was missing: a scan of every other running slot's TURN key (_cancel_target: the published _active_turn_session_key, else its routing), so a mid-turn rebind on the sibling does not drop it from the set. Each handler calls the helper inside its locks with the session key resolved there, and re-runs it in the no-await window immediately before its reset; agent and model unwind an already committed switch through their existing rollback closures, effort and bulk probe before their commit, workspace already probed after its last await. _run_chat publishes slot._active_turn_session_key as the first statement inside the try its teardown finally covers -- before the memory-preparation wait and the OPTIONS expiry -- so the turn key is visible for the whole admission window; a turn refused at admission leaves through the same finally, whose compare-and-clear retires only the key this turn published. It also takes slot_switch_session_lock for the span from binding capture through session registration (get_or_create), so a switch's scan-then-reset and a sibling's dispatch cannot interleave: the dispatch either registers first and is refused, or captures after the switch committed and starts on the new bindings. Held for the cold start only: a session that is already registered is already visible to the busy scan, so the lock is released BEFORE waiting for that session's turn lease -- the lease is held by a sibling turn whose refusal-fallback restore takes this same lock, and waiting under it would deadlock the two. The under-lock claim never waits for a lease (wait_if_busy=False; a busy refusal releases and retries outside). On any earlier exit the finally releases first thing. Session keys are compared and locked in canonical spelling: a slot restored from an old transcript can carry the bare legacy Slack thread_ts while its sibling carries slack:<thread_ts>, and SessionManager folds both onto one session. slot_switch_session_lock canonicalizes its key (so every caller shares one lock per session) and the busy scan compares canonical_key on both sides. Tests: test_switch_handlers_sibling_alias_busy.py (31 cases: pre-commit refusal, last-await window, mid-turn rebind, legacy/canonical Slack key spellings, controls); three cases in test_active_turn_session_key.py (key visible while parked on admission, cleared on refusal, successor's key never clobbered; dispatch parks on a held switch lock and registers on the new binding without holding the lock into the turn; a dispatch onto a busy registered session waits for the lease outside the lock while the lease holder takes it); the readiness-handoff test in test_dashboard_chat.py pins the identity as published during the memory-preparation wait and retired on stop/deadline.
…k off (kirodotdev#12563) A failed nightly backup recorded nothing, because `_record_run` is reached only after `storage.put_file` returns. So `last_runs` held no entry, `due_for_nightly` took its never-ran branch, and the loop re-attempted the same failing snapshot on every half-hourly wake: each attempt re-staged the whole data home into a fresh temporary directory, and the same traceback repeated at that cadence for as long as the fault lasted. Nothing in the stored state could tell a transient fault from a deterministic one. `hooks._failed_attempt` is now the single place an unattended failure is both SEL-audited and recorded, reached from the shared setup's handler and from each kind's own push, so the backoff cannot depend on which way the run broke. Cancellation does not reach it: a cancelled attempt is teardown, and counting it would let a clean shutdown push the next night out. The record lives under `NIGHTLY_FAILURE_STATE_KEY`, per account then per kind, separate from `runs` because `runs` is read by `uploaded_versions`, `_unchanged_baseline` and the retention sweep as proof an archive exists. `NIGHTLY_RETRY_BACKOFF_SECS` maps consecutive failures to a wait -- 0, 1 h, 2 h, 4 h, 8 h, then a 12 h ceiling -- so a single failure still retries on the next wake, and a module-level assert pins the ceiling under `NIGHTLY_WINDOW_SECS`. `_backoff_withholds` answers DUE for every unusable reading, the rule `_a_day_since_last_run` already states for an unparseable success stamp. Any success clears the count, atomically inside `_record_run_locked`'s mutate, so no wake can land between the run record and the clear. Only the scheduled path records a failure while a success from anywhere clears one. The status read serves the record as `nightlyFailures`. Closes kirodotdev#12547
…kirodotdev#12637) The composer sat flat on the transcript: a 1px border on the elevated background and nothing else. An offset-free box-shadow spreading evenly on all four sides gives it a little depth without turning it into glass, and while the box holds focus the halo takes the accent tint so it lights up together with the existing accent focus border. Incognito and temporary modes paint that border warn / aim at all times, so the focus halo follows the same color there: one control, one color. The shadow lives on the motion wrapper that animates the composer's height, not on the bordered box inside it: that wrapper clips its content with overflow hidden for the height:0 exit, and a child's shadow is content, so drawn one level down it was cut at the edge. An element's own shadow is outside its overflow clip. When an approval box is attached above, the wrapper has no top radius and the approval glow already lights the pair, so the halo stands down.
…ut (kirodotdev#12593) The capability matrix omitted two enforced fields, no page owned the no-buttons choice path, and the iMessage settings table listed `service: auto` without saying what it does. - Two matrix rows: "Answers a send with a message id" (`returns_message_id`) and "Parses `@everyone`-style mentions" (`mention_grammars`), with the prose that a cell can be a different convention rather than a missing feature. WeCom and Feishu return no id at all, so an empty id is their success value; Webex parses no broadcast grammar, so the zero-width-space defang is skipped there. - A canonical "Choices on a channel with no buttons" section. Four of the five channels declaring `max_buttons=0` turn the whole `[OPTIONS:]` list into numbered lines. WhatsApp does not: `whatsapp/turn_renderer.py` removes a completed trailer, so those choices are lost. The section says so, and says tool approval takes a different path — WhatsApp installs a decider, the other four install none. - An iMessage send-service section: the default names no service on the send at all, `sms` and `auto` go to the `imsg` bridge verbatim, and the fallback is the bridge's own decision per send. Every place that asserted the promise holds for all five is corrected with it, because the same claim in seven voices is how it survived: the `max_buttons` contract in `messaging/transport.py`, the module and `render_options_as_text` docstrings in `messaging/renderer.py`, the capability docstring in `whatsapp/transport.py`, the `/model` rationale in `whatsapp/commands.py`, `whatsapp-integration.md`, and two statements in the owning spec `docs/system-specs/modules/messaging.md` that contradicted each other — its `renderer.py` row promised the numbered list universally while its iMessage section claimed the trailer "is stripped like on the other button-less channels", which is wrong about iMessage and about the other three. The other four channel guides are unchanged: each carries a channel-specific fact the shared section cannot hold, and iMessage never described the path at all. The message-id row carries one caveat: iMessage declares the strict reading while its bridge reports the id as best-effort, so a delivered message can answer with no id. The cell still reports the declaration -- that is what the rest of the code acts on -- and the prose names the gap between the two. `test/test_channel_capabilities_doc.py` reads the DOC and maps each cell through the header row, so a reordered column cannot re-point a value at the wrong channel. It pins the membership of both exception sets and of the five-channel list, and drives `_strip_options` so the paragraph calling WhatsApp a gap reds if that ever stops being true. The iMessage caveat is pinned CONDITIONALLY on the declaration: required while it says `True`, and flagged as stale the moment it is corrected, so neither state can drift silently. The seven files recording the WhatsApp strip are pinned as one set against `_strip_options`, so closing kirodotdev#12599 reds a single test whose message names every file still carrying the sentence. Co-authored-by: Joe Guo <zejiangg@amazon.com>
…v#12426) kirocrew snapshot covered memory, crons, config, skills, workspace, notifications and security. config_dir()/artifacts and config_dir()/uploads were in no component at all, so a restored host came back without either and the command reported success. Fixes kirodotdev#3794. Both arrive as tree-only components with a declared share policy, staged by the existing generic tree loop through pinned_fs.stage_tree_pinned, so they inherit the symlink, hardlink, reparse-point and unsafe-root refusals every other tree already has. Restore's per-component branches become two tuples that say how a component is restored, and a test asserts their union equals the component table, so a component routed by neither fails loudly. artifact_folders.json is deliberately NOT carried. It is a record format whose consumers read fields off each entry, so carrying it means answering what a restore does with a record they cannot use, and each answer opened another one. Restored artifacts arrive at the root of the library, which the folder store already does for an id it does not know. The doc says so and a comment on kirodotdev#3794 records the follow-up, alongside a second comment recording the four other user-data trees no component carries yet. Both components are --mode replace only. A merge is per-file and no-overwrite, an artifact is a directory whose files describe each other, and a slug comes from the artifact's name, so two machines can hold one slug for unrelated content. Merge names the skip before the per-component tick, imports everything else, and refuses when these are all that was asked for. Its destination-root pre-flight is scoped to the components it writes, so a linked uploads root does not abort a merge that skips it. The hollow-component refusal is narrowed to memory, the one component whose replace clears live state even when the bundle carries nothing for it. Both new components are legitimately empty on a home that never made one, and refusing on that declaration alone refused the entire restore. The pre-restore backup saves a tree only when the archive carries one for it. The mutation phase leaves a declared component whose bundle half is absent standing untouched, so saving that tree anyway let a later failure roll it back over live state the restore never opened -- deleting an artifact the dashboard saved while the restore ran. Unsaved and uninstalled is the recovery case that leaves a target alone; this is what puts such a tree in it. Scope deliberately left out, both recorded rather than half-answered: a per-artifact merge, and any refresh of a file-backed artifact's copy from its live source. Tests: 40 in test/test_snapshot_artifacts_uploads.py, all red before this change. Co-authored-by: Joe Guo <zejiangg@amazon.com>
|
PR kirodotdev#15029 evidence: repeat-failure notice |
|
Evidence for kirodotdev#14810, head 2720c70 (narrow viewport) |
|
PR kirodotdev#15978 round-2 evidence |
|
Evidence refresh for kirodotdev#13109 head 4b38e30: contested Review panels with Approve as the outline secondary (spawn prompt dark/light, tool prompt dark/light). |
|
Evidence for kirodotdev#13109: the contested Review panel after a failed Approve -- the decision-not-recorded notice beside the buttons. |
|
Evidence for kirodotdev#14810, head ac9b922 (plain refresh icon, Reload session wording) |
|
Evidence for kirodotdev#14810, head 3359e43 (badge after agent name, untruncated remedy) |
|
Evidence for kirodotdev#14810, head ef8808e (generic states) |
|
PR kirodotdev#15978 evidence at 389f961: degraded pick chip on a narrow composer; backend-list load error row. |
|
PR kirodotdev#14810 stale-config Reload row at 320px (en + ja) |
|
PR kirodotdev#15978 evidence at 9c5d75a: a picked backend's model list failing to load. |
|
PR kirodotdev#15978 evidence at 9c5d75a: split-view pane on a picked backend whose model list failed. |
|
PR kirodotdev#15978: degraded pick shows Kiro's model list |
|
PR kirodotdev#15978: channel-linked chat shows no backend picker |
|
Screenshot for kirodotdev#13399 (steering card details in the approval bar) |
|
PR kirodotdev#13399 evidence (async steering card) |
|
PR kirodotdev#13399 evidence (plain-label steering cards) |
|
Screenshot assets for kirodotdev/KiroCrew PR kirodotdev#13399 (folder.steering change card) |
|
evidence for kirodotdev#14810 stale-config redesign 2026-10-14T02:07:27Z |
|
evidence for kirodotdev#14810 phone cue 2026-10-14T03:14:50Z |
|
evidence for kirodotdev#14810 phone cue-in-trigger 2026-10-14T03:33:21Z |
|
evidence for kirodotdev#14810 reload-failed notice 2026-10-14T06:33:54Z |
|
evidence for kirodotdev#14810 desktop two-control row 2026-10-14T09:25:27Z |
|
evidence for kirodotdev#14810 reload-failed via action-error region 2026-10-14T10:10:05Z |
|
stale-config frames at 493dfc0 (2026-10-20) |





































































































Holds attachment assets referenced from kirodotdev#11863.