santifer/career-ops · error · Error
the release pointer names an unusable index filename
Error message
the release pointer names an unusable index filename (${JSON.stringify(doc.filename)}): ${url} What it means
The parsed pointer object must contain a `filename` matching FILENAME_RE; otherwise the installer refuses it, since the filename is used to construct the archive download path. A missing, empty, or path-like/unsafe filename is rejected — this also acts as a path-traversal guard.
Solutions
- Inspect the pointer JSON and ensure it has a `filename` field matching the expected index archive name (e.g. h1b-index.sqlite.zst).
- If you maintain the pointer, publish the correct filename key with a plain filename — no paths or directories.
- Re-point the installer at the official pointer URL to get a known-good document.
- Treat repeated failures from a third-party URL as a trust problem — only use pointers you trust.
Example fix
// before
{"sha256":"abc..."} // filename missing
// after
{"filename":"h1b-index.sqlite.zst","sha256":"abc..."} Defensive patterns
Strategy: validation
Validate before calling
const doc = JSON.parse(text);
if (!/^[A-Za-z0-9._-]+$/.test(String(doc?.filename ?? ''))) {
throw new TypeError(`unsafe or missing pointer filename: ${JSON.stringify(doc?.filename)}`);
} Type guard
const hasSafeFilename = (doc) => doc && typeof doc.filename === 'string' && /^[A-Za-z0-9._-]+$/.test(doc.filename);
Try / catch
try {
await installH1bIndex();
} catch (e) {
if (e.message.includes('unusable index filename')) {
console.error(`Pointer filename rejected (${e.message}). Use a plain archive filename with no path components.`);
} else throw e;
} Prevention
- Always include a plain `filename` (basename only) in pointer documents.
- Never allow path separators in pointer filenames — treat this as a path-traversal guard.
- Only trust pointers from sources you control or vet.
When it happens
Trigger: Running install-h1b-index.mjs against a pointer document whose `filename` field is absent, null, empty, or fails the expected index-filename pattern (e.g. contains slashes, '../', or an unexpected extension).
Common situations: A self-hosted or hand-edited pointer missing the filename key; a renamed archive asset so the pointer was regenerated with a different naming convention; a malicious/compromised pointer attempting path traversal.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- a 40-hex commit --sha is required
- arbeitnow: URL must use HTTPS
- eightfold: URL must use HTTPS
- justjoin: untrusted hostname
- local-parser: careers_url must be http(s)
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/936605d059375eb8.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/h1b-sponsor/install-h1b-index.mjs:122
const out = await fetchImpl(url, { timeoutMs: POINTER_TIMEOUT_MS }, async res => {
if (res.status !== 200) return { status: res.status };
const read = await readBoundedText(res, MAX_POINTER_BYTES);
return read.oversized ? { oversized: true } : { text: read.text };
});
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 existsView on GitHub (pinned to aac998c7ed)