ci(browser): MCP connection drift-check workflow - #4
Merged
Conversation
The build-from-scratch skill for agentbase-browser — the intake front half the MCP's guidance.py (mechanics canon) deliberately lacks. - skills/byg-et-flow/SKILL.md — interview → confirm the plan in chat → build → run on a real sample → iterate. Enforces a five-point intake bar before building (process+rules, variants, a real sample input, output+audience, Human-in-the-Loop placement) and the chat-checkpoint discipline (the canvas is invisible in another tab). Hands off to the MCP mechanics: read guide://flow-building, confirm handles with get_node_type, lay the whole graph in one set_flow rather than clobber-prone incremental edits. - skills/byg-et-flow/references/flow-eksempler.md — four Danish flow shapes distilled from guidance.py EXAMPLES + docs relationships.md (document → structured data → spreadsheet; sort a document pile; loop over a list; conditional branching), each pointing at the live example:// resource and get_node_type for exact handles, so tool-schema drift can't reach the skill. RED/GREEN tested: without the skill a fresh agent gathered only a partial intake (missed variants and the approval step); with it, the full five-point intake plus confirm-in-chat/run-on-sample loop. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai> Claude-Session: https://claude.ai/code/session_01SYvwyQEa9xsKzsQTwpBuhp
The debug skill for agentbase-browser — reproduce, localise, smallest fix,
re-run. Mirrors the MCP's revise_flow prompt and folds in the concrete
failure catalogue from guidance.py + flow-agent/src/prompts.ts.
- skills/ret-et-flow/SKILL.md — the fault-finding loop (reproduce on a real
failing input → localise the exact node:handle with get_execution → make the
smallest change → re-run on the same input) plus a symptom→cause→fix table of
the AgentBase-specific traps a generic agent won't know: empty output after a
Hvis/ellers (config missing true_output/false_output → set both, route both
branches to one shared field); raw {placeholder} (conditional branches merged
into one template); dataurl→text needs Dokument-OCR not a code node; a list
fed to a single-item node needs a Løkke; loop-control nodes must sit inside
the loop; missing response_schema. Names no tool schemas — get_node_type and
guide://flow-building stay the live source, so drift can't reach it.
RED/GREEN tested on an empty-if-else-output scenario: both baseline and
skilled agents debugged rather than rebuilt, but the skill made the agent lead
with the exact known root cause and its precise structural fix instead of a
diffuse list of guesses.
Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai>
Claude-Session: https://claude.ai/code/session_01SYvwyQEa9xsKzsQTwpBuhp
Guards the two rot-prone facts the browser packs depend on — the MCP endpoint host and its OAuth auth model. Real drift here is ~1 event/year, always silent and total: the server moves or changes auth under a still repo and every packaged connector URL / skill instruction breaks at once. - scripts/check-mcp-drift.sh — fetches the live RFC 9728 metadata at api.agentbase.dk/.well-known/oauth-protected-resource/mcp and asserts: host reachable + HTTP 200; advertised `resource` equals the canonical https://api.agentbase.dk/mcp the packs ship; OAuth still advertised (authorization_servers non-empty); the canonical URL is actually present in a manifest/skill; and no plugin.json points at the dead host or carries a static-token block (userConfig/headers/Authorization/Bearer). The stale-host and token checks are scoped to plugin.json — skill prose may legitimately name the dead host as forbidden, so a repo-wide scan would false-positive. - .github/workflows/mcp-drift-check.yml — runs on pull_request, a weekly cron, and workflow_dispatch. On a non-PR failure it opens (or comments on an existing) "MCP connection drift detected" issue, because the failure that actually happens — the server moving under a still repo — surfaces only in the cron run, where a red check alone goes unseen. - .gitattributes — pin *.sh / *.yml to LF so CRLF can't break bash on the runner. Verified: live endpoint returns resource=https://api.agentbase.dk/mcp with one authorization server; script passes syntax + repo-scan checks against the current tree. Co-Authored-By: Claude <noreply@anthropic.com> via Dash <dash@syv.ai> Claude-Session: https://claude.ai/code/session_01SYvwyQEa9xsKzsQTwpBuhp
simo787c
marked this pull request as ready for review
July 27, 2026 09:45
simo787c
changed the base branch from
feat/agentbase-browser-ret-et-flow
to
main
July 27, 2026 09:47
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.
What
PR 4 of 4 for
agentbase-browser. Adds an automated drift check for the two rot-prone facts every browser pack depends on: the MCP endpoint host and its OAuth auth model. This drift is rare (~1 event/year) but silent and total — when the server moves or changes auth under a still repo, every packaged connector URL and skill instruction breaks at once.Stacked on #3 (base =
feat/agentbase-browser-ret-et-flow) — merge #1→#2→#3 first.How it checks
scripts/check-mcp-drift.shfetches the live RFC 9728 metadata atapi.agentbase.dk/.well-known/oauth-protected-resource/mcp(root-mounted, unauthenticated) and asserts:resourceequals the canonicalhttps://api.agentbase.dk/mcpthe packs ship.authorization_serversnon-empty).plugin.jsonpoints at the deadapi.flows.syv.aihost or carries a static-token block (userConfig/headers/Authorization/Bearer).The stale-host and token checks are scoped to
plugin.jsonon purpose: skill prose legitimately names the dead host as forbidden (kom-i-gangdoes), so a repo-wide scan would false-positive. The server's ownbearer_methods_supportedis a normal OAuth field and is not treated as drift.When it runs
.github/workflows/mcp-drift-check.yml—pull_request, a weeklyschedule(Mondays 06:17 UTC), andworkflow_dispatch. On a non-PR failure it opens (or comments on an existing) "MCP connection drift detected" issue — because the failure that actually happens surfaces only in the cron run, where a red check alone goes unseen. On a PR the failing check is already visible to the author..gitattributespins*.sh/*.ymlto LF so CRLF can't break bash on the Linux runner.Verification
resource=https://api.agentbase.dk/mcp, one authorization server, HTTP 200.bash -nand the repo-scan assertions against the current tree; jq assertions validated by hand against the live JSON (jq is preinstalled onubuntu-latest).To exercise the alarm path: push a branch that changes the canonical URL to a wrong host and confirm the check fails (and, on a dispatch run, opens the issue).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SYvwyQEa9xsKzsQTwpBuhp