Document versioned file reads, guarded saves and conflict recovery

Merged
SS
1mo ago
+532-24

A developer following the file reference could not discover how to warn before overwriting someone else's newer draft. Document the versioned read and conditional save added by API #1044, including copyable requests, per-file receipts, partial success, conflict/deleted-target recovery and fresh upload URLs for retries.

The canonical source covers include_revision, returned sha/encoding, files[].expected_sha, supported paths/binary/size limits and the 200/409/500 outcomes. The full recovery explanation lives in the operation; the field points to it. Only participating saves are protected, and saving a repository file does not update a running sandbox. Client adoption and company-fact acceptance remain separately tracked in #361.

The shared generator freezes request/response examples for API #1045's eight tests. Explicit declaration checks catch omitted optional fields; the rendering assertion checks individual strong elements and rejects a demonstrated formatting counterexample. Existing callers and endpoint behavior are unchanged.

API #1045 is merged as 6c2fa42cc1bff59393ef138c34e9edd324dbf037; the documentation fixture follow-up #1047 is merged as 8deea619e16c2499cf652f18df6671d59398ccdd. Final candidate 9a6421496074921ffa5abce34e7788514abf6701 pins that actual API merge. Its delta from reviewed f5e3ff6 changes only the inventory source commit and the status note to reflect the merged API work and bounded test coverage. The merged API and reviewed #1047 source have identical trees.

Validation repeated for this candidate: all 460 tests / 111 files; 11 docs tests / three files; five response-contract and one inventory Python tests; shared fixture/inventory checks against actual API 8deea619; diff checking; required normal production build including TypeScript. The prior six-path local HTTP receipt verifies unchanged documentation content. Final-head remote checks and Vercel preview pass at 9a64214. Cubic's independent incremental review reports zero issues in the two-file delta; no unresolved threads are observed. CodeRabbit skipped its review, which is not approval. Coordinator retains the final merge decision.

File-length advisories were explicitly treated as nonblocking: the maintained instructions define no 100-line file cap, and the generator/coordinated artifact already exceeded that size. No independent agreement with that disposition is implied. The declaration, rendering, missing-target, duplicated-copy and metadata findings are repaired and recorded in #361.

After coordinator merge, refresh Docs #378 from the actual Marketing merge; verify source parity and obtain the UI owner's independent exact-head delta review/checks before its merge. Docs #377 is already preserved. Verify publicly served formats after publication. No manual deployment, hosted customer write or feature activation is included. Tracks mono #361.