feat(smartlog): Phase 1 CI overlay — SmartlogCiOverlay + attach_ci_overlay · Refs #310 - #418
Merged
Merged
Conversation
…erlay · Refs #310 - Add `SmartlogCiOverlay` struct (overall/total/failed) replacing the `serde_json::Value` placeholder in `SmartlogNode.ci` - `attach_ci_overlay()` soft-fail async fn: calls `get_check_runs()` for each PR-linked node; maps passing/failing/pending/no-checks to the four canonical states (passed/failed/running/none) - `map_ci_overall()` helper for the state mapping - `format_ci_badge()` text renderer: [CI: ✓ passed (7/7)] / [CI: ✗ failed (2/7)] / [CI: ● running (0/5)] / [CI: none] - `render_text` emits ├─ CI badge line for nodes with ci overlay set - 9 new Phase 1 tests (badge variants, serde roundtrip, JSON omit/present, render_text integration, map_ci_overall mapping) - `SmartlogNode.ci` change is backward-compatible: None is skip-serialized, existing JSON consumers see no change Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
SmartlogNode.ci의Option<serde_json::Value>placeholder를 타입 안전한SmartlogCiOverlay구조체로 교체하고, GitHub Checks API 결과를 smartlog 출력에 반영한다.SmartlogCiOverlay신규 structoverall(passed/running/failed/none) +total+failed카운트SmartlogNode.ci타입 변경Option<serde_json::Value>→Option<SmartlogCiOverlay>(backward-compat: None은 skip-serialize)attach_ci_overlay()함수get_check_runs()호출 → soft-fail pattern (PR overlay와 동일)map_ci_overall()헬퍼passing/failing/pending/no checks→ 4 canonical statesformat_ci_badge()렌더러[CI: ✓ passed (7/7)]/[CI: ✗ failed (2/7)]/[CI: ● running (0/5)]/[CI: none]render_text업데이트├─ [CI: ...]줄 추가출력 예시:
왜 (이슈 참조)
Refs #310 — smartlog CI overlay check runs Phase 1.
GitHubClient::get_check_runs()는 이미 구현되어 있었지만 smartlog layer까지 데이터가 전달되지 않았음. Phase 1은 typed struct 정의 + async overlay 함수 + 텍스트 렌더링의 skeleton. JSON output에서도ci필드로 per-check detail이 소비 가능해짐.변경
src/cli/commands/smartlog.rs1파일, +217/-5줄다음 Phase 힌트
--ci-filter failed같은 필터 옵션리스크
low — 순수 additive.
ci=None이 기본값이라 기존 JSON consumers 영향 0.attach_ci_overlaysoft-fail이라 네트워크 에러도 안전.롤백
git revert b6f222e— 즉시 이전 상태 복원.Test plan
cargo test -- smartlog: 45 tests pass (기존 36 + Phase 1 신규 9)cargo build --quiet+cargo clippy -D warnings+cargo fmt --check: all clean@erishforG