Skip to content

feat: AgentCore principal propagation (default-off) - #6595

Closed
kyleseaman wants to merge 2 commits into
mainfrom
cursor/agentcore-2-principal-1b02
Closed

kyleseaman wants to merge 2 commits into
mainfrom
cursor/agentcore-2-principal-1b02

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

PR 2 of 6 in the AgentCore stack. Session identity must be core-derived and independently reviewable before AWS, Gateway inject, or login attach land.

Token vending and Gateway inbound later key off SessionPrincipal. If a tool argument or an injected cron envelope can mint dashboard+admin, later PRs inherit that hole. This PR is the trust boundary for "who is this turn?"

What changed

  • SessionPrincipal is {surface}+{raw_id}, derived in core. Tool-input identity is rejected. Injected cron/subagent envelopes do not bind.
  • Every human surface now supplies surface and raw_id: dashboard (verified request["user"] only when is_dashboard_user is true — never state.owner_id), Slack, Discord, Telegram, CLI, and every ChannelTurn principal_raw_id.
  • CLI bind uses the process UID passwd row (POSIX) or the process-token SID (Windows). It does not honour LOGNAME / USER / USERNAME.
  • Unattended channel injectors (Slack AutoNudge; Discord/Webex synthetics with bind_principal=False) omit raw_id and publish after get_or_create. Automated turns omit raw_id and publish_turn_identity clears leftover principal metadata

@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 c56fe1ab40526f4f55fe35d958dbf125e5e38671 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

The spec contradicts itself on the dashboard bind: session.md prose says _run_chat binds dashboard+{user}; the table, code, and pinned tests say unbound.

Watch

  • docs/system-specs/modules/session.md:744 states "Dashboard chat (chat_runner._run_chat) binds surface="dashboard" … only when _directive_user_origin is true and both identity fields are present," while the same section's table says "Dashboard | unbound — _run_chat publishes the pid sidecar only," which is what the code does (chat_runner.py:7887 publishes bare) and what test_chat_runner_does_not_bind_steer_capable_dashboard_turns and test_linked_slack_surface_stays_unbound pin. This spec is the input to the later token-vending/Gateway PRs; the stale "binds" paragraph invites either vending against a principal that never exists, or "restoring" the bind and running a queued second speaker under the opener's credentials — the exact hole the unbound decision closes.
    Clears when: the prose paragraph is rewritten to match the table and pinned tests (dashboard identity is queue provenance only, never a session principal).
  • Two discriminators for "is this turn a user?" ship side by side: the live rule is provenance-only (principal_bind_kwargs explicitly ignores message text; automated callers omit raw_id / set bind_principal=False), yet is_injected_envelope, derive_session_principal_for_injected, and reject_tool_input_identity have zero production callers, is_injected_envelope's docstring names principal_bind_kwargs and _run_chat as callers (false), and injected-messages.md now describes the prefix check as the active bind gate. A later-stack implementer following those docs wires text-prefix matching as a trust signal — the opposite of the shipped rule and of AGENTS.md's own "a prefix is not a trust signal."
    Clears when: the unused helpers either gain their real caller in the next stack PR or their docstrings and injected-messages.md stop describing them as on the current bind path.

Suggestions

  • Unify the trust predicate: the send path decides directive_user_origin via dashboard_user_origin(request) but the queue-edit path (chat_handlers.py:4801) still uses not bool(request.get("app", "")) beside the new principal stamp — one trust question should have one predicate.

[DESIGN-REVIEWED] c56fe1a

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of c56fe1ab40526f4f55fe35d958dbf125e5e38671 — 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

Half the new identity surface has zero production consumers — the "do not bind" guarantees the description headlines are enforced by callers omitting raw_id, not by the helpers shipped to state them.

