Skip to content

Add provenance for automatic turns - #691

Merged
GraciousGazelles merged 47 commits into
mainfrom
successor/automatic-turn-provenance-20260831
Sep 3, 2026
Merged

GraciousGazelles merged 47 commits into
mainfrom
successor/automatic-turn-provenance-20260831

Conversation

@GraciousGazelles

@GraciousGazelles GraciousGazelles commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • carry bounded provenance metadata for automatic policy retries through the existing client message ID
  • validate thread, trigger, attempt, and replay state before recording automatic-turn telemetry
  • preserve repeated attempts that share a turn ID without changing existing retry behavior
  • cover TUI submission, app-server/core event delivery, and state projection with focused regression tests

Validation

  • cargo fmt --manifest-path codex-rs/Cargo.toml --all
  • cargo metadata --manifest-path codex-rs/Cargo.toml --no-deps --format-version 1
  • git diff --check

Build and test execution are deferred to hosted validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces a mechanism to track, validate, and record automatic turn retries (such as after a cyber policy block) using model-opaque metadata (AutomaticTurnProvenance) carried in the client_user_message_id transport envelope. The server validates this client-provided metadata against preceding policy events stored in a SQLite database before recording the turn. Feedback on the changes points out a potential issue where duplicate or stale policy trigger events could bypass attempt limits or reset the attempt count by minting new eligibility tickets, and suggests checking if an automatic turn has already been recorded for the given trigger turn ID to prevent this.

@GraciousGazelles
GraciousGazelles force-pushed the successor/automatic-turn-provenance-20260831 branch 6 times, most recently from 842d619 to dcab5b2 Compare September 1, 2026 04:11
@GraciousGazelles
GraciousGazelles force-pushed the successor/automatic-turn-provenance-20260831 branch 2 times, most recently from 7c1d288 to 0934714 Compare September 2, 2026 10:21
@GraciousGazelles
GraciousGazelles force-pushed the successor/automatic-turn-provenance-20260831 branch from 9d29d0d to aa1b0db Compare September 2, 2026 19:42
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit e6bd6b6 Sep 3, 2026
126 of 128 checks passed
@GraciousGazelles
GraciousGazelles deleted the successor/automatic-turn-provenance-20260831 branch September 3, 2026 11:43
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.

2 participants