E2E all-in: NBA (reference dogfood)¶
First shipped dogfood for the generic E2E stack: topic NBA,
effort low, collection e2e/NBA. For any other topic or tier, use
scripts/e2e_stack.py or /e2e-watch.
This is not in default CI. Sci-Hub stays off. Paperful never sends mail.
Honesty¶
Rule |
Detail |
|---|---|
Opt-in |
|
Isolated writes |
Only |
Soft-skip |
Twenty, SearXNG, headed tabs, Scholar/EZProxy when not ready |
No Sci-Hub |
Not in the harness; see scihub if you opt in yourself |
Watch |
Every live run is babysat; see Babysitting |
Preconditions¶
Zotero 10+ local write API;
paperful doctor(exit 0 or 1).Real Unpaywall
emailinconfig.toml.Prefer
OPENALEX_API_KEY(shared no-key pool is easy to exhaust).For summarize + browser-agent:
[llm].enabled,
uv sync --extra llm --extra browser-agent(Python ≥ 3.11), Ollama up.Optional:
[twenty].enabled+TWENTY_API_KEY+base_url;
[searxng].base_urlorSEARXNG_BASE_URL(JSON API).Optional headed tabs:
PAPERFUL_E2E_TABS=1.
Profiles¶
File |
Kind |
Role |
|---|---|---|
snowball |
Same caps as harness ( |
|
run |
|
One command¶
make e2e-nba
# or:
PAPERFUL_E2E=1 uv run python scripts/e2e_stack.py --topic NBA --effort low
Resume after a failed phase (keep the same --topic and --effort):
PAPERFUL_E2E=1 uv run python scripts/e2e_stack.py --topic NBA --effort low \
--from-phase run_fetch --run-id <id>
Machine witness: state/e2e/<run-id>/report.json and REPORT.md (older runs may
be under state/e2e-nba/).
Phases¶
# |
Phase |
What runs |
Required |
|---|---|---|---|
0 |
|
|
yes (exit 2 fails) |
1 |
|
|
yes |
2 |
|
ORCIDs from |
yes if ≥1 ORCID, else skip |
3 |
|
|
yes |
4 |
|
|
yes (summarize soft if LLM off) |
5 |
|
|
soft |
6 |
|
|
soft |
7 |
|
|
yes (CSV may have 0 data rows) |
8 |
|
|
yes |
9 |
|
|
yes |
Lane matrix (fetch)¶
Default sources from config (unpaywall … htmlpdf), then late
author_site (when a pack/contact exists), optional Scholar (session),
browser_agent when LLM + extra are ready. No Sci-Hub.
SearXNG is only used inside snowball --author-site-preflight, not as a
run source. Twenty feeds listings/emails; it never sends mail.
Pass signals¶
≥1 snowball candidate for
NBAin 2025–2026Parents under
e2e/NBAafter gate autoAfter fetch: at least one attach or explicit miss rows (not a silent empty run)
reachout.csvexistsreport.jsonhas"ok": truefor required phasesSoft-skips logged when Twenty / SearX / tabs / LLM are off
Babysitting a live run¶
Do not fire-and-forget. Use Cursor /watch (or the same discipline by hand):
Use
/e2e-watchor copytemplates/e2e-watch-assessment.mdintoassessments/YYYY-MM-DD-e2e-<topic>-watch.md(gitignored).Record command, terminal path, start time.
Poll the terminal. Progress (new phase lines) is not a hang.
Hang quiet window: 10 minutes (longer for one browser-agent item or a long summarize batch).
On failure: diagnose → backup once before first code edit → minimal fix → focused test (
uv run pytest -q tests/test_e2e_nba.pyor narrower) → resume with--from-phase/--run-id.On hang: kill only that PID; then the failure path.
Finalize the assessment:
completedorblocked, duration,git diff --stat.
Harness log: state/e2e/<run-id>/watch.log.
Assessment file: human/agent narrative. Keep both.
Hermetic tests¶
uv run pytest -q tests/test_e2e_nba.py
Live marker (skipped unless env set):
PAPERFUL_E2E=1 uv run pytest -q tests/test_e2e_nba.py -m e2e_live
Manual copy-paste (without the harness)¶
SCOPE=(-C e2e/NBA --year-from 2025 --year-to 2026)
uv run paperful snowball search NBA --year-from 2025 --year-to 2026 \
--max-candidates 12 --depth 1 --gate dry-run
uv run paperful snowball search NBA --year-from 2025 --year-to 2026 \
--max-candidates 12 --depth 1 --gate auto --fetch-pdfs full -C e2e/NBA
# then ORCID seeds from state/snowball/<run>/candidates.jsonl author_records
uv run paperful run "${SCOPE[@]}" --try-all --retry-failed --upgrade-linked --browser-agent
uv run paperful all "${SCOPE[@]}" --steps lint,fix-metadata,summarize --apply
uv run paperful reachout -C e2e/NBA --lookup --to reachout-nba.csv
uv run paperful gaps -C e2e/NBA --list-missing --handoff list
Cleanup¶
Review e2e/NBA in Zotero. Trash or keep. Author pack e2e-nba under
state/author-packs/ can stay for reruns. Do not point production BBNJ
profiles at this collection.