Skip to content

fix: make UI evidence labels standards-safe - #222

Merged
seonghobae merged 8 commits into
mainfrom
fix/ui-evidence-label-contract-v1
Aug 24, 2026
Merged

fix: make UI evidence labels standards-safe#222
seonghobae merged 8 commits into
mainfrom
fix/ui-evidence-label-contract-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Purpose

Correct two buyer-visible evidence-label semantics without changing filesystem, cleanup, model, or mutation authority:

  1. fmtBytes scales by powers of 1024, so its labels must use the IEC binary-prefix ladder rather than decimal KB/MB/GB/TB labels or a truncated upper unit.
  2. The model-backed safe verdict must not read like deletion authorization. It must present a low-risk advisory and explicitly require verification before action.

Reference: International Electrotechnical Commission. (2025). IEC 80000-13:2025 Quantities and units — Part 13: Information science and technology. IEC.

Exact current state

  • Exact source head: 4d54c63e6cce7509c3c70bb3e77f28a8033ac5e8.
  • Live protected main: be418bac9bfbdc8aa41b1a698713833e3dbccfdc.
  • The PR is open, Ready for review, mergeable, and based directly on protected main.
  • Current semantic delta remains exactly:
    • src/lib/fmt.ts;
    • src/lib/fmt.test.ts;
    • src/lib/verdictBadge.ts;
    • src/lib/verdictBadge.test.ts.
  • Current-head formal reviews and review threads are empty; no approval is claimed.

Test-first evidence and narrow implementation

  • 9946397d96af33024f39fcfcb89194d860ec891d first required IEC binary byte labels.
  • 31ba8101857d7f06b6c0b8739435b8236786dad8 then required model verdict copy to remain advisory rather than presenting safe as deletion authority.
  • c7e1b628b15cd033e8728e4588e34170a2c9bc34 replaced decimal labels with binary labels through PiB while preserving the existing 1024 scaling and rounding behavior.
  • 99cebe6c1216eaecb314e596cd9b64ae6d030383 changed only the safe badge copy from categorical 안전 / 삭제해도 안전 (자문) to 낮은 위험 and 모델 자문: 낮은 위험 — 작업 전 검증 필요.
  • Review then found the upper-unit implementation still repeated the original truncation defect above PiB despite citing the 2025 standard.
  • Test-only commit b579d0debb4912d612ee36563b08e3a0be9f7479 requires the complete IEC 80000-13:2025 ladder through EiB, ZiB, YiB, RiB, and QiB.
  • Implementation commit 71f1da02582868ab2c291345a8ad916c437946f3 extends only the formatter unit table through QiB; caller behavior and rounding remain unchanged.
  • Documentation commits 72ba003e6acbc52f14027ef7482339374118a0cf and 4d54c63e6cce7509c3c70bb3e77f28a8033ac5e8 add and correct a beginner-readable formatter contract without changing runtime behavior.
  • CSS classes, caution/keep/unrated behavior, unknown-verdict fail-safe fallback, confirmation, cleanup, and filesystem mutation gates remain unchanged.

Exact-head validation

On unchanged exact head 4d54c63e6cce7509c3c70bb3e77f28a8033ac5e8:

  • Test 31881989747 — success;
  • Release 31881989780 — success;
  • Security Scan 31881989752 — success;
  • SAST Semgrep 31881989789 — success.

CodeRabbit selected the four changed files on the current change stack but did not run because the organization review quota is rate-limited; rate-limit output is not review evidence.

Conditional PR-inapplicable publication or attestation helpers are not represented as passing release evidence.

Remaining integration blockers

  • The live organization ruleset requires one independent approving review, approval after the last push, and review-thread resolution; the current head has no approval.
  • Repository-wide exact 100% owned-production region/statement-equivalent, branch, function, and line coverage remains materially unsatisfied on canonical owner ci: require exact-head production coverage evidence #156.
  • Ready-for-review status is not merge authorization.

Required before merge

Do not merge unless the unchanged exact head satisfies every applicable live required workflow and current finding, every review thread is resolved, a qualifying independent approval covers the last push/current head, fresh protected-main ancestry remains current, the live review ruleset is satisfied, and repository-wide exact coverage is satisfied without exclusions or threshold weakening. Pending, queued, skipped-required, neutral-required, failed, stale, predecessor, synthetic, diagnostic-only, status-only, model-only, rate-limited, no-source scanner, or infrastructure-only evidence is not passing.

Summary by CodeRabbit

  • 변경 사항
    • 파일 크기 표시 단위가 SI 접두사에서 IEC 이진 접두사(KiB~QiB)로 변경되었습니다.
    • 파일 크기 값은 10 미만일 때 소수점 한 자리, 그 이상일 때 정수로 표시됩니다.
    • 안전 판정 배지가 ‘안전’에서 ‘낮은 위험’으로 변경되고, 자문·검증 결과임을 나타내도록 문구가 개선되었습니다.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 68865586-8f8a-4ded-b9c5-8ee5e3ab7a9e

📥 Commits

Reviewing files that changed from the base of the PR and between 93aa747 and 6647513.

