Skip to content

3033: [factory] Successful Slack receipt is re-ingested as a write and rejected on read-only ts - #422

Open
agent-relay-code[bot] wants to merge 5 commits into
mainfrom
factory/3033-agentworkforce-relayfile-fee96ee4
Open

agent-relay-code[bot] wants to merge 5 commits into
mainfrom
factory/3033-agentworkforce-relayfile-fee96ee4

Conversation

@agent-relay-code

@agent-relay-code agent-relay-code Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

After Relayfile provider-confirmed a Slack reply_in_thread, a follow-on operation reprocessed the materialized result and attempted to write Slack's read-only ts field. The user-visible delivery succeeded, but the lifecycle then emitted a contradictory failure.

A provider receipt must be terminal evidence for that operation, not new writable provider input. This is distinct from the missing-writeback-scope failure tracked in #2029.

Production evidence

Observed on 2026-08-15 while replying to the engineering-triage Slack thread.

Successful operation:

  • Relayfile op: op_232967
  • provider: Slack
  • action: reply_in_thread
  • endpoint: /chat.postMessage
  • HTTP status: 200
  • channel: C0B9Z4CLG1J
  • provider message ts: 1786747030.233189
  • acknowledged at: 2026-08-14T22:37:11.171Z

Follow-on failure:

  • Relayfile op: op_232968
  • error: Field "ts" is read-only and cannot be written

The second failure did not undo delivery, but it makes success ambiguous and can provoke retries or duplicate notifications.

Required behavior

  • Separate requested write payloads from materialized provider receipts.
  • Never feed provider-owned/read-only fields such as Slack ts back into create/update inputs.
  • Treat the provider-confirmed receipt for op_232967 as terminal and idempotent.
  • Reconciliation may enrich local state from the receipt, but must not synthesize a second provider write.
  • Surface any post-success bookkeeping failure separately from delivery outcome.

Definition of done

  • Regression fixture reproduces a successful reply_in_thread receipt containing ts and proves no follow-on provider write is generated.
  • Replaying/reconciling the same mounted receipt is a no-op and cannot duplicate the Slack message.
  • Delivery status remains succeeded if later local bookkeeping fails, with the bookkeeping error reported separately.
  • Add contract coverage for provider-owned fields across create/reply/update paths.
  • Verify with a provider-style receipt through the built runtime/writeback path.

Related: #2029

Fixes #3033

Review in cubic

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9e07842b-baa6-465d-a1d4-773107424988

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@agent-relay-code

Copy link
Copy Markdown
Contributor Author

@codex review 3035f66 for the Slack receipt regression, event and digest propagation, ACL preservation and store batching. Please cite the reviewed SHA and give findings or verdict.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge; no new actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

The PR separates requested writes from provider receipts and keeps confirmed delivery successful when local bookkeeping fails.

  • Slack writes use the saved request without provider-owned fields.
  • Successful provider receipts complete the write and reconcile drafts locally.
  • Delivery stays successful when local bookkeeping fails.

All three earlier, unnumbered findings are addressed: acknowledgment replays retry failed saves, the HTTP test uses parallel table cases, and receipt reconciliation has digest-content and non-recursion coverage.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Requested write] --> B[Save requested payload]
  B --> C[Call provider]
  C --> D[Successful receipt]
  D --> E[Keep delivery succeeded]
  E --> F[Reconcile local file without another provider write]
  E --> G[Report local save errors separately]
  H[Replay or late callback] --> I{Already succeeded?}
  I -->|Yes| J[Keep original receipt]
Loading

Reviews (3) · Last reviewed commit: "Keep acknowledged receipts terminal acro..." · Reviewed by Greptile

Comment thread internal/relayfile/store.go Resolved
Comment thread internal/httpapi/server_test.go Resolved
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Relayfile Eval Review

Run: .relayfile/evals/runs/2026-12-01T04-37-24-749Z-HEAD-provider
Mode: provider
Git SHA: 23b3f97

Passed: 4 | Needs human: 0 | Reviewable: 0 | Missing output: 0 | Failed: 0 | Skipped: 0

Human Review Cases

No reviewable human-review cases captured Relayfile output.

@agent-relay-code

Copy link
Copy Markdown
Contributor Author

For the agent-relay-code author lane: Skip’s independent local Codex review requests changes at e0ca5eb9.

  1. P1, terminal success. At store.go:4519, recheck terminal success after the unlocked callback returns and the operation is reloaded. Add a regression where another caller records success before the late callback returns. Verify the successful acknowledgment survives and delivery stays out of the queue.
  2. P2, success timestamp. At store.go:3573, ensure the first successful acknowledgment records its success time even when an earlier failure has a timestamp. Cover failure followed by success, then a repeated acknowledgment.
  3. P2, Python SDK compatibility. At types.py:419, preserve the tenth positional argument of OperationStatusResponse as provider_result. Add a regression using the existing ten-argument constructor and verify bookkeeping_error can be supplied separately.

Please return the successor SHA and focused test results. The Go findings came from source inspection. Skip reports 11 hosted CI checks passed and two skipped; a hosted Codex verdict is unavailable.

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