Repository navigation
ci: add doctor-check job to verify agent workspace health - #114
Merged
Merged
Conversation
Adds a CI job that installs gptme from git master, creates a fresh agent workspace from the template, runs `gptme-agent doctor`, and asserts the warning count stays at or below 5. This catches regressions introduced to the template that would surface as doctor warnings when users fork it (e.g. missing frontmatter in lessons, lessons exceeding the line limit). Git-Session-Id: fbbb5524-beb4-42bc-9d1b-9909d9da811f
The --template-repo flag clones from a local path using branch 'master', but the CI checkout is on the PR branch. Copy the workspace and run fork.sh directly to avoid the branch mismatch. Git-Session-Id: fbbb5524-beb4-42bc-9d1b-9909d9da811f
The PR checkout is in detached HEAD state, so copying .git then running git commit fails with 'nothing to commit'. Copy workspace content without the .git directory and reinitialize to give fork.sh a clean git repo. Git-Session-Id: fbbb5524-beb4-42bc-9d1b-9909d9da811f
Three issues fixed: 1. `cd \"\$TMPDIR/test-agent\"` after fork.sh was a no-op (already there) — should be `cd \"\$TMPDIR/test-agent/test-agent\"` to enter the forked agent 2. uv and pre-commit not installed in CI → doctor reported them as missing 3. pre-commit hooks not installed → doctor warned about unhook state 4. Threshold was 5 but 8 warnings appeared; after fixes expected warnings are ~5 (no-origin, prek-not-found, no-pyproject, frontmatter, long-lessons) so threshold raised to 7 for 2 warnings of headroom Git-Session-Id: a2a243f8-6671-442c-93a8-f7f8f68f35cd
Member
Author
|
The CI-failure alert refers to the earlier head. The existing fix in e1b5c13 is now green: all seven checks passed, including doctor-check (https://github.com/gptme/gptme-agent-template/actions/runs/40431153352). The latest three master runs also passed. No further code change or rerun needed; ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
doctor-checkCI job to.github/workflows/test.ymlgptme-agent create)gptme-agent doctor, and asserts warning count ≤ 5Why
The template currently has 3 known doctor warnings (no pyproject.toml, 3 lessons missing frontmatter, 43 lessons >100 lines). This job catches regressions where changes to the template push the warning count above an acceptable threshold.
The threshold of 5 gives headroom for the known baseline while still catching new warnings introduced by template changes.
Test plan
gptme-agent doctorruns clean on the created workspace (≤5 warnings)