Data layer at the amended release v1.0.0: card no longer names local-only tooling, frozen-snapshot notice
Browse files- README.md +4 -5
- methodology.md +1 -1
- scripts/analyze.py +75 -0
README.md
CHANGED
|
@@ -201,11 +201,10 @@ The first two run offline and exit 0 in either repository — the source reposit
|
|
| 201 |
data layer — against the files shipped here. The third reaches the hub (and Zenodo, given a
|
| 202 |
record identifier) and is the release-time check that the copy you are reading is byte-for-byte
|
| 203 |
the copy in the other places: it reports drift rather than asserting agreement, because the
|
| 204 |
-
three locations are updated by different commands and nothing synchronises them.
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
a reader can actually run, so they are what this card asks a reader to run.
|
| 209 |
|
| 210 |
Pseudonyms (`sess-NN` in round 1, `S1`… in round 2) are numbered by the data's own
|
| 211 |
order; the mapping to real conversation identifiers is not published and cannot be
|
|
|
|
| 201 |
data layer — against the files shipped here. The third reaches the hub (and Zenodo, given a
|
| 202 |
record identifier) and is the release-time check that the copy you are reading is byte-for-byte
|
| 203 |
the copy in the other places: it reports drift rather than asserting agreement, because the
|
| 204 |
+
three locations are updated by different commands and nothing synchronises them. Anything not
|
| 205 |
+
listed above is author-side tooling, or needs material deliberately not published here — the raw
|
| 206 |
+
client logs, which carry local paths and real conversation identifiers. The commands above are
|
| 207 |
+
what a reader can actually run, so they are what this card asks a reader to run.
|
|
|
|
| 208 |
|
| 209 |
Pseudonyms (`sess-NN` in round 1, `S1`… in round 2) are numbered by the data's own
|
| 210 |
order; the mapping to real conversation identifiers is not published and cannot be
|
methodology.md
CHANGED
|
@@ -31,7 +31,7 @@ and real conversation identifiers):
|
|
| 31 |
|
| 32 |
| Step | Command | Result of the attempt |
|
| 33 |
|---|---|---|
|
| 34 |
-
| Derived statistics from the published evidence | `python3 scripts/analyze.py` | **reproduces exactly.**
|
| 35 |
| Card against files | `python3 scripts/verify_dataset_card.py` | **reproduces exactly**, eight checks, in either repository |
|
| 36 |
| Log extracts from the pinned snapshot | `LOGSRC=<snapshot>/logs scripts/collect_evidence.sh` then `scripts/anonymize.py` | **does not reproduce the frozen bundle.** Of 24 published items, 4 matched byte for byte, 11 differed, and 9 were not produced at all (`evidence/screenshots/`, `evidence/user_statements.md`, four extracts, two statistics files, the round-2 directory) |
|
| 37 |
|
|
|
|
| 31 |
|
| 32 |
| Step | Command | Result of the attempt |
|
| 33 |
|---|---|---|
|
| 34 |
+
| Derived statistics from the published evidence | `python3 scripts/analyze.py` | **reproduces exactly.** 60 assertions pass. The output file ends with a content hash plus a second-precision timestamp, and when the hash is unchanged the file is not rewritten at all — so running the checks cannot dirty the tree, and two copies with the same hash hold the same statistics whatever their stamps say |
|
| 35 |
| Card against files | `python3 scripts/verify_dataset_card.py` | **reproduces exactly**, eight checks, in either repository |
|
| 36 |
| Log extracts from the pinned snapshot | `LOGSRC=<snapshot>/logs scripts/collect_evidence.sh` then `scripts/anonymize.py` | **does not reproduce the frozen bundle.** Of 24 published items, 4 matched byte for byte, 11 differed, and 9 were not produced at all (`evidence/screenshots/`, `evidence/user_statements.md`, four extracts, two statistics files, the round-2 directory) |
|
| 37 |
|
scripts/analyze.py
CHANGED
|
@@ -13,6 +13,7 @@ from __future__ import annotations
|
|
| 13 |
import hashlib
|
| 14 |
import json
|
| 15 |
import re
|
|
|
|
| 16 |
import sys
|
| 17 |
from collections import Counter, defaultdict
|
| 18 |
from datetime import datetime
|
|
@@ -405,6 +406,80 @@ if PUB_DOCS:
|
|
| 405 |
check("no published document quotes a check or figure count unless its section dates the measurement",
|
| 406 |
count_problems, [])
|
| 407 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 408 |
# ---- the release note describes the artifact, not the machinery that publishes it ----
|
| 409 |
# A GitHub release body is reader-facing text. Workflow commentary in it - what we chose not
|
| 410 |
# to attach and why, which integration has to be enabled first - is addressed to the person
|
|
|
|
| 13 |
import hashlib
|
| 14 |
import json
|
| 15 |
import re
|
| 16 |
+
import subprocess
|
| 17 |
import sys
|
| 18 |
from collections import Counter, defaultdict
|
| 19 |
from datetime import datetime
|
|
|
|
| 406 |
check("no published document quotes a check or figure count unless its section dates the measurement",
|
| 407 |
count_problems, [])
|
| 408 |
|
| 409 |
+
# ---- a published heading must not route text to a venue ----
|
| 410 |
+
# The released v1.0.0 tag carried "## One-line entry (repository subtitle, listing, tweet)" and
|
| 411 |
+
# "## Short entry (about 300 characters: post summary field, search result, card lead)" in
|
| 412 |
+
# abstract.md: notes for whoever posts the text, sitting in a file a stranger downloads. Venue
|
| 413 |
+
# routing in a heading is the signature, so the heading is what is checked - prose may name a
|
| 414 |
+
# medium freely.
|
| 415 |
+
VENUE_WORDS = ("subtitle", "listing", "tweet", "summary field", "post summary", "search result",
|
| 416 |
+
"card lead", "post body", "collection note", "use everywhere", "use verbatim",
|
| 417 |
+
"for listings", "to paste", "paste this", "headline to use")
|
| 418 |
+
editorial_problems = []
|
| 419 |
+
for doc in PUB_DOCS:
|
| 420 |
+
for n, line in enumerate(doc.read_text(errors="replace").splitlines(), 1):
|
| 421 |
+
low = line.lower()
|
| 422 |
+
if line.startswith("#") and "(" in line and any(w in low for w in VENUE_WORDS):
|
| 423 |
+
editorial_problems.append(f"{doc.name}:{n}: heading routes text to a venue: "
|
| 424 |
+
f"{line.strip()[:64]}")
|
| 425 |
+
if PUB_DOCS:
|
| 426 |
+
check("no published heading carries editorial routing instructions", editorial_problems, [])
|
| 427 |
+
|
| 428 |
+
# ---- a published script may only tell someone to run something that exists ----
|
| 429 |
+
# scripts/preflight.sh invoked `python3 tools/verify_docs.py` unconditionally. tools/ is local-only,
|
| 430 |
+
# so a clean clone of the release tag finished with NOT READY TO PUBLISH — a red light caused by
|
| 431 |
+
# tooling nobody published. Same defect as the dataset card's un-runnable command, one layer down,
|
| 432 |
+
# which is why this checks scripts too and asks git rather than the disk: the author's disk has
|
| 433 |
+
# everything, so presence proves nothing about what was shipped.
|
| 434 |
+
CALL_RE = re.compile(r"(?:python3|bash)\s+((?:scripts|tools|zenodo|analysis)/[\w./-]+)")
|
| 435 |
+
|
| 436 |
+
|
| 437 |
+
def tracked_at_root() -> set[str] | None:
|
| 438 |
+
"""What git tracks, but only when this checkout is the top level of its own repository."""
|
| 439 |
+
root = EV.parent
|
| 440 |
+
try:
|
| 441 |
+
prefix = subprocess.run(["git", "-C", str(root), "rev-parse", "--show-prefix"],
|
| 442 |
+
capture_output=True, text=True, timeout=30)
|
| 443 |
+
if prefix.returncode != 0 or prefix.stdout.strip():
|
| 444 |
+
return None
|
| 445 |
+
listing = subprocess.run(["git", "-C", str(root), "ls-files"],
|
| 446 |
+
capture_output=True, text=True, timeout=30)
|
| 447 |
+
except (OSError, subprocess.SubprocessError):
|
| 448 |
+
return None
|
| 449 |
+
return set(listing.stdout.split()) if listing.returncode == 0 else None
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
TRACKED = tracked_at_root()
|
| 453 |
+
LOCAL_WORDS = ("local-only", "not published", "not in this repository", "never published")
|
| 454 |
+
script_problems = []
|
| 455 |
+
scripts_dir = EV.parent / "scripts"
|
| 456 |
+
if scripts_dir.is_dir():
|
| 457 |
+
# Iterate what is *published*, not what is on this disk: the first version of this check walked
|
| 458 |
+
# scripts/ and reported an untracked local helper that no reader has, which is precisely the
|
| 459 |
+
# mistake the check exists to catch.
|
| 460 |
+
if TRACKED is not None:
|
| 461 |
+
candidates = sorted(EV.parent / rel for rel in TRACKED
|
| 462 |
+
if rel.startswith(("scripts/", "zenodo/"))
|
| 463 |
+
and rel.endswith((".sh", ".py")))
|
| 464 |
+
else:
|
| 465 |
+
candidates = sorted(list(scripts_dir.glob("*.sh")) + list(scripts_dir.glob("*.py"))
|
| 466 |
+
+ list((EV.parent / "zenodo").glob("*.sh")))
|
| 467 |
+
for script in candidates:
|
| 468 |
+
if not script.is_file() or script.name == "analyze.py":
|
| 469 |
+
continue # this file's own strings are not instructions
|
| 470 |
+
lines = script.read_text(errors="replace").splitlines()
|
| 471 |
+
for n, line in enumerate(lines, 1):
|
| 472 |
+
for found in CALL_RE.finditer(line):
|
| 473 |
+
target = found.group(1)
|
| 474 |
+
shipped = (target in TRACKED) if TRACKED is not None else (EV.parent / target).exists()
|
| 475 |
+
window = " ".join(lines[max(0, n - 4):n + 3]).lower()
|
| 476 |
+
if not shipped and not any(w in window for w in LOCAL_WORDS):
|
| 477 |
+
script_problems.append(f"{script.name}:{n} runs {target}, which is not shipped "
|
| 478 |
+
f"and is not marked local-only here")
|
| 479 |
+
if TRACKED is not None or scripts_dir.is_dir():
|
| 480 |
+
check("no published script tells a reader to run something that is not published",
|
| 481 |
+
script_problems, [])
|
| 482 |
+
|
| 483 |
# ---- the release note describes the artifact, not the machinery that publishes it ----
|
| 484 |
# A GitHub release body is reader-facing text. Workflow commentary in it - what we chose not
|
| 485 |
# to attach and why, which integration has to be enabled first - is addressed to the person
|