Skip to content

feat: AgentCore dashboard identity settings - #6602

Closed
kyleseaman wants to merge 2 commits into
cursor/agentcore-5-login-1b02from
cursor/agentcore-6-dashboard-1b02
Closed

kyleseaman wants to merge 2 commits into
cursor/agentcore-5-login-1b02from
cursor/agentcore-6-dashboard-1b02

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Stacked PR 6 of 6. Trust boundary: dashboard management UI for this crew's AgentCore identity.

What this PR does

Owner-dashboard GET/PUT /api/agentcore/identity reads and writes the home security_policy.json row (capabilities.agentcore) and hot-applies the AWS extra. Fleet env overrides, signed documents, and cache-only policy distribution (KIROCREW_POLICY_CACHE_ONLY) are refused (409 policy_not_writable), not rewritten. The home-file persist takes security_policy.json.lock (sensitive leaf, O_NOFOLLOW open). The rewrite creates security_policy.json.tmp with O_EXCL|O_NOFOLLOW. A leftover regular .tmp under the exclusive flock is reclaimed; a planted staging link or junction is refused. Publish retries the Windows sharing-violation window and unlinks the staging file if lockdown or replace fails, so a stranded exclusive .tmp cannot brick later Saves. Save → Off writes a disabled AgentCore row even when identity was env-only, so revoke is not skipped. GET still returns retained Gateway fields from that disabled row so re-enable cannot delete the URL. _write_reason / _file_row on PUT run in asyncio.to_thread. App tokens cannot GET or PUT.

Successful apply recycles sessions and stops the SigV4 proxy on a worker thread (asyncio.to_thread), waiting for proxy.stop so Save → Off cannot return while a revoked session still reaches Gateway. A failed agent-config rebuild is HTTP 503 agent_rebuild_failed; live sessions and the SigV4 proxy are still dropped because apply already succeeded.

Settings → Security adds the Agent identity rail: posture, workload name, Gateway URL, catalog verify, and pending 3LO consent (allowlisted URL from PR 5). Gateway target sync is not shown: the standard instance role omits SynchronizeGatewayTargets. POST /api/agentcore/gateway/sync remains only behind KIROCREW_AGENTCORE_GATEWAY_SYNC=1.

