Skip to content

Launch prep: compress hero GIF, drop star history, split render/quickstart workflows - #125

Merged
jothimani-rajendran merged 6 commits into
mainfrom
launch/block1
Sep 9, 2026
Merged

Launch prep: compress hero GIF, drop star history, split render/quickstart workflows#125
jothimani-rajendran merged 6 commits into
mainfrom
launch/block1

Conversation

@jothimani-rajendran

@jothimani-rajendran jothimani-rajendran commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

What

Launch-prep block: compress the hero GIF for mobile, drop the Star history section for
now, split render-demo.yml into demo-gif.yml with a commit-back push trigger, and
move the quickstart CI job into its own workflow backed by a generated
docs/quickstart.sh. Also a small github.repository cleanup in schemas.yml.

1. Hero GIF: 2,369,386 -> 955,293 bytes

gifsicle -O3 --lossy=60 --colors 128 (the given recipe) only reached 1,447,862 bytes,
still above the 1.2 MB target. --colors 128 stayed above target at every --lossy
value tried (60/80/100 -> 1.45 MB / 1.37 MB / 1.30 MB), so --colors was the lever that
actually moved it, not --lossy:

lossy colors bytes
60 128 1,447,862
80 128 1,366,375
100 128 1,302,075
60 64 1,196,659
80 64 1,116,001
60 32 955,293 (used)

Settled on --lossy=60 --colors 32. Verified by extracting the last frame and a
mid-recording frame with Pillow (single ImageSequence.Iterator pass, frames copied
during iteration) at both full size and the 760px width the README renders at: the
blocked-commit message and [PASS] All checks passed. line are both fully legible,
no visible banding from the terminal's already-small color set. Frame count (244),
dimensions (1200x640) and total duration (16,640ms) are byte-for-byte unchanged from
the original -- only the color/pixel encoding did. The tape was not re-rendered.

2. Star history removed

README.md lines 253-256 (heading, centered wrapper, star-history.com image) deleted.
## License is now the final section. The owner should restore this after launch.

3. render-demo.yml -> demo-gif.yml

git mv, SHA pins unchanged. Two jobs now:

  • render (workflow_dispatch, contents: read): unchanged behavior.
  • render-and-commit (push on docs/assets/demo.tape, branches-ignore: [main],
    contents: write scoped to this job only, persist-credentials: true): renders and
    commits the regenerated GIF back to the pushed branch with
    stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d
    (v7.2.0, the latest tag as of this change, resolved via git ls-remote --tags),
    commit message docs: regenerate demo.gif, file_pattern: docs/assets/demo.gif.
    main is protected with no bypass, so this can only ever land on a feature branch --
    which is the point: a tape change carries its GIF into its own PR. The commit only
    touches demo.gif, so it never re-triggers the tape-path filter.

Verified with actionlint 1.7.7 (pinned/checksummed, same as ci.yml's
template-lint job) and python -c "import yaml,sys; yaml.safe_load(open(...))" --
both clean on every workflow file in the repo.

4. quickstart job split out, docs/quickstart.sh generated

New .github/workflows/quickstart.yml (push + pull_request, ubuntu-latest,
Python 3.12): installs chock from the checkout, regenerates
docs/quickstart.sh from the README's Quick start block via the existing
tools/quickstart_block.py (still the single source of truth), diffs it against the
committed copy, then runs the committed copy with bash -euo pipefail in a fresh
mktemp -d. Removed the old quickstart job from ci.yml so it doesn't run twice.
docs/quickstart.sh carries a header noting it's generated from README.md and that
edits belong there.

Proof the job fails on a broken block (ran the workflow's own command sequence
locally, edited README.md's block to chock sync --repo . --nonexistent-flag,
then reverted before committing -- README content is unchanged in this PR):

=== diff (expected to show drift) ===
--- docs/quickstart.sh
+++ /tmp/quickstart.sh.broken
@@ -9,4 +9,4 @@
 git init -q demo && cd demo
 chock init .                       # wiring only — no policies, no opinions
 chock add scan-secrets             # pull a policy from the catalog
-chock sync --repo .                # compile + install it
+chock sync --repo . --nonexistent-flag  # compile + install it
diff exit: 1
=== running the broken block directly ===
...
usage: chock sync [-h] [--repo REPO] [--agents [AGENTS ...]] [--skip-hooks]
                  [--check] [--ci] [--skills]
chock sync: error: unrecognized arguments: --nonexistent-flag
run exit: 2

Both the diff check and the executed block fail independently, as intended.

5. Stale owner strings

grep -rn "open-coder-ai-org" --exclude-dir=.git . — clean, nothing found.

pyproject.toml's project URLs and scorecard.yml's
if: github.repository == 'open-coder-ai/chock' are hardcoded on purpose (no
Actions context in pyproject.toml; the scorecard gate is a same-repo comparison
that a variable would turn into a no-op tautology) and were left alone. One real
hit: schemas.yml's generated Pages index linked back with a hardcoded
open-coder-ai/chock string where ${{ github.repository }} is available and
correct in the same-repo context -- swapped in.

