feat(ci): auto-update sticky coverage tracker on every schema sync#61
Open
strausmann wants to merge 1 commit into
Open
feat(ci): auto-update sticky coverage tracker on every schema sync#61strausmann wants to merge 1 commit into
strausmann wants to merge 1 commit into
Conversation
Adds a new "Update sticky coverage tracker" step to the `api-schema-sync.yml` workflow. After the validator runs, it locates a single open issue labelled `coverage-tracker` and rewrites the content between the `<!-- validator-report:start -->` and `<!-- validator-report:end -->` markers with the latest `validation-report.md`. Manual context above/below the markers (priority categorisation, decisions, follow-up checklists) is preserved. Why this is needed: - The validator already reports MISSING_TOOL endpoints, but exits 0 for them (informational only). The existing "Create issue on validation failure" step therefore never fires for coverage gaps, only for ORPHANED_TOOL / PARAM_MISMATCH / MISSING_ENCODE — so long-standing coverage gaps stayed invisible outside the workflow artifact. - A single sticky issue gives the gap a stable, addressable home while keeping the existing per-incident issue flow intact for hard schema mismatches. Safety properties: - No issue → warning, no failure. - Multiple matching issues → warning, no update (prevents clobbering). - Missing markers → warning, no update (manual issue layout preserved). - Idempotent: identical body produces no API call. Refs #60
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
Pull request overview
Adds an automated “sticky” coverage tracking update to the api-schema-sync workflow so the validator’s informational validation-report.md is surfaced directly in a single labeled GitHub issue, refreshed on each run, while preserving manual notes outside the marker block.
Changes:
- Adds a new
actions/github-scriptstep to find the single open issue labeledcoverage-trackerand replace only the content between<!-- validator-report:start -->/<!-- validator-report:end -->. - Stamps the report with the run date and a link back to the workflow run, and skips the update when the computed body is unchanged.
Comment on lines
+71
to
+82
|
|
||
| if (issues.data.length === 0) { | ||
| core.warning('No open issue with label "coverage-tracker" found — skipping sticky update.'); | ||
| return; | ||
| } | ||
| if (issues.data.length > 1) { | ||
| const nums = issues.data.map(i => `#${i.number}`).join(', '); | ||
| core.warning(`Multiple issues carry label "coverage-tracker" (${nums}). Skipping update to avoid clobbering.`); | ||
| return; | ||
| } | ||
|
|
||
| const issue = issues.data[0]; |
Comment on lines
+100
to
+103
| if (newBody === body) { | ||
| core.info(`Issue #${issue.number} already up to date — no change.`); | ||
| return; | ||
| } |
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
Extend
api-schema-sync.ymlwith a new step that auto-updates a single sticky tracking issue (labelcoverage-tracker, currently #60) after every validator run. The step rewrites only the content between<!-- validator-report:start -->and<!-- validator-report:end -->markers in the issue body — manual notes around the markers are preserved.Why
The validator already produces
validation-report.mdlisting every endpoint without an MCP tool, but those gaps exit 0 (informational). The existingCreate issue on validation failurestep only fires for hard schema mismatches (ORPHANED_TOOL / PARAM_MISMATCH / MISSING_ENCODE), so long-standing coverage gaps stayed buried inside the workflow artifact. After this change, the gap count and per-endpoint list are visible on the issue tracker and refreshed daily.How
Update sticky coverage trackerstep, placed betweenValidate MCP tools against schemaand the existingCreate issue on validation failure.if: always() && hashFiles('validation-report.md') != '').coverage-trackerlabel, expects exactly one open match.Safety properties
coverage-trackerlabelcore.warning, no failurecore.warning, no update (prevents clobbering)core.warning, no update (preserves any manual layout)Test plan
python3 -c 'yaml.safe_load(...)')workflow_dispatchand confirm MCP API Coverage tracking: 44 endpoints without MCP tool #60 body refreshes between markerscore.warningpaths surface in workflow logs when label/markers are missingRefs
Refs #60