Skip to content

Transfer-artifact schema, stdlib reader and synthetic fixture (SM-CORE2) - #24

Merged
DatMoshu merged 3 commits into
mainfrom
worker/sm-core2-rebased
Oct 7, 2026
Merged

DatMoshu merged 3 commits into
mainfrom
worker/sm-core2-rebased

Conversation

@DatMoshu

@DatMoshu DatMoshu commented Oct 7, 2026

Copy link
Copy Markdown
Owner

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.json and docs/transfer-artifact.md describe the artifact; GUO's director reviews the schema before the exporter story.
  • Deterministic synthetic fixture, kept byte-exact across checkouts (-text in .gitattributes, merged as the union with PR Add UO_Model3D v13 by Levy (shared with the artist's permission) #22's LFS lines).
  • pytest 124 passed, 1 skipped (needs UO client data); outfit-lab OK; agents check clean.

🤖 Generated with Claude Code

DatMoshu and others added 2 commits October 6, 2026 21:57
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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T03:03:34.714665Z 875cde7 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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]:)(?!/)(?!.*\\\\)(?!.*(^|/)\\.\\.(/|$))[^\\\\]+$"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread common/transfer.py
Comment on lines +218 to +219
for entry in manifest["animation"]["actions"]:
action = entry.get("action")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@DatMoshu
DatMoshu merged commit 1386e86 into main Oct 7, 2026
2 checks passed
@DatMoshu
DatMoshu deleted the worker/sm-core2-rebased branch October 7, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant