Record whether a problem has a forum thread - #384
Chessing234 wants to merge 5 commits into
Conversation
data/problems.yaml carried no signal that a problem has a discussion thread on
erdosproblems.com, so anyone working from the export -- which is the natural
entry point for bulk or automated work -- was routed away from where the
subject-matter discussion actually is.
update_forum_status.py parses the forum index, which lists every thread on one
page, and records a post count per problem. `forum` is derived like
`formalized`, and a problem with no thread carries no key at all, so the
field's presence is the signal.
Only the post count is taken. The index dates threads relatively ("a month
ago"), so an exact last-post date would mean fetching all ~900 threads
individually -- much heavier for much less, and better left out than
approximated.
The workflow is manual-only; adding a schedule is a maintainer's call.
Generated by scripts/update_forum_status.py against the forum index. Purely additive: 901 problems gain a `forum` block, nothing else moves.
|
Reviewed. The engineering here is in good shape: the data change is purely additive (exactly 901 One thing to resolve before this goes in, about coverage rather than correctness. The PR says non-problem threads are "the site's own Those are tied to a specific problem, so What that costs, measured against today's index:
I don't think this is obviously a bug — there's a reasonable position that a proof claim is a distinct object and shouldn't be folded into a single Three options, roughly in increasing order of work:
My inclination is (1) or (3) — folding them into one number loses a distinction that looks worth keeping. Your call, and Terry's. One smaller note: unlike |
The index carries 235 proof-claim threads coded <number>/proof-claims#proof-claim-<id>, which code.isdigit() dropped along with the blog and named topic threads. They are tied to a problem, so 13 problems whose only discussion is a proof claim got no forum key at all, and 110 more understated their discussion. A proof claim is a distinct object from a thread, so rather than folding it into posts, record proof_claims (how many claims) and proof_claim_posts (posts in reply to them). The index badges a claim only once it has replies, so an unanswered claim counts in the former and not the latter; the claim itself is never counted as a post. Also document the named topic threads as a second skipped kind, and note on the delete path that it assumes the index is a single page.
|
Thanks — you were right that the description undercounted the skips, and I went with option (3) in 8b6701f.
forum:
posts: 13
proof_claims: 2
proof_claim_posts: 2One thing I had to settle to make (3) work: the index badges a proof-claim item only once it has replies — 78 of the 235 carry a Reproducing your measurements on today's index: 1153 items, 901 problem threads, 235 proof claims over 123 problems, 7 On the smaller note: the delete path now carries a comment saying it assumes the index is a single page, and that the zero-thread guard only catches a total parse failure, not a partial one. The description and the |
|
Thanks for taking the third option — splitting Two things before this can land. It needs a rebase. The branch is 28 commits behind and now conflicts in Please rebase rather than resolving the conflict in place. Diffing the branch against current Please re-run the script as the last step of the rebase. The counts in the branch were generated some days ago and the forum keeps moving, so the committed data will have drifted. Running Worth also updating the docstring on One smaller point I raised before and still think is worth a line of comment: this script deletes |
Closes #370.
Add a derived
forumfield to the problem export so readers can find which problems have discussion on erdosproblems.com. The updater reads the single-page forum index and records problem-thread posts, proof-claim counts, and replies to proof claims separately. Blog and named site-wide threads are excluded. Problems without discussion have noforumfield.The schema accepts positive counts only. The update workflow is manual (
workflow_dispatch). Exact last-post timestamps are omitted because the index exposes relative dates; obtaining exact timestamps would require fetching individual threads.Validation — 12 September 2026
Merged current main normally, preserving branch history, and refreshed the forum data. All 1,217 upstream problem records remain semantically identical after excluding the added forum field.
The live index contained 913 problem threads and 333 proof claims across 933 problem numbers, carrying 5,695 posts. The export contains forum fields for 931 of its 1,217 records; index-only problem numbers are not added to the database.
scripts/validate.py: passed.scripts/derive_status.py --check: passed.scripts/update_forum_status.py --check: passed with no drift.Limits
The parser depends on the current HTML structure and on the index remaining a complete single page. A zero-thread parse fails before modifying data; a partial markup failure or future pagination still requires an updater change. Counts are a dated snapshot and will change as discussion continues.
This was AI-assisted.