Conversation
Reduce emission-ordered produced events by exact output identity so overwritten content and superseded approvals cannot remain eligible for completion. Preserve the raw event history at the caller and document the observation boundary.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Product defect
A GTM operator can correct an offer, overwrite a deliverable, or withdraw an approval.
extractProducedStatecurrently appends every historical version, so completion can still match text or approval from a superseded version. GTM's producer already emits stable output identities expecting the latest write to be authoritative.Change
Use the existing normalization point, not a product-local deduplicator. Artifacts reduce by exact name/URI/id fallback; proposals reduce by proposal ID. The latest observation replaces content/status, including missing content or a rejection. Distinct paths stay distinct and first-seen identity order remains deterministic. Raw history remains with the caller.
No new API, runtime dependency, agent loop, or GTM policy.
docs/produced-state.mdexplains the behavior change, ordering requirement, and evidence limits.Verification
Executed the candidate TypeScript source through TypeScript transpilation and Node assertions: 13/13 focused checks passed. Reverting the map reduction to the baseline append behavior passes 5/13 and fails 8/13, including superseded content and approved-to-rejected proposals. Added the corresponding Vitest regression file.
The focused check is not a full package signoff.
pnpm typecheck, build, verify:package, and the full Vitest suite were not run: this environment has Node/TypeScript but no installed repository dependency tree and cannot resolve the registry. No benchmark digest or release version was fabricated.Scope
This establishes current observed state for an emission-ordered input, not a provider transaction or live sale. Tool names remain invocation evidence, not successful-effect receipts. Consumers must collect independently verified payment/delivery outcomes and preserve trace ordering. GTM should consume the normal published package release; do not copy this reduction into the application.