chore(ci): docs/skills/MCP drift audit — script + baseline + weekly workflow (+ fix found drift)#630
Merged
Merged
Conversation
…ly workflow (+ fix the drift it found) ## Why Connectors and MCP tools ship in code PRs, but the surrounding surfaces are updated by hand and regularly lag: - /drt-debug skill went 3 months without learning about `drt doctor` - the MCP server lagged the CLI by 4 months (no drt_doctor, no --diff parity, docstring missing drt_get_history since #445) - drt_list_connectors' hardcoded inventory silently lagged the registry by 10 connectors - the README Sources table never got a REST API source row (#474) ## What **scripts/check_drift.sh** — 9 state-based checks (audits current reality, not a PR diff, so it also catches drift that accumulated before the check existed): 1. destination → docs/connectors/<name>.md 2. destination → /drt-create-sync skill mention 3. destination → README.md Destinations table 4. source → README.md Sources table 5. source → /drt-init skill mention 6. MCP tool → server.py module docstring 7. MCP tool → README.md MCP table 8. MCP tool → README.ja.md MCP table 9. registered connector → drt_list_connectors inventory (sources and destinations blocks matched separately so presence in one can't mask absence from the other) Display-name matching is fuzzy (type key with underscores → spaces, case-insensitive) with an alias map for exceptions (file → "CSV"). **scripts/drift_baseline.txt** — ratchet for known historical gaps. Only NEW drift fails the run (exit 1). The 14 destinations that predate the docs/connectors/ convention are baselined as a docs backlog. Every baseline entry is debt to burn down, not a permanent allowlist. **.github/workflows/drift-check.yml** — post-merge on main (path- filtered) + weekly Monday 01:00 UTC + manual dispatch. Deliberately NOT on pull_request: contributor PRs must never get drift warnings — docs/skill upkeep is a maintainer concern, and surfacing it on first-time contributors' PRs adds onboarding friction. Reports to a self-updating maintainer-facing tracking issue (same model as contributors-audit.yml from #621) and auto-closes the issue when the audit comes back clean. **Makefile**: `make check-drift`. ## Drift found by the first run, fixed here The audit's calibration run found 12 real gaps (besides the 14 baselined docs): 1. **dest-skill:databricks** — #629 merged hours earlier without the /drt-create-sync skill mention. Added (destinations list + mirror mode availability note). Exactly the failure mode this tool exists to catch. 2. **src-readme:rest_api** — the REST API source (#474, v0.7) never got a README / README.ja Sources-table row. Added. 3. **mcp-inventory × 10** — drt_list_connectors was missing mixpanel, s3, snowflake (destinations side), databricks (both sides), twilio, intercom, email_smtp, google_ads, staged_upload, sqlserver, rest_api (source side). The inventory now carries all 27 destinations + 11 sources, with a comment pointing at the drift check that enforces it. `make sync-skills` ran; `.claude/commands/drt-create-sync.md` matches. `make check-skills` clean. `make check-drift` exits 0. 22 MCP tests pass. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…self-bootstrap guard Self-review before merge caught a latent label time-bomb — the same class of first-run failure yodakanohoshi flagged on #621's contributors-audit workflow. The drift-check workflow opened its tracking issue with `--label "documentation"`. That label exists in the repo *right now* only as a leftover GitHub default — `.github/labels.yml` defines `docs`, and `sync-labels` runs `crazy-max/ghaction-github-labeler` with `skip-delete: false`. So the moment sync-labels reconciles (which #621 will trigger by adding the `contributors` label), `documentation` gets DELETED and `docs` created — at which point `gh issue create --label "documentation"` would hard-fail on the next drift run. Fix mirrors the #621 pattern: - Use `docs` (the labels.yml canonical) instead of `documentation`. - Add an idempotent `gh label create docs --force || true` guard right before `gh issue create`, so the workflow is self-sufficient regardless of whether sync-labels has run yet. labels.yml stays the source of truth; the guard's colour/description are cosmetic (sync-labels reconciles them). Verified: YAML valid, `make check-drift` still exits 0, open/update/ close paths all search the same title substring. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Automated detection for the docs / skills / MCP drift problem we kept hitting by hand: connectors and MCP tools ship in code PRs, but the surrounding surfaces are updated manually and regularly lag. Real examples that motivated this:
/drt-debugskill went 3 months without learning aboutdrt doctor(fixed in chore(skill): refresh /drt-debug — catch up to v0.7+ features (3-month gap) #625)drt_list_connectors's hardcoded inventory silently lagged the registry by 10 connectors (fixed in this PR)Design
State-based, not diff-based
scripts/check_drift.shaudits current reality (the registry vs the surfaces), not a PR diff — so it also catches drift that accumulated before the check existed, and works identically for the weekly schedule and post-merge runs.9 checks: destination → connector doc / create-sync skill / README table · source → README table / init skill · MCP tool → server docstring / README + README.ja tables · registered connector →
drt_list_connectorsinventory (sources and destinations blocks matched separately).Contributor isolation — deliberately NOT
on: pull_requestPer maintainer requirement: contributor PRs never see drift warnings. Docs/skill upkeep is a maintainer concern; surfacing it on first-time contributors' PRs adds onboarding friction. The workflow runs:
main(path-filtered to registry / MCP / docs / skills / README)workflow_dispatchand reports to a self-updating maintainer-facing tracking issue — same model as
contributors-audit.yml(#621). The issue auto-closes when the audit comes back clean.Baseline ratchet
scripts/drift_baseline.txtholds known historical gaps (check_id:itemlines). Only NEW drift fails the run. The 14 destinations that predate thedocs/connectors/convention (discord / jira / teams / twilio / …) are baselined as a docs backlog — every entry is debt to burn down, not a permanent allowlist.Dogfooding: drift found by the first run, fixed in this PR
dest-skill:databricks— #629 merged hours earlier without the skill mention/drt-create-syncdestinations list + mirror-mode availability notesrc-readme:rest_api— REST API source (#474, v0.7) missing from Sources tablesmcp-inventory× 10 —drt_list_connectorsmissing mixpanel / s3 / snowflake-dest / databricks ×2 / twilio / intercom / email_smtp / google_ads / staged_upload / sqlserver / rest_api-srcThe databricks-in-skill catch is exactly the failure mode this tool exists for — it happened within hours of #629 merging.
Usage
make check-drift # local run; exit 0 = no new driftTo accept an intentional, short-lived gap: add
check_id:itemtoscripts/drift_baseline.txt(and burn it down later).Test plan
bash scripts/check_drift.sh— exit 0 after fixes, 14 baselined gaps reported as KNOWNmake check-skillsclean aftermake sync-skillsruff check drtcleanOut of scope
🤖 Generated with Claude Code