Not justified as shipped

  • Item 6 — zero consumers: later-stack seams with no reader — get_principal, clear_session_principal, retract_principal_credentials (documented no-op), inherit_parent_principal, and CLI's provider.principal (0 readers, grep \.principal in providers/); session.md presents "Subagent | inherit parent subject" as shipped while nothing calls it.
    Subtraction: defer inherit_parent_principal and its session.md table row to the PR that wires subagent spawn.
    Clears when: the stack PR that reads the principal (token vend / Gateway inject) merges, or the unwired seams are deferred to it.
  • Item 7 — duplicate of src/kiro_crew/messaging/identity.py (exclusive_bind_raw_id): exclusive_session_binds is a second spelling of the same predicate with 0 consumers (grep exclusive_session_binds in src: only its def; every dispatcher uses exclusive_bind_raw_id).
    Subtraction: delete exclusive_session_binds (identity.py:38).
    Clears when: the deletion is made or a production caller lands.
  • Item 8 — zero consumers: is_injected_envelope / derive_session_principal_for_injected have no production caller, yet their docstring names principal_bind_kwargs, _run_chat as callers and injected-messages.md now claims "is_injected_envelope treats it like cron…: bind kwargs stay empty" — bind kwargs stay empty because callers omit raw_id (principal_bind_kwargs does del message). New AUTO_NUDGE_PREFIX serves only these dead helpers while 6 sibling literal spellings stay hardcoded (slack/gateway.py ×5, session_summary.py:44).
    Subtraction: defer both helpers plus AUTO_NUDGE_PREFIX, and the doc sentences crediting them, to the vending PR that calls them.
    Clears when: a production call site exists, or the helpers and doc claims are removed.
  • Item 9 — one consumer, generalized: principal_bind_kwargs(message, …) discards message (del message) yet all 5 call sites pass the turn text.
    Subtraction: drop the message parameter; the "prefix is not a trust signal" pins hold on raw_id alone.
    Clears when: the parameter is removed or something reads it.
  • Item 5 — undeclared: rides along — _directive_user_origin for dashboard sends now requires the positive is_dashboard_user claim instead of "no app claim", flipping loopback internal-secret callers to non-user-origin; the description frames is_dashboard_user only as the principal raw_id gate.

What this change ships

Inventory (10 items) — 5 justified

Intent: bind a trusted core-derived "who is this turn?" principal on every human surface, default-off, ahead of AgentCore token vending — an ADDITION (covered by rfc-agentcore-identity-gateway.md, in-progress on base).

  1. Exclusive channel DM turns (Slack/Discord/Telegram/Teams/Webex/WeCom/Weixin/iMessage/WhatsApp/Feishu) bind {channel}+{user_id}; groups and unified buckets stay unbound — justified
  2. CLI chat binds cli+{os user} from the process UID/SID, never env vars — justified
  3. Dashboard turns stay unbound; queued human turns carry stamped provenance forwarded on drain, fail-closed on mixed — justified
  4. Automated turns (cron, taskrunner, AutoNudge, drain replays, synthetics) publish unbound and clear leftover principal metadata — justified
  5. Dashboard user-origin now requires positive is_dashboard_user; internal-secret loopback callers lose it — undeclared, rides along
  6. Later-stack seams (get_principal, clear/retract, subagent inherit, CLI provider attr) with no reader — zero consumers
  7. exclusive_session_binds beside the used exclusive_bind_raw_id — duplicate of src/kiro_crew/messaging/identity.py
  8. Injected-envelope discriminator helpers + AUTO_NUDGE_PREFIX/CRON_NOTIFY_PREFIX constants move — zero consumers (move itself layering-derived)
  9. principal_bind_kwargs accepts and discards the message text every caller passes — one consumer, generalized
  10. Identity-topology tests pin every human dispatcher to name a principal and gate on exclusivity — justified

[FIRST-PRINCIPLES-REVIEWED] c56fe1a

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — 🔴 changes requested (blocking)

GPT 5.6 found at least one blocking issue that must be resolved before merging c56fe1ab40526f4f55fe35d958dbf125e5e38671. 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands.

This comment is updated in place on each push.

