Skip to content

validate: check record value formats, run the same check before every deploy - #22

Merged
TinyBrickBoy merged 1 commit into
mainfrom
claude/nice-shannon-l9mipe
Sep 25, 2026
Merged

TinyBrickBoy merged 1 commit into
mainfrom
claude/nice-shannon-l9mipe

Conversation

@TinyBrickBoy

Copy link
Copy Markdown
Owner

This PR hardens record validation so a broken file like the aurora TXT object (fixed in #21) can't break a deploy again. That PR was merged even though validate was red, and one bad record made skrime reject the whole skillissue.gg zone.

validate-pr.js

  • Checks every value against its record type:
    • A: IPv4
    • AAAA: IPv6
    • CNAME/ALIAS: exactly one hostname
    • MX: <prio> <host>
    • SRV: <prio> <weight> <port> <target>
    • CAA: <flags> issue|issuewild|iodef <value>
    • TXT: no surrounding quotes, max 2048 chars
  • Rejects objects, empty strings and empty lists, and points people to a separate _label.json file instead.
  • Exports validateContent so the deploy script can reuse it.

deploy.js

  • Runs validateContent on every file before the POST, so a broken zone never reaches skrime, even if a red PR gets merged. The other domains still deploy.

README

  • Documents the new rules.

Tested locally:

  • All 9 existing record files pass.
  • Malformed cases fail with clear messages: object TXT, bad IPv4/IPv6, CNAME list, URL as CNAME, MX without priority, quoted TXT, empty list.
  • Against a mock API, the current data deploys, and the old aurora file fails skillissue.gg before the POST while addictedto.beer still deploys.

Note: validate fails on this PR by design because it only touches files outside domains/.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vzw95xoy6RWUeGkRfgbMST


Generated by Claude Code

… deploy

A malformed record (the aurora TXT object) was merged although the PR check
was red, and it broke the deploy of the whole skillissue.gg zone.

- validate-pr.js: check each value per type (IPv4, IPv6, hostname, MX,
  SRV, CAA, TXT without quotes, single CNAME) and export validateContent
- deploy.js: run validateContent on every file before POSTing, so a broken
  file fails the run instead of reaching skrime, even if a red PR is merged
- README: document the new rules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vzw95xoy6RWUeGkRfgbMST
@github-actions

Copy link
Copy Markdown

Changes requested

Thanks for your submission! A few things need fixing before this can be merged:

  • .github/scripts/deploy.js is outside domains/. PRs may only add or edit files in domains/<domain>/<subdomain>/.
  • .github/scripts/validate-pr.js is outside domains/. PRs may only add or edit files in domains/<domain>/<subdomain>/.
  • README.md is outside domains/. PRs may only add or edit files in domains/<domain>/<subdomain>/.

Push a new commit to this pull request and I'll re-check automatically.

@github-actions github-actions Bot added the invalid This doesn't seem right label Sep 25, 2026

Copy link
Copy Markdown
Owner Author

validate fails here by design. This PR only changes maintainer files (.github/scripts/*, README.md), and validate-pr.js accepts only changes inside domains/<domain>/<subdomain>/. Nothing is wrong with the code; a maintainer has to merge past this check.


Generated by Claude Code

@TinyBrickBoy
TinyBrickBoy marked this pull request as ready for review September 25, 2026 09:45
@TinyBrickBoy
TinyBrickBoy merged commit be2d9fb into main Sep 25, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants