Skip to content

refactor: Playwright + sprint work log + auto-flow#3

Merged
gpwork4u merged 1 commit intomainfrom
refactor/playwright-worklog-autoflow
Apr 4, 2026
Merged

refactor: Playwright + sprint work log + auto-flow#3
gpwork4u merged 1 commit intomainfrom
refactor/playwright-worklog-autoflow

Conversation

@gpwork4u
Copy link
Copy Markdown
Owner

@gpwork4u gpwork4u commented Apr 4, 2026

Summary

  • 瀏覽器測試從 agent-browser 替換為 Playwright(TypeScript,更穩定的 auto-waiting + Locator API)
  • 新增 Sprint 工作日誌機制(specs/logs/sprint-{N}-log.md),每個 sprint 完成後自動產出格式一致的日誌
  • Sprint 推進改為全自動,使用者只在定義 spec 和部署 production 時介入
  • API test 和 Browser test 任一失敗都建 bug issue 附截圖通知 engineer

Changes

Playwright 替換(8 個檔案)

  • .claude/agents/qa-engineer.md — 完整改寫 browser test 範例、Playwright 設定、API 速查表
  • .github/workflows/sprint-test.yml — 安裝 Playwright + 執行 npx playwright test
  • .claude/settings.json — 權限 agent-browsernpx playwright
  • CLAUDE.md / README.md — 前置需求、範例、目錄結構

Sprint 工作日誌

  • .claude/agents/verifier.md — 驗證通過後自動產出工作日誌(固定格式,含所有 issue/PR 連結)
  • 日誌存放:specs/logs/sprint-{N}-log.md

自動化流程

  • .claude/skills/specflow:start/SKILL.md — Phase 6 改為自動產出日誌 + 關閉 milestone,Phase 7 自動推進
  • .claude/skills/specflow:release/SKILL.md — 從「sprint release gate」改為「production 部署確認」
  • CLAUDE.md — 流程圖更新

Test Plan

  • 確認所有 agent-browser 引用已清除(grep -r agent-browser
  • 確認 Playwright 設定範例正確
  • 確認工作日誌格式一致性
  • 確認 GitHub Actions workflow 語法正確

🤖 Generated with Claude Code

… auto-flow

- Replace agent-browser with Playwright for browser testing across all files
- Add sprint work log mechanism (specs/logs/sprint-{N}-log.md) generated
  by verifier after each sprint verification
- Remove manual release gate — sprint progression is now fully automatic
  (test pass → verify → work log → close milestone → next sprint)
- /specflow:release now only handles production deployment
- Both API and browser test failures create bug issues with screenshots
- Update GitHub Actions workflow for Playwright
- Update permissions settings (npx playwright)

Co-Authored-By: Claude <noreply@anthropic.com>
@gpwork4u gpwork4u merged commit 70658db into main Apr 4, 2026
1 check passed
Copy link
Copy Markdown

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

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: 86414cab8d

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

Comment on lines +161 to +162
RESULT=$(npx playwright test --reporter=json 2>&1) || true
EXIT_CODE=$?
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve Playwright failure status in CI

The browser-test step masks Playwright’s exit code by using RESULT=$(...) || true and then reading $?, which will always be 0 from true. That means this step reports success even when Playwright itself fails, and downstream logic can miss real browser-test failures (especially setup/config/runtime failures that do not produce reliable stats), causing the workflow to publish misleading PASS results.

Useful? React with 👍 / 👎.

Comment on lines +31 to +33
for report in test/reports/sprint-*-test-report.md; do
[ -f "$report" ] || continue
if ! grep -q "ALL TESTS PASSED" "$report"; 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.

P1 Badge Block deployment when no test reports are found

The release gate now iterates over test/reports/sprint-*-test-report.md but immediately continues when files are missing, so BLOCK remains false when there are zero reports. In that case deployment can proceed without any sprint test evidence, which violates the stated gate requirement that all sprint reports must be ALL TESTS PASSED (the same missing-file pattern is also used for verify reports).

Useful? React with 👍 / 👎.

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