This PR's unique diff versus #6600 is the identity handler, Settings rail, i18n, inspect operator-gate, synchronous proxy stop off the event loop, and three pieces the review rounds added:

  • POST /api/agentcore/gateway/preview + "Preview what Save grants". Before this, the catalog card only rendered after Save, so the person pressing Save was granting a tool list they could not see (the UX blind-reader refused to press it: "I don't understand the consequences well enough"). The endpoint is owner- and capability-gated, validates the drafted URL exactly as the PUT does, reads the Gateway and its targets through the same control-plane calls as GET /gateway, persists nothing, creates no identity, and reports tools as listed_after_save. One consumer (GatewayPreviewCard).
  • The commit restates the scoped grant. With a Gateway URL drafted, Save is disabled until the preview has listed the targets; the button then reads Grant N targets: … (Login: Allow N targets after sign-in: …) and the consequence line names exactly those targets. Changing the URL or posture invalidates the preview and re-locks the commit. Per-target tool counts are not shown because the identity that lists tools does not exist before Save; the copy says so.
  • Consent allow_source / allowlist_path. The sign-in card said the host was "checked against the allowlist", which the reader could not verify; the payload now says which allowlist admitted it (a built-in provider, or the operator's oauth_endpoints.json by path). Read-only provenance; consumed by the card.
  • atomic_write.unlink_with_retry. Windows sibling of replace_with_retry for the .tmp reclaim path; one consumer.
  • all chunk budget 11620 → 12300 KB (website/scripts/check-bundle-size.mjs). The identity panel's copy adds 202,936 B of translated strings across the 13 catalogs; rebased onto main 0cbe2d4ca the stack below this PR builds all at 11,778,497 B and this PR at 11,981,433 B (11701 KB), 81 KB over the ceiling main set on 2026-09-10. The chunk holds the same 14 modules before and after (no library reached it; catalog strings cannot leave all through a lazy boundary), so per the file's own convention the ceiling moves to ~5% headroom over the measurement, with the attribution recorded in the entry's comment.

The ten frames under temp-screenshots/agentcore-identity/ are committed so the <img> links below resolve at a pinned SHA of this branch (the same convention the 13 sibling directories already use); they are review evidence, not shipped assets, and are regenerated by the capture script. Channel / Tailscale / PDF / tips / companion / sidebar files that appear in the vs-main stack view belong to earlier layers, not this leaf.

Inert by default

Identity off / no policy row = Settings shows Off and writes nothing. Verify stays a no-op without a saved Gateway URL.

Save → Off proves revocation. Session teardown captures each provider's PID before shutdown, escalates any shutdown failure (not just a timeout) to the force-kill, and confirms the process is gone; a survivor makes the awaited revoke fail, so the PUT answers 503 with restart_required instead of reporting credentials revoked while a detached child still holds its Gateway bearer.

Screenshots

Rendered from the shipped component against API fixtures by website/scripts/capture-agentcore-identity.mjs (real strings, one frame per state the code can actually be in).

Off / unset — the select with consequence-first option labels, the reversibility line beneath it, and the Agent identity · Off rail entry:

Agent identity: Off. Identity select, Save-gated reversibility line, rail summary Off

Unsaved edit — Workload picked, name and Gateway URL typed, nothing saved. With a Gateway URL the commit waits until "Preview what Save grants" has listed the targets, then restates the scoped grant on the button itself while keeping the anchor the reader learned (Save — grant 2 targets: ticketing-mcp, payroll-lookup, the same control in the same shape) with the matching consequence beneath it. That line names what the grant IS and what still governs every call after Save -- signed only for a live chat whose policy allows AgentCore, the crew's normal tool approval, every decision in the audit log -- so nobody is asked to authorize "every tool" sight unseen or to guess whether anyone checks afterwards:

Agent identity: unsaved edit. Workload selected, preview listing two targets, commit reads Save — grant 2 targets: ticketing-mcp, payroll-lookup

Workload — Workload name (helper text visible) and Gateway URL inputs, Save, Verify connection, nine green checks, a READY target, the tools list through the SigV4 proxy, Copy debug summary:

Agent identity: Workload. Inputs, Save, Verify connection, nine green checks, targets table, tools list, Copy debug summary

Login — the Gateway sign-in card names the waiting target and the sign-in host and says this is the sign-in that counts; the tools section explains that Login tools show up in the chat where the person signed in (so this page lists none) and points back at the link above; the Tools are reachable check is not shown under Login, since this page never lists tools; the target row's own link reads Same sign-in as above:

Agent identity: Login. Consent card naming target and host, target awaiting sign-in, tools skipped until a chat signs in

Needs relaunch / install failed — a saved Workload whose hot-apply could not finish: the relaunch warning and the AgentCore-support install failure, both as notices:

Agent identity: saved, gateway relaunch required, AgentCore support install failed

Name required — Workload picked with the name left blank (the field shows an example, e.g. kirocrew, so an empty field never reads as typed): the "set a workload name" warning, and the line beside the disabled Save restates that gate (nothing recorded, nothing granted until the workload has a name) instead of describing a Save the reader cannot press:

Agent identity: Workload picked, no workload name, warning shown, Save disabled

No install channel — saved, but this install has no channel through which the AgentCore extra could be installed: the notice names the manual step:

Agent identity: saved, AgentCore extra cannot be installed from here, manual step named

Empty Gateway — every check green on a Gateway with no targets yet; the empty-targets and empty-tools copy point at the Gateway console, not at this page:

Agent identity: all checks green, no targets, no tools yet

Write-blocked — a fleet-signed ceiling: every control disabled, ownership stated:

Agent identity: write-blocked by a signed policy; controls disabled, ownership stated

Failing verify — denied control-plane call: red invoke check with its code hint, the target listing error mapped through the same hint vocabulary, and the tools section deferring to the failed check above instead of offering a third remedy:

Agent identity: a Verify that came back red -- failed invoke check, target listing error, tools skipped

Source: temp-screenshots/agentcore-identity/.

  • Identity Save rollback is atomic: the prior policy is staged to security_policy.json.bak (same floor/mask as .tmp) BEFORE the publish, a failed dest lockdown rolls back by one atomic replace of that snapshot (Windows retries, re-read verify), and dest is never written into -- no O_TRUNC rewrite that a mid-write death could leave truncated. If even that replace cannot land, dest stays the whole published document and .bak keeps the snapshot for recovery; the next successful Save clears it.
  • The Gateway preview is cleared whenever the drafted URL or posture changes, including a return to a URL previewed earlier: Save re-locks until a fresh preview lands (the response is also labelled with its own request, so a late answer for Gateway A never unlocks B).

Out of this PR

Tests

Identity API: cache-only refuse, locked persist, successful apply resets sessions and waits for proxy stop. Inspect: sync is 403 sync_not_permitted unless the operator env is set. SigV4: reset_workload_proxy waits for stop to finish. SecurityPanel vitest: catalog verify works and the sync button is absent.

Part of GitHub stack #6830. Supersedes the monolithic #6387.

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

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

Revocation proof hinges on duplicated private-attribute PID probes; a provider shape they miss makes Save → Off "confirm" revocation vacuously.

Watch

_provider_pid in sessions.py re-implements the attribute lookups of session_pid._sync_kill_provider ("Same lookups session_pid._sync_kill_provider performs" — _client._pid, _proc, _active_proc). A provider whose process handle lives elsewhere (a future harness, or drift in either copy) returns None → _safe_shutdown treats "nothing to confirm" as success → the PUT reports credentials revoked while a child still holds its Gateway bearer — exactly the failure the description says the design prevents ("a survivor makes the awaited revoke fail"). The contract is load-bearing but lives in two hand-synced probes instead of on the provider seam.
Clears when: PID exposure is one shared helper (or an LLMProvider method) used by both the kill and confirm paths, with a parity test pinning that every selectable backend's provider yields a trackable PID.

Suggestions

  • The keystone write protocol (_open_policy_lock, _write_exclusive_tmp, _rollback_replaced_home_document, _persist_identity_write) lives in a dashboard handler; a second sanctioned writer would have to import from dashboard.handlers.* or copy the .lock/.tmp/.bak protocol. Move it beside its owner (platform/governance or security) and keep the handler a thin caller.

[DESIGN-REVIEWED] ecef629

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of ecef6298cd93e0553092a19dbb24b68bde13b3b4 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ecef629

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

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

"Preview what Save grants" and "Verify connection" read as one shape-shifting button on one renamed panel; the blind reader couldn't tell them apart.

Watch

  • Two near-identical cards (same Plug icon, same layout, same refresh-icon button) swap around Save: the reader said they "seem to be the same 'check now' button under two names, and I can't tell what's actually different about what they do" and "one panel with two names… nothing on screen says so". Every setup flow hits it; friction, not failure; every dirty visit. Smallest fix: visually mark GatewayPreviewCard as an unsaved preview (badge or dashed border) so it doesn't read as the catalog renamed.
  • agent_identity_targets_deferred ("Targets are listed once the checks above pass.") renders in the no-channel/restart states where no checklist renders — reader: "I don't see any checklist 'above' in this shot." Uncommon states, but it confuses users already in a broken state. Reword to reference the always-visible button: "Targets are listed once Verify connection passes."

Suggestions

  • agent_identity_extra_missing_channel: "a locked Python" / "the gateway interpreter" meant "nothing to me" per the blind read; rewrite in task vocabulary, e.g. "This installation cannot add AgentCore support by itself. Install it on the machine that runs {{productName}}, then restart."
  • The rail badge shows the saved posture while the select shows the draft; the reader resolved "Off vs Workload" only via the preview panel's wording. Add an explicit unsaved-changes cue near Save (e.g. a small "Unsaved" chip when dirty).

[UX-REVIEWED] ecef629

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of ecef6298cd93e0553092a19dbb24b68bde13b3b4 — 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: CONCERNS

api.syncAgentcoreGatewayTarget plus the 13-catalog "Sync catalog" string ship with zero consumers — the description itself says target sync "is not shown".

Not justified as shipped

  • Item 6 — zero consumers: grep syncAgentcoreGatewayTarget across website/src finds only the client.ts definition and test mocks (one test asserts it is never called), and agent_identity_sync appears in all 13 catalogs but in no component.
    Subtraction: delete syncAgentcoreGatewayTarget from website/src/api/client.ts and the agent_identity_sync key from the catalogs; re-add with the panel that presses it.
    Clears when: the deletion lands, or a component calling it ships.
  • Item 10 — undeclared, rides along: website/src/components/settings.tsx restyles every disabled SettingsInput/textarea product-wide (dashed border, elevated background), not just the identity rail; the description never mentions it.

What this change ships

Inventory (10 items) — 8 justified

Intent: let the crew's owner see and configure this crew's AgentCore identity from Settings → Security, with Save → Off provably revoking Gateway access — an ADDITION, whose shape the base already records (rfc-agentcore-identity-gateway is in-progress on the base list, and base cloud.md names "GET/PUT /api/agentcore/identity, Settings → Security → Agent identity" as the planned PR).

  1. Settings → Security gains the Agent identity rail (Off/Workload/Login, name, Gateway URL) — justified
  2. GET/PUT /api/agentcore/identity: owner-cookie-only keystone rewrite under lock/.tmp/.bak, fleet/signed/cache-only refused 409 — justified
  3. Save → Off waits for proven revocation (closing gate, PID-confirmed kill, proxy stop; survivor ⇒ 503) — justified
  4. "Preview what Save grants" + Save button restating the scoped grant — justified
  5. POST /gateway/sync now 403 unless KIROCREW_AGENTCORE_GATEWAY_SYNC=1 — justified (iam.py grants inspect only, never SynchronizeGatewayTargets; no UI called sync on base)
  6. Sync client method + "Sync catalog" string in 13 catalogs — zero consumers, panel never calls it
  7. Consent card names which allowlist admitted the sign-in host (allow_source/allowlist_path) — justified
  8. atomic_write.unlink_with_retry (Windows delete twin of replace_with_retry) — justified
  9. Bundle all ceiling 11620 → 12300 KB, measured and attributed per the file's own 5%-headroom convention — justified
  10. Every disabled settings input product-wide restyled — undeclared, rides along

More rode along than fits ten (command-palette entries, capture script + committed screenshots matching the 29 existing sibling directories, 13 i18n catalogs, dashboard-restart drain reorder); these ten are what a person would notice. No test pin is deleted anywhere in the diff — the two rewritten rfile.read source pins in test_agentcore_sigv4.py follow the read into _read_request_body, and the sync tests gain the env the new gate requires.

[FIRST-PRINCIPLES-REVIEWED] ecef629

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

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

Review details

Both candidates die under falsification:

Candidate 1 (_try_read_nonblocking leaves socket non-blocking when old is None): The None branch is unreachable. Both call sites pass sockets with an explicit timeout — self.connection gets settimeout(PROXY_PREAUTH_DEADLINE_SECS) in setup() (line 555) and PROXY_SOCKET_TIMEOUT_SECS in _authenticated() (line 596); the upstream socket (line 769) belongs to a conn created with timeout=PROXY_SOCKET_TIMEOUT_SECS (line 732). gettimeout() never returns None, so (a) has no concrete production input.

Candidate 2 (stop() blocks on slots.acquire() up to 300s): Requires a Save→Off to land in the sub-millisecond window between conn.connect() starting (line 745) and registration (line 756), and the upstream host to be slow/unreachable. The connect is itself bounded by timeout=PROXY_SOCKET_TIMEOUT_SECS, the drain runs off the event loop, and it is the deliberate revocation-drain design. (a) reduces to "if the host were slow during a narrow race" — the "could/might" that the bar forbids; no crash, corruption, or security consequence.

No findings.

[OPUS-REVIEWED] ecef629

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

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

@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 Aug 28, 2026
@kyleseaman
kyleseaman marked this pull request as ready for review August 28, 2026 18:56
@kyleseaman
kyleseaman requested review from a team and iamwhatever August 28, 2026 18:56
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-6-dashboard-1b02 branch from 34b091d to 278ee6c Compare August 28, 2026 19:31
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Aug 28, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-6-dashboard-1b02 branch from 8d26108 to b891ba3 Compare August 28, 2026 19:54
@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 Aug 28, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-6-dashboard-1b02 branch from b891ba3 to 1da8e02 Compare August 28, 2026 20:21
@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 Aug 28, 2026
extra_code = await asyncio.to_thread(ensure_extra)
applied = await asyncio.to_thread(apply_agentcore_runtime)
if applied:
await asyncio.to_thread(_rebuild_agent_after_apply)

@kyleseaman kyleseaman Aug 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[P1] Revoke live sessions after an identity policy change. Rebuilding only affects the next session/new; existing ACP sessions retain the previously injected Gateway URL and proxy/bearer headers, so Save -> Off does not actually remove access. After a successful hot-apply, reset the live sessions and invalidate/stop the workload proxy so the new ceiling takes effect immediately.

@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Aug 29, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-6-dashboard-1b02 branch from a5d746e to 50de9d0 Compare August 29, 2026 01:44
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Aug 29, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-6-dashboard-1b02 branch from 50de9d0 to f210526 Compare August 29, 2026 01:54
@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 Aug 29, 2026
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review -- 🟡 CONCERNS

Which legitimate operations does ecef6298cd93e0553092a19dbb24b68bde13b3b4 newly refuse? Updated in place on each push. A script-confirmed regression blocks; the model proposes candidates and never decides a refusal.

Verdict basis: the reviewer's own judgement; no confirmed regression.

Security scope review -- adjudicated candidates

  • macos-latest (platform posix): 9 classified, 0 newly refused, 9 still allowed.
  • ubuntu-latest (platform posix): 9 classified, 0 newly refused, 9 still allowed.
  • windows-latest (platform windows): 8 classified, 0 newly refused, 8 still allowed.

No candidate flipped from allowed to refused.

candidates.json is written (16 rows probing the .bak boundary, the crew-home neighbors, both platform spellings, and the suffix-rule tier). Emitting the review.

Scope-Verdict: CONCERNS

TIGHTENING: The crew-home keystone path fence (_CREW_SECRET_LEAVES in src/kiro_crew/security/paths.py) gains three exact-name leaves — security_policy.json.lock, security_policy.json.tmp, security_policy.json.bak — mirrored into the sandbox bind-mask (_CREW_HIDDEN_LEAVES) and the governance boot assertion — the one threat it refuses is an agent seizing the identity PUT's publish artifacts beside the trust-root ceiling: "Exclusive lock sibling of the trust-root policy. An agent that can flock this file blocks an owner's Save → Off indefinitely", and for the stage/snapshot, "an in-sandbox writer could steal the lock or swap the staged bytes before the rename".

ADJUDICATED: 16 candidates, 0 confirmed newly-refused
(No confirmed rows were handed back for this run; per the mechanism, a regression without a script verdict is not a finding. Note that of the three new leaves, only security_policy.json.bak is a new refusal on the tool path — .lock and .tmp at the crew root were already fenced at base by the _KEYSTONE_ARTIFACT_SUFFIXES rule, whose parent set this diff does not change. The diff also scopes deliberately: it declares .bak as a leaf rather than adding a .bak artifact suffix, precisely to keep the operator's config.json.bak / sessions.db.bak hand-backups readable — my candidates 1–5 probe that exact promise.)

PLATFORM COVERAGE: posix and windows rows were written in pairs for every path-shaped probe: the .bak hand-backup read and write beside the new leaves (cat/cp vs type/copy under %USERPROFILE%\.kiro\crew), the routine config.json read, the crew-home listing (ls -la vs Get-ChildItem), the maintainer's repo git grep for the fenced names as argv tokens, the sanctioned pytest invocation against this PR's own new test file, and stale-.lock cleanup outside the keystone parents (/tmp vs %TEMP%). This covers the diff's platform assumption directly: the new leaves are authored as POSIX-separated home_dirs entries and re-anchored per-OS by _home_dir_targets_uncached (both-separator anchoring, casefolded compare), so each spelling must be proven on its own host. One any row (loopback curl of the new identity route) is genuinely separator-free. I could not express an in-sandbox (bind-masked mount namespace) probe as a plain shell row — that platform surface is named below, not covered.

UNADJUDICATED: Four parts of this tightening live outside the shell tool-call composite, so no verdict exists for them and the empty confirmed set is not evidence there:

  • Sandbox bind-mask (sandbox.py _CREW_HIDDEN_LEAVES += the three names). Call path: agent subprocess spawn → Linux sandbox mount setup masks the three crew-home leaves from the in-sandbox view. Candidate inputs I would have submitted: an in-sandbox ls -la ~/.kiro/crew still listing config.json/sessions.db, and an in-sandbox cat ~/.kiro/crew/config.json.bak still succeeding (the mask must stay leaf-exact, like the fence).
  • Governance boot assertion (governance.py assert_governance_paths_protected required += .kiro/crew/security_policy.json.lock/.tmp). Call path: gateway startup integrity check → raises (fail-closed boot) if the fence does not cover those paths. Candidate input: a normal gateway start on a tree where paths.py and governance.py skew (e.g. a partial backport) — the legitimate operation lost is startup itself, by design.
  • Dashboard identity write gates (new agentcore_identity.py): PUT /api/agentcore/identity → _owner_gate (403 for app tokens and non-owner sessions) → _write_reason (refuses companion profile, KIROCREW_SECURITY_POLICY fleet override, KIROCREW_POLICY_URL/cache-only distribution, signature-required fleets, and signed home documents). Candidate inputs: an owner's Save of Off/workload/login on a standalone, unsigned, undistributed home file (must stay writable), and Save → Off retaining a submitted name/URL.
  • Session closing gate during identity revoke (sessions.py _reset_all_sessions(await_shutdown=True) → _drain_all_under_closing_gate): while a Save is revoking, and indefinitely after a failed drain (until restart), new session allocations get SessionClosingError. Candidate input: a user starting a new chat turn during or just after Save → Off — refused transiently by design, permanently on a failed revoke.

[SCOPE-REVIEWED] ecef629

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for e3a5691d79ab374d35f5dc09bd5190a316bd7b57; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

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

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for 378c46279657fd002d7ac91deb5928d1cc55778b; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

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

Owner-dashboard GET/PUT /api/agentcore/identity writes the home
policy row and hot-applies the extra. Settings → Security shows
posture, catalog verify/sync, and pending 3LO consent. Inert when
identity is off.
Revalidate signed or distributed home policy under the exclusive
lock before rewriting it. Session cleanup cannot skip proxy
revocation. Save → Off persists a disabled row when identity
came from the environment, and GET still returns retained
Gateway fields from that row so re-enable cannot delete them.
RFC workload grant matches the narrowed IAM: no ForUserId mint,
no SynchronizeGatewayTargets. proxy.stop waits for signed
in-flight requests and closes unauthed sockets so they cannot
pin Save. Force-kill of a hung provider runs off the loop.
Identity PUT rejects a nonempty gateway_url that is not an
AgentCore Gateway MCP hostname.

The exclusive staging file is locked down while empty, fsync'd
before close, and unlinked if lockdown or Windows replace fails
so a stranded .tmp cannot brick later Saves.
@bolichen97

Copy link
Copy Markdown
Contributor

Maintainer note: PR #11780 (merged 2026-09-19, bc0d2b0cf, "simplify member memory to one SQLite store") removed the protected-binding / private-execution member memory model. Two PRs written against the old model merged after it with a textually clean merge and broke main at import time (#11947, #11960); both are now reverted. This PR carries the same hazard.

This PR is MERGEABLE, but on this head src/kiro_crew/session_allocation.py:1801 calls await cast(Any, provider).prepare_private_memory() under is_acp_provider. No provider on main defines prepare_private_memory any more, so every ACP session allocation would raise AttributeError. Please do not merge as-is: rebase onto current main and delete that call (the _private_memory provider flag it fed is gone too).

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking merge until this is rebased onto post-#11780 main and the removed-symbol references listed in my comment above are dropped. Textually the merge is clean, so nothing else would stop it from breaking main at import time.

@iamwhatever

Copy link
Copy Markdown
Contributor

Reviewed for merge triage, not approving from my side: the base branch is cursor/agentcore-5-login-1b02, not main, it is ~9k lines of identity settings, and bolichen97's changes-requested review is still open.

@iamwhatever

Copy link
Copy Markdown
Contributor

Thanks a lot for this careful, well-split AgentCore stack. We are closing #6595, #6793, #6828, #6600 and #6602 together for now: the branches are about 7,500 commits behind main, #6595 still has an open review on the identity contract, and the upper PRs reference symbols that #11780 removed, so a rebase would be close to a rewrite. The need is still tracked in docs/request-for-change/rfc-agentcore-identity-gateway.md (status: partial; phase 1 is on main via #6594). When AgentCore is picked up again, please open a fresh stack from current main, starting with the principal-propagation layer. Happy to reopen if you would rather continue on these branches.

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.

3 participants