diff --git a/.agents/skills/conference-ingestion/SKILL.md b/.agents/skills/conference-ingestion/SKILL.md index 80ac8e6..86bbd87 100644 --- a/.agents/skills/conference-ingestion/SKILL.md +++ b/.agents/skills/conference-ingestion/SKILL.md @@ -18,6 +18,8 @@ For a requested conference/year, run the stages the user requested: ```bash go run ./cmd/fastnews fetch-conf --conference --year +# NeurIPS: enrich a bounded batch before summarizing; --all processes every missing abstract. +go run ./cmd/fastnews enrich-abstracts --conference neurips --year --limit 12 go run ./cmd/fastnews summarize-conf --conference --year go run ./cmd/fastnews conference-report --conference --year ``` @@ -28,6 +30,8 @@ Inspect the records in `top-conf/data/conferences/_.jsonl`, the catego PMLR overrides must also serve `assets/rss/feed.xml`; the index's canonical volume and complete link set must agree with that RSS. Official OpenReview cross-links preserve PMLR identities when available. NeurIPS proceedings use their canonical landing URLs, with no inferred equivalence to older OpenReview IDs. Summarization/reporting validate the registered conference/year independently from default source availability, so existing archives remain usable. +NeurIPS abstract enrichment checkpoints each verified detail page in `top-conf/data/abstracts/_.jsonl`. It matches the citation PDF's paper identifier and volume; publication date can differ from conference year. Completed entries are reused. New evidence makes older summaries stale until `summarize-conf` regenerates them; unchanged evidence does not repeat model calls. Bound a manual acceptance run with `--limit`; choose `--all` explicitly for full enrichment. Do not describe a bounded sample as the full archive. + ## Classification Supply the available title, abstract, keywords and venue to the model. Keep its structured category and summary. Detailed topics such as Coding Agents are semantic choices based on this evidence, not substring filters. When only bibliography/title evidence exists, the summary must say so and avoid invented methods, results or experiments. A successful fixture run proves protocol handling; live acquisition and model quality require their own observations. diff --git a/.github/workflows/conf_release.yml b/.github/workflows/conf_release.yml index f086bb3..808f987 100644 --- a/.github/workflows/conf_release.yml +++ b/.github/workflows/conf_release.yml @@ -41,6 +41,9 @@ jobs: - run: go build -trimpath -o bin/fastnews ./cmd/fastnews - name: Fetch official paper records run: ./bin/fastnews fetch-conf --conference "$CONFERENCE" --year "$YEAR" + - name: Enrich original NeurIPS abstracts with resumable checkpoints + if: inputs.conference == 'neurips' + run: ./bin/fastnews enrich-abstracts --conference "$CONFERENCE" --year "$YEAR" --all - name: Generate resumable summaries run: ./bin/fastnews summarize-conf --conference "$CONFERENCE" --year "$YEAR" - uses: pnpm/action-setup@v4 diff --git a/README.md b/README.md index 53ed8e5..9c7156f 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ FastRead 保留现有授权边界:Research 会话申请 `fast-read` 一次性 ./bin/fastnews fetch-conf --conference usenix --year 2026 ./bin/fastnews fetch-conf --conference icml --year 2025 # PMLR 索引 + 同卷 RSS 完整摘要 ./bin/fastnews fetch-conf --conference neurips --year 2025 # 官方卷中 conference 主会轨道 +./bin/fastnews enrich-abstracts --conference neurips --year 2025 --limit 12 +./bin/fastnews enrich-abstracts --conference neurips --year 2025 --all # 逐篇补全,已完成文章不再请求 ./bin/fastnews summarize-conf --conference usenix --year 2026 ./bin/fastnews conference-report --conference usenix --year 2026 --pdf ./bin/fastnews update-range --since 2023 --until 2026 @@ -116,6 +118,8 @@ FastRead 保留现有授权边界:Research 会话申请 `fast-read` 一次性 HTML 报告由 Go 模板生成。PDF 使用 Chromium,通过 `FASTNEWS_CHROME` 指定可执行文件;不请求 PDF 时不需要浏览器。周报同时输出到 `output/` 及 `secnews/data/report/`。CI 的采集、摘要与报告工作流已改为 Go CLI。 +NeurIPS 原始摘要补全读取官方论文详情页,按 PDF 路径中的论文 ID 和卷号核对身份,不用出版日期推断会议年份。每篇成功结果追加到 `top-conf/data/abstracts/_.jsonl` 并同步落盘;后续运行只请求缺少摘要的文章,失败保留此前进度。默认每次补全 12 篇,`--limit 0` 或 `--all` 处理全部缺失文章。摘要来源与正文合并后提供给分类器;已有总结若对应旧材料则不会作为当前总结进入目录/报告,重新执行 `summarize-conf` 只更新材料发生变化的记录。未补全语料的既有断点保持原行为;这里的摘要补全不调用 LLM。 + ## 验证 ```bash diff --git a/cmd/fastnews/abstracts_test.go b/cmd/fastnews/abstracts_test.go new file mode 100644 index 0000000..f184dea --- /dev/null +++ b/cmd/fastnews/abstracts_test.go @@ -0,0 +1,175 @@ +package main + +import ( + "context" + "fmt" + "io" + "net/http" + "net/http/httptest" + "os" + "path/filepath" + "strings" + "sync/atomic" + "testing" + + "github.com/FastR-D/FastNews/internal/catalog" + "github.com/FastR-D/FastNews/internal/config" +) + +func TestNeuripsAbstractsResumeAndRefreshSourceBoundSummaries(t *testing.T) { + index, err := os.ReadFile(filepath.Join("testdata", "neurips-2025-index.html")) + if err != nil { + t.Fatal(err) + } + var failSecond atomic.Bool + failSecond.Store(true) + var first, second, models atomic.Int32 + original := http.DefaultTransport + http.DefaultTransport = newsTransport(func(r *http.Request) (*http.Response, error) { + if r.URL.Hostname() == "127.0.0.1" { + return original.RoundTrip(r) + } + if r.URL.Hostname() != "papers.nips.cc" { + return nil, fmt.Errorf("unexpected source") + } + body := string(index) + status := 200 + if strings.HasSuffix(r.URL.Path, ".html") { + if strings.Contains(r.URL.Path, "0010665e") { + second.Add(1) + if failSecond.Load() { + status = 503 + } + } else { + first.Add(1) + } + pdf := strings.Replace(strings.TrimSuffix(r.URL.Path, "-Abstract-Conference.html"), "/hash/", "/file/", 1) + "-Paper-Conference.pdf" + body = fmt.Sprintf(`