📒 Files selected for processing (4)
  • src/lib/fmt.test.ts
  • src/lib/fmt.ts
  • src/lib/verdictBadge.test.ts
  • src/lib/verdictBadge.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

fmtBytes가 IEC 이진 접두사를 사용하도록 변경되었습니다. verdictBadge의 safe 표시가 낮은 위험 자문 결과를 나타내도록 변경되었습니다. 두 변경에 대한 테스트도 갱신되었습니다.

Changes

바이트 형식 변경

Layer / File(s) Summary
IEC 바이트 단위와 검증
src/lib/fmt.ts, src/lib/fmt.test.ts
fmtBytesB, KiB부터 QiB까지 지원합니다. 10 미만 값은 소수점 한 자리로 표시하고, 그 외 값은 정수로 표시합니다. 테스트는 1024 기반 접두사와 표시 규칙을 검증합니다.

Verdict 배지 의미 변경

Layer / File(s) Summary
위험도 자문 배지와 검증
src/lib/verdictBadge.ts, src/lib/verdictBadge.test.ts
safe 배지 라벨이 안전에서 낮은 위험으로 변경되었습니다. 제목은 자문 및 검증 안내를 포함하며, 삭제 승인 문구는 포함하지 않습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to 66475

This PR only changes buyer-visible byte-unit labels and advisory verdict wording without changing deletion, cleanup, filesystem, or mutation authority. It is not merge-ready at the current head because a qualifying independent approval is missing and the required repository-wide exact coverage gate remains unsatisfied.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 IEC 단위 라벨과 안전 판정 라벨의 변경이라는 주요 변경 사항을 UI 증거 라벨 표준화로 요약합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ui-evidence-label-contract-v1

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.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 12:21
@seonghobae
seonghobae marked this pull request as draft August 14, 2026 20:04

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 06:05

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 9 minutes and 57 seconds before sending another message.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review
@cwl-noema-review review
@strix review

Review exact head 4d54c63e6cce7509c3c70bb3e77f28a8033ac5e8 over protected main@be418bac9bfbdc8aa41b1a698713833e3dbccfdc read-only. Current Test, Release, Security Scan, and Semgrep workflows are terminal-success; the four-file diff is limited to the IEC binary formatter and advisory verdict copy with direct regressions. Verify the IEC 80000-13:2025 ladder, 1024 scaling/rounding, safe unknown-verdict fallback, and that “low risk” cannot be interpreted as deletion authority. Submit an exact-head formal verdict only; do not mutate, merge, or weaken repository-wide coverage/protection.

@seonghobae
seonghobae enabled auto-merge (squash) August 16, 2026 09:32
@seonghobae
seonghobae force-pushed the fix/ui-evidence-label-contract-v1 branch from 6647513 to bb0e721 Compare August 20, 2026 16:38

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae

Copy link
Copy Markdown
Contributor Author

The previous Strix failure on exact head bb0e721 was infrastructure-side: Strix/Caido loginAsGuest retried 10 times and could not connect to 127.0.0.1:48080; the report had Vulnerabilities 0 and no source finding. I requested a same-head central .github repository_dispatch rerun (run 32436011049); do not treat the old failure as a code finding.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head Strix failure is infrastructure-only: run 32393125238/job 96503678472 reports Caido loginAsGuest curl exit 7 against 127.0.0.1:48080 before a vulnerability report. The canonical fail-closed repair is ContextualWisdomLab/.github#1153; please re-run this check after that protected central fix lands. No source finding is being reclassified as a pass.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@strix review current head bb0e721. The prior run was infrastructure-only (Caido loginAsGuest could not connect to 127.0.0.1:48080); please rerun against this exact head after the central Strix fix.

@seonghobae

Copy link
Copy Markdown
Contributor Author

The only current failing check is the historical strix run 32393125238 (job 96503678472, 2026-08-20). Its workflow is no longer retrievable (404), while the same source was already exercised by the central dispatch run 32503607110, whose Strix job succeeded; the central publisher could not write the target status because GitHub returned 403 Resource not accessible by integration. No DiskSage source failure is evidenced, and no bypass or force-merge was used. The PR remains protected pending a fresh qualifying check/review.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head check repair: Strix failed on infrastructure, not source findings. The job log shows loginAsGuest failed after 10 attempts because the Strix Caido service at 127.0.0.1:48080 never became reachable; the gate then failed closed on provider infrastructure. The PR head remains bb0e721bc51dda5b6a0e98104c1897187e2b2b55; I requested a rerun of failed job 96503678472 without changing source.

@opencode-agent opencode-agent Bot added area: ui-ux Frontend, interaction, design, or user experience priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior labels Aug 22, 2026
@seonghobae
seonghobae marked this pull request as draft August 24, 2026 01:39
auto-merge was automatically disabled August 24, 2026 01:39

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 05:25
@seonghobae
seonghobae merged commit 7eb131c into main Aug 24, 2026
38 of 39 checks passed
@seonghobae
seonghobae deleted the fix/ui-evidence-label-contract-v1 branch August 24, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-ux Frontend, interaction, design, or user experience priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant