From 1e5454909dad5ab103372ad10461254dbacf0691 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 09:39:05 +0000 Subject: [PATCH] Fix aurora.skillissue.gg TXT record breaking the skillissue.gg deploy The Railway verification TXT was stored as an object inside aurora/@.json, so deploy.js sent "[object Object]" and skrime rejected the zone. It also put a TXT next to a CNAME on the same name, which DNS does not allow. - Move it to aurora/_railway-verify.json (-> _railway-verify.aurora) - deploy.js: refuse non-string record values before POSTing - validate-pr.js: reject non-string values, allow _label record files Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Vzw95xoy6RWUeGkRfgbMST --- .github/scripts/deploy.js | 4 ++++ .github/scripts/validate-pr.js | 9 ++++++++- domains/skillissue.gg/aurora/@.json | 19 ++++++++----------- .../skillissue.gg/aurora/_railway-verify.json | 5 +++++ 4 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 domains/skillissue.gg/aurora/_railway-verify.json diff --git a/.github/scripts/deploy.js b/.github/scripts/deploy.js index 873cdc9..79d3c0f 100644 --- a/.github/scripts/deploy.js +++ b/.github/scripts/deploy.js @@ -48,6 +48,9 @@ function collectRecords(domain) { for (const [type, value] of Object.entries(recs)) { const values = Array.isArray(value) ? value : [value]; for (const v of values) { + if (typeof v !== "string" && typeof v !== "number") { + throw new Error(`${domain}: ${sub}/${file} ${type} value must be a string, got ${JSON.stringify(v)}`); + } records.push({ name, type, data: String(v) }); } } @@ -67,6 +70,7 @@ function summarize(text) { } async function deployZone(domain, productId) { + // Throws on malformed files, so a broken zone is never pushed. const records = collectRecords(domain); const body = JSON.stringify({ productId, records }); diff --git a/.github/scripts/validate-pr.js b/.github/scripts/validate-pr.js index 6998485..2c047e5 100644 --- a/.github/scripts/validate-pr.js +++ b/.github/scripts/validate-pr.js @@ -95,7 +95,8 @@ module.exports = async function validate({ github, context, core }) { // 5) Validate the folder name (and the record label, unless it is the apex). const nameErrors = validateName(sub); - if (!isApex) nameErrors.push(...validateName(label)); + // Record labels may start with "_" (e.g. `_railway-verify` for TXT verification). + if (!isApex) nameErrors.push(...validateName(label.replace(/^_/, ""))); if (nameErrors.length) { errors.push(...nameErrors.map((e) => `\`${fqdn}\`: ${e}`)); continue; @@ -248,6 +249,12 @@ function validateContent(data, isApex) { errors.push(`unsupported record type \`${t}\` (allowed: ${ALLOWED_RECORD_TYPES.join(", ")})`); } } + for (const [t, value] of Object.entries(data.records)) { + const values = Array.isArray(value) ? value : [value]; + if (values.length === 0 || values.some((v) => typeof v !== "string" || v.trim() === "")) { + errors.push(`\`${t}\` must be a string or a list of strings (for a record on another name like \`_verify\`, add a separate \`_verify.json\` file)`); + } + } if (types.includes("CNAME") && types.length > 1) { errors.push("a `CNAME` record cannot be combined with other record types"); } diff --git a/domains/skillissue.gg/aurora/@.json b/domains/skillissue.gg/aurora/@.json index f8de4ca..73eeb04 100644 --- a/domains/skillissue.gg/aurora/@.json +++ b/domains/skillissue.gg/aurora/@.json @@ -1,12 +1,9 @@ { - "records": { - "CNAME": "supernova-production-effe.up.railway.app", - "TXT": { - "_railway-verify": "railway-verify=5be397286a026674475780f7826aa5bf67ecff58f9156e09068c55d5b0fb34b3" - } - }, - "description": "SUPERNOVA aurora-themed cosmic apparel", - "owner": { - "github": "userst971-gif" - } -} \ No newline at end of file + "records": { + "CNAME": "supernova-production-effe.up.railway.app" + }, + "description": "SUPERNOVA aurora-themed cosmic apparel", + "owner": { + "github": "userst971-gif" + } +} diff --git a/domains/skillissue.gg/aurora/_railway-verify.json b/domains/skillissue.gg/aurora/_railway-verify.json new file mode 100644 index 0000000..c05b66e --- /dev/null +++ b/domains/skillissue.gg/aurora/_railway-verify.json @@ -0,0 +1,5 @@ +{ + "records": { + "TXT": "railway-verify=5be397286a026674475780f7826aa5bf67ecff58f9156e09068c55d5b0fb34b3" + } +}