We examine model efficiency with measured evidence.

`, pdf) + } + return &http.Response{StatusCode: status, Body: io.NopCloser(strings.NewReader(body)), Header: http.Header{}, Request: r}, nil + }) + t.Cleanup(func() { http.DefaultTransport = original }) + model := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + count := models.Add(1) + body, _ := io.ReadAll(r.Body) + if count > 2 && !strings.Contains(string(body), "We examine model efficiency with measured evidence.") { + t.Error("regenerated summary did not receive enriched source text") + } + fmt.Fprint(w, `{"choices":[{"finish_reason":"stop","message":{"content":"{\"category\":\"Recorded test category\",\"summary_zh\":\"隔离模型协议测试。\"}"}}]}`) + })) + defer model.Close() + c := config.Config{Root: t.TempDir(), LLMKey: "fixture", LLMURL: model.URL} + args := []string{"--conference", "neurips", "--year", "2025"} + ctx := context.Background() + for _, command := range []string{"fetch-conf", "summarize-conf"} { + if err := job(ctx, c, command, args); err != nil { + t.Fatal(err) + } + } + if models.Load() != 2 { + t.Fatal(models.Load()) + } + if err := job(ctx, c, "enrich-abstracts", append(append([]string{}, args...), "--limit", "1")); err != nil { + t.Fatal(err) + } + if first.Load() != 1 || second.Load() != 0 { + t.Fatal("bounded enrichment exceeded its requested work", first.Load(), second.Load()) + } + enrichArgs := append(append([]string{}, args...), "--all") + if err := job(ctx, c, "enrich-abstracts", enrichArgs); err == nil { + t.Fatal("interrupted enrichment succeeded") + } + file := filepath.Join(c.Root, "top-conf/data/abstracts/neurips_2025.jsonl") + checkpoints, err := catalog.Rows(file) + if err != nil || len(checkpoints) != 1 { + t.Fatal("first successful abstract not checkpointed", checkpoints, err) + } + failSecond.Store(false) + for range 2 { + if err := job(ctx, c, "enrich-abstracts", enrichArgs); err != nil { + t.Fatal(err) + } + } + if first.Load() != 1 || second.Load() != 2 { + t.Fatal("completed papers were fetched again", first.Load(), second.Load()) + } + checkpoints, err = catalog.Rows(file) + if err != nil || len(checkpoints) != 2 { + t.Fatal("resume duplicated or lost abstracts", checkpoints, err) + } + for _, record := range checkpoints { + if record["description"] != "We examine model efficiency with measured evidence." { + t.Fatal("nested publisher paragraph was lost", record) + } + if catalog.Str(record, "description_source") == "" { + t.Fatal("source URL lost") + } + } + cat := &catalog.Catalog{Root: c.Root} + papers, err := cat.Papers() + if err != nil || len(papers) != 0 { + t.Fatal("stale title-only summaries were treated as current", papers, err) + } + for range 2 { + if err := job(ctx, c, "summarize-conf", args); err != nil { + t.Fatal(err) + } + } + if models.Load() != 4 { + t.Fatal("source update did not refresh exactly the changed summaries", models.Load()) + } + cat.Invalidate() + papers, err = cat.Papers() + if err != nil || len(papers) != 2 { + t.Fatal("fresh summaries missing or duplicated", papers, err) + } + if err := job(ctx, c, "conference-report", args); err != nil { + t.Fatal(err) + } +} + +func TestNeuripsAbstractRejectsWrongIdentityOrMissingContent(t *testing.T) { + index, err := os.ReadFile(filepath.Join("testdata", "neurips-2025-index.html")) + if err != nil { + t.Fatal(err) + } + for _, mode := range []string{"wrong-pdf", "wrong-volume", "missing-abstract", "verification-page"} { + t.Run(mode, func(t *testing.T) { + original := http.DefaultTransport + http.DefaultTransport = newsTransport(func(r *http.Request) (*http.Response, error) { + body := string(index) + if strings.HasSuffix(r.URL.Path, ".html") { + pdf := strings.Replace(strings.TrimSuffix(r.URL.Path, "-Abstract-Conference.html"), "/hash/", "/file/", 1) + "-Paper-Conference.pdf" + volume := "38" + content := `

