Skip to content

ci: keep the published demo GIF intact when rendering fails #596

Open

Description

@yeongseon

Problem observed in source

demos/record_demo.sh correctly checks the Python MCP demo's recorded exit code before rendering, but then calls:

agg --theme github-dark --font-size 14 --last-frame-duration 4 "$cast" docs/demo.gif

The converter writes directly to the tracked published artifact. If agg errors or is interrupted while writing, the old known-good docs/demo.gif can be truncated/replaced with a partial output. This is independent of the open demo-result validation PR #593, which changes demos/mcp_demo.py.

This is a source-level failure-path finding; no real agg failure was induced here.

Small change

  • Render into a temporary GIF in the same destination filesystem, and replace docs/demo.gif only after a successful agg exit and basic nonempty-file validation.
  • Clean up the temporary GIF/cast/status on failure or signal; preserve the existing demo exit-code check, stop-on-error behavior and no-secret recording.
  • Keep the published demo's content/output location unchanged on success.

Acceptance criteria

  • Offline shell regression with fake asciinema/agg: failed converter and missing/empty output preserve the original GIF byte-for-byte.
  • Successful render updates the GIF exactly once, leaving no temporary files; no CUBRID required for this fake-tool check.
  • Existing demos/record_demo.sh workflow and README links remain valid; report optional real-recording verification separately.
  • No MCP tool, SQL safety, environment/permissions, publishing workflow or release version changes.

Coordinate with #593 if both demo-related PRs are active; they own different files and failure boundaries.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus: needs triageNot yet looked at by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions