Skip to content

Commit 89a567e

Browse files
garrytanclaude
andcommitted
fix: register smoke-test in RESOLVER + add required SKILL sections
Fixes the 7 failing unit tests + 1 failing Tier 1 E2E: - `skills/RESOLVER.md`: add smoke-test under Operational (mirrors skillpack-check placement). Fixes resolver_health check failure which cascaded into skillpack-check tests, doctor exit code, and the E2E 'gbrain doctor exits 0 on healthy DB' assertion. - `skills/smoke-test/SKILL.md`: add `## Anti-Patterns` and `## Output Format` sections required by skills-conformance.test.ts. Root cause: PR #369 added skills/smoke-test/ to the manifest but never wired it into RESOLVER.md and never added the sections the conformance test requires for every manifest entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 67fc285 commit 89a567e

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

skills/RESOLVER.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ This is the dispatcher. Skills are the implementation. **Read the skill file bef
5454
| "Create a skill", "improve this skill" | `skills/skill-creator/SKILL.md` |
5555
| "Skillify this", "is this a skill?", "make this proper" | `skills/skillify/SKILL.md` |
5656
| "Is gbrain healthy?", morning health check, skillpack-check | `skills/skillpack-check/SKILL.md` |
57+
| Post-restart health + auto-fix, "did the container restart break anything", smoke test | `skills/smoke-test/SKILL.md` |
5758
| Cross-modal review, second opinion | `skills/cross-modal-review/SKILL.md` |
5859
| "Validate skills", skill health check | `skills/testing/SKILL.md` |
5960
| Webhook setup, external event processing | `skills/webhook-transforms/SKILL.md` |

skills/smoke-test/SKILL.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,28 @@ fi
132132
- **Symptom:** Worker can't connect to DB
133133
- **Cause:** `GBRAIN_DATABASE_URL` not propagated to worker subprocess
134134
- **Auto-fix:** Script explicitly passes both `DATABASE_URL` and `GBRAIN_DATABASE_URL`
135+
136+
## Anti-Patterns
137+
138+
- ❌ Running smoke tests on every chat turn. Once per container restart (or
139+
on user request) is plenty. The script is cheap but it's not free.
140+
- ❌ Writing a user drop-in without `timeout N` around any command that
141+
could hang. A single hung drop-in stalls every subsequent run.
142+
- ❌ Auto-fixing without confirming the check is actually broken first.
143+
The `pass → fail-detected → fix → re-test` loop is the contract; fixes
144+
that skip the re-test can report success on a still-broken state.
145+
- ❌ Treating `skip` as `fail`. Missing prerequisites (no OpenClaw installed,
146+
no brain repo configured) are skips, not failures. Exit code = count of
147+
real failures, not skipped checks.
148+
- ❌ Hardcoding paths in a user drop-in. Read env vars
149+
(`GBRAIN_DATABASE_URL`, `HOME`, etc.) so the script travels across
150+
container rebuilds.
151+
152+
## Output Format
153+
154+
The script writes a one-line status per check to stdout (✅/❌/🔧/⏭️) plus a
155+
final summary line: `Results: N/M passed, F auto-fixed, S skipped`. A
156+
structured timestamped log appends to `$GBRAIN_SMOKE_LOG`
157+
(default `/tmp/gbrain-smoke-test.log`) for post-run forensics. Exit code
158+
equals the count of unfixed failures (0 = all pass, positive integer =
159+
count of remaining failures).

0 commit comments

Comments
 (0)