Skip to content

test(scripts): smol-worker A/B gate harness (verdict: FAIL, flags not landed) - #2304

Open
lidge-jun wants to merge 1 commit into
codex/bun14-followup-memory-docsfrom
codex/bun14-smol-ab
Open

test(scripts): smol-worker A/B gate harness (verdict: FAIL, flags not landed)#2304
lidge-jun wants to merge 1 commit into
codex/bun14-followup-memory-docsfrom
codex/bun14-smol-ab

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Verification

  • bun scripts/smol-worker-ab.ts 100 3 — exit 0, report.json with per-run rows + gate block (verdict fail recorded above).
  • bun x tsc --noEmit — exit 0.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

…s not landed

Fresh-child-process isolation per run (in-process sequential runs contaminate
baselines via allocator page retention — the first version measured a phantom
win). Peak from Subprocess.resourceUsage().maxRSS over the audited workload
shape (100MB row materialization + aggregate JSON). Result on Bun 1.4.0
darwin/arm64: elapsed within bound but median peak RSS NOT reduced
(447.76MB vs 447.81MB) — the burst-allocation batch shape is dominated by
live data, not heap growth policy. Per the audited pre-landing gate, the
production Worker call sites keep full-size heaps; harness + devlog record
are the deliverable.

Unit: devlog/_plan/260822_260822-bun14-followup-memory/030
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner August 21, 2026 15:52
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Aug 21, 2026
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 378c6dcc-cc54-4c5b-a8ce-c56cf6d4b3f2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 9c7f42f8db8307615c3f65abd1f1c38be0a04287 against its stacked base and the 030 pre-landing gate.

Keeping all production workers on the full heap after a failed experiment is the conservative outcome. The evidence artifact still needs correction before it is mergeable:

  1. The document records 2026-08-22, but the current date is August 21, 2026. Use the actual measurement date and avoid a future-dated result.

  2. payloadMb and runs accept zero, negative, non-numeric, and arbitrarily large values. This is a memory-stress script under scripts/, where inputs must be explicit and bounded. For example, runs=0 reaches median([]) and writes a structurally incomplete gate, while a huge payload can exhaust the host. Validate finite positive integer ranges before creating the child or output directory, and make median/report generation total for every accepted value.

  3. The controlling document says “for each worker (history, restore, policy): build a large fixture and run the job.” This harness runs one synthetic array-plus-JSON workload and does not invoke or model the distinct production history, restore, and policy jobs. That is useful preliminary screening, but it is not a per-worker gate and cannot support the current claim that all three audited workload shapes were measured. Either scope the report/doc honestly as a synthetic screening result, or add separate fixtures/cells that exercise each production worker boundary.

git diff --check also fails on scripts/smol-worker-ab.ts because of the extra blank line at EOF. Please fix that, add focused argument/report regressions, and rerun exact-head validation. The parent documentation PR must be cleaned and landed before this sibling is retargeted to dev.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 42 / 80

지금 dev HEAD c0cbe494eWorker({ smol: true }) 프로덕션 플래그 없음. cleanup/history 워커는 풀 힙. 이 PR이 그걸 안 바꿈. base가 dev가 아님. codex/bun14-followup-memory-docs (#2301). #2302/#2303 형제가 아니라 문서 브랜치 위 030. gh api pulls/2304/files: scripts/smol-worker-ab.ts +120, devlog/_plan/260822_260822-bun14-followup-memory/030_smol_workers.md +27. 드래프트 아님. 커밋 1. 게이트 본문이 FAIL. 플래그 안 넣음. 그 계약은 맞음.

하네스. scripts/smol-worker-ab.ts가 런마다 새 자식. 인프로세스 연속 측정은 allocator 페이지 잔류로 팬텀 smol 승이 났음. 그걸 버리고 자식 격리. 피크는 Subprocess.resourceUsage().maxRSS. 주석이 darwin bytes / linux KiB를 Bun이 bytes로 맞춘다고 함. 워크로드는 100MB row 물질화 + JSON.stringify({ rows }). 감사된 storage/history 모양. 수용: 완료, elapsed ≤ baseline×1.25, peak RSS 감소. 셋 다여야 pass. 로컬 darwin/arm64 Bun 1.4.0 3런: off 37.84ms / 447,758,336B, on 38.72ms / 447,807,488B. elapsed 통과. peakRssReduced FALSE. verdict fail. live 데이터가 피크를 먹음. GC 정책이 못 줄임. smol 문서 이득은 장기 idle 워커. 버스트 배치가 아님. 정직한 FAIL임.

구멍. (1) childSource가 한 줄 이스케이프 문자열. 워커 Blob URL + self.onmessage. 리뷰/회귀가 힘듦. 파일로 빼라. (2) mediansorted[Math.floor(n/2)]. n=3이면 중간값. 맞음. 빈 배열은 undefined. completionSuccess가 false면 비교 전에 median을 이미 넣음. 크래시는 아님. 읽기는 더러움. (3) peak 감소가 1바이트라도 <. 노이즈에 pass 가능. 이번 숫자는 on이 더 큼. FAIL 유지. 임계를 상대 %로 둘 필요는 지금 없음. 플래그 안 넣는 게 맞음. (4) src/tests 0. 스크립트 실행이 증거. CI에 기본 안 태우는 게 맞음. 100MB×3×2는 파이프라인 비용. (5) #2302 extraMemorySize랑 무관. 문서 PR 위면 됨. #2303 GC 하네스랑 합치지 말 것.

types.ts/config.ts 안 만짐. 스플릿 안 씹힘. 리베이스하지 말고 닫으라는 케이스 아님. 닫을 중복 아님. #2188 L1–L9 사이드카 이미 dev. x_search 넣지 말 것. Grok OAuth Chat 기본(#2255)/GUI 옵트인 Responses(#2266)/#2283이랑 다른 레인임. 프리뷰 배포 아님. 카탈로그는 그대로 Ox Alpha x-preview-f-free + deepseek-v4-flash-vision-exp. v2.29.0 태그됨. v2.30.0-preview.20260821 있음. 비전공자 유지. 프로덕션 Worker 콜사이트 손대지 말 것. 문서+하네스라 42. #2301 다음. #2302/#2303이랑 병렬 가능.

해결방안: FAIL 유지. smol:true 프로덕션에 넣지 말 것. #2301 머지 다음에 이 기록 올려라. childSource는 일반 .ts 픽스처로 분리. 워커 타임아웃/에러 경로 테스트는 선택. 040 macmini는 030에 필수는 아님. 플랜이 로컬 A/B를 프라이머리로 둠. 이미 있음. 스플릿이랑 무관. 지금은 그 정도 아님.

이 댓글은 grok-bot이 작성했습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants