Skip to content

fix(dashboard): require goal update confirmation - #818

Merged
izadoesdev merged 3 commits into
stagingfrom
codex/agent-goal-confirmation
Sep 18, 2026
Merged

izadoesdev merged 3 commits into
stagingfrom
codex/agent-goal-confirmation

Conversation

@izadoesdev

@izadoesdev izadoesdev commented Sep 17, 2026

Copy link
Copy Markdown
Member

Goal updates previously bypassed the preview and confirmation used by other agent mutations. Omitted or false confirmation now reads the current goal and returns the proposed fields without writing; confirmed updates apply only the supplied fields. Empty updates return without requesting approval or writing, avoiding unnecessary definition rechecks.

This fixes the native goal tool used by Slack and dashboard agents. The external MCP server has a separate wrapper that already requires confirmation. The confirmation flag remains a conversational contract, not a server-authenticated approval or a stored, immutable payload. A short internal skill note documents the verified routing.

Validation: 31 focused AI tests, 963 AI tests, 95 Slack tests, root lint, all 33 typecheck tasks, and all 29 pre-push test tasks passed. Regression coverage checks omitted/false/true confirmation, exact mutation inputs, false field values, and empty updates. The no-op regression failed before the fix and passed afterward. The AI suite skips 33 integration tests requiring external services. Independently reviewed.

Independent of #820 and #821, which touch separate files. No migrations, new dependencies, environment variables, or user setup. Maintainer-directed, AI-assisted implementation and review.

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
databuddy-status Ready Ready Preview Sep 18, 2026 8:25am UTC
2 Skipped Deployments
Project Deployment Actions Updated
dashboard Skipped Skipped Sep 18, 2026 8:25am UTC
documentation Skipped Skipped Sep 18, 2026 8:25am UTC

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f16ca4d6-0b45-41d0-ac0b-a1a2aa155db6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unkey-deploy

unkey-deploy Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Unkey Deploy

Name Status Preview Inspect Updated (UTC)
links (preview) Ready Visit Preview Inspect Sep 18, 2026 8:25am

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule issues remain.

Summary

This PR adds an explicit preview-and-confirmation flow to native goal updates while preserving partial-update semantics.

  • Defaults omitted confirmation to false and previews the proposed changes alongside the current goal.
  • Writes only defined fields after explicit confirmation.
  • Treats empty updates as no-ops without requesting confirmation or invoking the update procedure.
  • Adds regression coverage for omitted, false, and true confirmation values, false-valued fields, and empty updates.
  • Documents that shared conversational agents use native goal tools while the external MCP server uses separate wrappers.
  • The previous namespace-import rule violation is fixed, and its thread is resolved.

Diagram

sequenceDiagram
  participant A as Agent
  participant T as update_goal
  participant R as Goals RPC
  A->>T: Update fields, confirmed omitted/false
  T->>R: getById(id)
  R-->>T: Current goal
  T-->>A: Preview and confirmation required
  A->>T: "Same update, confirmed=true"
  T->>R: update(id, defined fields)
  R-->>T: Updated goal
  T-->>A: Success
Loading

Reviews (2) · Last reviewed commit: "test(ai): isolate goal confirmation case..."

Comment thread packages/ai/src/ai/tools/goals.test.ts Outdated
@vercel
vercel Bot temporarily deployed to Preview – dashboard September 18, 2026 08:24 Inactive
@vercel
vercel Bot temporarily deployed to Preview – documentation September 18, 2026 08:24 Inactive
@izadoesdev
izadoesdev marked this pull request as ready for review September 18, 2026 08:25
@izadoesdev
izadoesdev merged commit 5f5df9b into staging Sep 18, 2026
22 checks passed
@izadoesdev
izadoesdev deleted the codex/agent-goal-confirmation branch September 18, 2026 08:30
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.

1 participant