fix(artifacts): admit bounded reads and preserve source identity

Validation: integrated changes passed formatting, typecheck, lint, resolved module-boundary verification and git diff --check. Tests and real-provider workflows were not run.
This commit is contained in:
morluto committed 2026-10-11 00:03:18 +08:00
1 parent 2a0b58e440
commit 6d4cefc4f7
21 files changed
+502 -189

No files matched your search

+6 -1
View File
@@ -50,7 +50,12 @@ export const publishWakaruArtifacts = async (
const { tree, source, parsed, staging, signal } = context;
const write = async (path: string, bytes: Buffer) => {
const sha256 = recoveryDigest(bytes);
const file = await tree.write(path, Readable.from([bytes]), sha256, signal);
const file = await tree.write(
path,
Readable.from([bytes]),
{ sha256, bytes: bytes.byteLength },
signal,
);
return {
path: join(tree.outputRoot, file.relativePath),
sha256: file.sha256,