settings-ui-changed #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Refresh UI paths snapshot | |
| # Triggered automatically when warp-internal's Settings UI files change | |
| # (via repository_dispatch from warpdotdev/warp) or manually via | |
| # workflow_dispatch as a fallback. | |
| on: | |
| repository_dispatch: | |
| types: | |
| - settings-ui-changed | |
| workflow_dispatch: | |
| # Only WARP_API_KEY is needed here — warp-internal access and Slack | |
| # notifications are handled by the Oz cloud agent environment. | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: refresh-ui-paths | |
| # Do not cancel in-progress runs: a run may be mid-commit when the next | |
| # dispatch arrives, leaving a branch with no PR. Each run is fast and | |
| # idempotent — if two overlap, the second will simply find no diff. | |
| cancel-in-progress: false | |
| jobs: | |
| refresh: | |
| name: Dispatch Oz cloud agent to refresh UI path snapshot | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout docs | |
| uses: actions/checkout@v4 | |
| - name: Install Oz CLI | |
| run: | | |
| curl -sL "https://app.warp.dev/download/cli?os=linux&package=deb&arch=x86_64" -o /tmp/oz.deb | |
| sudo dpkg -i /tmp/oz.deb | |
| - name: Write Oz prompt | |
| run: | | |
| cat > /tmp/oz_prompt.txt << 'PROMPT' | |
| Run the validate_ui_refs skill to refresh the UI path snapshot and fix stale doc references. | |
| This was triggered by a change to app/src/settings_view/ in warpdotdev/warp. | |
| Steps: | |
| 1. Locate warpdotdev/warp. It should be checked out at | |
| /workspace/warp in this environment. If that path does | |
| not exist, clone it: | |
| git clone git@github.com:warpdotdev/warp.git /workspace/warp | |
| Then run: | |
| python3 .agents/skills/validate_ui_refs/validate_ui_refs.py \\ | |
| --refresh-valid-paths \\ | |
| --warp-internal-path /workspace/warp | |
| 2. Compare valid_paths.json before and after (strip generated_at from both, | |
| then diff). If unchanged, exit — no PR needed. | |
| 3. If the snapshot changed, run: | |
| python3 .agents/skills/validate_ui_refs/validate_ui_refs.py \\ | |
| --all --fix --create-pr --slack-notify \\ | |
| --slack-channel C09BVK0PL3Y | |
| The script auto-fixes high-confidence issues, opens a PR, and posts to | |
| #growth-docs if issues remain. BUZZ_SLACK_TOKEN is available in this | |
| environment and is used as a fallback for SLACK_BOT_TOKEN. | |
| 4. After running --refresh-valid-paths, check whether any shared-source-file | |
| subpages (Warp Agent, Oz, Profiles, Knowledge, Third party CLI agents, | |
| Indexing and projects, Editor and Code Review) now have sub_sections that | |
| differ significantly from the last verified values in valid_paths.json. | |
| If they do, use computer use (if available) to verify against the live | |
| Warp Settings UI following the instructions in: | |
| .agents/skills/verify-settings-subsections/SKILL.md | |
| 5. Report the outcome (PR URL if created, or "no changes" if already up to date). | |
| Full instructions: .agents/skills/validate_ui_refs/SKILL.md | |
| PROMPT | |
| - name: Dispatch Oz cloud agent | |
| id: oz-dispatch | |
| env: | |
| WARP_API_KEY: ${{ secrets.WARP_API_KEY }} | |
| run: | | |
| OUTPUT=$(oz agent run-cloud \ | |
| --environment K5KStCm5aYvhfBJb8cHol6 \ | |
| --skill warpdotdev/docs:validate_ui_refs \ | |
| --prompt "$(cat /tmp/oz_prompt.txt)") | |
| echo "$OUTPUT" | |
| RUN_ID=$(echo "$OUTPUT" | grep -oP 'run ID: \K[0-9a-f-]{36}') | |
| echo "run_id=$RUN_ID" >> "$GITHUB_OUTPUT" | |
| echo "Dispatched cloud agent run: $RUN_ID" | |
| - name: Wait for Oz run to complete | |
| env: | |
| WARP_API_KEY: ${{ secrets.WARP_API_KEY }} | |
| run: | | |
| RUN_ID="${{ steps.oz-dispatch.outputs.run_id }}" | |
| if [[ -z "$RUN_ID" ]]; then | |
| echo "No run ID captured — cannot poll." | |
| exit 1 | |
| fi | |
| echo "Polling run $RUN_ID (max 60 min, 30s intervals)..." | |
| FINAL_STATUS="timeout" | |
| for i in $(seq 1 120); do | |
| OUTPUT=$(oz run get "$RUN_ID" 2>/dev/null || echo "") | |
| STATUS=$(echo "$OUTPUT" | grep -oP '(?<=\()\w+(?=\))' | head -1 | tr '[:upper:]' '[:lower:]') | |
| ELAPSED="$((i * 30 / 60))m$((i * 30 % 60))s" | |
| echo "[$ELAPSED] $STATUS" | |
| if [[ "$STATUS" == "succeeded" ]]; then | |
| FINAL_STATUS="succeeded" | |
| break | |
| elif [[ "$STATUS" == "failed" || "$STATUS" == "errored" || "$STATUS" == "cancelled" ]]; then | |
| FINAL_STATUS="$STATUS" | |
| break | |
| fi | |
| sleep 30 | |
| done | |
| if [[ "$FINAL_STATUS" != "succeeded" ]]; then | |
| echo "Oz run did not succeed (status: $FINAL_STATUS)" | |
| exit 1 | |
| fi | |
| echo "Oz run completed successfully." |