Commit Graph

22 Commits

Author SHA1 Message Date
Jordan Ritter fe8d70996e fix(ci): skip Slack notification when SLACK_WEBHOOK_OSS_ALERTS is not set 2026-05-06 16:35:52 -07:00
Jordan Ritter 51afc3823b fix(workflows): update docs-sync staging path after shell restructure
The "Showcase: Docs Sync" workflow has been failing with
`fatal: pathspec 'showcase/shell/src/content/' did not match any files`
since the shell platform restructure (#4109, #4112) split the monolithic
`showcase/shell/` package into `showcase/shell-docs/`,
`showcase/shell-dashboard/`, and `showcase/shell-dojo/`.

The sync-docs-from-main.ts script already writes to
`showcase/shell-docs/src/content/` and maintains the sync marker at
`showcase/shell-docs/.docs-sync-sha`. Update the "Create PR for docs
sync" step to stage from the new location so the workflow can commit
synced content again.
2026-04-21 09:32:10 -07:00
Jordan Ritter a7fcd2da59 fix(docs-sync): emit review_items_file output, fix auto_push fast path, tighten gates 2026-04-17 17:28:20 -07:00
Jordan Ritter ae5fc2cc0f fix(docs-sync): manifest path, add-order, exit-code, marker, stripTrailingEol, dead search 2026-04-17 17:28:20 -07:00
Jordan Ritter 157cf7d4a0 fix(docs-sync): harden shell injection, add needs-review Slack, fix silent re-resolution + PR collision 2026-04-17 17:28:20 -07:00
Jordan Ritter 5bb7c19cab ci(docs-sync): auto-open PR instead of warn-and-skip on conflict 2026-04-17 17:28:20 -07:00
Jordan Ritter 3f89e57da9 fix: inline fallback Slack payload to remove payloads-step dependency 2026-04-16 14:20:46 -07:00
Jordan Ritter 143b3eb41b fix: address CR findings — explicit pr_opened output + safe JSON + Slack fallback
Fixes 3 HIGH findings from R1 review on #3988:

1. pr_url empty was used as a proxy for "no PR opened because clean-transform
   was empty", but it's also empty on every error path (bot-token failure, gh
   pr create failure, push failure). Replace with an explicit pr_opened=true/
   false output from the push step — true only after the PR URL is captured,
   false only on the deliberate CHANGED=0 path. Error paths leave it unset so
   alerts fall through to the failure() handler.

2. review_items_json was string-interpolated raw into a JSON payload inside
   triple-backticks. Any filename containing ", \\, or a control character
   would break the payload. Moved to a jq-based payload-file-path pattern:
   a dedicated Build Slack payloads step writes each payload to disk with jq
   --arg, so all values are safely JSON-escaped regardless of content. Slack
   steps consume the tmpfiles via payload-file-path.

3. If a notify-* step itself fails (webhook 5xx, rate limit, malformed JSON),
   the review-needed alert was silently lost — the existing failure() alert
   was gated on pr_url == '' and would not fire. Added an unconditional
   fallback step that posts a plain-text "alert machinery failed" message via
   curl when any notify-* step's outcome is failure, so we never lose a
   review-needed or failure notification.
2026-04-16 14:12:15 -07:00
Jordan Ritter 8a1b6fc0e1 ci(docs-sync): include PR link in review-needed Slack alert
The "files needing manual review" Slack warning listed files but
didn't link the auto-opened PR, forcing reviewers to hunt for it
in GitHub. Capture the PR URL from the create/merge step output
(already exposed as steps.push.outputs.pr_url) and include it as
a "Review:" line in the payload.

Split the alert into two variants:
- PR opened (normal case): includes the PR link
- No PR opened (edge case where clean-transform portion was empty):
  posts review items without a link

Auto-sync and merge-failed alerts already linked the PR — this
brings the review-needed alert to parity.
2026-04-16 13:52:51 -07:00
Jordan Ritter ccbc19a436 fix: include review items in docs-sync Slack notification
The warning notification for files needing manual review was sending
'see workflow run for details' with no actionable information.

- Read review-items.txt and include file list in the Slack message
- Use jq for proper JSON escaping (handles newlines, quotes, special chars)
- Guard against missing review-items.txt with fallback and ::warning::
- Review-needed notification fires independently of push/merge outcome
2026-04-15 16:13:27 -07:00
Jordan Ritter fbb9d01584 fix: upgrade docs sync token action to v2, add failure context
The v1 action uses SubtleCrypto.importKey() which fails with 'Invalid keyData'
on certain PEM key formats. v2 handles this more robustly.

Also adds step-level failure info to the Slack notification so we know
WHICH step failed instead of just 'workflow failed'.
2026-04-13 15:03:54 -07:00
Jordan Ritter ed065725a4 fix: address CR findings — deploy needs, rebuild loop resilience, merge-failure alert, loop prevention, drift failure alert 2026-04-12 14:57:18 -07:00
Jordan Ritter c0fb38959a fix: add Slack alerts across all showcase workflows, fix silent failures and loop risk 2026-04-12 14:50:21 -07:00
Jordan Ritter 7a5ebbf1e3 fix: docs sync auto-merges via devops bot (bypasses branch protection) 2026-04-12 14:02:00 -07:00
Jordan Ritter 4f4541b711 fix: docs sync uses PRs instead of direct push (branch protection) 2026-04-12 13:33:13 -07:00
Jordan Ritter 63948957e0 fix: docs sync commit messages need conventional prefix + skip hooks 2026-04-12 13:23:06 -07:00
Jordan Ritter 4bf09a1eb0 fix: docs sync Slack notifications fire even when PR step fails 2026-04-12 13:14:50 -07:00
Jordan Ritter c3bb61c10e fix: docs sync PR step — stage and commit review items before creating PR 2026-04-12 13:04:11 -07:00
Jordan Ritter 168297fbda feat: add Slack notifications for docs sync (auto-push and review PR) 2026-04-09 15:06:04 -07:00
Jordan Ritter 8ce19c5f6a fix: remove hardcoded pnpm version 9, use packageManager from package.json 2026-04-09 14:50:20 -07:00
Jordan Ritter 204dd29a97 fix: standardize health checks on /health port 8000 2026-04-08 21:22:35 -07:00
Jordan Ritter 6d05499ecd feat: add automated docs sync from main with transform pipeline 2026-04-08 19:59:31 -07:00