Definition of done

  • chock check → 0 errors, 0 warnings, 0 infos
  • chock check --only matrix passes (no policy/manifest behavior changed here)
  • chock sync --repo . --check clean (part of chock check, no manifests touched)
  • chock check --only verify clean (part of chock check, no manifests touched)
  • Registry rescanned; no stale entries (unaffected -- no policy changes)
  • pytest -q green (1126 passed, 6 skipped); this PR is docs/CI-only, no new checks
  • pytest acceptance/... -- not run; nothing here touches packaging, init, add
    or hook installation
  • No manifests changed, so no migration needed
  • CHANGELOG.md [Unreleased] entry added; no version bump
  • ruff check . and ruff format --check . clean

Claims

  • N/A — no enforcement surface, INSTALLED_SURFACES, or coverage table changed.

Check output tails

$ python -m pytest -q
1126 passed, 6 skipped in 137.55s (0:02:17)

$ python -m ruff check .
All checks passed!

$ python -m ruff format --check .
257 files already formatted

$ python -m chock check
...
== index freshness
== ambient conflicts
[PASS] All checks passed.

$ python3 tools/quickstart_block.py README.md | bash -euo pipefail  # (in a fresh mktemp -d)
...
scan-secrets:
  claude: enforced-at-commit
  copilot: enforced-at-commit
  gemini: enforced-at-commit

🤖 Generated with Claude Code

gifsicle -O3 --lossy=60 --colors 128 alone only reached 1,447,862 bytes
(above the 1.2 MB target); --colors 128 held the file well above target
at every lossy value tried (60/80/100), so colors was reduced instead of
lossy. Settled on --lossy=60 --colors 32 -> 955,293 bytes (from
2,369,386), verified against the last frame and a mid-recording frame
at the 760px width the README renders at: the blocked-commit message
and "[PASS] All checks passed." stay fully legible. Frame count (244),
dimensions (1200x640) and total duration (16,640ms) are unchanged --
only the color/pixel encoding did. The tape itself was not re-rendered.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Drop the Star history section (heading, centered wrapper, and the
star-history.com image) so ## License is the final section. The owner
will restore it after launch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
…igger

git mv render-demo.yml -> demo-gif.yml, SHA pins unchanged. Split into two
jobs sharing the workflow:

- render (workflow_dispatch, contents: read): unchanged behavior --
  render and upload the demo-gif artifact for manual review.
- render-and-commit (push on docs/assets/demo.tape, branches-ignore:
  [main], contents: write, scoped to this job only): renders and commits
  the regenerated docs/assets/demo.gif back to the pushed branch with
  stefanzweifel/git-auto-commit-action, pinned to v7.2.0
  (4a55954c782fc1ea30b9056cd3e7a2b40ca8887d, the latest tag as of this
  change). main is protected with no bypass, so this can only ever land
  on a feature branch, which is the point: a tape change then carries
  its GIF into its own pull request. The commit only touches demo.gif,
  so it never re-triggers the tape-path filter.

persist-credentials is true only on the push job's checkout (it must
push); the dispatch job keeps it false. Verified with actionlint 1.7.7
(pinned/checksummed, matching ci.yml's template-lint job) and
`python -c "import yaml,sys; yaml.safe_load(open(...))"` -- both clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Move the `quickstart` job out of ci.yml into .github/workflows/quickstart.yml
(push + pull_request, ubuntu-latest, Python 3.12) so it no longer runs twice.
tools/quickstart_block.py stays the single source of truth for the block; the
new job also writes docs/quickstart.sh from the extracted README block and
fails the diff if the committed copy has drifted, before running the
committed copy with `bash -euo pipefail` in a fresh `mktemp -d`. This
satisfies the "commands live in docs/quickstart.sh" ask without a second
hand-maintained copy -- the script is generated output, checked in so the
README and the executed block cannot silently diverge.

Verified locally by running the workflow's own command sequence:
- Diff clean, block runs, exit 0, against the current README.
- Edited the block to `chock sync --repo . --nonexistent-flag`: the diff
  check fails (exit 1, showing the drift) and running the (regenerated)
  block itself fails separately (`chock sync: error: unrecognized
  arguments: --nonexistent-flag`, exit 2). Reverted the edit before
  committing -- the README content is unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
schemas.yml's generated Pages index linked back to the repo with a
hardcoded "open-coder-ai/chock" string; ${{ github.repository }} is
available in this same-repo context and names the same thing without
the duplication. Left two other hardcoded occurrences alone:
scorecard.yml's `if: github.repository == 'open-coder-ai/chock'` gates
the job on the canonical public repo name on purpose (a self-comparison
would defeat it), and pyproject.toml's project URLs are plain metadata
with no Actions context to draw from.

grep -rn "open-coder-ai-org" --exclude-dir=.git . is clean -- no stale
owner string found anywhere in the tree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@jothimani-rajendran
jothimani-rajendran marked this pull request as ready for review September 9, 2026 01:32
@jothimani-rajendran
jothimani-rajendran merged commit 634e1ec into main Sep 9, 2026
17 checks passed
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.

2 participants