SShortSingh.
Back to feed

차등 테스트로 API 리라이트를 검증하는 방법

0
·5 views

API 리라이트를 검증하려면 동일한 요청을 기존 서비스와 새 서비스에 함께 보내고, 허용된 차이를 정규화한 뒤 상태 코드, 헤더, 본문을 비교하는 차등 테스트를 활용할 수 있다. 이때 기존 서비스가 기준이 되며, 설명되지 않는 차이는 리라이트의 버그이거나 사용자가 의존하는 숨은 동작을 의미한다. Anthropic은 Python에서 Rust로 Messages API를 옮기는 과정에서 테스트 통과율과 실제 트래픽 일치율의 큰 차이를 확인했고, 기존 테스트 스위트 자체도 약화된 assertion으로 퇴화해 있었다. 이 글은 재생 방식과 섀도잉 방식으로 트래픽을 공급하는 법, 요청 코퍼스 구성, 무시할 휘발성 필드 정규화, 계층별 diff와 불일치 그룹화 방법을 설명한다. 간단한 Python 비교 코드 예시도 함께 제시된다.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Tests on 25 AI faces show expression and head turn shift face scores most

A browser-based face analysis tool team changed one photo factor at a time across 25 AI-generated faces to see what moves the score. Lighting and head tilt had little effect on average, though individual photos could still swing by up to about one point. Faces shrunk to small sizes were often refused with a retake request rather than scored, since unreliable measurements were judged worse than no result. A smile showing teeth lowered scores the most, by a median of 0.8, because the expression changes facial geometry. Head turn, which cannot be simulated by editing flat images, is likely the largest factor, and the team now lists measured photo factors and retake tips with each result.

0
ProgrammingDEV Community ·

2026 Benchmarks Compare Self-Hosted n8n Disk I/O, Billing Costs and Exit Code 137 Fixes

A DEV Community article presents 2026 benchmarks for self-hosting n8n and AI agents, measured on a live 3 vCPU Linux 6.8 KVM node. The author reports non-cached 4K fsync performance of about 2,500 IOPS, which the piece says is adequate for PostgreSQL 16 write-ahead log commits. The article argues that per-task billing on platforms like Zapier, Make and n8n Cloud can escalate sharply once AI agents run many steps per conversation, and it compares monthly costs against several VPS and managed hosting options. To prevent Exit Code 137 out-of-memory kills, it recommends a set of n8n environment variables for binary data handling, execution pruning and Node memory limits, alongside a 2 GB swapfile. The author also links to a reproducible telemetry dataset and open-source Docker Compose templates.

0
ProgrammingDEV Community ·

Server Code Diverged From Repo, Caught by Deploy Guards Before Patching

A developer running a portfolio site found that a file generating article preview cards behaved differently from its copy in their code repository. Two patch workers built from the repo's code both failed their safety checks, signaling the file had changed. The developer then shipped a read-only worker to dump the live server file, which revealed a completely different structure from the repo version. The repo turned out to be outdated documentation of a file that had been replaced without being reconciled. The developer rebuilt the patch from the actual server bytes, and the incident led to a new rule: read the live host file before writing any patch.