Repository navigation
fix(events): log why uploads are rejected or fail, without client-chosen names - #76
Merged
Merged
Conversation
A rejected upload now carries a closed reason and stage in its 400 body and log line, with a privacy-safe batch description: size, event-name counts, the client's appVersion, buildChannel and contractRevision when they match their formats, a user-agent family, and for a property rejection the key. The body is read before the token check so token rejections keep that context. An internal failure logs the ingestion step, error class and name, and a closed storage error kind, never the message. Maintenance, identity-link and deletion failures log the same error diagnostics. Validation strictness is unchanged. Desktop's uploader ignores the body of an unsuccessful response, so the extra 400 fields are compatible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desktop's turn and delivery fields (retryAttempts, failure details, runtime-change details, oldestEventAgeBucket) were missing from the gateway's copy of the contract-v11 corpus. Regenerated with generateConformance.ts; --check passes against desktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review (Codex): a tokenless request could get any name of a valid shape, such as one with an IP address, into the rejection log. Only names of lowercase words joined by dots, as Scient's code writes them, are logged; anything else is counted as "(other)". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-check (Codex): a name pattern cannot tell an event name from one that carries a person's name (patient.john.smith). Nothing is authenticated when a batch is rejected, so its log keeps only counts, the rejected event's position, the client's release fields and the reason; no event names or property keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
Deploying scientfactory-website with
|
| Latest commit: |
74465eb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7f5c2493.scientfactory-website.pages.dev |
| Branch Preview URL: | https://claude-events-diagnostics-20.scientfactory-website.pages.dev |
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.
What
The events gateway now explains why it rejected or failed an upload.
reasonandstage(headers,body,size,batch,event,privacy).appVersion,buildChannelandcontractRevision, only when they match their formats;error_kind, never the error message.fixtures/contract-v11.json) is regenerated from Desktop's contract (generateConformance.ts --checkpasses).Why
validation.internal.Testing
vitest(187 passed, 2 opt-in skipped),events:typecheck,oxfmt --check.Documentation impact: Updated — README.md
Deploy (manual, needs the owner's go): merge, run
bun run check, thenbun run events:deploy. No migrations, secrets or binding changes. Afterwards, confirmworker_versionon/health.🤖 Generated with Claude Code