Skip to content

feat(human): add confirmation presenter contract - #93

Open
ben-ranford wants to merge 5 commits into
feat/53-modal-focus-lifecyclefrom
feat/63-confirmation-presenter
Open

ben-ranford wants to merge 5 commits into
feat/53-modal-focus-lifecyclefrom
feat/63-confirmation-presenter

Conversation

@ben-ranford

Copy link
Copy Markdown
Owner

Summary

Closes #63

  • Add an opt-in, renderer-neutral human confirmation presenter contract with a redacted view containing only action identity, safety, and expiry.
  • Route explicit confirmation through action.Registry; cancellation revokes the exact issued grant without invoking its action.
  • Document host-owned modal focus restoration with the existing focus.ModalLifecycle.

Validation

  • go test ./action ./runtime/human -count=1
  • go test -race ./action ./runtime/human -count=1
  • make generated-refresh
  • make ci (exit 0)

Release Notes

  • Added an opt-in confirmation presenter contract for human hosts. Presentations are redacted and cannot automatically approve actions.

Scope firewall: this stacked PR depends on #53 only for the documented modal focus lifecycle. It adds no transport or controller framework and does not change authorization, root dependencies, Go floor, existing wire behavior, or canonical encodings.

@ben-ranford ben-ranford added area:runtime Terminal lifecycle, events, input, cancellation, and effects type:feature Additive user-facing library capability or workflow priority:p2 Normal milestone priority labels Sep 13, 2026
@ben-ranford ben-ranford self-assigned this Sep 13, 2026
@ben-ranford ben-ranford added this to the v1.1.0 milestone Sep 13, 2026
@ben-ranford
ben-ranford marked this pull request as ready for review September 13, 2026 12:18
@ben-ranford
ben-ranford requested a lite review from Copilot September 13, 2026 12:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T14:34:41.390637Z 303bd61 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

🟡 Changes recommended

Unresolved critical confirmation replay and action-mismatch issues, plus presenter error handling, block approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds an opt-in, renderer-neutral human confirmation presenter contract with redacted views, registry-backed resolution, cancellation, tests, documentation, and refreshed inventories.

Changes:

  • Adds confirmation presenter and resolution flow.
  • Adds grant cancellation and lifecycle tests.
  • Updates security documentation and generated inventories.

Review findings:

  • Critical (3 votes): Cancellation must retain a revocation tombstone to prevent replay.
  • Critical (1 vote): Reject confirmation grants whose action ID differs from the invoked action.
  • Moderate (1 vote): Preserve presenter errors instead of reporting every failure as cancellation.
  • Nit (3 votes): Add the required Unreleased changelog entry.
File summaries
File Summary
scripts/rigor/generated/public-api.txt Updated exported API inventory.
scripts/rigor/generated/dependency-inventory.json Updated dependency inventory.
runtime/human/confirmation.go Implements the presenter contract and confirmation flow.
runtime/human/confirmation_test.go Tests confirmation behavior and redaction.
docs/security.md Documents confirmation security and modal focus integration.
action/action.go Adds confirmation cancellation support.
Review details

Suppressed comments (1)

runtime/human/confirmation.go:74

  • An error from PresentConfirmation is discarded and reported as CONFIRMATION_INVALID: confirmation cancelled, even when the host failed rather than the person canceling. Callers cannot distinguish a renderer/context failure from an explicit cancel to decide whether to retry; handle err separately and return an appropriate failure result while still revoking the grant.
	if err != nil || decision != ConfirmationConfirmed {
		f.Registry.CancelConfirmation(grant)
		return confirmationRejected(call, action.ConfirmationInvalid, "confirmation cancelled")
  • Files reviewed: 4/6 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread action/action.go
Comment thread runtime/human/confirmation.go Outdated
Comment thread docs/security.md

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 280f7009f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread runtime/human/confirmation.go Outdated
@ben-ranford
ben-ranford marked this pull request as draft September 13, 2026 13:44
@ben-ranford
ben-ranford marked this pull request as ready for review September 13, 2026 13:44

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16c2aebc02

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread runtime/human/confirmation.go Outdated
@ben-ranford
ben-ranford marked this pull request as draft September 13, 2026 14:28
@ben-ranford
ben-ranford marked this pull request as ready for review September 13, 2026 14:28
@sonarqubecloud

Copy link
Copy Markdown

@ben-ranford
ben-ranford force-pushed the feat/53-modal-focus-lifecycle branch from ff6fdb8 to a15ec4c Compare September 15, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:runtime Terminal lifecycle, events, input, cancellation, and effects priority:p2 Normal milestone priority type:feature Additive user-facing library capability or workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants