Skip to content

feat: AgentCore core interfaces and governance schema - #6594

Merged
iamwhatever merged 1 commit into
mainfrom
cursor/agentcore-1-governance-1b02
Sep 1, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
cursor/agentcore-1-governance-1b02

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

The AgentCore identity + Gateway work landed as one ~18k-line PR (#6387, 111 files). That form mixes independent security boundaries and is too large to review. This is PR 1 of 6 in a stacked split by trust boundary. Each PR is merge-safe and inert by default.

Why it matters

Reviewers of governance and the CPP contract should not also have to review SigV4, OAuth consent, or Settings UI. A schema-only first PR lets that review happen on a small, AWS-free surface.

What changed (motivation → approach → change)

Goal: land the contract later PRs attach to, without turning anything on.

  • AgentIdentityProvider Protocol + WorkloadIdentity / SessionPrincipal / InboundToken types
  • DefaultAgentIdentityProvider no-op (enabled() -> False; no tokens, no Gateway spec)
  • PlatformContext.agent_identity slot (CONTRACT_VERSION stays 1)
  • Bootstrap composes only the Default — no AWS swap
  • capabilities.agentcore catalog row (capability_default=False)
  • Policy-only posture / gateway_url / workload_name with fail-closed unknown posture
  • AWS-free validators in platform/agentcore_schema.py so governance never imports boto3
  • _agent_identity_enabled() three-conjunct probe (adapter AND capability AND known posture)
  • agentcore-inbound reserved on the keystone leaf list (writer comes later)
  • CapabilityGate.from_dict now rejects a non-boolean enabled the same way ScopedRuleset.mode already does. A profile or policy that previously coerced "false" / 1 / "0" will fail composition instead of silently permitting. This is the existing gate parser, not AgentCore-only.
  • RFC + plan + system-spec updates for this slice

Unrelated Node/theming/Discord reversions from #6387 are not in this stack.

Later PRs (stacked on this one):

  1. Principal propagation (default-off)
  2. AWS extra + CFN/IAM adapter
  3. Workload Gateway integration (SigV4 proxy, MCP inject)
  4. Login attach and consent
  5. Dashboard Settings UI

#6387 will be closed as superseded once the stack is up.

Tests

  • TestAgentIdentitySeam in test_platform_cpp_seam_coverage.py: Default disabled, opt-in catalog, fail-closed posture, policy-only keys rejected on profiles, https-only gateway URL, three-conjunct probe stays off without capability/posture
  • test_fully_enumerated_block_reports_no_gap supplies a known agentcore posture
  • Local: 213 passed (test_platform_cpp_seam_coverage.py + test_governance_policy.py)

Manual verification

N/A — this PR is inert. No Settings UI, no AWS calls, no Gateway inject. Unit coverage is the verification.

Related Issues

Supersedes the schema/CPP portion of #6387.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated
  • No secrets, credentials, or internal references in the diff

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

Design-Verdict: CONCERNS

Sound inert-slice design; the ride-along CapabilityGate strictness change and per-scope parser hooks are the two things a human should consciously accept.

Watch

  • The CapabilityGate.from_dict change ("rejects a non-boolean enabled … not AgentCore-only") raises unconditionally — even with boot.fail_closed: false — so any deployed policy/profile that today carries enabled: 1 or "true" (currently parsed as enabled and working) will hard-fail composition at boot after upgrade, with no lint/migration path. Fail-toward-safe and pre-launch, but it changes availability for every capability, not just agentcore; it deserves its own commit so a boot-abort bisects to it, and a release-note line when it ships.
  • Governance's own invariant is that a new scope is "a SCOPE_CATALOG data change, never an evaluator edit," yet this lands ~170 lines of agentcore-named code (_capability_raw_for_gate, three _apply_agentcore_* hooks, three ceiling fields) inside governance.py's parse path. One capability needing inner policy data is fine; the risk is PRs 2–6 and the next data-bearing capability copying the pattern until the parser is a per-scope switch.

Suggestions

  • If a second capability ever needs policy-only data fields, promote the pattern to a ScopeSpec declaration (policy_data_fields + validator) then — don't pre-build it now, but treat a second copy-paste as the trigger.

[DESIGN-REVIEWED] 0d5e146

@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 0d5e146b7b779832da77e80f6b88c268cf9c745e and found no blocking issues.

This comment is updated in place on each push.

Review details

FINDING -- src/kiro_crew/platform/agentcore_schema.py:45 -- parsed.fragment is rejected but parsed.query is accepted, so ?token=secret passes credential-free URL validation -> Fix: reject non-empty query strings.
[GPT-REVIEWED] 0d5e146

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

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of 0d5e146b7b779832da77e80f6b88c268cf9c745e — 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.

All mechanical checks are done. Counts verified: the six non-enabled() Protocol methods, both agentcore_gateway_url/agentcore_workload_name readers, and the _agent_identity_enabled() probe each have zero consumers under src/ (tests only); governance_permits is an existing helper with 26 call sites correctly reused; the bool() coercion the PR fixes in CapabilityGate.from_dict has three unfixed siblings in the same parse function. Final review follows.

First-Principles-Verdict: CONCERNS

gateway_url / workload_name policy keys, their two readers, and the whole agentcore_schema.py module ship two PRs before anything reads them — zero consumers.

What this change ships

Intent: land the inert contract (interfaces + governance schema) that the later AgentCore identity/Gateway PRs attach to. ADDITION.

  1. RFC + implementation plan, indexed — justified (docs process followed)
  2. Policies can name capabilities.agentcore, opt-in default-off — justified (fail-closed row before any writer)
  3. enabled: true without a known posture aborts boot / disables — justified
  4. Policy gateway_url / workload_name keys + read helpers + validator module — zero consumers
  5. New agent_identity platform slot, Default disabled, nothing observable standalone — justified, declared
  6. AgentIdentityProvider Protocol + 3 dataclasses — declared; 6 of 7 methods have zero consumers (stack contract, revisable pre-launch)
  7. _agent_identity_enabled() three-conjunct probe — zero consumers (tests only)
  8. Any capability row with non-boolean enabled now refuses to compose instead of silently permitting — justified fix, rides along, declared
  9. agentcore-inbound reserved on the keystone secret-leaf list — justified (ceiling precedes writer)
  10. Profiles carrying posture/gateway_url/workload_name rejected at parse — justified

Watch

  • Item 8 fixes the bool()-coercion cause for CapabilityGate but leaves 3 identical coercions in the same parse_policy (grepped bool( in governance.py: lines 2415–2417). allow_terminal=bool("false") → True is the permissive direction — latent today (sole consumer is a CLI status line, cli_commands.py:1544), but it is the exact class the description says "must not turn into a permit".
  • The plan doc ships Tasks 5 and 6 with every step pre-checked [x] while the description says PRs 5–6 come later — carried over from feat: AgentCore identity, inbound inject, and Gateway MCP access #6387; misleading tracking state.

Subtractions

  • Defer gateway_url and workload_name: drop _apply_agentcore_gateway_url, _apply_agentcore_workload_name, both readers, both GovernanceCeiling fields, and platform/agentcore_schema.py (its only callers are those two walkers) to the stack PR that consumes them. Zero consumers today; posture alone carries this PR's fail-closed guarantee, and unknown-key-on-profile rejection already comes from _capability_raw_for_gate.

[FIRST-PRINCIPLES-REVIEWED] 0d5e146

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 0d5e146

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 0d5e146b7b779832da77e80f6b88c268cf9c745e: <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 hoang-phan98 August 28, 2026 18:56
Comment thread src/kiro_crew/platform/interfaces.py Resolved
@kyleseaman

Copy link
Copy Markdown
Contributor Author

Stack review summary

The six-PR decomposition is a substantial improvement: each layer now has a coherent trust boundary, the unrelated main-branch reversions are gone, and the ordering is mostly right. The stack is not mergeable yet.

Confirmed blockers by layer:

I would fix the base contract and principal layer first, then rebase the remaining stack before reviewing downstream behavior again. In particular, the proxy authentication design and the principal-at-session-create contract affect several later fixes.

@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 0d5e146b7b779832da77e80f6b88c268cf9c745e 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: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Aug 28, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-1-governance-1b02 branch from e559056 to 83e6eff Compare August 28, 2026 19:54
@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-1-governance-1b02 branch from 83e6eff to 3da2524 Compare August 28, 2026 20:21
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Aug 30, 2026
@bolichen97
bolichen97 force-pushed the cursor/agentcore-1-governance-1b02 branch from 163db12 to 31dd32b Compare August 30, 2026 03:21
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision labels Aug 30, 2026
bolichen97
bolichen97 previously approved these changes Aug 30, 2026

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

Re-approving after conflict-resolution rebase (single conflict in the RFC README index, both rows kept; commits squashed to one per PR Hygiene; 18 files unchanged in scope).

@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 30, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-1-governance-1b02 branch from 31dd32b to 02b4ebb Compare August 30, 2026 12:01
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Aug 30, 2026
@kyleseaman
kyleseaman force-pushed the cursor/agentcore-1-governance-1b02 branch from 02b4ebb to e16d646 Compare August 30, 2026 19:38
@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 merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Aug 30, 2026
bolichen97
bolichen97 previously approved these changes Aug 30, 2026

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

Full-diff maintainer review passed: change matches its stated scope, no regressions or trust-boundary weakening found, checks green and no outstanding change requests. Approving.

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