55# Validates that the repo uses hyperpolymath's own formats and tools.
66# Companion to static-analysis-gate.yml (security) — this is for format compliance.
77name : Dogfood Gate
8-
98on :
109 pull_request :
1110 branches : ['**']
1211 push :
1312 branches : [main, master]
14-
1513permissions :
1614 contents : read
17-
1815jobs :
1916 # ---------------------------------------------------------------------------
2017 # Job 1: A2ML manifest validation
2118 # ---------------------------------------------------------------------------
2219 a2ml-validate :
2320 name : Validate A2ML manifests
2421 runs-on : ubuntu-latest
25-
2622 steps :
2723 - name : Checkout repository
2824 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
29-
3025 - name : Check for A2ML files
3126 id : detect
3227 run : |
@@ -35,14 +30,12 @@ jobs:
3530 if [ "$COUNT" -eq 0 ]; then
3631 echo "::warning::No .a2ml manifest files found. Every RSR repo should have 0-AI-MANIFEST.a2ml"
3732 fi
38-
3933 - name : Validate A2ML manifests
4034 if : steps.detect.outputs.count > 0
4135 uses : hyperpolymath/a2ml-validate-action@6bff6ec134fc977e86d25166a5c522ddea5c1e78 # main
4236 with :
4337 path : ' .'
4438 strict : ' false'
45-
4639 - name : Write summary
4740 run : |
4841 A2ML_COUNT="${{ steps.detect.outputs.count }}"
@@ -59,18 +52,15 @@ jobs:
5952 echo "" >> "$GITHUB_STEP_SUMMARY"
6053 echo "Scanned **${A2ML_COUNT}** .a2ml file(s). See step output for details." >> "$GITHUB_STEP_SUMMARY"
6154 fi
62-
6355 # ---------------------------------------------------------------------------
6456 # Job 2: K9 contract validation
6557 # ---------------------------------------------------------------------------
6658 k9-validate :
6759 name : Validate K9 contracts
6860 runs-on : ubuntu-latest
69-
7061 steps :
7162 - name : Checkout repository
7263 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
73-
7464 - name : Check for K9 files
7565 id : detect
7666 run : |
@@ -83,14 +73,12 @@ jobs:
8373 if [ "$COUNT" -eq 0 ] && [ "$CONFIG_COUNT" -gt 0 ]; then
8474 echo "::warning::Found $CONFIG_COUNT config files but no K9 contracts. Run k9iser to generate contracts."
8575 fi
86-
8776 - name : Validate K9 contracts
8877 if : steps.detect.outputs.k9_count > 0
8978 uses : hyperpolymath/k9-validate-action@2d96f43c538964b097d159ed3a56ba5b5ceca227 # main
9079 with :
9180 path : ' .'
9281 strict : ' false'
93-
9482 - name : Write summary
9583 run : |
9684 K9_COUNT="${{ steps.detect.outputs.k9_count }}"
@@ -108,18 +96,15 @@ jobs:
10896 echo "" >> "$GITHUB_STEP_SUMMARY"
10997 echo "Validated **${K9_COUNT}** K9 contract(s) against **${CFG_COUNT}** config file(s)." >> "$GITHUB_STEP_SUMMARY"
11098 fi
111-
11299 # ---------------------------------------------------------------------------
113100 # Job 3: Empty-linter — invisible character detection
114101 # ---------------------------------------------------------------------------
115102 empty-lint :
116103 name : Empty-linter (invisible characters)
117104 runs-on : ubuntu-latest
118-
119105 steps :
120106 - name : Checkout repository
121107 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
122-
123108 - name : Scan for invisible characters
124109 id : lint
125110 run : |
@@ -153,7 +138,6 @@ jobs:
153138 REL_PATH="${filepath#$GITHUB_WORKSPACE/}"
154139 echo "::warning file=${REL_PATH}::Invisible Unicode characters detected (zero-width space, BOM, NBSP, etc.)"
155140 done < /tmp/empty-lint-results.txt
156-
157141 - name : Write summary
158142 run : |
159143 if [ "${{ steps.lint.outputs.ready }}" = "true" ]; then
@@ -172,18 +156,15 @@ jobs:
172156 echo "" >> "$GITHUB_STEP_SUMMARY"
173157 echo "Skipped: empty-linter not available." >> "$GITHUB_STEP_SUMMARY"
174158 fi
175-
176159 # ---------------------------------------------------------------------------
177160 # Job 4: Groove manifest check (for repos that should expose services)
178161 # ---------------------------------------------------------------------------
179162 groove-check :
180163 name : Groove manifest check
181164 runs-on : ubuntu-latest
182-
183165 steps :
184166 - name : Checkout repository
185167 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
186-
187168 - name : Check for Groove manifest
188169 id : groove
189170 run : |
@@ -220,7 +201,6 @@ jobs:
220201 if [ "$HAS_SERVER" = "true" ] && [ "$HAS_MANIFEST" = "false" ] && [ "$HAS_GROOVE_CODE" = "false" ]; then
221202 echo "::warning::This repo has server code but no Groove endpoint. Add .well-known/groove/manifest.json for service discovery."
222203 fi
223-
224204 - name : Write summary
225205 run : |
226206 echo "## Groove Protocol Check" >> "$GITHUB_STEP_SUMMARY"
@@ -230,7 +210,6 @@ jobs:
230210 echo "| Static manifest (.well-known/groove/manifest.json) | ${{ steps.groove.outputs.has_manifest }} |" >> "$GITHUB_STEP_SUMMARY"
231211 echo "| Groove endpoint in code | ${{ steps.groove.outputs.has_groove_code }} |" >> "$GITHUB_STEP_SUMMARY"
232212 echo "| Has HTTP server code | ${{ steps.groove.outputs.has_server }} |" >> "$GITHUB_STEP_SUMMARY"
233-
234213 # ---------------------------------------------------------------------------
235214 # Job 5: Dogfooding summary
236215 # ---------------------------------------------------------------------------
@@ -239,11 +218,9 @@ jobs:
239218 runs-on : ubuntu-latest
240219 needs : [a2ml-validate, k9-validate, empty-lint, groove-check]
241220 if : always()
242-
243221 steps :
244222 - name : Checkout repository
245223 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
246-
247224 - name : Generate dogfooding scorecard
248225 run : |
249226 SCORE=0
@@ -306,4 +283,3 @@ jobs:
306283 *Generated by the [Dogfood Gate](https://github.com/hyperpolymath/rsr-template-repo) workflow.*
307284 *Dogfooding is guinea pig fooding — we test our tools on ourselves.*
308285 EOF
309-
0 commit comments