Skip to content

feat: automate valid_paths.json refresh on Settings UI changes#328

Open
rachaelrenk wants to merge 4 commits into
mainfrom
rrenk/automate-ui-ref-refresh
Open

feat: automate valid_paths.json refresh on Settings UI changes#328
rachaelrenk wants to merge 4 commits into
mainfrom
rrenk/automate-ui-ref-refresh

Conversation

@rachaelrenk

@rachaelrenk rachaelrenk commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes the automation gap in the validate_ui_refs skill. valid_paths.json — the snapshot the validator checks docs against — is now refreshed automatically whenever app/src/settings_view/ changes in warp-internal.

Changes

New workflow: refresh-ui-paths.yml — triggered by repository_dispatch (settings-ui-changed) from warp-internal, or workflow_dispatch as a manual fallback. Checks out both repos, runs --refresh-valid-paths, and if the Settings structure changed, runs --all --fix --slack-notify and opens a PR with the updated snapshot + any doc fixes. Change detection compares normalized JSON (without generated_at) to avoid false positives from the timestamp being rewritten on every run.

Updated validate_ui_refs.py — docs version was the Feb 2026 build, missing the entire umbrella migration. Synced from April 2026 gitbook version: adds umbrella-aware refresh_valid_path*(), _extract_umbrellas(), deprecated_section auto-fix, and the _WARP_SETTINGS_ROOT_SECTIONS external-path guard. Adjusted for Astro Starlight: DEFAULT_DOCS_DIRsrc/content/docs/, scan_docs() finds *.md and *.mdx.

Synced valid_paths.json — was Feb 2026 (missing the April umbrella migration). Now April 2026, including Agents / Code / Cloud platform restructure.

Updated SKILL.md — removes the 'not yet implemented' caveat; replaces Cloud Agent / Scheduling section with documentation of the new automated workflow and required secrets. Fixes 4 rogue .warp/skills/... paths to .agents/skills/.... Corrects DOCS_DISPATCH_PAT permissions (Actions: write only, not Contents read). Adds --self-test to options list.

Updated ci.yml — adds --self-test step so script and snapshotUpdated ci.yml — adds --self-test step so script and snapshotUpdated ci.yml — adds --self-test step so script and snapshotUpdated ci.yml — adds --self-test step so script and snapshotUpdated ci.yml — adds --self-test step so script and snapshotUpdated ci.yml — adds --self-test step so script and snapshotUpdated ci.yml — adds --self-test step so script and snapsh. Secrets go in GitHub repo secrets — not in any Oz environment (e.g. buzz is for community management, unrelated to this).

Secret Repo Where Permissions
WARP_INTERNAL_READ_PAT warpdotdev/docs Settings → Secrets and variables → Actions Fine-grained PAT: Contents read + Metadata read on warpdotdev/warp-internal
SLACK_BOT_TOKEN warpdotdev/docs Settings → Secrets and variables → Actions Slack bot, chat:write scope
DOCS_DISPATCH_PAT warpdotdev/warp-internal Settings → Secrets and variables → Actions Fine-grained PAT: Actions write on warpdotdev/docs

The workflow will not fire automatically until both PRs are merged and all three secrets are provisioned. To test before secrets are ready, use workflow_dispatch in the Actions tab.


Oz conversation | Plan

Co-Authored-By: Oz oz-agent@warp.dev

Closes the automation gap described in the validate_ui_refs skill: the
valid_paths.json snapshot now refreshes automatically whenever
app/src/settings_view/ changes in warp-internal, rather than requiring
manual intervention.

Changes:
- Add .github/workflows/refresh-ui-paths.yml — triggered by
  repository_dispatch (settings-ui-changed) from warp-internal or
  workflow_dispatch (manual fallback). Checks out both repos, runs
  --refresh-valid-paths, and if the snapshot changed runs --all --fix
  --slack-notify and opens a PR with the updated snapshot + any doc fixes.
- Sync valid_paths.json from gitbook to docs (was Feb 2026, now Apr 2026,
  including the Agents/Code/Cloud platform umbrella migration).
