This repository was archived by the owner on May 25, 2026. It is now read-only.
feat(ci): schema-drift CI gate against live GitLab (DOT-559)#112
Merged
Conversation
Member
Author
|
This change is part of the following stack: Change managed by git-spice. |
ApprovabilityVerdict: Approved This PR adds CI-only infrastructure (a scheduled workflow and validation script) for detecting schema drift against live GitLab APIs. No production runtime code is modified - the changes are purely testing/validation tooling. You can customize Macroscope's approvability policy. Learn more. |
21ee699 to
c657401
Compare
Closes Phase 4 of the response-schemas initiative (DOT-555). Adds a weekly GitHub Actions workflow plus a standalone Bun script that calls every response-schema-bearing GitLab REST endpoint and parses each response against its declared Zod schema with .parse() (strict). Phase 1 deliberately made runtime parsing lenient (.safeParse + log + pass-through) so users aren't blocked by minor drift; this is the strict counterpart that catches API drift in CI. The script auto-discovers fixture IDs from list endpoints — no per-endpoint env var sprawl. Re-uses loadConfig() and GitLabClient from the runtime. Required env vars: GITLAB_API_URL, GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_PROJECT_ID.
c657401 to
8e00818
Compare
Member
Author
|
@macroscopeapp review |
github-actions Bot
pushed a commit
that referenced
this pull request
May 15, 2026
# [2.33.0](v2.32.0...v2.33.0) (2026-05-15) ### Features * **ci:** schema-drift CI gate against live GitLab (DOT-559) ([#112](#112)) ([fe19784](fe19784))
|
🎉 This PR is included in version 2.33.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Closes Phase 4 of the response-schemas initiative (DOT-555). Adds a
weekly GitHub Actions workflow plus a standalone Bun script that calls
every response-schema-bearing GitLab REST endpoint and parses each
response against its declared Zod schema with .parse() (strict).
Phase 1 deliberately made runtime parsing lenient (.safeParse + log +
pass-through) so users aren't blocked by minor drift; this is the
strict counterpart that catches API drift in CI.
The script auto-discovers fixture IDs from list endpoints — no
per-endpoint env var sprawl. Re-uses loadConfig() and GitLabClient
from the runtime. Required env vars: GITLAB_API_URL,
GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_PROJECT_ID.
Note
Add schema-drift CI gate that validates live GitLab responses against Zod schemas
.parse(), exiting non-zero on any mismatch.workflow_dispatchtrigger that runs the drift check using repo secrets for GitLab credentials.driftscript to package.json for running the same check locally viabun run drift.🖇️ Linked Issues
Completes DOT-559, the Phase 4 subtask of DOT-555 (Introduce Zod response schemas as a token-efficiency primitive).
Macroscope summarized 8e00818.