Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/data-integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ jobs:
- name: The source portability gate can still fail
run: python tests/test_source_portability.py

- name: Screen review writes what the keyboard tools write
run: python tests/test_serve_review.py

- name: Serveable zone matches a fresh build (candidates)
run: python scripts/build/project_candidates.py --check

Expand Down
48 changes: 48 additions & 0 deletions data/raw/arxiv_abstracts/dumps/2026-11-22_034213/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"source_id": "arxiv_abstracts",
"dump_stamp": "2026-11-22_034213",
"fetched_at": "2026-11-22T03:42:13.559579+00:00",
"api": "http://export.arxiv.org/api/query",
"requested": 1129,
"retrieved": 1129,
"not_returned": [],
"license": {
"spdx": "CC0-1.0",
"url": "https://creativecommons.org/publicdomain/zero/1.0/",
"attribution": "arXiv.org. Abstracts are authored text, offered by arXiv as descriptive metadata. Attributed here as a courtesy that CC0 does not require.",
"citation": "arXiv API (export.arxiv.org/api/query), Atom summary field",
"source_terms_url": "https://info.arxiv.org/help/api/tou.html",
"verified_at": "2026-08-21",
"verified_by": "Fetched and read the arXiv API Terms of Use and its footnote 1 defining descriptive metadata; see the comment above this constant for both quotations."
},
"transformations": [
{
"step": "whitespace_collapse",
"what": "runs of whitespace and newlines collapsed to single spaces",
"why": "arXiv wraps the abstract for display; the wrapping is not content",
"lossy": false
},
{
"step": "ascii_coerce",
"what": "_base.to_ascii, NFKD decomposition with no '?' fallback",
"why": "the repository is ASCII-only and enforces it in CI",
"lossy": true,
"note": "an accented letter survives as its base letter; a character with no ASCII decomposition is DELETED, which is why chars_dropped is recorded per record and shown to the reviewer before the choice"
},
{
"step": "sentence_trim",
"what": "cut at the last sentence boundary at or before 600 characters",
"why": "event_v1 allows 1000; 600 is an editorial choice, not a schema requirement, so it is named here as a choice",
"lossy": true,
"note": "applied only when the abstract exceeds the limit; is_excerpt records it"
}
],
"audit_chain": [
"served description",
"<- data/curated/event_descriptions/decisions.jsonl (named reviewer, exact approved string)",
"<- this dump's data.jsonl, field abstract (verbatim, unmodified)",
"<- entry_id, the versioned arXiv Atom entry this was read from",
"<- the paper itself at source_url"
],
"note": "Abstracts for records in enriched_alignment_research_events.json, which has no raw provenance in this repo. See pdoom-data#88."
}
53 changes: 40 additions & 13 deletions scripts/review/review_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,43 @@ def append_decision(entry):
handle.write(json.dumps(entry, ensure_ascii=True, sort_keys=True) + "\n")


def build_decision(p, verdict, proposed, by, proposals_file, editorial=None):
"""One decision row. Shared by this keyboard tool and serve_review.py.

`editorial` is Pip's own condensation of the abstract, when he writes one.
It is an ATTRIBUTED OPINION, held beside the source's words and never in
place of them: the overlay in project_timeline_events.py reads only
`description`, which is always the abstract exactly as shown. A consumer
that wants the shorter text (pdoom1, for in-game display) can take
`editorial`; one that does not can ignore the key. That is ADR-001's
fork-or-ignore test passed on purpose. Ruled by Pip 2026-11-22: "I will
want to note that it's been editorialised by me rather than the raw
extract".
"""
if verdict not in [v[0] for v in KEYS.values()]:
raise ValueError("unknown verdict %r" % verdict)
if not (by or "").strip():
raise ValueError("no anonymous verdicts")
row = {
"id": p["id"],
"arxiv_id": p["arxiv_id"],
"source_url": p["source_url"],
"verdict": verdict,
"description": proposed if verdict == "accept_abstract" else None,
"replaces": p["current_description"],
"reviewer": by,
"at": datetime.now(timezone.utc).isoformat(),
"proposals_file": proposals_file,
"title_matches": p.get("title_matches"),
"chars_dropped": p.get("chars_dropped") or [],
}
text = " ".join((editorial or "").split())
if text:
row["editorial"] = {"text": text, "by": by,
"kind": "editorialised -- not the source's words"}
return row


def render(p, position, total, proposed):
print("\n" + "=" * 78)
print("[%d/%d] %s" % (position, total, p["current_title"][:64]))
Expand Down Expand Up @@ -204,19 +241,9 @@ def main():
continue

verdict, _label = KEYS[key]
append_decision({
"id": p["id"],
"arxiv_id": p["arxiv_id"],
"source_url": p["source_url"],
"verdict": verdict,
"description": proposed if verdict == "accept_abstract" else None,
"replaces": p["current_description"],
"reviewer": args.by,
"at": datetime.now(timezone.utc).isoformat(),
"proposals_file": os.path.relpath(args.proposals, REPO).replace("\\", "/"),
"title_matches": p.get("title_matches"),
"chars_dropped": p.get("chars_dropped") or [],
})
append_decision(build_decision(
p, verdict, proposed, args.by,
os.path.relpath(args.proposals, REPO).replace("\\", "/")))
counts[verdict] = counts.get(verdict, 0) + 1

print("\n%d decision(s) recorded by %s: %s"
Expand Down
Loading
Loading