- Update SKILL.md: remove 'not yet implemented' caveat, replace the
  Cloud Agent / Scheduling section with documentation of the new workflow
  and the two required secrets (WARP_INTERNAL_READ_PAT, SLACK_BOT_TOKEN).

Requires two new secrets (see SKILL.md for details):
- WARP_INTERNAL_READ_PAT in docs (Contents read on warp-internal)
- SLACK_BOT_TOKEN in docs (chat:write scope)
- DOCS_DISPATCH_PAT in warp-internal (PR opened separately)

Co-Authored-By: Oz <oz-agent@warp.dev>
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 12, 2026 9:36pm

Request Review

@cla-bot cla-bot Bot added the cla-signed label Jul 11, 2026
@oz-for-oss

oz-for-oss Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

@rachaelrenk

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overview

This PR adds a GitHub Actions workflow to refresh valid_paths.json, updates the validate-ui-refs skill documentation, and refreshes the UI path snapshot.

Concerns

  • The automated workflow currently has several correctness blockers: it will treat every refresh as changed because generated_at is volatile, the refresh generator does not preserve the new metadata fields added to valid_paths.json, unfixed validation issues stop the PR creation path, Slack notifications are missing the required channel configuration, and the generated PR can accidentally stage the nested warp-internal checkout.
  • No approved spec context was available for implementation drift validation.
  • The supplemental security pass did not find security-specific issues.

Verdict

Found: 0 critical, 5 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread .github/workflows/refresh-ui-paths.yml
Comment thread .github/workflows/refresh-ui-paths.yml Outdated
- name: Check if snapshot changed
id: snapshot
run: |
if git diff --quiet .agents/skills/validate_ui_refs/valid_paths.json; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] Because --refresh-valid-paths rewrites generated_at on every run, this whole-file diff check will report changed=true even when the Settings structure is unchanged; compare normalized JSON without generated_at or only rewrite the timestamp when semantic content changes.

Comment thread .github/workflows/refresh-ui-paths.yml
Comment thread .github/workflows/refresh-ui-paths.yml
Comment thread .github/workflows/refresh-ui-paths.yml
Five issues flagged by oz-for-oss[bot] review:

1. validate_ui_refs.py was the Feb 2026 version (pre-umbrella migration),
   missing umbrella-aware refresh_valid_paths(), _extract_umbrellas(),
   deprecated_section fix type, and _WARP_SETTINGS_ROOT_SECTIONS guard.
   Replaced with the April 2026 gitbook version, updated for Astro:
   - DEFAULT_DOCS_DIR -> src/content/docs/ (not docs/)
   - scan_docs() now finds *.md and *.mdx

2. generated_at is rewritten on every --refresh-valid-paths run, causing
   git diff to always report changed=true. Now saves normalized JSON
   (without generated_at) before and after refresh and diffs those.

3. --slack-notify called without a channel ID. DEFAULT_SLACK_CHANNEL in
   the docs script reads GROWTH_DOCS_SLACK_CHANNEL_ID env var (defaults
   to empty). Added explicit --slack-channel C09BVK0PL3Y to the command.

4. validate_ui_refs.py --all --fix exits 1 when unfixed issues remain,
   aborting the step before the summary output or PR creation. Added
   || true so the step always continues.

5. warp-internal was checked out at ./warp-internal inside the docs
   working directory; git add -A would stage it as a nested submodule.
   Moved checkout to ${{ runner.tem   Moved checkout to ${{ runner.tem   Moved checkout to ${{ runner
Co-Authored-By: Oz <oz-agent@warp.dev>
- SKILL.md: fix 4 rogue .warp/skills/... paths → .agents/skills/...;
  update --slack-notify flag description (channel is hardcoded, not an
  env var); correct DOCS_DISPATCH_PAT permission — only Actions: write
  needed on docs, not Contents read; add --self-test to options list
- refresh-ui-paths.yml: cancel-in-progress: false (prevent cancelling a
  run mid-commit); add --base main to gh pr create
- ci.yml: add --self-test step to catch script/snapshot breakage on
  every PR without needing warp-internal checked out

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant