diff --git a/app/main.py b/app/main.py index 6f6aa8d..85f3cde 100644 --- a/app/main.py +++ b/app/main.py @@ -56,6 +56,7 @@ async def lifespan(app: FastAPI): from workers.mailplus_archive import run as mailplus_run from workers.statute_collector import run as statute_run from workers.news_collector import run as news_collector_run + from workers.arxiv_collector import run as arxiv_collector_run from workers.fulltext_worker import reconcile_unresolved as fulltext_reconcile_run from workers.kosha_collector import run as kosha_collector_run from workers.csb_collector import run as csb_collector_run @@ -147,6 +148,9 @@ async def lifespan(app: FastAPI): scheduler.add_job(api_standards_run, CronTrigger(day=5, hour=7, minute=5, timezone=KST), id="api_standards_collector") # 사이클 3 C-2 잔여: CCPS Beacon 월간 PDF (playwright 익명 경유 — WAF 차단 시 health 로 가시화). scheduler.add_job(ccps_collector_run, CronTrigger(day=5, hour=7, minute=20, timezone=KST), id="ccps_collector") + # B-3 PR2: arXiv 키워드 필터 수집기 (daily 07:30 KST — statute 07:00 직후 빈 슬롯). + # signal-only 초록 색인, per-run cap 으로 임베드 큐 보호. keyless. + scheduler.add_job(arxiv_collector_run, CronTrigger(hour=7, minute=30, timezone=KST), id="arxiv_collector") scheduler.start() # Phase 2.1 (async 구조): QueryAnalyzer prewarm. diff --git a/app/workers/arxiv_collector.py b/app/workers/arxiv_collector.py new file mode 100644 index 0000000..ba223af --- /dev/null +++ b/app/workers/arxiv_collector.py @@ -0,0 +1,368 @@ +"""arXiv 키워드 필터 수집기 — B-3 PR2 (plan safety-library-b3-1). + +bespoke arXiv API(Atom) 수집기. 카테고리 RSS 통째(firehose)가 아니라 +cat:{category} AND (abs:키워드 ...) 로 안전/신뢰성/압력용기 관련분만 좁혀 수집한다. + +- signal-only: 초록만 색인(embed+chunk), summarize 절대 미enqueue — 맥미니 Qwen 큐 무접촉. +- DOI 보유 → paper.doi(서지 holder, partial-unique 인덱스 진입). 없으면 versionless arXiv id 로 + dedup(향후 PR4 reconcile 가 DOI 백필). +- etiquette: 요청 간 ≥3s + HTTP 429 지수 백오프. 카테고리별 submittedDate 워터마크로 증분. +- per-run insert cap(_RUN_CAP) — 광역 수집이 GPU bge-m3 embed 큐를 범람시키지 않게(적대리뷰 A major). + 잔여는 silent-cap 금지(csb idiom): 누락 건수 로깅. +- keyless. enabled=False news_sources 행(6h 뉴스 사이클 비대상) + main.py CronTrigger(자체 폴링). +- arXiv API 는 https 필수(http=301). UA = CRAWL_UA. +""" + +import asyncio +import hashlib +import re +import xml.etree.ElementTree as ET +from dataclasses import dataclass, field +from datetime import datetime, timezone + +import httpx +from sqlalchemy import select + +from core.crawl_politeness import CRAWL_UA +from core.database import async_session +from core.utils import setup_logger +from models.document import Document +from models.news_source import NewsSource +from models.queue import enqueue_stage +from services.papers.doi import normalize_doi +from services.papers.holder import find_paper_holder +from workers.news_collector import ( + FeedError, + _get_or_create_health, + _record_failure, + _record_success, +) + +logger = setup_logger("arxiv_collector") + +_ARXIV_API = "https://export.arxiv.org/api/query" +_SOURCE_NAME = "arXiv 안전·공학 (keyword)" + +# 신규 카테고리만 — 기존 RSS 행(id 62 physics.app-ph, id 64 cond-mat.mtrl-sci)과 비중복. +_CATEGORIES = ( + "eess.SY", # systems & control + "physics.flu-dyn", # 유체 — 압력/유동 + "physics.comp-ph", # 전산물리 + "math.OC", # 최적화·제어 + "math.NA", # 수치해석 (FEM 등) + "stat.AP", # 응용통계 — 신뢰성 + "cs.CE", # computational engineering +) +# 압력용기·공정안전·구조건전성 도메인 키워드(abs: OR 게이트). 좁게 유지 = 관련성↑·볼륨↓ (튜너블). +_KEYWORDS = ( + "pressure vessel", + "process safety", + "structural integrity", + "fracture mechanics", + "fatigue life", + "corrosion", +) + +_RUN_CAP = 80 # 1회 run 신규 적재 상한(임베드 큐 보호). bulk 시 해제. +_PAGE_SIZE = 50 # max_results per request +_MAX_PAGES_PER_CAT = 4 # 카테고리당 최대 페이지(증분이라 보통 1페이지에 워터마크 도달) +_REQ_SLEEP = 3.0 # arXiv etiquette ≥3s +_MAX_RETRY = 4 +_BACKOFF_BASE = 5.0 + +_NS = { + "a": "http://www.w3.org/2005/Atom", + "arxiv": "http://arxiv.org/schemas/atom", + "opensearch": "http://a9.com/-/spec/opensearch/1.1/", +} +_ABS_ID_RE = re.compile(r"arxiv\.org/abs/(.+?)(v\d+)?$") +_WS_RE = re.compile(r"\s+") + + +# ───────────────────────── 순수 파서 (fixture 단위 테스트 대상) ───────────────────────── + +@dataclass +class ArxivEntry: + arxiv_id: str # versionless, 예: "1209.2405" + version: str | None # "v1" 또는 None + title: str + summary: str # 초록 + published: datetime | None + doi: str | None # normalize_doi 적용 + journal_ref: str | None + primary_category: str | None + categories: list = field(default_factory=list) + abs_url: str | None = None + pdf_url: str | None = None + + +def _clean(text: str | None) -> str: + return _WS_RE.sub(" ", text).strip() if text else "" + + +def _parse_id(raw_id: str | None) -> tuple[str | None, str | None]: + """'http://arxiv.org/abs/1209.2405v1' → ('1209.2405', 'v1'). versionless id 가 dedup 키.""" + m = _ABS_ID_RE.search((raw_id or "").strip()) + if not m: + return None, None + return m.group(1), m.group(2) + + +def _parse_dt(s: str | None) -> datetime | None: + if not s: + return None + try: + return datetime.fromisoformat(s.replace("Z", "+00:00")) + except ValueError: + return None + + +def build_search_query(category: str, keywords=_KEYWORDS) -> str: + """cat:{category} AND (abs:kw1 OR abs:"kw with space" ...). 공백 키워드는 따옴표 구절.""" + kw = " OR ".join(f'abs:"{k}"' if " " in k else f"abs:{k}" for k in keywords) + return f"cat:{category} AND ({kw})" + + +def parse_arxiv_feed(xml_text: str) -> tuple[int, list[ArxivEntry]]: + """arXiv Atom 응답 → (total_results, [ArxivEntry]). 순수 함수.""" + root = ET.fromstring(xml_text) + raw_total = root.findtext("opensearch:totalResults", default="0", namespaces=_NS) + try: + total = int(raw_total) + except (TypeError, ValueError): + total = 0 + entries: list[ArxivEntry] = [] + for e in root.findall("a:entry", _NS): + aid, ver = _parse_id(e.findtext("a:id", namespaces=_NS)) + if not aid: + continue + prim = e.find("arxiv:primary_category", _NS) + abs_url = pdf_url = None + for ln in e.findall("a:link", _NS): + if ln.get("rel") == "alternate" and (ln.get("type") or "").startswith("text/html"): + abs_url = ln.get("href") + elif ln.get("title") == "pdf": + pdf_url = ln.get("href") + entries.append(ArxivEntry( + arxiv_id=aid, + version=ver, + title=_clean(e.findtext("a:title", namespaces=_NS)), + summary=_clean(e.findtext("a:summary", namespaces=_NS)), + published=_parse_dt(e.findtext("a:published", namespaces=_NS)), + doi=normalize_doi(e.findtext("arxiv:doi", namespaces=_NS)), + journal_ref=_clean(e.findtext("arxiv:journal_ref", namespaces=_NS)) or None, + primary_category=prim.get("term") if prim is not None else None, + categories=[c.get("term") for c in e.findall("a:category", _NS)], + abs_url=abs_url, + pdf_url=pdf_url, + )) + return total, entries + + +# ───────────────────────── 적재 (DB — PR2 라이브 검증) ───────────────────────── + +def _build_paper_meta(source: NewsSource, entry: ArxivEntry) -> dict: + """extract_meta — license + source + paper 식별. 서지 holder 는 paper.doi(있으면) 보유.""" + paper: dict = {"arxiv_id": entry.arxiv_id} + if entry.doi: + paper["doi"] = entry.doi # partial-unique 인덱스 진입 (교차소스 dedup) + if entry.journal_ref: + paper["journal_ref"] = entry.journal_ref + if entry.primary_category: + paper["primary_category"] = entry.primary_category + meta: dict = { + "source_id": source.id, + "source_name": source.name, + "source_region": "INT", # arXiv = 국제 preprint. paper.jurisdiction 은 NULL 유지(A-2). + "paper": paper, + # arXiv 기본 라이선스 = 비배포(보수적). restricted 부재 → 초록은 RAG 사용 가능. + # (명시 CC 검출은 OAI 인터페이스 필요 — Atom API 미포함, PR 후속/관찰.) + "license": {"scheme": "arxiv", "redistribute": False, "attribution": "arXiv"}, + } + if entry.published: + meta["published_at"] = entry.published.isoformat() + return meta + + +async def _ingest_entry(session, source: NewsSource, entry: ArxivEntry) -> bool: + """1건 적재. 반환 = 신규 여부. signal-only(embed+chunk, summarize 없음).""" + arxiv_hash = hashlib.sha256(f"arxiv|{entry.arxiv_id}".encode()).hexdigest()[:32] + # 재수집 dedup(arXiv id) — .first()(다중행 방어) + dup = await session.execute( + select(Document.id).where(Document.file_hash == arxiv_hash).limit(1) + ) + if dup.scalars().first(): + return False + # 교차소스 dedup(DOI holder 이미 존재 — partial-unique 인덱스 백스톱 선제 회피) + if entry.doi and await find_paper_holder(session, entry.doi): + return False + + body = entry.summary or entry.title + doc = Document( + file_path=f"crawl/arxiv/{entry.arxiv_id}", + file_hash=arxiv_hash, + file_format="article", + file_size=len(body.encode()), + file_type="note", + title=entry.title, + extracted_text=f"{entry.title}\n\n{body}", + extracted_at=datetime.now(timezone.utc), + extractor_version="arxiv-api-signal", + md_status="skipped", + md_extraction_error="arXiv abstract: signal-only, markdown 비대상", + source_channel="crawl", + data_origin="external", + edit_url=entry.abs_url, + review_status="approved", + material_type="paper", + jurisdiction=None, # paper = NULL 불변(A-2). 지역은 extract_meta.paper.source_region. + published_date=entry.published.date() if entry.published else None, + extract_meta=_build_paper_meta(source, entry), + ) + session.add(doc) + await session.flush() + # signal-only: 검색 색인만. summarize/fulltext 절대 enqueue 안 함(맥미니 큐 무접촉). + await enqueue_stage(session, doc.id, "embed") + await enqueue_stage(session, doc.id, "chunk") + return True + + +async def _get_or_create_source(session) -> NewsSource: + result = await session.execute( + select(NewsSource).where(NewsSource.name == _SOURCE_NAME) + ) + source = result.scalars().first() + if source is None: + source = NewsSource( + name=_SOURCE_NAME, feed_url=_ARXIV_API, feed_type="atom", + fetch_method="signal-only", fulltext_policy="none", + source_channel="crawl", category="Engineering", language="en", + country=None, # paper → jurisdiction NULL (country 미전파) + material_type="paper", + license_scheme="arxiv", license_redistribute=False, + enabled=False, # 6h 뉴스 사이클 비대상 — 본 워커가 자체 폴링 + ) + session.add(source) + await session.flush() + return source + + +def _watermark(source: NewsSource, category: str) -> datetime | None: + raw = (source.selector_override or {}).get("arxiv_watermark", {}).get(category) + if not raw: + return None + return _parse_dt(raw) + + +def _set_watermark(source: NewsSource, category: str, value: datetime) -> None: + cfg = dict(source.selector_override or {}) + wm = dict(cfg.get("arxiv_watermark") or {}) + wm[category] = value.isoformat() + cfg["arxiv_watermark"] = wm + source.selector_override = cfg # JSONB 변경 감지 위해 재할당 + + +async def _fetch(client: httpx.AsyncClient, query: str, start: int) -> str: + params = { + "search_query": query, "start": start, "max_results": _PAGE_SIZE, + "sortBy": "submittedDate", "sortOrder": "descending", + } + for attempt in range(_MAX_RETRY): + resp = await client.get(_ARXIV_API, params=params) + if resp.status_code == 429: + await asyncio.sleep(_BACKOFF_BASE * (2 ** attempt)) + continue + resp.raise_for_status() + return resp.text + raise FeedError(f"arXiv 429 재시도 초과: {query[:48]}") + + +async def run(bulk: bool = False, limit: int = 0) -> None: + """daily 진입점(스케줄러). bulk/limit 은 CLI 전용(bulk=cap 해제·깊은 페이징).""" + now = datetime.now(timezone.utc) + async with async_session() as session: + source = await _get_or_create_source(session) + await session.commit() + source_id = source.id + + run_cap = (limit or 10**9) if bulk else (min(limit, _RUN_CAP) if limit else _RUN_CAP) + inserted = 0 + seen = 0 + failures: list[str] = [] + + async with httpx.AsyncClient( + timeout=30.0, headers={"User-Agent": CRAWL_UA}, follow_redirects=True + ) as client: + for category in _CATEGORIES: + if inserted >= run_cap: + break + query = build_search_query(category) + async with async_session() as session: + src = await session.get(NewsSource, source_id) + watermark = _watermark(src, category) + newest_seen: datetime | None = None + max_pages = (10**6 if bulk else _MAX_PAGES_PER_CAT) + try: + for page in range(max_pages): + if inserted >= run_cap: + break + xml_text = await _fetch(client, query, page * _PAGE_SIZE) + total, entries = parse_arxiv_feed(xml_text) + if not entries: + break + stop = False + for entry in entries: + seen += 1 + if entry.published: + newest_seen = max(newest_seen or entry.published, entry.published) + # 증분: 워터마크 이하 도달 시 이 카테고리 종료(이미 본 구간) + if watermark and not bulk and entry.published <= watermark: + stop = True + break + async with async_session() as session: + src = await session.get(NewsSource, source_id) + if await _ingest_entry(session, src, entry): + inserted += 1 + await session.commit() + else: + await session.rollback() + if inserted >= run_cap: + break + await asyncio.sleep(_REQ_SLEEP) + if stop or (page + 1) * _PAGE_SIZE >= total: + break + # 카테고리 워터마크 전진(이번 run 최신 발행일) + if newest_seen: + async with async_session() as session: + src = await session.get(NewsSource, source_id) + _set_watermark(src, category, newest_seen) + await session.commit() + except (httpx.HTTPError, FeedError, ET.ParseError) as e: + msg = f"[{category}] {e or repr(e)}" + logger.error(f"[arxiv] {msg}") + failures.append(msg) + + async with async_session() as session: + health = await _get_or_create_health(session, source_id) + if failures and inserted == 0: + _record_failure(health, "; ".join(failures)[:500], now) + else: + _record_success(health, now) + await session.commit() + + deferred = "" if inserted < run_cap else f" (cap {run_cap} 도달 — 잔여는 다음 run 이월)" + logger.info( + f"[arxiv] {len(_CATEGORIES)}개 카테고리 스캔 {seen}건 → 신규 {inserted}건{deferred}" + + (f" / 실패 {len(failures)}건" if failures else "") + ) + + +if __name__ == "__main__": + # CLI = 수동/백필 전용. --bulk = cap 해제·깊은 페이징, --limit N = 상한 N(라이브 검증용). + import argparse + + parser = argparse.ArgumentParser(description="arXiv 안전·공학 키워드 수집기") + parser.add_argument("--bulk", action="store_true", help="cap 해제 + 깊은 페이징 백필") + parser.add_argument("--limit", type=int, default=0, help="신규 적재 상한(0=기본 cap)") + args = parser.parse_args() + asyncio.run(run(bulk=args.bulk, limit=args.limit)) diff --git a/tests/fixtures/arxiv_search_pressure_vessel.xml b/tests/fixtures/arxiv_search_pressure_vessel.xml new file mode 100644 index 0000000..28269b8 --- /dev/null +++ b/tests/fixtures/arxiv_search_pressure_vessel.xml @@ -0,0 +1,383 @@ + + + https://arxiv.org/api/m9A/71G4hH6NGyarIQjqA3n6Zzk + arXiv Query: search_query=abs:"pressure vessel"&id_list=&start=0&max_results=10 + 2026-06-13T21:57:59Z + + 10 + 89 + 0 + + http://arxiv.org/abs/1209.2405v1 + A Survey of Pressure Vessel Code Compliance for Superconducting RF Cryomodules + 2012-09-11T19:34:46Z + + + Superconducting radio frequency (SRF) cavities made from niobium and cooled with liquid helium are becoming key components of many particle accelerators. The helium vessels surrounding the RF cavities, portions of the niobium cavities themselves, and also possibly the vacuum vessels containing these assemblies, generally fall under the scope of local and national pressure vessel codes. In the U.S., Department of Energy rules require national laboratories to follow national consensus pressure vessel standards or to show "a level of safety greater than or equal to" that of the applicable standard. Thus, while used for its superconducting properties, niobium ends up being treated as a low-temperature pressure vessel material. Niobium material is not a code listed material and therefore requires the designer to understand the mechanical properties for material used in each pressure vessel fabrication; compliance with pressure vessel codes therefore becomes a problem. This report summarizes the approaches that various institutions have taken in order to bring superconducting RF cryomodules into compliance with pressure vessel codes. + + 2012-09-11T19:34:46Z + 7 pp + + + Thomas Peterson + Fermilab + + + Arkadiy Klebaner + Fermilab + + + Tom Nicol + Fermilab + + + Jay Theilacker + Fermilab + + + Hitoshi Hayano + KEK, Tsukuba + + + Eiji Kako + KEK, Tsukuba + + + Hirotaka Nakai + KEK, Tsukuba + + + Akira Yamamoto + KEK, Tsukuba + + + Kay Jensch + DESY + + + Axel Matheisen + DESY + + + John Mammosser + Jefferson Lab + + 10.1063/1.4707088 + + + + http://arxiv.org/abs/2003.02057v1 + Investigation of Unit-1 Nuclear Reactor of the Fukushima Daiichi by Cosmic Muon Radiography + 2020-03-03T03:21:53Z + + + We have investigated the status of the nuclear fuel assemblies in Unit-1 reactor of the Fukushima Daiichi Nuclear Power plant by the method called Cosmic Muon Radiography. In this study, muon tracking detectors were placed outside of the reactor building. We succeeded in identifying the inner structure of the reactor complex such as the reactor containment vessel, pressure vessel, and other structures of the reactor building, through the concrete wall of the reactor building. We found that a large amount of fuel assemblies was missing in the original fuel loading zone inside the pressure vessel. It can be naturally interpreted that most of the nuclear fuel was melt and dropped down to the bottom of the pressure vessel or even below. + + + 2020-03-03T03:21:53Z + 14 pages, 17 figures + + + Hirofumi Fujii + High Energy Accelerator Research Organization + + + Kazuhiko Hara + University of Tsukuba + + + Kohei Hayashi + High Energy Accelerator Research Organization + + + Hidekazu Kakuno + Tokyo Metropolitan University + + + Hideyo Kodama + High Energy Accelerator Research Organization + + + Kanetada Nagamine + High Energy Accelerator Research Organization + + + Kotaro Sato + High Energy Accelerator Research Organization + + + Shin-Hong Kim + University of Tsukuba + + + Atsuto Suzuki + High Energy Accelerator Research Organization + + + Takayuki Sumiyoshi + Tokyo Metropolitan University + + + Kazuki Takahashi + University of Tsukuba + + + Fumihiko Takasaki + High Energy Accelerator Research Organization + + + Shuji Tanaka + High Energy Accelerator Research Organization + + + Satoru Yamashita + University of Tokyo + + + + http://arxiv.org/abs/1609.07515v1 + Low Background Stainless Steel for the Pressure Vessel in the PandaX-II Dark Matter Experiment + 2016-09-21T10:33:04Z + + + We report on the custom produced low radiation background stainless steel and the welding rod for the PandaX experiment, one of the deep underground experiments to search for dark matter and neutrinoless double beta decay using xenon. The anthropogenic 60 Co concentration in these samples is at the range of 1 mBq/kg or lower. We also discuss the radioactivity of nuclear-grade stainless steel from TISCO which has a similar background rate. The PandaX-II pressure vessel was thus fabricated using the stainless steel from CISRI and TISCO. Based on the analysis of the radioactivity data, we also made discussions on potential candidate for low background metal materials for future pressure vessel development. + + + 2016-09-21T10:33:04Z + + + Tao Zhang + + + Changbo Fu + + + Xiangdong Ji + + + Jianglai Liu + + + Xiang Liu + + + Xuming Wang + + + Chunfa Yao + + + Xunhua Yuan + + 10.1088/1748-0221/11/09/T09004 + + + + http://arxiv.org/abs/2308.09786v1 + Mechanical design of the optical modules intended for IceCube-Gen2 + 2023-08-18T19:20:09Z + + + IceCube-Gen2 is an expansion of the IceCube neutrino observatory at the South Pole that aims to increase the sensitivity to high-energy neutrinos by an order of magnitude. To this end, about 10,000 new optical modules will be installed, instrumenting a fiducial volume of about 8 km^3. Two newly developed optical module types increase current sensitivity per module by a factor of three by integrating 16 and 18 newly developed four-inch PMTs in specially designed 12.5-inch diameter pressure vessels. Both designs use conical silicone gel pads to optically couple the PMTs to the pressure vessel to increase photon collection efficiency. The outside portion of gel pads are pre-cast onto each PMT prior to integration, while the interiors are filled and cast after the PMT assemblies are installed in the pressure vessel via a pushing mechanism. This paper presents both the mechanical design, as well as the performance of prototype modules at high pressure (70 MPa) and low temperature (-40 degree Celsius), characteristic of the environment inside the South Pole ice. + + + 2023-08-18T19:20:09Z + Presented at the 38th International Cosmic Ray Conference (ICRC2023). See arXiv:2307.13048 for all IceCube-Gen2 contributions + + + Yuya Makino + for the IceCube-Gen2 Collaboration + + + + http://arxiv.org/abs/0804.0261v1 + Circulation in Blowdown Flows + 2008-04-01T22:22:32Z + + + The blowdown of high pressure gas in a pressure vessel produces rapid adiabatic cooling of the gas remaining in the vessel. The gas near the wall is warmed by conduction from the wall, producing radial temperature and density gradients that affect the flow, the mass efflux rate and the thermodynamic states of both the outflowing and the contained gas. The resulting buoyancy-driven flow circulates gas through the vessel and reduces, but does not eliminate, these gradients. The purpose of this note is to estimate when blowdown cooling is rapid enough that the gas in the pressure vessel is neither isothermal nor isopycnic, though it remains isobaric. I define a dimensionless number, the buoyancy circulation number BC, that parametrizes these effects. + + 2008-04-01T22:22:32Z + 5 pp., no figures + + J. Pressure Vessel Tech. 131, 034501 (2009) + + J. I. Katz + + + + http://arxiv.org/abs/1204.0234v1 + Substantiation of Thermodynamic Criteria of Explosion Safety in Process of Severe Accidents in Pressure Vessel Reactors + 2012-03-27T11:21:14Z + + + The paper represents original development of thermodynamic criteria of occurrence conditions of steam-gas explosions in the process of severe accidents. The received results can be used for modelling of processes of severe accidents in pressure vessel reactors. + + 2012-03-27T11:21:14Z + 5 pages, 1 figure + + + V. I. Skalozubov + + + V. N. Vashchenko + + + S. S. Jarovoj + + + V. Yu. Kochnyeva + + + + http://arxiv.org/abs/2511.11485v1 + Data-efficient U-Net for Segmentation of Carbide Microstructures in SEM Images of Steel Alloys + 2025-11-14T17:01:02Z + + + Understanding reactor-pressure-vessel steel microstructure is crucial for predicting mechanical properties, as carbide precipitates both strengthen the alloy and can initiate cracks. In scanning electron microscopy images, gray-value overlap between carbides and matrix makes simple thresholding ineffective. We present a data-efficient segmentation pipeline using a lightweight U-Net (30.7~M parameters) trained on just \textbf{10 annotated scanning electron microscopy images}. Despite limited data, our model achieves a \textbf{Dice-Sørensen coefficient of 0.98}, significantly outperforming the state-of-the-art in the field of metallurgy (classical image analysis: 0.85), while reducing annotation effort by one order of magnitude compared to the state-of-the-art data efficient segmentation model. This approach enables rapid, automated carbide quantification for alloy design and generalizes to other steel types, demonstrating the potential of data-efficient deep learning in reactor-pressure-vessel steel analysis. + + + 2025-11-14T17:01:02Z + + Machine Learning and the Physical Sciences Workshop @ NeurIPS 2025 https://openreview.net/forum?id=xYY5pn4f8N + + Alinda Ezgi Gerçek + + + Till Korten + + + Paul Chekhonin + + + Maleeha Hassan + + + Peter Steinbach + + + + http://arxiv.org/abs/2511.09689v1 + An ASME-Compliant Helium-4 Evaporation Refrigerator for the SpinQuest Experiment + 2025-11-12T19:45:47Z + + + This paper presents the design, safety basis, and commissioning results of a 1 K liquid helium-4 (4He) evaporation refrigerator developed for the Fermilab SpinQuest Experiment (E1039). The system represents the first high power helium evaporation refrigerator operated in a fixed target scattering experiment at Fermilab and was engineered to comply with the Fermilab ES\&H Manual (FESHM) requirements governing pressure vessels, piping, cryogenic systems, and vacuum vessels. The design is mapped to ASME B31.3 (Process Piping) and the ASME Boiler and Pressure Vessel Code (BPVC) for pressure boundary integrity and overpressure protection, with documented compliance to FESHM Chapters 5031 (Pressure Vessels), 5031.1 (Piping Systems), and 5033 (Vacuum Vessels). This work documents the methodology used to reach compliance and approval for the 4He evaporation refrigerator at Fermilab which the field lacks. Design considerations specific to the high radiation target-cave environment including remotely located instrumentation approximately 20 m from the cryostat are summarized, together with the relief-system sizing methodology used to accommodate transient heat loads from dynamic nuclear polarization microwaves and the high-intensity proton beam. Commissioning data from July 2024 confirms that the system satisfies all thermal performance and safety objectives. + + 2025-11-12T19:45:47Z + For IEEE Transactions in Nuclear Physics, 11 pages, 14 figures + + + Jordan D. Roberts + + + Vibodha Bandara + + + Kenichi Nakano + + + Dustin Keller + + + + http://arxiv.org/abs/1507.04072v1 + High-Voltage Terminal Test of Test Stand for 1-MV Electrostatic Accelerator + 2015-07-15T02:41:11Z + + + The Korea Multipurpose Accelerator Complex (KOMAC) has been developing a 300-kV test stand for a 1-MV electrostatic accelerator ion source. The ion source and accelerating tube will be installed in a high-pressure vessel. The ion source in the high-pressure vessel is required to have a high reliability. The test stand has been proposed and developed to confirm the stable operating conditions of the ion source. The ion source will be tested at the test stand to verify the long-time operating conditions. The test stand comprises a 300-kV high-voltage terminal, a battery for the ion-source power, a 60-Hz inverter, 200-MHz RF power, a 5-kV extraction power supply, a 300-kV accelerating tube, and a vacuum system. The results of the 300-kV high-voltage terminal tests are presented in this paper. + + 2015-07-15T02:41:11Z + International Conference on Accelerators and Beam Utilization (ICABU2014) + + Yong-Sub Cho KNS (2014); W. Sima IEEE (2004) 480-483; LA-UR-87-126 (1987); Jeong-tae Kim KNS (2014) + + Sae-Hoon Park + + + Yu-Seok Kim + + 10.3938/jkps + + + + http://arxiv.org/abs/2005.05585v1 + Investigation of the Status of Unit 2 Nuclear Reactor of the Fukushima Daiichi by the Cosmic Muon Radiography + 2020-05-12T07:26:37Z + + + We have investigated the status of the nuclear debris in the Unit-2 Nuclear Reactor of the Fukushima Daiichi Nuclear Power plant by the method called Cosmic Muon Radiography. In this measurement, the muon detector was placed outside of the reactor building as was the case of the measurement for the Unit-1 Reactor. Compared to the previous measurements, the detector was down-sized, which made us possible to locate it closer to the reactor and to investigate especially the lower part of the fuel loading zone. We identified the inner structures of the reactor such as the containment vessel, pressure vessel and other objects through the thick concrete wall of the reactor building. Furthermore, the observation showed existence of heavy material at the bottom of the pressure vessel, which can be interpreted as the debris of melted nuclear fuel dropped from the loading zone. + + 2020-05-12T07:26:37Z + 11 figures and 2 tables + + + Hirofumi Fujii + + + Kazuhiko Hara + + + Shugo Hashimoto + + + Kohei Hayashi + + + Hidekazu Kakuno + + + Hideyo Kodama + + + Gi Meiki + + + Masato Mizokami + + + Shinya Mizokami + + + Kanetada Nagamine + + + Kotaro Sato + + + Shunsuke Sekita + + + Hiroshi Shirai + + + Shin-Hong Kim + + + Takayuki Sumiyoshi + + + Atsuto Suzuki + + + Yoshihisa Takada + + + Kazuki Takahashi + + + Yu Takahashi + + + Fumihiko Takasaki + + + Daichi Yamada + + + Satoru Yamashita + + + diff --git a/tests/test_arxiv_collector_units.py b/tests/test_arxiv_collector_units.py new file mode 100644 index 0000000..d6a1930 --- /dev/null +++ b/tests/test_arxiv_collector_units.py @@ -0,0 +1,75 @@ +"""B-3 PR2 — arXiv 파서·쿼리빌더 순수 단위 테스트 (plan safety-library-b3-1). + +fixture = arXiv API 실응답 박제(abs:"pressure vessel" relevance 10건 — +DOI 보유 / journal_ref 만 보유 / 둘 다 없음 3경로 포함). run()/적재(DB)는 PR2 라이브 검증. +""" + +import sys +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent.parent / "app")) + +from workers.arxiv_collector import ( # noqa: E402 + build_search_query, + parse_arxiv_feed, +) + +FIX = Path(__file__).parent / "fixtures" / "arxiv_search_pressure_vessel.xml" + + +def _entries(): + total, entries = parse_arxiv_feed(FIX.read_text(encoding="utf-8")) + return total, {e.arxiv_id: e for e in entries}, entries + + +# ─── 피드 레벨 ─── + +def test_feed_total_and_count(): + total, by_id, entries = _entries() + assert total == 89 # fixture totalResults (페이징 재료) + assert len(entries) == 10 + + +def test_versionless_ids(): + _, by_id, entries = _entries() + # arxiv_id 는 versionless (버전 접미는 .version 으로 분리) + assert all("/" not in e.arxiv_id for e in entries) + assert "1209.2405" in by_id and by_id["1209.2405"].version == "v1" + + +# ─── DOI 보유 entry ─── + +def test_entry_with_doi(): + _, by_id, _ = _entries() + e = by_id["1209.2405"] + assert e.doi == "10.1063/1.4707088" # normalize_doi 적용(소문자·정규화) + assert e.journal_ref is None + assert e.primary_category == "physics.acc-ph" + assert e.title.startswith("A Survey of Pressure Vessel") + assert len(e.summary) > 200 # 초록 본문 + assert e.published is not None + assert e.abs_url and "/abs/" in e.abs_url + assert e.pdf_url and "pdf" in e.pdf_url + + +# ─── journal_ref 만 (DOI 없음) — 압력용기 저널 출판분 ─── + +def test_entry_journal_ref_without_doi(): + _, by_id, _ = _entries() + e = by_id["0804.0261"] + assert e.doi is None + assert e.journal_ref and "Pressure Vessel" in e.journal_ref + + +# ─── 둘 다 없음(최근 preprint) 경로도 존재 ─── + +def test_entry_neither_doi_nor_journal_ref_exists(): + _, _, entries = _entries() + assert any(e.doi is None and e.journal_ref is None for e in entries) + + +# ─── 쿼리 빌더 ─── + +def test_build_search_query(): + q = build_search_query("eess.SY", ["pressure vessel", "safety"]) + assert q == 'cat:eess.SY AND (abs:"pressure vessel" OR abs:safety)'