feat(ci): add samples build validation gate#674
feat(ci): add samples build validation gate#674tamirdresher merged 5 commits intobradygaster:devfrom
Conversation
|
@bradygaster Part 3 of the repo health series (after #672 PR requirements and #673 CI completeness gates). This adds CI coverage for all 11 sample projects -- SDK changes that break samples are now caught at PR time. CI green and ready to merge. |
There was a problem hiding this comment.
Pull request overview
Adds CI validation gates to ensure SDK changes don’t silently break repo expectations—most notably by compiling/testing sample projects on PRs.
Changes:
- Adds a
samples-buildjob that builds the SDK and then builds/tests eachsamples/*project whenpackages/squad-sdk/src/**changes. - Adds feature-flag + skip-label behavior to conditionally bypass the samples gate.
- Introduces
changelog-gateandexports-map-checkjobs alongside the samples gate.
|
Fixed -- removed changelog-gate and exports-map-check from the diff. This PR now only adds the samples-build job. Those other gates are in PR #673. |
|
Valid enhancement -- tracked in diberry#112 (Samples CI enhancements). This PR ships the initial gate that catches build/test failures in samples with file: SDK references (8 of 11 samples). The npm-registry samples (autonomous-pipeline, cost-aware-router) need SDK reference patching to test against PR changes -- that is a follow-up. |
|
Fixed -- added a CI step that patches npm-registry samples (autonomous-pipeline, cost-aware-router) to use file:../../packages/squad-sdk before running builds. All 11 samples now validate against the PR's SDK changes. |
|
@diberry is this ready to merge? i see a conflict |
…eed heuristic - Fix sample count: 11 → 9 (actual count in samples/ directory) - Mark samples-build and changelog/exports gates as pending merge (#673, #674) - Add concrete heuristic for bleed check (scope by packages/ directory) - Clarify bash snippet as reference commands, not literal agent execution Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closes #103 Adds samples-build CI job that validates all 11 samples compile when SDK changes. - Loops samples/ directories with npm install/build/test - Feature-flagged via skip-samples-build label - 15-minute timeout, --ignore-scripts, npm cache - Accepted Copilot suggestions: cache-dependency-path, workspace root install Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Remove changelog-gate and exports-map-check from this PR's diff. Those gates are in PR bradygaster#673. This PR should only add samples-build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot review found that samples using @bradygaster/squad-sdk from npm registry (autonomous-pipeline, cost-aware-router) were not validated against the PR's SDK changes. This step rewrites their package.json to use file:../../packages/squad-sdk before running builds and tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8b84703 to
d6c8d7c
Compare
Merge conflict resolved — rebased onto upstream/devWhat happened: PR #673 (changelog-gate + exports-map-check) merged to upstream/dev while this PR was open. Both PRs added content to the same region of How it was resolved:
Final diff: 1 file changed, 151 additions — scoped exclusively to the The CI workflow now has all 6 jobs in order: docs-quality, test, changelog-gate, exports-map-check, samples-build, publish-policy. @tamirdresher — conflict is resolved, should be mergeable now. |
tamirdresher
left a comment
There was a problem hiding this comment.
Reviewed: 1 file changed (squad-ci.yml only), all 6 CI checks green, all 8 Copilot review findings resolved. Clean samples-build gate with feature flag + skip label pattern matching existing gates. LGTM.
) Adds useTerminalHeight() hook and viewport-aware layout with height-bounded content area. Reserves 3 rows for InputPrompt. Closes bradygaster#674 Closes bradygaster#675
Part 3: Repo Health -- Samples Build CI Gate
What
Adds a samples-build job to squad-ci.yml that validates all sample projects still compile and pass tests when SDK source files change.
Why
The 11 sample projects in samples/ ship with zero CI coverage. SDK changes can silently break samples, which users discover only when they try to follow a tutorial. This gate catches breakage at PR time, not after release.
Issue: #103
Gate 3 tracking: #104
How
Samples Inventory
Related Issues
Testing
Breaking Changes
None. This is an additive CI gate. It does not block existing jobs and can be disabled via feature flag or skip label.
Waivers
None requested.
Preflight