Skip to content

feat(docs): document the batch status data type - #12263

Draft
kozlek wants to merge 1 commit into
mainfrom
devs/kozlek/devs/kozlek/batch-status-data-type/document-batch-status-data-type--c5cd0801
Draft

feat(docs): document the batch status data type#12263
kozlek wants to merge 1 commit into
mainfrom
devs/kozlek/devs/kozlek/batch-status-data-type/document-batch-status-data-type--c5cd0801

Conversation

@kozlek

@kozlek kozlek commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

A batch's status.code appeared on the API reference as a bare list of
values with no explanation, and nowhere else in the docs. Readers seeing
a status in an API response, in the CLI, or on a dashboard chip had no
way to find out what it meant.

Add a Batch Status section to the data-types page, rendering a table
generated from the OpenAPI spec so the codes and their descriptions come
from the engine rather than being hand-maintained, and cross-reference it
from the monitoring and batches pages.

Extend the anchor build gate to scan the API spec alongside the
configuration schema. This is the first data type marked in the API
spec, and schema syncs land as direct pushes to main, so the deploy
build is the only gate they pass through.

The bundled api-schemas.json is what the sync bot will deliver once the
engine side merges; it differs from the current file in the BatchStatus
schema alone.

Also sanitize renderMarkdown. Its output is injected with
dangerouslySetInnerHTML by every schema-driven table, and it did not
filter URL protocols, so a javascript: link in any synced description
would have rendered as a live link. Raw HTML was already dropped, since
remark-rehype runs without allowDangerousHtml. The inputs are all
first-party, so this is defence in depth, but the guarantee belongs in
the shared helper rather than in each of its six callers. Verified that
article text and every href on the data-types, file-format and batches
pages are unchanged.

Part of MRGFY-8330

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

Copilot AI review requested due to automatic review settings July 29, 2026 16:44
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 29, 2026 16:44 Failure
@mergify

mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 2 of 6 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

Show 4 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team July 29, 2026 16:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents the merge queue batch status.code data type and ensures the docs build/CI gate catches future schema-driven anchor drift by validating both the configuration schema and the OpenAPI schema.

Changes:

  • Adds a new Batch Status section to /configuration/data-types, rendering status codes/descriptions from the synced OpenAPI schema.
  • Cross-references the new data type from merge queue monitoring and batch resolution docs.
  • Extends the anchor validation gate (and its tests) to scan public/api-schemas.json in addition to the configuration schema.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/util/dataType.test.ts Adds API schema coverage to the data-type anchor test suite and pins the new batch-status anchor.
src/content/docs/merge-queue/monitoring.mdx Links readers to the Batch Status reference from the monitoring page.
src/content/docs/merge-queue/batches.mdx References batch status codes during batch failure resolution/splitting explanation.
src/content/docs/configuration/data-types.mdx Adds the Batch Status section and renders the new table component.
src/components/Tables/BatchStatusCodes.tsx New table component that reads status enums + descriptions from the OpenAPI schema.
public/api-schemas.json Updates BatchStatus schema metadata to include x-enum-descriptions and the x-has-data-type marker.
integrations/validate-data-type-anchors.ts Extends the build-time anchor validation to check both synced schemas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Tables/BatchStatusCodes.tsx
A batch's `status.code` appeared on the API reference as a bare list of
values with no explanation, and nowhere else in the docs. Readers seeing
a status in an API response, in the CLI, or on a dashboard chip had no
way to find out what it meant.

Add a Batch Status section to the data-types page, rendering a table
generated from the OpenAPI spec so the codes and their descriptions come
from the engine rather than being hand-maintained, and cross-reference it
from the monitoring and batches pages.

Extend the anchor build gate to scan the API spec alongside the
configuration schema. This is the first data type marked in the API
spec, and schema syncs land as direct pushes to main, so the deploy
build is the only gate they pass through.

The bundled `api-schemas.json` is what the sync bot will deliver once the
engine side merges; it differs from the current file in the BatchStatus
schema alone.

Also sanitize `renderMarkdown`. Its output is injected with
`dangerouslySetInnerHTML` by every schema-driven table, and it did not
filter URL protocols, so a `javascript:` link in any synced description
would have rendered as a live link. Raw HTML was already dropped, since
`remark-rehype` runs without `allowDangerousHtml`. The inputs are all
first-party, so this is defence in depth, but the guarantee belongs in
the shared helper rather than in each of its six callers. Verified that
article text and every href on the data-types, file-format and batches
pages are unchanged.

Part of MRGFY-8330

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Change-Id: Ic5cd08016af10408a80c0d9f72b86dd61abc0a84
@kozlek
kozlek force-pushed the devs/kozlek/devs/kozlek/batch-status-data-type/document-batch-status-data-type--c5cd0801 branch from e2af176 to 5e644c7 Compare July 30, 2026 13:20
@kozlek

kozlek commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial e2af176 2026-07-30 13:20 UTC
2 content e2af176 → 5e644c7 2026-07-30 13:20 UTC

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections July 30, 2026 13:20 Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants