test(api): 7.1 golden contract fixtures — sanitized JSON snapshots for the file/folder wire contract (#223) #229
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!229
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/contract-goldens"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Dev-plan 7.1 deliverable: golden request/response contract fixtures in CI — the pinned target the iOS migration (next slices) moves onto. Complements ContractPinningTests (property-NAME sets) with exact VALUE snapshots: an alias flip (mime_type/content_type), a date-format change, or a nullability drift now breaks a test FIRST, before any client.
13 sanitized snapshots in tests/fixtures/golden/: folders create/get/rename/list/children/root/root_contents (POPULATED — subfolder + both upload paths feed the listings), chunked upload-url → blob → complete, multipart 201 raw-DTO shape, file rename, download headers, delete 204s.
Sanitizer: GUIDs (whole-string or embedded in storage_path/upload_url, lookaround-guarded) → stable
<owner-N>/<tenant-N>/<root-1>/<folder-N>/<guid-N>placeholders; ISO-8601 →<ts>; base64-shaped >48 chars →<b64>;namefields exempt (a long name is contract, not noise); keys sorted recursively; LF-pinned indented JSON.Mechanics: UPDATE_GOLDEN=1 regenerates locally (skips the presence gate; refuses under CI=true — regeneration is local-only, a diff fails the PR); fixture-set drift (deleted endpoints) also fails.
Review: dual-pass — ponytail checklist inline + full correctness pass. Reviewer empirically verified determinism (byte-identical regeneration with fresh GUIDs, working skip, working drift failure, no cross-test interference path). Findings all fixed: populated-children/root_contents coverage gap (the Important one — these are exactly the surfaces iOS migrates onto), CRLF-on-Windows regen pin, base64url-mangling lookarounds,
name-collapse blind spot, exact fixture-set gate, CI regen hard-guard, doc/type residue, restored collateral getSettings test.Known blind spots (documented): shares/classification/GetFolderKey/rotate pinned elsewhere or later slices; server pre-query breadth + cache warming at unlock recorded in #222.
Gates: full suite 1099 green (incl. 2 new tests), fixture set gate, regen determinism ×2.