Skip to content

feat(sdk): add principal, reporting, and controller support - #1121

Merged
bokelley merged 2 commits into
mainfrom
port-vila-v2
Sep 3, 2026
Merged

feat(sdk): add principal, reporting, and controller support#1121
bokelley merged 2 commits into
mainfrom
port-vila-v2

Conversation

@bokelley

@bokelley bokelley commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fix comply_test_controller field forwarding and enforce the canonical request schema across MCP and A2A
  • implement every currently documented compliance-controller scenario with schema-parity coverage
  • add principal client orchestration and CAS-backed server primitives for versioning, idempotency, proofs, declarations, and destination lifecycle
  • add cumulative reporting tiers plus built-in manifest/resource inspection with hardened HTTPS retrieval, integrity validation, bounded decoding, schema safety, totals, and RFC 8785 digest verification

Safety and compatibility

  • preserves legacy optional controller arguments as explicit None values
  • rejects malformed controller requests consistently on both transports
  • requires explicit trusted origins for built-in HTTPS reporting reads
  • validates active and inactive principal notification/destination configurations
  • uses store-level compare-and-swap for cross-service principal concurrency

Verification

  • Ruff: clean
  • Black: clean on changed Python files
  • mypy: clean across 1,294 source files
  • strict adopter type checks: clean across 20 files
  • Bandit: clean on changed runtime modules
  • focused controller/A2A suite: 236 passed
  • focused principal/reporting/public API suite: 59 passed
  • post-fix import/principal regression suite: 62 passed
  • full post-rebase suite: 7,603 passed, 42 skipped, 9 deselected, 1 expected failure
  • GitHub CI: green across Python 3.10-3.13, schema drift, Postgres, storyboards, CodeQL, security, import smoke, and automated review

Closes #1110
Closes #1106
Closes #1103

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve — clean additive public-surface expansion with no blocking or medium findings.

What I checked:

  • Purely additive public surface across new modules (adcp.principal, adcp.reporting_inspection, adcp.server.principal) and type re-exports; correct feat: semver signal — no breaking removals/renames/required-flips that would demand feat!:.
  • Import layering intact: aliases.py maps traversal-order Result6/17/19 to stable names; no non-allowlisted module imports generated identifiers.
  • Security-critical paths are fail-closed and tested: HttpsReportingResourceReader is redirect-free / DNS-pinned / trusted-origins-only / IP-literal-rejecting; server principal CAS + credential-stripping keeps secrets out of state and the idempotency replay cache; reporting tiers reject reconciled_billing without managed_delivery.
  • Public API snapshot updated to match.

high_risk note: flag is true, but reasons are new files (added) or (modified) files with no medium-or-higher findings — presumed safe per the change-kind rule. No deletions. Not escalation-worthy on the flag alone.

gated_paths: false — row 2 does not apply despite review_decision: REVIEW_REQUIRED.

No no-auto-approve team match. No findings at any tier. One non-blocking observation from the reviewer: enforcing the canonical comply_test_controller schema now requires account on every call (sandbox-only, pre-1.0 conformance tightening) — worth a changelog/migration note, but not a blocking or medium finding.

Rows 1–8 do not fire → row 9 approve.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ladon verdict: Approve

Approve.

Additive PR (#1121) introducing principal/reporting/test-controller support (~4900 lines across new and modified non-generated files). No blocking or medium findings.

Checked:

  • aliases.py traversal-number→semantic mappings verified correct against generated Result classes; no codegen renumber churn breaking the alias layer.
  • Import layering and PEP 562 lazy facade preserved; no direct generated-name imports leaking out of the allowlist.
  • Semver signal holds — purely additive feat, no removals, renames, required↔optional flips, or response-shape changes on the public surface.
  • Idempotency digest correctly strips context/governance_context; no credentials landing in ctx_metadata.
  • SSRF/gzip/schema hardening in reporting_inspection.py sound; CAS concurrency loops in server/principal.py re-fence on miss.

Two non-blocking notes (not findings): the canonical schema now makes account required for every controller request including the list_scenarios probe (deliberate spec conformance — worth a changelog line), and the full suite was rerunning at authoring time (CI gates the merge).

high_risk: true is driven by modified/added files under src/adcp/server/** and src/adcp/types/**, but the reviewer surfaced no medium-or-higher concern on any modified file, and the one added file (server/principal.py) is new scaffolding — neither triggers escalation. No gated paths, no no-auto-approve team match. Rows 1–8 do not fire; falls through to row 9.

@bokelley
bokelley enabled auto-merge (squash) September 3, 2026 15:56
@bokelley
bokelley disabled auto-merge September 3, 2026 16:01
@bokelley
bokelley merged commit 19c600e into main Sep 3, 2026
28 checks passed
@bokelley
bokelley deleted the port-vila-v2 branch September 3, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant