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
38 changes: 38 additions & 0 deletions .agents/skills/conference-ingestion/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: conference-ingestion
description: "Collect, classify and render a requested conference/year in FastNews, or extend its conference source registry. Use for conference ingestion and domain coverage, including software engineering and Coding Agents; use field-briefing for literature search alone."
---

# Conference ingestion

Use the production Go pipeline and the source registry in `internal/catalog/catalog.go`.

## Existing sources

- Security: `usenix`, `ieee-sp`, `ndss`, `ccs` use official conference pages.
- Machine learning: `iclr`, `icml`, `neurips` use OpenReview API v2 and the exact accepted conference venue for the requested year.
- Software engineering: `icse`, `ase` use DBLP conference/workshop bibliography records for the requested stream/year. Preserve the actual venue; these records do not establish main-track-only coverage or provide paper abstracts.

For a requested conference/year, run the stages the user requested:

```bash
go run ./cmd/fastnews fetch-conf --conference <id> --year <year>
go run ./cmd/fastnews summarize-conf --conference <id> --year <year>
go run ./cmd/fastnews conference-report --conference <id> --year <year>
```

Fetching writes the local corpus. Summarization uses the configured model and resumes existing per-paper checkpoints. HTML rendering is local; `--pdf` additionally requires Chromium. A retrieval-only request uses `search-papers` instead.

Inspect the records in `top-conf/data/conferences/<id>_<year>.jsonl`, the category/summary output and the rendered report. Check stable identities, original links, authors, source provenance, requested year and actual scope. Source errors, authentication challenges, unavailable proceedings and incomplete pagination remain explicit failures; do not replace them with unrelated pages or claim a successful empty collection. An override URL must expose the same provider protocol. Do not trigger release/deployment workflows merely to validate collection.

## 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.

## Extending sources

1. Identify the authoritative endpoint and its declared record identities, scope and pagination. Confirm a real response when access is available.
2. Add the conference's name/domain/provider/remote identifier to the existing registry. Reuse an existing provider when its protocol fits; add parsing in `internal/jobs` only for a distinct protocol.
3. Keep accepted-venue or stream/year validation and stable-ID deduplication before corpus writes. Preserve source fields needed by the classifier.
4. Verify the production CLI path through fetch, classification checkpoints, HTTP catalog and HTML report, with remote services replaced only at their HTTP boundary.
5. Update the report workflow choices and docs. Run Go race/vet and the frontend/browser CI before merging. Report separately any live endpoint or model verification still blocked by external access.
2 changes: 1 addition & 1 deletion .agents/skills/field-briefing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ go run ./cmd/fastnews search-papers --query "<field and aliases>" --limit 16

The Go command reads the existing corpus without generating content or starting a server. It uses the same vector retriever as the application. Add `--category`, `--conference`, `--year`, or `--source top-conf|arxiv` to narrow the evidence. If hits are weak, rerun with English aliases or a broader category, then inspect the JSON `items`.

3. Use web search only for canonical surveys or seminal papers that FastNews does not cover (the local top-conference set is recent Big4, not a historical archive). Open a real page before citing an external paper. Skip web search when local hits already answer a narrow request.
3. Use web search only for canonical surveys or seminal papers that FastNews does not cover. Inspect the actual local conference/year coverage; registered sources do not imply their papers have been fetched and summarized. Open a real page before citing an external paper. Skip web search when local hits already answer a narrow request.
4. Write the briefing from the retrieved papers plus established field knowledge. Do not invent FastNews papers, venues, years, or links.

## Output
Expand Down
19 changes: 3 additions & 16 deletions .agents/skills/field-briefing/references/corpus.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,13 @@ Local sources used by `go run ./cmd/fastnews search-papers`.
| arXiv + news | `secnews/data/articles/YYYY-MM-DD.jsonl` | Filter `source` to arXiv feeds |
| Daily Chinese blurbs | `secnews/data/daily_summaries/YYYY-MM-DD.json` | Join by `_id` / `link` when present |

Conference file stems: `usenix`, `ieee-sp`, `ndss`, `ccs`. Labels: USENIX Security, IEEE S&P, NDSS, ACM CCS.
Conference file stems are registered in `internal/catalog/catalog.go`: `usenix`, `ieee-sp`, `ndss`, `ccs`, `iclr`, `icml`, `neurips`, `icse`, `ase`.

FastNews covers summarized Big4 papers from the years present in the corpus, plus the last 90 days of fetched arXiv feeds (`cs.CR`, `cs.AI+cs.CL`). Inspect the actual files for coverage; this is not a complete historical library.
FastNews searches summarized conference papers from the years actually present in the corpus, plus the last 90 days of fetched arXiv feeds (`cs.CR`, `cs.AI+cs.CL`, `cs.SE`). Source registration does not imply that a conference/year is present. Inspect the actual files for coverage; this is not a complete historical library. The separate arXiv reading page can browse older dated files without the research index's 90-day cutoff.

