Repository navigation
Transfer-artifact schema, stdlib reader and synthetic fixture (SM-CORE2) - #24
Conversation
spritemotion.transfer reads a finished export through one reader: schema check when jsonschema is present, and always path/traversal, missing file, sha256, PNG-size, mirror-map and frame-coverage checks. Fixture and its deterministic generator are synthetic only. Documented in docs/transfer-artifact.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 875cde78f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "description": "Path relative to the artifact directory, forward slashes, no '..', not absolute. The reader enforces this too.", | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "pattern": "^(?![A-Za-z]:)(?!/)(?!.*\\\\)(?!.*(^|/)\\.\\.(/|$))[^\\\\]+$" |
There was a problem hiding this comment.
Reject empty segments in schema paths
A producer relying on the published schema can emit paths such as frames//image.png or frames/, because this pattern does not reject empty path segments. The standard-library reader rejects those same values in safe_path, so an artifact can pass schema validation but fail the canonical reader; extend the pattern to enforce the reader's path contract.
Useful? React with 👍 / 👎.
| for entry in manifest["animation"]["actions"]: | ||
| action = entry.get("action") |
There was a problem hiding this comment.
Validate action entries before dereferencing them
When an animation.actions element is null, a list, or another non-object value, this call raises a raw AttributeError. Schema validation happens only after _read_frames and jsonschema is optional, so malformed external artifacts violate read's documented contract of reporting problems as TransferError; check that each entry is a dictionary before calling .get.
Useful? React with 👍 / 👎.
- Define "animation group" (action, stored direction) in the doc and schema. - equipment.tiledata is now exactly GUO's tiledata-item keys (flags as an integer bit field, no anim); reader rejects equipment.layer vs tiledata.layer mismatch. - Doc notes: 15-bit/1-bit alpha, importer limits, frame_delay_ms metadata. - A non-object frame centre raises TransferError, not AttributeError. - Tests for each; schema_version stays 1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SM-CORE2, accepted by spritemotion-director at 875cde7 (rebased onto main dbc8a9a).
spritemotion.transfer: stdlib-only reader for the transfer artifact.common/schemas/transfer-artifact.schema.jsonanddocs/transfer-artifact.mddescribe the artifact; GUO's director reviews the schema before the exporter story.-textin .gitattributes, merged as the union with PR Add UO_Model3D v13 by Levy (shared with the artist's permission) #22's LFS lines).🤖 Generated with Claude Code