---
name: imc-reproducibility
description: Use when keeping measurement data, queries, vantage records, and gaps so that an IMC result can be recomputed from raw data and promised artifacts can be delivered. Does not publish.
---

# IMC reproducibility

Use this from the first collection day. IMC says that willingness to share and make work reproducible receives particular attention.

Call: https://conferences.sigcomm.org/imc/2027/cfp/

## Three stores

```text
raw/      append-only, checksummed daily, restricted          <- never edited, never "cleaned"
derived/  built by code from raw, can be deleted              <- partition by collection date
paper/    numbers, tables, figures, built from derived        <- one query per number
```

If a fix is needed, it is code in the step from raw to derived, with a comment saying which day revealed it.

## Collection diary

A line per day, partly automatic:

```bash
D=$(date -u +%F); mkdir -p diary
{ echo "date $D"; echo "host $(hostname)"; echo "collector $(git rev-parse --short HEAD 2>/dev/null || echo NO-GIT) dirty:$(git status --porcelain 2>/dev/null | wc -l | tr -d ' ')"
  echo "files $(find raw/"$D" -type f 2>/dev/null | wc -l | tr -d ' ') bytes $(du -sk raw/"$D" 2>/dev/null | cut -f1)K"
  echo "clock $( (chronyc tracking 2>/dev/null || timedatectl 2>/dev/null) | grep -iE 'offset|synchronized' | head -1)"
  echo "ip $(ip -br addr 2>/dev/null | awk '$2=="UP"{print $3}' | head -2 | tr '\n' ' ')"; } > "diary/$D.txt"
[ -d "raw/$D" ] && (cd "raw/$D" && find . -type f -exec sha256sum {} + 2>/dev/null | sort -k2 > "../../diary/$D.sha256")
cat "diary/$D.txt"; grep -q '^files 0 ' "diary/$D.txt" && echo "LOOK: nothing was collected today"
```

By hand add: outages, provider mail, blocked addresses, changed lists, complaints.

## Every number has a query

A file `numbers.yml`: key, SQL or script, derived version, value, date. The paper uses a macro per key, written by the build. When a reviewer asks for the denominator the answer is one line away. Numbers typed by hand are the ones that differ between abstract and Section 5.

## Snapshots of the outside

Top lists, routing tables, geolocation, AS-to-organization, WHOIS, blocklists, certificate logs: store the copy used, with date and licence. They are not available later in the same form.

## Rules as code

R1 and R2 of the paper are functions with tests: ten positive examples, ten negative, ten odd ones from life. Change of a rule is a version, and derived data state which one they used.

## Recompute test

Four weeks before submission somebody else deletes `derived/` and `paper/` on a copy, rebuilds from raw, compares numbers. Time it. Differences are explained before the text is touched.

## Privacy

Raw data that can harm people: encryption, access list, deletion date, log of access. The plan is written for the ethics review and is **kept**.

## Output

```text
[IMC record] days <n>, gaps <n explained>, checksums ok
[numbers.yml] keys <n>, typed by hand <none>
[External snapshots] <list with dates>
[Rules tested] R1..R<n>, version <x>
[Rebuilt by] <person> in <hours>, differences <none / explained>
[Raw access] <who>, delete on <date>
```

## Reverify each cycle

- What Open Science asks to declare.