## Categories

Use these exact English names when passing `--category`:

- Web Security
- Network Security
- System & OS Security
- Hardware Security
- Cryptography & Protocols
- Privacy & Anonymity
- ML/AI Security
- Human Factors & Usable Security
- Binary & Forensics
- Miscellaneous

A few summary rows may use `Network & System Security`; treat them as network/system papers, do not rename the files.
Read the actual category strings from the summary records or `/api/catalog` before passing `--category`. Classification uses source evidence and the conference domain, so fine-grained categories can vary between corpora. Pass the stored value exactly; do not rename files or silently force software/ML papers into the older security taxonomy.

## Search output

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/conf_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: true
default: usenix
type: choice
options: [usenix, ieee-sp, ndss, ccs]
options: [usenix, ieee-sp, ndss, ccs, iclr, icml, neurips, icse, ase]
year:
description: Conference year
required: true
Expand Down Expand Up @@ -68,16 +68,13 @@ jobs:
RELEASE_TAG: report-${{ inputs.conference }}-${{ inputs.year }}
run: |
case "$CONFERENCE" in
usenix) PREFIX=USENIX ;;
ieee-sp) PREFIX=IEEE-SP ;;
ndss) PREFIX=NDSS ;;
ccs) PREFIX=CCS ;;
usenix|ieee-sp|ndss|ccs|iclr|icml|neurips|icse|ase) PREFIX="$(printf '%s' "$CONFERENCE" | tr '[:lower:]' '[:upper:]')" ;;
*) exit 2 ;;
esac
REPORT="top-conf/data/report/${PREFIX}_${YEAR}_Report"
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
gh release upload "$RELEASE_TAG" "$REPORT.html" "$REPORT.pdf" --clobber
else
gh release create "$RELEASE_TAG" "$REPORT.html" "$REPORT.pdf" \
--target main --title "$PREFIX $YEAR Summary" --notes '安全顶会论文中文报告。'
--target main --title "$PREFIX $YEAR Summary" --notes '会议论文分类与中文报告。'
fi
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FastNews

安全研究报告工作台:Go 后端与 React / TypeScript 前端分离,前端使用 **FastUI 0.3.0**。总览、安全资讯、四大顶会论文、领域导读、总结汇报、关注作者、每日私信及账号管理共用同一套 JSON API。
安全研究报告工作台:Go 后端与 React / TypeScript 前端分离,前端使用 **FastUI 0.3.0**。总览、安全资讯、多领域会议论文、领域导读、总结汇报、关注作者、每日私信及账号管理共用同一套 JSON API。

## 开发

Expand Down Expand Up @@ -76,7 +76,7 @@ FastRead 保留现有授权边界:Research 会话申请 `fast-read` 一次性
```bash
./bin/fastnews search-papers --query 'LLM jailbreak' --limit 16 # 只读 JSON 检索
./bin/fastnews field-briefing --query 'LLM jailbreak' --limit 5 --format text
./bin/fastnews summary-brief --query '四大顶会全景'
./bin/fastnews summary-brief # 会议论文全景
```

