Skip to content

feat(openrca): fetch the dataset from an archive you downloaded - #20

Merged
kottinov merged 3 commits into
mainfrom
feat/openrca-fetch-archive
Nov 18, 2026
Merged

kottinov merged 3 commits into
mainfrom
feat/openrca-fetch-archive

Conversation

@kottinov

Copy link
Copy Markdown
Collaborator

Why

A ReAct baseline on OpenRCA needs the telemetry on disk. Today Google Drive answers every request for the three dataset archives with its "Quota exceeded" page, even for 1 KB ranges, and no mirror exists. This PR lets evorca fetch read an archive that you download yourself, and makes the refusal say what to do.

What changed

  • evorca fetch and evorca reproduce take --archive=<path>, which can repeat. The file's size picks the archive it replaces. Its files go through the same zip reader, pinned size and SHA-256 check, .tmp rename, progress lines, and free-space check as a download.
  • openRemoteZip in remote-zip.ts becomes openZip in zip.ts. It takes a ZipSource, which is a URL or a path, so the source of the bytes is the only thing that changes.
  • A 200 text/html answer to a Range request fails with the archive's name and size, its browser link built from the pinned Drive file ID, and the command to run with --archive.

Scope

  • It covers the three archives as Drive serves them. An archive that was unpacked and zipped again has another size, so it fails with the expected sizes.
  • It leaves out retries, concurrency, and a mirror. pin-telemetry still reads from Drive.
  • The refusal message always suggests evorca fetch. A reproduce user who follows it gets the telemetry as well, which comes from disk, not the network.

Blast Radius

The change touches the dataset download in @evorca/openrca and the flag parsing of fetch and reproduce. Without --archive, the only new behavior is the HTML check, which fires only on an answer that already failed with the generic error.

Verification

  • A real pnpm evorca fetch --benchmark=openrca --scenario=telecom against Drive exits 1 and writes no file:
    Google Drive refused the download (quota exceeded).
    Download Telecom.zip (3.07 GB) from https://drive.google.com/file/d/1cyOKpqyAP4fy-QiJ6a_cKuwR7D46zyVe/view yourself, then run:
      pnpm evorca fetch --benchmark=openrca --scenario=telecom --archive=<path>
    
  • In new tests, a Telecom-shaped zip on disk and an injected pin table give the right bytes and hashes with no HTTP request. A hash mismatch leaves no file and no .tmp, and a zip of the wrong size fails with the archive sizes. A local server that returns Drive's quota page gives the message, both at the first request and partway through a file. Each test fails when its behavior is broken on purpose. pnpm check passes.
  • No test or run reads a real 3 GB archive from disk, because Drive refuses every download today.

Google Drive answers every download of the OpenRCA archives with its
"Quota exceeded" page once a file's quota is used up. With
--archive=<path>, evorca fetch and evorca reproduce read the files from
an archive that the user downloaded in a browser.

The size of the file picks the archive that it replaces. Each file goes
through the same zip reader, pinned size and SHA-256 check, .tmp rename,
and free-space check as a download from Drive. openRemoteZip becomes
openZip, which takes a URL or a path.
When Drive answers a Range request with 200 and an HTML page, the fetch
now fails with the archive's name and size, the link that opens it in a
browser, and the evorca fetch command to run with --archive. The link
comes from the pinned Drive file ID. Other unexpected responses keep
the generic error.
# Conflicts:
#	packages/cli/README.md
#	packages/cli/src/main.ts
@kottinov
kottinov merged commit e338890 into main Nov 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant