santifer/career-ops · error · Error

the release pointer does not carry a sha256 digest

Error message

the release pointer does not carry a sha256 digest: ${url}

What it means

The pointer must carry a sha256 digest matching SHA256_RE so the downloaded archive can be integrity-checked. When `sha256` is missing, empty, or not a 64-char hex digest, the installer throws instead of downloading an archive it could not verify.

Solutions

  1. Regenerate the sha256 (e.g. `sha256sum h1b-index.sqlite.zst`) and publish the full 64-character lowercase hex digest in the pointer.
  2. If you do not control the pointer, switch to the official pointer URL, which always carries a valid digest.
  3. Validate before publishing: `echo <digest> | grep -E '^[0-9a-f]{64}$'`.

Example fix

// before
{"filename":"h1b-index.sqlite.zst","sha256":"TODO"}
// after
{"filename":"h1b-index.sqlite.zst","sha256":"9f2c...64-hex...e1"}
Defensive patterns

Strategy: validation

Validate before calling

const doc = JSON.parse(text);
if (!/^[0-9a-f]{64}$/.test(String(doc?.sha256 ?? '').trim().toLowerCase())) {
  throw new TypeError('pointer sha256 missing or malformed');
}

Type guard

const hasValidDigest = (doc) => typeof doc?.sha256 === 'string' && /^[0-9a-f]{64}$/.test(doc.sha256.trim().toLowerCase());

Try / catch

try {
  await installH1bIndex();
} catch (e) {
  if (e.message.includes('does not carry a sha256')) {
    console.error('Pointer lacks a valid sha256; regenerate with sha256sum and republish the pointer.');
  } else throw e;
}

Prevention

When it happens

Trigger: Running install-h1b-index.mjs against a pointer document whose sha256 field is absent, blank, uppercase-with-junk, truncated, or otherwise not a valid lowercase 64-hex-digit digest after trim().

Common situations: Hand-rolled mirror pointer where the author forgot to compute the digest; a regenerated archive whose pointer was not updated; editing the pointer by hand and pasting a short or 'TODO' value.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16). Data as JSON: /api/errors/b3b9dc9a4e30c591. Report an issue: GitHub.

Appendix: source

Thrown at plugins/h1b-sponsor/install-h1b-index.mjs:126

  });
  if (out.status) throw new Error(`could not read the release pointer (HTTP ${out.status}): ${url}`);
  if (out.oversized) throw new Error(`the release pointer is implausibly large: ${url}`);

  let doc;
  try {
    doc = JSON.parse(String(out.text || ''));
  } catch {
    throw new Error(`the release pointer is not JSON: ${url}`);
  }
  if (!doc || typeof doc !== 'object') throw new Error(`the release pointer is not an object: ${url}`);

  const filename = String(doc.filename || '');
  if (!FILENAME_RE.test(filename)) {
    throw new Error(`the release pointer names an unusable index filename (${JSON.stringify(doc.filename)}): ${url}`);
  }
  const sha256 = String(doc.sha256 || '').trim().toLowerCase();
  if (!SHA256_RE.test(sha256)) {
    throw new Error(`the release pointer does not carry a sha256 digest: ${url}`);
  }
  // Recorded, never acted on, so a missing or odd value costs a label rather
  // than the install. Bounded because it lands in a file on disk.
  const version = doc.version === undefined || doc.version === null
    ? null
    : String(doc.version).slice(0, 64);
  return { filename, sha256, version };
}

/**
 * Stream the asset to `tmpFile`, hashing as it goes, and return the digest.
 *
 * Streamed rather than buffered: the body is millions of times the size of
 * anything else this plugin reads, and readBoundedText's 1 MiB ceiling exists
 * precisely because nothing on the API path should ever be this big. Hashing
 * during the write means the file is never read a second time to verify it.
 */
async function downloadAsset(fetchImpl, url, tmpFile) {

View on GitHub (pinned to aac998c7ed)