Skip to content

fix(provenance): preserve completions and isolate tool identities - #7630

Merged
icecrasher321 merged 1 commit into
stagingfrom
codex/fix-provenance-completion-boundaries
Sep 9, 2026
Merged

fix(provenance): preserve completions and isolate tool identities#7630
icecrasher321 merged 1 commit into
stagingfrom
codex/fix-provenance-completion-boundaries

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve block provenance through initial and resumed workflow execution into table cells, and project only public output into streams.
  • Scope provider tool-call IDs at the stream boundary so persistence, confirmations, permissions, and deduplication stay isolated between runs; restore provider IDs when resuming execution.
  • Seal watchdog failures through the existing completion writer and preserve winning completions during settlement races.
  • Move the shared path getter from lib/table/pluck.ts to @sim/utils/object. Keep provenance flags and legacy compatibility behavior.

Type of Change

  • Bug fix

Testing

  • Bun 1.4.1: 564 targeted tests passed across 22 suites, including real local PostgreSQL and Redis integration tests; 18 shared object utility tests passed.
  • Covered callback-to-table persistence and retry behavior, public stream payloads, repeated provider IDs across runs, checkpoint/resume translation, watchdog sealing, and completion races.
  • Full monorepo lint and type checking, all 46 repository audits, API validation, block registry, and docs manifest checks passed.
  • Deployment verification remains after merge; integration tests use isolated local services.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 9, 2026 12:16am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or repository-rule violations identified.

Summary

  • Introduces run-scoped provider-to-canonical tool-call identity translation.
  • Enforces durable async-tool ownership across concurrent runs.
  • Carries completion provenance into table-cell writes and resumed workflows.
  • Projects only public block output through API, chat, service, and resume streams.
  • Moves the shared nested-path reader into @sim/utils/object.
  • Adds unit and PostgreSQL/Redis integration coverage for identity, provenance, and settlement races.

Diagram

sequenceDiagram
  participant Go as Go provider
  participant Stream as Copilot stream boundary
  participant Identity as Run identity map
  participant Tools as Tool executor
  participant Store as Async-tool storage
  participant Workflow as Workflow executor
  participant Table as Table cell writer
  participant Client as Public stream client

  Go->>Stream: Tool event with provider call ID
  Stream->>Identity: Scope ID using run namespace
  Identity-->>Stream: Canonical Sim call ID
  Stream->>Tools: Dispatch canonical tool event
  Tools->>Store: Persist and settle run-owned tool call
  Store-->>Tools: Winning terminal state
  Tools->>Identity: Restore provider ID for resume
  Identity-->>Go: Resume result with provider call ID

  Workflow->>Table: Completion envelope with provenance
  Table->>Table: Persist selected output and provenance
  Workflow->>Client: Project output and outputBlockId only
Loading

@icecrasher321
icecrasher321 merged commit a1cf7ed into staging Sep 9, 2026
35 checks passed
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