BLOCKING -- src/kiro_crew/messaging/identity.py:67 -- unified DM sessions bind one human’s principal to other humans (origin: validation)
if channel_namespace_of(session_key) == DM_SCOPE_UNIFIED:
dm_scope="unified" + user A starts turn -> user B steers shared session -> B’s instruction retains A’s JWT-bearing principal.
Anchor: backend-security-controls
Fix: Detect the unified: key directly in both helpers.
[BLOCK-MERGE] c56fe1a
[GPT-REVIEWED] c56fe1a

Adjudication (Opus 4.8) — is blocking on each finding proportionate?

The adjudicable block is empty (0 findings). Ruling on the one fenced finding, F1.

F1 (fenced): The claim is that exclusive_bind_raw_id/exclusive_session_binds fail to detect the unified: key, so user A's principal binds and leaks to user B on a shared unified session.

  • Harm rung: UNBOUNDED (cross-user principal/JWT binding) — which is why it was fenced.

  • Guard site: exclusive_bind_raw_id returns "" (unbound) when channel_namespace_of(session_key) == DM_SCOPE_UNIFIED (identity.py:67); same guard in exclusive_session_binds (identity.py:48). DM_SCOPE_UNIFIED = "unified" (link.py:390).

  • channel_namespace_of (link.py:89-94) returns "unified" for any key starting with unified: or unified_, because "unified" is a member of CHANNEL_SESSION_NAMESPACES (constants.py:830) and _in_namespace matches both separators (link.py:72).

  • The writer build_dm_session_key produces exactly unified:{agent}[:genN] for unified direct DMs (link.py:465-466), and the persisted stem folds to unified_… — both caught. So every unified key the system writes IS classified as "unified", the guard returns "", and publish_turn_identity takes the metadata-only else branch that clears the principal (identity.py:124-131). A's principal is never retained for B.

  • Recovery path: not needed — the guard holds on every writer-produced key.

  • Rarity: the harm requires a unified session key that channel_namespace_of fails to classify. No code path in the key builder can produce such a key — this is an input the system's own writer cannot generate. FLAG (evidence record complete; blocking is unaffected).

    [ADJUDICATION] c56fe1a total=0 uphold=0 downgrade=0
    [GPT-ADJUDICATED] c56fe1a
    [ADJUDICATION-FENCED] c56fe1a fenced=1 flagged=1
    FLAG F1 src/kiro_crew/messaging/identity.py:67 -- both guards route through channel_namespace_of, which returns "unified" for every unified:/unified_ key the builder emits (constants.py:830, link.py:465-466), so the guard already unbinds unified sessions and the leak requires a key the system's writer cannot produce.
    [GPT-ADJUDICATED-FENCED] c56fe1a

🏷️ Fenced finding(s) machine-flagged as likely edge case

The security fence keeps these findings blocking regardless of adjudication; the only clearance path is a human override. The annotate-only pass judged the condition combination each one requires extreme, and pre-drafted the override rationale below. A repository writer must independently verify a rationale before posting it — it is machine-authored, and a wrong override on a security-class finding ships exactly the class the fence exists to stop.

  • F1 src/kiro_crew/messaging/identity.py:67 — both guards route through channel_namespace_of, which returns "unified" for every unified:/unified_ key the builder emits (constants.py:830, link.py:465-466), so the guard already unbinds unified sessions and the leak requires a key the system's writer cannot produce.

    /ai-review override gpt c56fe1ab40526f4f55fe35d958dbf125e5e38671: both guards route through channel_namespace_of, which returns "unified" for every unified:/unified_ key the builder emits (constants.py:830, link.py:465-466), so the guard already unbinds unified sessions and the leak requires a key the system's writer cannot produce.
    

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

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

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

Review details

No findings.

The sole candidate — that repointing _directive_user_origin from not bool(request_app) to dashboard_user_origin(request) regresses legitimate human turns — fails to ground a concrete input. The normal dashboard human authenticates via cookie/query-param (token_auth.py:2485, :2928), which sets request["is_dashboard_user"] = not _app → True, so dashboard_user_origin returns True and behavior is unchanged. The only path that flips (internal-secret loopback with no derived app, token_auth.py:2434) is a machine-to-machine transport; no concrete production caller posts a genuine human chat turn through it, which the candidate itself concedes, and the narrowing is a documented, deny-by-default tightening. (a) is speculative ("if a companion were to…") and drops under falsification.

