Dispatch awareness packets for uploadFile - #1113
Merged
Merged
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
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.
Description of change
uploadFilewas the only write mutation in eVault-core that never callednotifyAwareness— it wrote the File Meta Envelope and returned. So uploaded blobs never reached AaaS, and integrators mirrored every upload as a secondFile-ontology envelope just to make it observable, pointing their domain records at the mirror instead of the realw3ds://fileenvelope.The
w3ds-file-v1slug is not the cause. AaaS matches ontologies as opaque strings (SubscriptionMatcherdoes plain string comparison, catch-all subscriptions match everything), so such a packet would have matched all along. The missing dispatch was the whole bug.Three changes:
uploadFilenow dispatches — addednotifyAwarenessplusappendEnvelopeOperationLog, which was also missing, following the existingstoreMetaEnvelopepattern. Fire-and-forget by design: awaiting would drop into the catch block and delete a blob whose envelope was already committed.datais the stored payload verbatim, so the packet matches what a consumer reads back viametaEnvelope(id)— divergence would muddy thecontentHashdedupe in AaaS.Nine webhook controllers now ack unknown schemas with 200, matching pictique. This is load-bearing, not cleanup: catch-all subscriptions broadcast
w3ds-file-v1to every platform, andDeliveryEnginehas no 4xx short-circuit, so without it each upload would produce ~27 failed POSTs and 9 dead-letter rows. In esigner and file-manageraddToLockedIdsalso moved below the guard so an unconsumed packet does not needlessly lock that id for 15s.Docs — the new awareness behaviour, the ack-unknown-ontology contract, and a 50 MB → 250 MB drift fix (code enforces 250 MB). The two guides that taught the throwing pattern are corrected so new platforms do not inherit it.
The
w3ds-file-v1slug is unchanged and stays non-overridable: it gates theGET /files/:metaEnvelopeIddereference, and the storage-layer vs application-layerFileontology split is deliberate.Issue Number
Closes #1112
Type of change
How the change has been tested
New
uploadFile-awareness.spec.ts(4 tests, e2e against testcontainers):w3ds-file-v1, withoperation: "create", the ownerw3id, the MetaEnvelope id, andrequestingPlatformforwardeddataequals the stored envelope payload exactly, asserted by reading it back viametaEnvelope(id)Full evault-core suite: 188 passed / 18 files, no regressions. Typecheck clean across evault-core and all nine touched platforms. Biome error count identical before and after (38 pre-existing).
Not covered: the webhook-controller change has no unit tests — no platform API has a test harness (no
testscript, no spec files, controllers coupled to module-level adapter singletons), and the repo-leveltests/dir is a staging load-test suite against live URLs. Those edits are verified by typecheck and review only.Worth watching on staging after deploy: the AaaS
deliveriestable should show catch-all deliveries asdelivered, notfailed/dead. That check depends on the nine platforms being redeployed too, not just eVault-core.Change checklist