fix(pushSmartForm): reconcile missing file id after create#78
fix(pushSmartForm): reconcile missing file id after create#78gh-corezoid wants to merge 1 commit into
Conversation
When the batch create response omits a file's id, instead of aborting with an opaque error, re-fetch the env struct to recover the id and update .manifest.json. This prevents the caller from retrying a create that already succeeded, which produced duplicate files/pages on each retry. If reconciliation also fails, a distinct error is surfaced — "run pullSmartForm to reconcile before retrying" — clearly distinguishable from a total failure where nothing happened. Adds reconciledFiles field to the success response so callers can see when recovery was needed. install: 6054ea78-1ace-49ad-8e81-e64cdb7b97d6 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Review
Checklist
Build detail: Issues found
This review was generated automatically. A human maintainer should still make the merge decision. |
Summary
pushSmartFormno longer aborts immediately when the batch create response omits a file idapp_content/struct/{actorId}/{envId}) to recover the server-assigned id and writes it to.manifest.jsonreconciledFilesfield in the response lists the affected pathsContext
tool: pushSmartForm | version: 2.3.5 | install: 6054ea78-1ace-49ad-8e81-e64cdb7b97d6
Root cause
The batch POST to
/papi/1.0/app_content/{actorId}sometimes returns a response that is missing one or more of the created files (id absent or object omitted). The old code returned a bare[Error] server did not return id for created fileimmediately — without writing the manifest — so retrying re-sent the same create and produced a duplicate file on the server on every attempt.Checklist
make buildpassesmake vetpassesmake testpassesmake discoveryrun — nopublic/changes (tool interface unchanged)Test plan