[OPUS-REVIEWED] c56fe1a

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable c56fe1ab40526f4f55fe35d958dbf125e5e38671: <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 krishdhasmana August 28, 2026 18:56
sessions: Any,
session_key: str,
*,
surface: str | None = None,

@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] Do not make caller identity optional on the shared human-turn hook without updating every caller. In the final stack, Slack, Discord, Telegram, and the generic messaging dispatcher still call publish_turn_identity(sessions, session_key) with neither field, so no principal is stored and login Gateway attach never runs for channel users. Split out a pid-only API for genuinely injected/system turns, require identity here for user turns, and update every surface with its trusted provider user id.

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.

Rechecked at dc9f141 and through the top of stack: still open. The channel callers continue to omit surface/raw_id, so they never bind a principal or attach login-posture Gateway authorization.

@kyleseaman
kyleseaman force-pushed the cursor/agentcore-2-principal-1b02 branch from 0e30917 to ab4a21b Compare August 28, 2026 19:30
@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
@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ⏭️ skipped

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

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Aug 28, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-2-principal-1b02 branch from ab4a21b to 7736436 Compare August 28, 2026 19:54
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Aug 28, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-2-principal-1b02 branch from 7736436 to dc9f141 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
Comment thread src/kiro_crew/dashboard/chat_runner.py Outdated
# can see it. Pid publication still happens after spawn. Injected
# envelopes omit surface/raw_id and skip this bind.
_principal_raw_id = state.owner_id or _dashboard_local_owner()
_bind_kw = principal_bind_kwargs(message, surface="dashboard", raw_id=_principal_raw_id)

@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] Do not derive the dashboard owner principal for app-token turns. api_chat deliberately passes app-originated work into _run_chat with _directive_user_origin=False, but this bind ignores that provenance and treats any non-prefix message as a human dashboard turn. In login posture a companion can therefore annotate an app-owned slot as the dashboard owner and attach the owner JWT/Gateway authorization. Thread the trusted request provenance into this decision and refuse principal binding for app and other synthetic turns; text-prefix detection is not an authentication boundary.

@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: checking Automated validation is still running labels Aug 29, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-2-principal-1b02 branch from d6c9db7 to 6df1aa8 Compare August 29, 2026 02:44
@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 Aug 29, 2026
iamwhatever
iamwhatever previously approved these changes Sep 1, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

