Skip to content

Plx/broken deploy#9

Merged
plx merged 4 commits intomainfrom
plx/broken-deploy
Aug 26, 2025
Merged

Plx/broken deploy#9
plx merged 4 commits intomainfrom
plx/broken-deploy

Conversation

@plx
Copy link
Copy Markdown
Owner

@plx plx commented Aug 23, 2025

No description provided.

plx and others added 2 commits August 22, 2025 21:30
This commit resolves the CI/CD deployment failure by:
- Fixing typos: 'dont' → 'don't', 'psecification' → 'specification'
- Adding legitimate project-specific words to cspell dictionary (Tailgraph, Berman, msapplication, mstile)
- Removing commented-out references to plxgithub from opengraph.ts

The deployment has been failing since the spell check was added to the CI pipeline and subsequent PRs introduced new terms not in the dictionary.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit addresses the CI/deployment mismatch that allowed PRs to pass validation
but fail deployment. It also implements deployment safeguards with dry-run capabilities.

## Changes:
1. **Created reusable build workflow** (.github/workflows/build.yml)
   - Single source of truth for all build/validation steps
   - Includes all checks: linting, spell check, build, link validation

2. **Updated deployment workflow** with safety features:
   - Uses reusable build workflow
   - Conditional deployment (only from main branch)
   - Manual trigger with explicit deploy flag for dry-runs
   - Clear deployment guards to prevent accidents

3. **Fixed PR validation** to match deployment:
   - Now uses same build workflow as deployment
   - Includes spell checking (previously missing)
   - Provides comprehensive status reporting
   - Acts as complete deployment dry-run

4. **Added workflow architecture documentation**
   - Explains the modular design
   - Documents safety features
   - Provides maintenance guidance

## Benefits:
- PR validation now exactly matches deployment validation
- No more "passes CI but fails deployment" surprises
- Safe dry-run capability for testing changes
- Zero risk of accidental deployment from non-main branches
- Easier maintenance with single source of truth

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

PR Validation ❌

Some checks failed. Please review the errors above.

Checks Performed:

Please check the workflow logs for details on which checks failed.

This is a complete dry-run of the deployment process, ensuring your changes will deploy successfully when merged.

Following the principle of least privilege, this commit removes unnecessary
Pages write permissions from the PR validation workflow.

## Changes:
1. **Removed pages:write and id-token:write from PR validation**
   - PRs only need read access to validate code
   - Write permissions are only needed for actual deployment

2. **Removed configure-pages action from build workflow**
   - Analysis showed we don't use any of its outputs
   - The action requires pages permissions we don't need in PRs
   - Simplifies the build process

3. **Updated security documentation**
   - Clarified the permission model
   - Documented why each permission is needed
   - Emphasized principle of least privilege

## Security Benefits:
- PR validation now truly read-only (can't accidentally deploy)
- Clearer separation between validation and deployment permissions
- Reduced attack surface for malicious PRs
- Follows GitHub Actions security best practices

The deployment workflow retains necessary permissions, while PR validation
only has the minimum required for its dry-run purpose.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

PR Validation ❌

Some checks failed. Please review the errors above.

Checks Performed:

Please check the workflow logs for details on which checks failed.

This is a complete dry-run of the deployment process, ensuring your changes will deploy successfully when merged.

This commit fixes a critical configuration issue where HTML spell checking
has been silently failing since it was first added to the project.

## Root Cause
The cspell.json had conflicting configuration:
- `ignorePaths` included "dist" (excluding the entire directory)
- `overrides` had rules for "dist/**/*.html" (which never applied)
Result: HTML spell check found 0 files and failed with exit code 1

## Fixes Applied

### 1. Fixed cspell configuration
- Removed blanket "dist" exclusion from ignorePaths
- Added specific exclusions for non-HTML files in dist
- HTML files are now actually checked

### 2. Fixed typos discovered by working spell check
- "explict" → "explicit" in equivalent-objects-function.md
- "Suprise" → "Surprise" in hdxl-xctest-retrofit/index.md

### 3. Added technical terms to dictionary
- Objective-C terms: nonnull, instancetype, NSURL, objc, kindof
- Project-specific: HDXLXC, xctest, imread, administrivia
- Common abbreviations: IIRC, pretraining
- HTML entity workaround: "doesn" (from doesn&#x27;t)

### 4. Improved CI/local development parity
- Added `test:ci` script to run exact same checks as CI
- Added `test:ci:verbose` with progress indicators
- Ensures local validation matches CI exactly

### 5. Enhanced workflow debugging
- Added debug output when spell check fails in CI
- Shows files found, ignore patterns, and verbose output
- Helps diagnose future issues quickly

### 6. Added comprehensive documentation
- Created VALIDATION.md with complete testing guide
- Documents all validation commands
- Includes troubleshooting section
- Provides pre-push checklist

## Impact
- HTML spell checking now actually works for the first time
- Discovered and fixed long-standing typos
- Local development now has true CI parity
- Future spell check issues will be easier to diagnose

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

PR Validation ✅

All checks passed! Ready for review.

Checks Performed:

✓ Linting
✓ Spell check (source)
✓ Type checking & Build
✓ Spell check (HTML)
✓ Internal link validation
✓ Artifact upload

This is a complete dry-run of the deployment process, ensuring your changes will deploy successfully when merged.

@plx plx merged commit 8e1e79d into main Aug 26, 2025
2 checks passed
@plx plx deleted the plx/broken-deploy branch August 26, 2025 00:17
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