Original abstract

` + if mode == "wrong-pdf" { + pdf = strings.Replace(pdf, "0010031a", "ffffffff", 1) + } + if mode == "wrong-volume" { + volume = "37" + } + if mode == "missing-abstract" { + content = "" + } + body = fmt.Sprintf(`
%s
`, volume, pdf, content) + if mode == "verification-page" { + body = `Verification required` + } + } + return &http.Response{StatusCode: 200, Body: io.NopCloser(strings.NewReader(body)), Header: http.Header{}, Request: r}, nil + }) + t.Cleanup(func() { http.DefaultTransport = original }) + c := config.Config{Root: t.TempDir()} + args := []string{"--conference", "neurips", "--year", "2025"} + if err := job(context.Background(), c, "fetch-conf", args); err != nil { + t.Fatal(err) + } + if err := job(context.Background(), c, "enrich-abstracts", append(args, "--limit", "1")); err == nil { + t.Fatal("invalid detail accepted", mode) + } + if _, err := os.Stat(filepath.Join(c.Root, "top-conf/data/abstracts/neurips_2025.jsonl")); !os.IsNotExist(err) { + t.Fatal("invalid detail persisted", err) + } + }) + } +} diff --git a/cmd/fastnews/jobs.go b/cmd/fastnews/jobs.go index 90c3dd6..c4f5cfb 100644 --- a/cmd/fastnews/jobs.go +++ b/cmd/fastnews/jobs.go @@ -27,11 +27,11 @@ func job(ctx context.Context, c config.Config, command string, args []string) er year := fs.Int("year", 2026, "conference year") rawURL := fs.String("url", "", "override official source URL") days := fs.Int("days", 7, "weekly report window") - all := fs.Bool("all", false, "process every article date") + all := fs.Bool("all", false, "process every available record/date") pdf := fs.Bool("pdf", false, "also export PDF using Chromium") format := fs.String("format", "json", "output: json or text") query := fs.String("query", "", "research direction") - limit := fs.Int("limit", 12, "recommended paper count") + limit := fs.Int("limit", 12, "paper count for recommendations/enrichment (0 means all enrichment)") since := fs.Int("since", 2023, "first conference year") until := fs.Int("until", 2026, "last conference year") if e := fs.Parse(args); e != nil { @@ -56,6 +56,12 @@ func job(ctx context.Context, c config.Config, command string, args []string) er return p.Weekly(*days, *pdf) case "fetch-conf": return p.FetchConference(ctx, *conf, *year, *rawURL) + case "enrich-abstracts": + count := *limit + if *all { + count = 0 + } + return p.EnrichConferenceAbstracts(ctx, *conf, *year, count) case "summarize-conf": return p.SummarizeConference(ctx, *conf, *year) case "conference-report": diff --git a/cmd/fastnews/main.go b/cmd/fastnews/main.go index 292bcc8..c1b6265 100644 --- a/cmd/fastnews/main.go +++ b/cmd/fastnews/main.go @@ -46,7 +46,7 @@ func run() error { if command == "help" || command == "--help" || command == "-h" { fmt.Println("FastNews: Go API + React workspace") fmt.Println("Commands: serve, create, invite, recovery, version, index") - fmt.Println("Data jobs: fetch-news, daily-summary, newspaper, weekly-report, fetch-conf, summarize-conf, conference-report, fetch-awards, enrich-metrics, update-range") + fmt.Println("Data jobs: fetch-news, daily-summary, newspaper, weekly-report, fetch-conf, enrich-abstracts, summarize-conf, conference-report, fetch-awards, enrich-metrics, update-range") fmt.Println("Research: search-papers, field-briefing, summary-brief") fmt.Println("Use fastnews --help for options.") return nil diff --git a/internal/catalog/catalog.go b/internal/catalog/catalog.go index 23451ba..4ec2fe9 100644 --- a/internal/catalog/catalog.go +++ b/internal/catalog/catalog.go @@ -169,7 +169,7 @@ func (c *Catalog) Papers() ([]Paper, error) { continue } year, _ := strconv.Atoi(m[2]) - src, e := Rows(filepath.Join(c.Root, "top-conf/data/conferences", m[1]+"_"+m[2]+".jsonl")) + src, e := c.ConferenceRows(m[1], year) if e != nil { return nil, e } @@ -188,6 +188,9 @@ func (c *Catalog) Papers() ([]Paper, error) { } id := First(Str(p, "_id"), Str(p, "link")) s := sources[id] + if ConferenceSourceHash(s) != Str(r, "source_hash") { + continue + } title := First(Str(p, "title"), Str(s, "title")) if id == "" || title == "" { continue diff --git a/internal/catalog/conference.go b/internal/catalog/conference.go new file mode 100644 index 0000000..c43b111 --- /dev/null +++ b/internal/catalog/conference.go @@ -0,0 +1,43 @@ +package catalog + +import ( + "crypto/sha256" + "encoding/json" + "fmt" + "path/filepath" +) + +// ConferenceRows overlays checkpointed publisher abstracts on original records. +func (c *Catalog) ConferenceRows(conf string, year int) ([]map[string]any, error) { + name := fmt.Sprintf("%s_%d.jsonl", conf, year) + rows, err := Rows(filepath.Join(c.Root, "top-conf/data/conferences", name)) + if err != nil { + return nil, err + } + abstracts, err := Rows(filepath.Join(c.Root, "top-conf/data/abstracts", name)) + if err != nil { + return nil, err + } + byID := map[string]map[string]any{} + for _, row := range rows { + byID[Str(row, "_id")] = row + } + for _, record := range abstracts { + row := byID[Str(record, "_id")] + if row == nil || Str(record, "description") == "" || Str(record, "description_source") == "" { + continue + } + row["description"], row["description_source"] = record["description"], record["description_source"] + } + return rows, nil +} + +// ConferenceSourceHash binds regenerated summaries to enriched source evidence. +// Unenriched archives keep their existing ID-only checkpoints. +func ConferenceSourceHash(paper map[string]any) string { + if Str(paper, "description_source") == "" { + return "" + } + body, _ := json.Marshal(paper) + return fmt.Sprintf("%x", sha256.Sum256(body)) +} diff --git a/internal/jobs/abstracts.go b/internal/jobs/abstracts.go new file mode 100644 index 0000000..e295ea9 --- /dev/null +++ b/internal/jobs/abstracts.go @@ -0,0 +1,127 @@ +package jobs + +import ( + "context" + "fmt" + "net/url" + "path/filepath" + "strings" + + "github.com/FastR-D/FastNews/internal/catalog" + "golang.org/x/net/html" +) + +func neuripsPaperURL(raw string, year int) (*url.URL, error) { + u, err := url.Parse(raw) + if err != nil { + return nil, err + } + if neuripsVolumes[year].URL == "" || u.Scheme != "https" || u.Host != "papers.nips.cc" || u.User != nil || u.RawQuery != "" || u.Fragment != "" || !strings.HasPrefix(u.Path, fmt.Sprintf("/paper_files/paper/%d/hash/", year)) || !strings.HasSuffix(u.Path, "-Abstract-Conference.html") { + return nil, fmt.Errorf("not a verified NeurIPS main-track paper URL for %d", year) + } + return u, nil +} + +func (p *Pipeline) EnrichConferenceAbstracts(ctx context.Context, conf string, year, limit int) error { + metadata, err := conferenceInfo(conf, year) + if err != nil { + return err + } + if metadata.Provider != "neurips-proceedings" { + return fmt.Errorf("abstract enrichment is supported for official NeurIPS proceedings") + } + if limit < 0 { + return fmt.Errorf("abstract limit must be nonnegative") + } + rows, err := p.Catalog.ConferenceRows(conf, year) + if err != nil { + return err + } + if len(rows) == 0 { + return fmt.Errorf("no papers; run fetch-conf first") + } + completed := 0 + for _, paper := range rows { + if catalog.Str(paper, "description") != "" { + continue + } + if limit > 0 && completed >= limit { + break + } + link, err := neuripsPaperURL(catalog.Str(paper, "link"), year) + if err != nil { + return err + } + if catalog.Str(paper, "_id") == "" { + return fmt.Errorf("paper identity is missing") + } + body, err := get(ctx, link.String()) + if err != nil { + return err + } + abstract, err := neuripsAbstract(body, link, year) + if err != nil { + return err + } + record := map[string]any{"_id": paper["_id"], "description": abstract, "description_source": link.String()} + file := filepath.Join(p.Config.Root, "top-conf/data/abstracts", fmt.Sprintf("%s_%d.jsonl", conf, year)) + if err := appendRows(file, []map[string]any{record}); err != nil { + return err + } + p.Catalog.Invalidate() + completed++ + } + return nil +} + +func neuripsAbstract(raw []byte, link *url.URL, year int) (string, error) { + doc, err := html.Parse(strings.NewReader(string(raw))) + if err != nil { + return "", err + } + meta := map[string]string{} + sections := []*html.Node{} + walk(doc, func(n *html.Node) { + if n.Type != html.ElementNode { + return + } + if n.Data == "meta" { + meta[attr(n, "name")] = attr(n, "content") + } + if n.Data == "section" && hasClass(n, "paper-section") { + marked := false + walk(n, func(child *html.Node) { + if child.Type == html.ElementNode && hasClass(child, "paper-abstract") { + marked = true + } + }) + if marked { + sections = append(sections, n) + } + } + }) + expected := strings.Replace(strings.TrimSuffix(link.Path, "-Abstract-Conference.html"), "/hash/", "/file/", 1) + "-Paper-Conference.pdf" + pdf, err := url.Parse(meta["citation_pdf_url"]) + if err != nil { + return "", err + } + if meta["citation_title"] == "" || meta["citation_volume"] != neuripsVolumes[year].CitationVolume || pdf.Scheme != "https" || pdf.User != nil || pdf.RawQuery != "" || pdf.Fragment != "" || (pdf.Host != "proceedings.neurips.cc" && pdf.Host != "papers.nips.cc" && pdf.Host != "papers.neurips.cc") || pdf.Path != expected { + return "", fmt.Errorf("NeurIPS citation volume/PDF identity does not match the requested paper") + } + if len(sections) != 1 { + return "", fmt.Errorf("NeurIPS page must declare one abstract section") + } + var content strings.Builder + for child := sections[0].FirstChild; child != nil; child = child.NextSibling { + if child.Type == html.ElementNode && hasClass(child, "section-label") { + continue + } + content.WriteString(text(child)) + content.WriteByte(' ') + } + abstract := strings.Join(strings.Fields(content.String()), " ") + if abstract == "" { + return "", fmt.Errorf("NeurIPS abstract section is empty") + } + return abstract, nil +} diff --git a/internal/jobs/conference.go b/internal/jobs/conference.go index abad103..f40fff0 100644 --- a/internal/jobs/conference.go +++ b/internal/jobs/conference.go @@ -261,7 +261,7 @@ func (p *Pipeline) SummarizeConference(ctx context.Context, conf string, year in return e } base := fmt.Sprintf("%s_%d", conf, year) - rows, e := catalog.Rows(filepath.Join(p.Config.Root, "top-conf/data/conferences", base+".jsonl")) + rows, e := p.Catalog.ConferenceRows(conf, year) if e != nil { return e } @@ -273,13 +273,14 @@ func (p *Pipeline) SummarizeConference(ctx context.Context, conf string, year in if e != nil { return e } - done := map[string]bool{} + done := map[string]string{} for _, r := range old { v, _ := r["paper"].(map[string]any) - done[catalog.Str(v, "_id")] = true + done[catalog.Str(v, "_id")] = catalog.Str(r, "source_hash") } for _, paper := range rows { - if done[catalog.Str(paper, "_id")] { + sourceHash := catalog.ConferenceSourceHash(paper) + if cached, ok := done[catalog.Str(paper, "_id")]; ok && cached == sourceHash { continue } b, _ := json.Marshal(paper) @@ -300,6 +301,9 @@ func (p *Pipeline) SummarizeConference(ctx context.Context, conf string, year in return fmt.Errorf("empty paper summary") } record := map[string]any{"category": result.Category, "paper": map[string]any{"_id": paper["_id"], "title": paper["title"], "link": paper["link"], "author": paper["author"], "summary_zh": result.Summary}} + if sourceHash != "" { + record["source_hash"] = sourceHash + } if e = appendRows(file, []map[string]any{record}); e != nil { return e } diff --git a/internal/jobs/proceedings.go b/internal/jobs/proceedings.go index 9ab1d93..ea708e9 100644 --- a/internal/jobs/proceedings.go +++ b/internal/jobs/proceedings.go @@ -13,17 +13,17 @@ import ( // These publisher volumes were checked against the official 2024/2025 indexes. var pmlrVolumes = map[int]string{2024: "235", 2025: "267"} -var neuripsVolumes = map[int]string{ - 2024: "https://papers.nips.cc/paper_files/paper/2024", - 2025: "https://papers.nips.cc/paper_files/paper/2025/vol38-main-conference", +var neuripsVolumes = map[int]struct{ URL, CitationVolume string }{ + 2024: {"https://papers.nips.cc/paper_files/paper/2024", "37"}, + 2025: {"https://papers.nips.cc/paper_files/paper/2025/vol38-main-conference", "38"}, } func proceedingsURL(conf string, year int) (string, error) { if conf == "icml" && pmlrVolumes[year] != "" { return "https://proceedings.mlr.press/v" + pmlrVolumes[year] + "/", nil } - if conf == "neurips" && neuripsVolumes[year] != "" { - return neuripsVolumes[year], nil + if conf == "neurips" && neuripsVolumes[year].URL != "" { + return neuripsVolumes[year].URL, nil } return "", fmt.Errorf("official %s proceedings profile is not verified for %d; supported years: 2024, 2025", conf, year) } @@ -175,8 +175,6 @@ func neuripsRecords(doc *html.Node, canonical string, year int) ([]map[string]an rows := []map[string]any{} seen := map[string]bool{} var invalid error - base, _ := url.Parse(canonical) - prefix := fmt.Sprintf("/paper_files/paper/%d/hash/", year) walk(doc, func(n *html.Node) { if invalid != nil || n.Type != html.ElementNode { return @@ -210,8 +208,8 @@ func neuripsRecords(doc *html.Node, canonical string, year int) ([]map[string]an link = absolute(canonical, attr(child, "href")) } }) - u, err := url.Parse(link) - if err != nil || u.User != nil || u.Scheme != "https" || u.Host != base.Host || !strings.HasPrefix(u.Path, prefix) || !strings.HasSuffix(u.Path, "-Abstract-Conference.html") || title == "" || authors == "" || seen[link] { + _, err := neuripsPaperURL(link, year) + if err != nil || title == "" || authors == "" || seen[link] { invalid = fmt.Errorf("NeurIPS paper lacks valid main-track identity/title/authors for %d", year) return }