## Go 数据任务
Expand Down Expand Up @@ -106,7 +106,9 @@ FastRead 保留现有授权边界:Research 会话申请 `fast-read` 一次性
./bin/fastnews index
```

会议支持 `usenix / ieee-sp / ndss / ccs`,采集地址可通过 `--url` 指定。官方页面改版导致解析不到论文时返回错误,不用空结果覆盖历史文件。新闻以 ID / URL 去重,论文摘要按 ID 续跑,日报保持原 `source_hash` 检查点算法。`enrich-metrics` 使用 OpenAlex 并要求标题规范化后完全匹配。
会议支持安全四会 `usenix / ieee-sp / ndss / ccs`、机器学习 `iclr / icml / neurips` 以及软件工程 `icse / ase`。安全会议读取官方页面;机器学习会议读取 OpenReview API v2 中指定年份的正式会议 venue;ICSE/ASE 读取 DBLP 中对应年份、会议流的会议及研讨会论文记录,并保留原始 venue。DBLP 不提供摘要时,生成结果必须说明仅依据标题,不补造实验。分类参考会议领域,支持 Coding Agents 等细分方向,不通过标题关键词自动判定类别。

采集地址可通过 `--url` 指定同协议的来源。OpenReview/DBLP 分页全部校验完成后才追加数据;来源要求登录、返回验证页、分页不完整或会议/年份不符时返回错误并保留已有文件。新闻以 ID / URL 去重,结构化会议记录和论文摘要按稳定 ID 续跑,日报保持原 `source_hash` 检查点算法。`update-range` 仍按原安全四会运行,其他会议按 `fetch-conf → summarize-conf → conference-report` 单独选择年份;手动报告工作流支持全部已接入会议。`enrich-metrics` 使用 OpenAlex 并要求标题规范化后完全匹配。

HTML 报告由 Go 模板生成。PDF 使用 Chromium,通过 `FASTNEWS_CHROME` 指定可执行文件;不请求 PDF 时不需要浏览器。周报同时输出到 `output/` 及 `secnews/data/report/`。CI 的采集、摘要与报告工作流已改为 Go CLI。

Expand Down
202 changes: 202 additions & 0 deletions cmd/fastnews/conference_sources_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
package main

import (
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"
"sync/atomic"
"testing"

"github.com/FastR-D/FastNews/internal/catalog"
"github.com/FastR-D/FastNews/internal/config"
"github.com/FastR-D/FastNews/internal/httpapi"
"github.com/FastR-D/FastNews/internal/store"
)

func TestConferenceSourcesThroughCLIClassificationCatalogAndReport(t *testing.T) {
for _, conf := range []string{"iclr", "icml", "neurips", "icse", "ase"} {
t.Run(conf, func(t *testing.T) {
var mode atomic.Int32
var modelCalls atomic.Int32
upstream := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/chat/completions" {
modelCalls.Add(1)
body, _ := io.ReadAll(r.Body)
if !strings.Contains(string(body), "Study") {
t.Error("model did not receive source paper evidence")
}
if conf == "iclr" || conf == "icml" || conf == "neurips" {
if !strings.Contains(string(body), "Official abstract") || !strings.Contains(string(body), "Declared keyword") {
t.Error("available abstract or keywords were lost before classification")
}
}
json.NewEncoder(w).Encode(map[string]any{"choices": []any{map[string]any{"finish_reason": "stop", "message": map[string]string{"content": `{"category":"Coding Agents / 评测","summary_zh":"基于提供的论文材料归纳研究问题与评测方法。"}`}}}})
return
}
if mode.Load() == 3 {
fmt.Fprint(w, `<html>Verification required</html>`)
return
}
if mode.Load() == 4 {
fmt.Fprint(w, `{}`)
return
}
offset, _ := strconv.Atoi(catalog.First(r.URL.Query().Get("offset"), r.URL.Query().Get("f"), "0"))
paperOffset := offset
if mode.Load() == 6 {
paperOffset = 0
}
if mode.Load() == 1 && offset > 0 {
w.WriteHeader(503)
return
}
if conf == "iclr" || conf == "icml" || conf == "neurips" {
venue := r.URL.Query().Get("content.venueid")
if mode.Load() == 2 {
venue = "Different.cc/2026/Conference"
}
note := map[string]any{"id": fmt.Sprintf("%s-%d-%d", conf, mode.Load(), paperOffset), "content": map[string]any{
"title": map[string]any{"value": "Study shared title"}, "abstract": map[string]any{"value": "Official abstract"},
"authors": map[string]any{"value": []string{"Alice", "Bob"}}, "keywords": map[string]any{"value": []string{"Declared keyword"}},
"venueid": map[string]any{"value": venue}, "venue": map[string]any{"value": "Accepted paper"},
}}
notes, total := []any{note}, 2
if mode.Load() == 5 && offset > 0 {
notes = nil
}
if mode.Load() == 7 && offset > 0 {
total++
}
json.NewEncoder(w).Encode(map[string]any{"count": total, "notes": notes})
} else {
stream := "icse"
if conf == "ase" {
stream = "kbse"
}
year := "2026"
if mode.Load() == 2 {
year = "2025"
}
author := any(map[string]string{"text": "Alice"})
if offset > 0 {
author = []any{map[string]string{"text": "Alice"}, map[string]string{"text": "Bob"}}
}
hit := map[string]any{"info": map[string]any{"key": fmt.Sprintf("conf/%s/paper-%d-%d", stream, mode.Load(), paperOffset),
"title": "Study shared title", "year": year, "type": "Conference and Workshop Papers", "venue": "Published Track",
"authors": map[string]any{"author": author}, "ee": "https://doi.org/10.1000/" + conf + strconv.Itoa(offset),
"url": "https://dblp.org/rec/conf/" + stream + "/record"}}
hits := []any{hit}
if offset == 0 {
hits = append(hits, map[string]any{"info": map[string]any{"type": "Editorship", "title": "Proceedings"}})
}
total := 3
if mode.Load() == 5 && offset > 0 {
hits = nil
}
if mode.Load() == 7 && offset > 0 {
total++
}
json.NewEncoder(w).Encode(map[string]any{"result": map[string]any{"hits": map[string]any{"@total": strconv.Itoa(total), "hit": hits}}})
}
}))
defer upstream.Close()
local, _ := url.Parse(upstream.URL)
original := http.DefaultTransport
http.DefaultTransport = newsTransport(func(r *http.Request) (*http.Response, error) {
if r.URL.Host == local.Host {
return original.RoundTrip(r)
}
if r.URL.Host != "api2.openreview.net" && r.URL.Host != "dblp.org" {
return nil, fmt.Errorf("unexpected upstream %s", r.URL)
}
copy := r.Clone(r.Context())
address := *r.URL
address.Scheme, address.Host = local.Scheme, local.Host
copy.URL = &address
return original.RoundTrip(copy)
})
t.Cleanup(func() { http.DefaultTransport = original })
c := config.Config{Root: t.TempDir(), LLMKey: "fixture", LLMURL: upstream.URL}
args := []string{"--conference", conf, "--year", "2026"}
ctx := context.Background()
for index := range 2 {
fetchArgs := append([]string{}, args...)
if index == 0 {
fetchArgs = append(fetchArgs, "--url", upstream.URL+"?access_token=fixture-secret")
}
if err := job(ctx, c, "fetch-conf", fetchArgs); err != nil {
t.Fatal(err)
}
}
file := filepath.Join(c.Root, "top-conf/data/conferences", conf+"_2026.jsonl")
rows, err := catalog.Rows(file)
if err != nil || len(rows) != 2 {
t.Fatalf("pagination/deduplication: %v rows, %v", len(rows), err)
}
for _, row := range rows {
if strings.Contains(catalog.Str(row, "source_url"), "?") {
t.Fatal("source provenance retained private query parameters", row["source_url"])
}
}
for range 2 {
if err := job(ctx, c, "summarize-conf", args); err != nil {
t.Fatal(err)
}
}
if modelCalls.Load() != 2 {
t.Fatalf("repeated paid generation: %d", modelCalls.Load())
}
if err := job(ctx, c, "conference-report", args); err != nil {
t.Fatal(err)
}
report, err := os.ReadFile(filepath.Join(c.Root, "top-conf/data/report", strings.ToUpper(conf)+"_2026_Report.html"))
if err != nil || !strings.Contains(string(report), catalog.Str(rows[0], "link")) || !strings.Contains(string(report), catalog.Str(rows[1], "link")) {
t.Fatalf("report lost papers: %v", err)
}
database, err := store.Open(filepath.Join(c.Root, "accounts"))
if err != nil {
t.Fatal(err)
}
defer database.Close()
app, err := httpapi.New(c, database)
if err != nil {
t.Fatal(err)
}
recorder := httptest.NewRecorder()
app.Handler().ServeHTTP(recorder, httptest.NewRequest("GET", "/api/papers?source=top-conf&conference="+conf+"&year=2026", nil))
var result struct {
Papers []catalog.Paper `json:"papers"`
}
if err := json.Unmarshal(recorder.Body.Bytes(), &result); err != nil || recorder.Code != 200 || len(result.Papers) != 2 {
t.Fatalf("catalog response %d: %s", recorder.Code, recorder.Body.String())
}
for _, paper := range result.Papers {
if paper.Category != "Coding Agents / 评测" {
t.Fatal("model category was lost", paper)
}
}
before, err := os.ReadFile(file)
if err != nil {
t.Fatal(err)
}
for _, invalid := range []int32{1, 2, 3, 4, 5, 6, 7} {
mode.Store(invalid)
if err := job(ctx, c, "fetch-conf", args); err == nil {
t.Fatalf("invalid/incomplete source mode %d succeeded", invalid)
}
after, err := os.ReadFile(file)
if err != nil || string(before) != string(after) {
t.Fatalf("failed source mode %d changed historical corpus: %v", invalid, err)
}
}
})
}
}
4 changes: 2 additions & 2 deletions internal/ai/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ func (s *Service) Run(ctx context.Context, kind string, req Request) (map[string
if kind == "related-work" {
query = strings.TrimSpace(req.Topic + " " + req.Keywords + " " + req.Impression)
}
landscape := kind == "summary-brief" && (query == "" || strings.Contains(query, "四大顶会全景"))
landscape := kind == "summary-brief" && query == ""
if landscape {
query = "四大顶会全景"
query = "会议论文全景"
}
if query == "" {
return nil, store.Fail(400, "请输入研究方向,或先保存研究印象")
Expand Down
Loading
Loading