Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .agents/skills/conference-ingestion/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ For a requested conference/year, run the stages the user requested:

```bash
go run ./cmd/fastnews fetch-conf --conference <id> --year <year>
# NeurIPS: enrich a bounded batch before summarizing; --all processes every missing abstract.
go run ./cmd/fastnews enrich-abstracts --conference neurips --year <year> --limit 12
go run ./cmd/fastnews summarize-conf --conference <id> --year <year>
go run ./cmd/fastnews conference-report --conference <id> --year <year>
```
Expand All @@ -28,6 +30,8 @@ Inspect the records in `top-conf/data/conferences/<id>_<year>.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/<id>_<year>.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.
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/conf_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/<conf>_<year>.jsonl` 并同步落盘;后续运行只请求缺少摘要的文章,失败保留此前进度。默认每次补全 12 篇,`--limit 0` 或 `--all` 处理全部缺失文章。摘要来源与正文合并后提供给分类器;已有总结若对应旧材料则不会作为当前总结进入目录/报告,重新执行 `summarize-conf` 只更新材料发生变化的记录。未补全语料的既有断点保持原行为;这里的摘要补全不调用 LLM。

## 验证

```bash
Expand Down
175 changes: 175 additions & 0 deletions cmd/fastnews/abstracts_test.go
Original file line number Diff line number Diff line change
@@ -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(`<html><head><meta name="citation_title" content="Recorded paper"><meta name="citation_volume" content="38"><meta name="citation_publication_date" content="2026-04-23"><meta name="citation_pdf_url" content="https://proceedings.neurips.cc%s"></head><body><section class="paper-section"><h2 class="section-label">Abstract</h2><p class="paper-abstract"><p>We examine <em>model efficiency</em> with measured evidence.</p></p></section></body></html>`, 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 := `<p class="paper-abstract">Original abstract</p>`
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(`<meta name="citation_title" content="Recorded paper"><meta name="citation_volume" content="%s"><meta name="citation_pdf_url" content="https://proceedings.neurips.cc%s"><section class="paper-section">%s</section>`, volume, pdf, content)
if mode == "verification-page" {
body = `<html><body>Verification required</body></html>`
}
}
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)
}
})
}
}
10 changes: 8 additions & 2 deletions cmd/fastnews/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion cmd/fastnews/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <command> --help for options.")
return nil
Expand Down
5 changes: 4 additions & 1 deletion internal/catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down
43 changes: 43 additions & 0 deletions internal/catalog/conference.go
Original file line number Diff line number Diff line change
@@ -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))
}
Loading
Loading