fix: probe lane ffprobes the OPENED source, not the sealed frame
downloadSealed fetched raw bytes (getSealedObject) and handed ciphertext to ffprobe — every direct upload failed 'Invalid data found'. The lane now uses getObject, whose magic branch opens SPENC1 and SPENC2 alike.
This commit is contained in:
parent
11b7619653
commit
df62aa88d4
1 changed files with 6 additions and 6 deletions
|
|
@ -166,7 +166,7 @@ export class ProduceRunner {
|
||||||
private async runProbe(job: ClaimedProduceJob): Promise<void> {
|
private async runProbe(job: ClaimedProduceJob): Promise<void> {
|
||||||
const directory = await mkdtemp(join(this.deps.scratchRoot, "probe-"));
|
const directory = await mkdtemp(join(this.deps.scratchRoot, "probe-"));
|
||||||
try {
|
try {
|
||||||
const bytes = await this.downloadSealed(job.source.storageKey);
|
const bytes = await this.downloadSource(job.source.storageKey);
|
||||||
const inputPath = join(directory, scratchAssetName(job.source.storageKey, "bin"));
|
const inputPath = join(directory, scratchAssetName(job.source.storageKey, "bin"));
|
||||||
await writeFile(inputPath, bytes, { mode: 0o600 });
|
await writeFile(inputPath, bytes, { mode: 0o600 });
|
||||||
await this.deps.jobs.progress(job.jobId, 50);
|
await this.deps.jobs.progress(job.jobId, 50);
|
||||||
|
|
@ -195,13 +195,13 @@ export class ProduceRunner {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the sealed source. getSealedObject is the raw read (the api's twin);
|
* Fetch the source PLAINTEXT: getObject picks the frame branch by magic, so
|
||||||
* getObject then picks the frame branch by magic, so both SPENC1 (api-sealed)
|
* SPENC1 (api-sealed) and SPENC2 (browser-sealed direct upload) sources open
|
||||||
* and SPENC2 (browser-sealed direct upload) sources probe identically here.
|
* identically before ffprobe. getSealedObject stays for CEK-header reads.
|
||||||
*/
|
*/
|
||||||
private async downloadSealed(storageKey: string): Promise<Buffer> {
|
private async downloadSource(storageKey: string): Promise<Buffer> {
|
||||||
try {
|
try {
|
||||||
return await withTimeout(this.deps.storage.getSealedObject(storageKey), this.downloadTimeoutMs, "download failed");
|
return await withTimeout(this.deps.storage.getObject(storageKey), this.downloadTimeoutMs, "download failed");
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
if (error instanceof Error && error.name === "download failed") throw error;
|
if (error instanceof Error && error.name === "download failed") throw error;
|
||||||
throw produceError("download failed");
|
throw produceError("download failed");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue