Skip to content

fix(ci): sync hardened reusable screenshots workflow; fix dashboard waitFor - #21

Merged
OneByJorah merged 1 commit into
mainfrom
agent/ci-fix
Oct 18, 2026
Merged

OneByJorah merged 1 commit into
mainfrom
agent/ci-fix

Conversation

@OneByJorah

Copy link
Copy Markdown
Owner

What

  • Sync reusable-screenshots.yml with the hardened version from repo-template: force-push the bot branch (regenerated wholesale each run), guard the PR-existence check to --state OPEN, and treat a concurrent PR-create race as a success outcome.
  • screenshots.mjs: dashboard waitFor now targets the rendered #page-title (visible state) instead of the permanently hidden #app-ready marker span; per-page state support added. Default port unchanged (app and compose both use 5000).

Why

The CI and CodeQL runs failed on the bot/screenshots PR (branch deleted at merge; logs unrecoverable), while identical content on main was green. This makes the screenshots pipeline race-proof and its render wait reliable for future bot PRs.

Testing

  • Ran the app locally (PORT=5000) and ran the updated script with Playwright/Chromium: dashboard.png and public.png captured, scrub checks passed.
  • Workflow YAML synced 1:1 from the hardened canonical copy (repo-template).

…ashboard render

- reusable-screenshots.yml: sync hardened copy from repo-template — force-push
  bot branch (regenerated wholesale), PR-existence check guarded to OPEN state,
  concurrent PR-create races result in success instead of failure
- screenshots.mjs: dashboard waitFor targets the rendered #page-title (visible)
  instead of the permanently hidden #app-ready marker; per-page state support
- verified locally: app serves on 127.0.0.1:5000, script captures dashboard and
  public screenshots with scrub checks passing
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 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-18T04:22:37.747907Z 7bee5ca 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: 7bee5ca4ef

ℹ️ 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".

git push --force-with-lease origin "$BRANCH"
if gh pr view "$BRANCH" >/dev/null 2>&1; then
git push --force origin "$BRANCH" # bot branch is regenerated wholesale each run
if gh pr view "$BRANCH" --state OPEN >/dev/null 2>&1; then

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 Use a command that supports state filtering

In the screenshot workflow, gh pr view --help only lists --comments, --jq, --json, --template, and --web; passing --state OPEN exits with unknown flag: --state. Consequently this condition always takes the creation path, and the catch-all || echo on gh pr create also turns real authentication, permission, API, or invalid-base failures into a successful workflow with no PR. Use an open-PR query that supports --state (such as gh pr list) and suppress only a confirmed duplicate-PR race.

AGENTS.md reference: AGENTS.md:L30-L30

Useful? React with 👍 / 👎.

@OneByJorah
OneByJorah merged commit 2865ce5 into main Oct 18, 2026
5 checks passed
@OneByJorah
OneByJorah deleted the agent/ci-fix branch October 18, 2026 04:25
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