Dropbox conformance
Experimental Dropbox conformance cases for tests and hand-run practice-account checks.
Dropbox actions are documented in the connectors package guide and the integrations reference. This page lists the experimental conformance cases only.
Conformance cases
Experimental. For tests and hand-run checks against a practice Dropbox account.
@yolk-sdk/connectors/dropbox/conformance exports conformance cases for
@yolk-sdk/conformance/runner. Every case runs the real connector actions or the host-only upload
helpers (createDropboxFile, updateDropboxFile) over the connector ports, and checks one wire
claim the connector relies on. The claims are as currently understood; none is observed live yet.
| Case id | Safety | Seeds | Claim (as currently understood) |
|---|---|---|---|
dropbox.files.list-folder-cursor-paging | read | pagingFolderPath | limit: 2 on a larger folder answers has_more and a cursor; list_folder/continue returns the rest with no repeats and still carries a cursor at the end |
dropbox.files.path-lower-lookup | read | mixedCasePath | A lower-cased path finds the same entry id; path_lower is the lower-cased path and the last path_display component keeps its casing |
dropbox.files.search-continue | read | searchQuery | max_results: 1 answers the nested { ".tag": "metadata", metadata } match, has_more, and a cursor; search/continue_v2 returns new matches |
dropbox.errors.not-found-409-envelope | read | workFolderPath | A missing path answers HTTP 409 (not 404) with error_summary path/not_found/...; the connector reports dropbox_not_found |
dropbox.files.create-folder-conflict | write-reversible | workFolderPath, runId | Creating an existing folder again, or with its name upper-cased, fails with HTTP 409 path/conflict/folder (dropbox_conflict) |
dropbox.files.delete-then-not-found | write-reversible | workFolderPath, runId | delete_v2 answers the folder metadata; get_metadata then answers not_found, and with include_deleted answers deleted metadata (unverified for folders) |
dropbox.files.copy-move-metadata | write-reversible | workFolderPath, copySourcePath, runId | Single-item copy_v2 answers { metadata } for a new file; move_v2 answers { metadata } keeping the id; no async job |
dropbox.files.upload-rev-precondition | write-reversible | workFolderPath, runId | add never overwrites and an update naming a stale rev fails with HTTP 409 (conflict); the file keeps its current rev |
A wire claim no live run has settled yet, marked "(unverified: ...)" in its case's wire:
get_metadatawithinclude_deletedanswersdeletedmetadata for a deleted folder, not only for files.
A cleanup assumption, which no case asserts: the cleanup's delete_v2 accepts the created entry's
id: form. When it does not, the cleanup falls back to the owned path, so a passing run does not
show which delete removed the folder.
DropboxConformanceConfig holds the seed paths and the runId. Cases never hard-code account data, and a missing
seed fails the case with a precondition: mismatch before any request. Credentials bind through
dropboxConformanceIntegration (dropbox.oauth, credential ref dropbox.conformance); an OAuth or
bearer token for the practice account needs files.metadata.read and files.content.write.
Every write case works only inside its own yolk-conformance-<runId>-<case> folder under
workFolderPath. The runId seed makes that namespace unique per invocation: the fixtures replay
with run-synthetic, and the live runner generates a fresh random id every time (it is never a
flag). Concurrent runs are supported only through distinct run ids. The cleanup is attempted and
verified under these conditions:
- Before writing, a case proves its folder path absent; an existing entry is a precondition failure, and nothing is written.
- The create request, its decoding, and the registration of the created entry run together without interruption, and so does every later write inside the case folder (copy, move, upload, delete): an aborted request could otherwise land after the cleanup. Neither the runner nor the bridges set a request timeout, so a hanging request delays an interruption until it answers.
- A definitive create rejection (HTTP 4xx other than 408, such as
path/conflictwhen something else created the folder first) proves the case created nothing: it fails and deletes nothing. - An ambiguous create (a transport or decoding failure, no status, HTTP 408, or HTTP 5xx) may still create the
folder later. The case makes one best-effort delete of its own path, but always fails with
DropboxConformanceActionFailed(createOutcome: 'unknown') naming the exact path: check it by hand. The same holds for the conflict case's two duplicate creates: the known original is cleaned up as usual, then the case reports the attempted path as an unknown create. - After a successful create, the cleanup deletes the entry by id and checks that
get_metadatathen answers not-found. A not-found answer to the id delete proves the entry gone; any other failure of it (a rejectedid:form, a transport failure) falls back to the owned path. The cleanup also runs after a failed assertion or a fiber interruption. A failed cleanup fails withDropboxConformanceRestoreFailednaming the path. - A create that answers a path outside the case folder is never deleted: the case fails with
DropboxConformanceCleanupRefusednaming it.
Deleted folders stay restorable in the account's deleted files for the Dropbox retention period.
In the live runner, the first SIGINT or SIGTERM (Ctrl-C) interrupts the run fiber, and the running case's cleanup is attempted before the process exits; no further case starts. The cleanup is not confirmed:
- A cleanup that fails, or a create whose outcome is unknown, while the case is being interrupted
prints its full message, with the exact path, as a WARN line (through the case's
ConformanceCleanupReporter). The run still ends as a plain interruption (exit code 130): the WARN line is the record of the problem. - After the interruption, the runner lists
workFolderPathagain (read-only, bounded as below) and print a WARN line for everyyolk-conformance-run-*folder still present.
One Ctrl-C reaches every process of the foreground group, and the wrappers relay it, so further
signals within a second count as the same keypress. A signal a second or more later exits at once
and may skip the cleanup, as does killing the process. Run live runs as
pnpm conformance:dropbox … (pnpm waits for the runner and exits with its code; observed with
pnpm 11) or ./node_modules/.bin/tsx scripts/run-dropbox-conformance.ts …. Avoid
pnpm exec tsx …: on Ctrl-C it returns to the prompt at once (observed), so the WARN and leftover
lines print after the prompt, $? is pnpm's own code rather than the runner's, and a second Ctrl-C
no longer reaches the runner; stop it with kill -TERM <pid>, using the pid the first-signal
message prints, at least a second after the first signal.
Before any write case, the runner lists workFolderPath read-only
(findDropboxConformanceLeftovers) and prints a WARN line for each yolk-conformance-run-*
folder an earlier run left behind; a work folder that does not exist yet holds none, and a failed
lookup prints its failure code. The lookup is bounded, not exhaustive: it reads at most 50 listing
pages of up to 2,000 entries each. It never deletes them. Check each one, and delete it by hand when
no run is using it. Every valid runId starts with run- (dropboxConformanceRunFolderPrefix is
yolk-conformance-run-), so the lookup covers every run, host-supplied run ids included.
The shipped fixtures are synthetic (evidence: 'unverified'). In this repository,
pnpm conformance:dropbox dry-runs by default; --live --owner-approved --account <label> (refused
whenever CI is non-empty) needs DROPBOX_ACCESS_TOKEN and the seeds, --allow-writes reversible
adds the write cases, and --record stages verified recordings only in the gitignored
.conformance-recordings/dropbox/ for manual scrubbing and promotion. See
Conformance APIs for the bridges.
For offline tests, the experimental
Dropbox emulator (@yolk-sdk/emulators/dropbox) is a
stateful, fixture-only stand-in that passes these cases through the real connector actions and
upload helpers over the connector ports; route both https://api.dropboxapi.com and
https://content.dropboxapi.com to it (each route answers only on the origin its fixtures record).
The leftover lookup fails against its default seed: no fixture records a listing of the empty work
folder, so the emulator answers it not-emulated (HTTP 400) and the runner prints its lookup-failed
WARN.