Skip to content

Dispatch awareness packets for uploadFile - #1113

Merged
coodos merged 1 commit into
mainfrom
fix/upload-aas
Aug 21, 2026
Merged

Dispatch awareness packets for uploadFile#1113
coodos merged 1 commit into
mainfrom
fix/upload-aas

Conversation

@coodos

@coodos coodos commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description of change

uploadFile was the only write mutation in eVault-core that never called notifyAwareness — it wrote the File Meta Envelope and returned. So uploaded blobs never reached AaaS, and integrators mirrored every upload as a second File-ontology envelope just to make it observable, pointing their domain records at the mirror instead of the real w3ds://file envelope.

The w3ds-file-v1 slug is not the cause. AaaS matches ontologies as opaque strings (SubscriptionMatcher does 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:

  1. uploadFile now dispatches — added notifyAwareness plus appendEnvelopeOperationLog, which was also missing, following the existing storeMetaEnvelope pattern. Fire-and-forget by design: awaiting would drop into the catch block and delete a blob whose envelope was already committed. data is the stored payload verbatim, so the packet matches what a consumer reads back via metaEnvelope(id) — divergence would muddy the contentHash dedupe in AaaS.

  2. Nine webhook controllers now ack unknown schemas with 200, matching pictique. This is load-bearing, not cleanup: catch-all subscriptions broadcast w3ds-file-v1 to every platform, and DeliveryEngine has no 4xx short-circuit, so without it each upload would produce ~27 failed POSTs and 9 dead-letter rows. In esigner and file-manager addToLockedIds also moved below the guard so an unconsumed packet does not needlessly lock that id for 15s.

  3. 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-v1 slug is unchanged and stays non-overridable: it gates the GET /files/:metaEnvelopeId dereference, and the storage-layer vs application-layer File ontology split is deliberate.

Issue Number

Closes #1112

Type of change

  • Fix (a change which fixes an issue)
  • Docs (changes to the documentation)

How the change has been tested

New uploadFile-awareness.spec.ts (4 tests, e2e against testcontainers):

  • packet is dispatched and stamped w3ds-file-v1, with operation: "create", the owner w3id, the MetaEnvelope id, and requestingPlatform forwarded
  • data equals the stored envelope payload exactly, asserted by reading it back via metaEnvelope(id)
  • no dispatch when the upload is rejected (invalid base64)
  • no dispatch when the object-store write fails

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 test script, no spec files, controllers coupled to module-level adapter singletons), and the repo-level tests/ 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 deliveries table should show catch-all deliveries as delivered, not failed/dead. That check depends on the nine platforms being redeployed too, not just eVault-core.

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fe017196-f769-425f-882a-aae35acf9d45


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

Comment @coderabbitai help to get the list of available commands.

@coodos
coodos merged commit 0f1f2d4 into main Aug 21, 2026
6 checks passed
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.

[Bug] uploadFile never dispatches an awareness packet, so uploads are invisible to AaaS

1 participant