Rebased onto main 6ae74179d by a maintainer as part of the 2026-09-08 open-PR audit (was 393 commits behind, dirty). Conflicts and resolutions:

  • docs/system-specs/common/code-style.md: merged rows, kept main's *_RECOVERY_PREFIX / drift-guard wording plus your constants.py relocation note.
  • docs/system-specs/modules/session.md: took main's rewritten get_or_create row, kept your set_principal / get_principal row; dropped the wait_if_busy row because main removed it from the docs.
  • messaging/dispatch.py, discord|telegram/transport_dispatch.py: union of imports and of the ChannelTurn fields (main's inbound_route next to your principal_raw_id / exclusive_principal).
  • dashboard/chat_delivery.py, chat_handlers.py, chat_runner.py: union of keyword params and call kwargs (main's send_id / attachments / _directive_self_wake plus your principal kwargs); kept your stricter dashboard_user_origin(request).
  • dashboard/chat_regenerate.py: kept main's edit-resend dispatch-reservation wrapper and injected your principal kwargs into its inner _run_chat call.

Gates run locally on changed files: black, isort, flake8, and pytest over the 22 test files this PR touches plus the ones covering the resolved code (3706 passed). test_queue_during_subagents.py and test_session_coverage.py are black-baselined and were already unformatted on main, so they were left alone.

Please review the resolutions. A maintainer push makes the maintainer the last pusher, so a second approver is needed under the repo's last-push rule. Reply if anything looks wrong.

@mrpackethead

Copy link
Copy Markdown

Landing here from the other direction. I run a Kiro Crew deployment day to day (multi-repo GitHub work, AWS deploys, a set of autonomous crons), and I worked through an architecture problem this week that lands exactly on what this PR does, so I wanted to add a real-world use case in support of it.

The problem I hit: today the crew acts under one baked-in bot identity for every write, no matter who directed the work. That makes attribution untrue (a PR opened because a teammate asked reads as the bot, under my account), it means a self-authored PR cannot be self-approved if branch protection ever needs a review, and it turns the crew into an ambient-authority path: anyone who can reach the control plane inherits the bot's full GitHub and AWS write access.

Working through it, the clean principle turned out to be exactly principal propagation: the crew should act as its caller, carrying that caller's identity outward, so the external system's own access control does the enforcing. Against GitHub that means the caller's own token (their writes attribute to them, they reach only what they already can). Against AWS it means a role scoped to the caller. The crew stops being a privilege-escalation path and becomes an accelerant on permissions the caller already holds. Most of what I was reaching for in a bespoke permission model simply disappears once the crew delegates identity to systems that already have access control.

Two things from my notes that might be useful as this lands, offered as field input, not a design ask:

  1. Autonomous work has no live caller. Crons, webhooks and monitor loops have no human to be. In practice they seem to want a scoped service identity, distinct from any human, rather than falling back to an owner identity. If default-off eventually flips on, the unattended path is the one I would most want a clear, least-privilege answer for.
  2. Delegation raises the stakes on the crew's own integrity. Once the crew holds real delegated credentials, a bug or compromise is a deputy wielding them. That is an argument for this PR's default-off, careful posture, not against it, but it is the tradeoff I keep coming back to.

Glad to see this being built rather than something I would have had to work around. Happy to test the propagation path against a real multi-repo GitHub + AWS deployment if that is useful once it is far enough along.

@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.

Maintainer review (agent-assisted), pinned to 40567d6. Requesting changes for the identity contract mismatch. The body and session.md paragraph promise a verified dashboard bind, but session.md's table and chat_runner.py:7681-7686 deliberately keep dashboard turns unbound. The only publish_turn_identity call omits the threaded _principal_surface/_principal_raw_id. Core-derived identities and exclusive-DM binding are sound; failure here is safely unbound, not credential leakage.

Keep that safe multi-speaker-slot behavior unless a separately reviewed binding design changes it. Make body/spec agree, remove or explicitly classify the unused plumbing as provenance-only, and add a dashboard-turn regression asserting no principal survives publication. Do not simply wire the opener's identity into a slot another speaker can steer to satisfy the prose. Later stack work must consume the actual contract. Isolated source/test review plus independent inspection of the call; local tests not run this wave.

Partition SessionPrincipal as {surface}+{raw_id} at turn start.
Injected cron/subagent envelopes skip bind. Existing
publish_turn_identity callers that omit surface/raw_id stay
byte-identical. No Gateway attach or AWS in this slice.
CLI identity comes from the process UID or token SID, not
environment usernames. Automated turns omit raw_id and publish
after session acquire so a concurrent human principal is not
cleared mid-stream. Live-credential retract belongs to the later
Gateway layer.
@NicholasRBowers

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]: This PR has been inactive since 2026-09-15. I reviewed the blockers and they require your input — every remaining gate on it is a decision, not a mechanical fix:

  • The standing CHANGES_REQUESTED asks which identity contract this PR actually ships. @bolichen97 (2026-09-12, pinned to 40567d62) reports that the body and the session.md paragraph promise a verified dashboard bind while session.md's own table and chat_runner.py:7681-7686 deliberately keep dashboard turns unbound, and asks you to keep the safe unbound behavior, make body/spec agree, classify the unused plumbing as provenance-only, and add a dashboard-turn regression asserting no principal survives publication — with an explicit "do not simply wire the opener's identity into a slot another speaker can steer to satisfy the prose." Your 2026-09-15 push (c56fe1ab, "bind every human surface and clear leftover principal metadata") has not been re-reviewed, so whether it answers that ask or moves toward the direction the review warned off is still the maintainer's call. Design Review's two Watch items name the same mismatch independently (span=ed72e49c32dd, span=111c9c531175).

  • First Principles lists five zero-consumer seams and asks whether they belong in PR 2 of 6 or in the PR that reads them. get_principal, clear_session_principal, retract_principal_credentials, inherit_parent_principal, CLI's provider.principal, exclusive_session_binds (a second spelling of exclusive_bind_raw_id, zero callers), is_injected_envelope / derive_session_principal_for_injected, and principal_bind_kwargs(message, …) which del messages the text all five call sites pass. Each item clears either when the token-vend/Gateway-inject PR lands or when the seam is deferred to it — that is a stack-sequencing choice about what this trust boundary commits to, and I won't make it for you. It also flags one undeclared rider (span=8e62ddcb2efa): requiring a positive is_dashboard_user claim instead of "no app claim" flips loopback internal-secret callers to non-user-origin, which the description frames only as the principal source.

  • The one blocking code finding can only be cleared by a repository writer. GPT 5.6 holds [BLOCK-MERGE] on messaging/identity.py:67 (unified DM sessions binding one human's principal to another). It is security-class and fenced, so adjudication cannot lift it — and Opus's adjudication is a FLAG, not an uphold: it traces channel_namespace_of returning "unified" for every unified: / unified_ key build_dm_session_key emits (link.py:465-466, constants.py:830), concluding the guard already unbinds and the leak needs a key the writer cannot produce. The fence pre-drafted an override rationale, but only a repository writer may verify and post it. I will not self-authorize an override on a security-class finding.

  • Your own two unresolved P1 threads are still open — "do not make caller identity optional on the shared human-turn hook without updating every caller" (identity.py:76) and "do not derive the dashboard owner principal for app-token turns" (chat_runner.py). Both read as questions about the final stack shape rather than line fixes.

The mechanical parts are real but downstream of all of the above: the branch is 435 commits behind main with conflicts across 57 files, and pr_status.py notes no linked issue. Once the contract and the override are settled, that part is straightforward.

When you've addressed these, the pipeline will re-assess on its next cycle.

Copy link
Copy Markdown
Contributor

Open-PR triage, 2026-10-05. Checked against origin/main af1eb612da66, PR head c56fe1ab40, merge base 57eaecf2fd0e.

Verdict: DISTINCT, REBASE + CONTINUE-DEVELOPMENT. Nothing on main or in another open PR replaces this one.

  • Main has the stack's base interfaces from feat: AgentCore core interfaces and governance schema #6594 (PR, merged 2026-09-01): SessionPrincipal, AgentIdentityProvider.annotate_principal/vend_* in platform/interfaces.py. It has none of this PR's binding layer. platform/agent_identity.py, bind_session_principal, set_principal/get_principal, exclusive_bind_raw_id and principal_raw_id all return 0 hits under src/ on main. Main's publish_turn_identity(sessions, session_key) (messaging/identity.py:86) still takes no surface/raw_id.
  • No other open PR touches messaging/identity.py or platform/agent_identity.py. The other PRs that share files (chat_runner.py, state.py, session.md, the transport dispatchers) only overlap by file and have different goals.
  • The branch is stale. It is 2737 commits behind main, and git merge-tree reports 26 conflicting files. These include messaging/identity.py, where main has since added co-tenant pid publishing and a single provider lookup, plus session.py, chat_runner.py, chat_handlers.py, every channel transport_dispatch.py, and session.md. Please rebase.
  • Breaking change / P0: I found no new P0. I traced the fenced GPT finding on identity.py:67 (unified DM binding) through channel_namespace_of and build_dm_session_key, and the guard holds for every key those writers produce. One behaviour change remains open and is already raised: _directive_user_origin now uses dashboard_user_origin(request) instead of not request_app, so loopback internal-secret callers become non-user-origin. The identity-contract mismatch is also still open. @bolichen97's CHANGES_REQUESTED (2026-09-12) and your own two P1 threads cover both points, so I'm not adding a duplicate review.

The full evidence is archived in the triage run.

@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

merge conflict Branch has merge conflicts with its base — author must resolve before merge needs-author-decision PR blocked on author input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants