Skip to content

test(reference): close numeric-literal coverage gap - #310

Merged
seonghobae merged 6 commits into
mainfrom
test/reference-numeric-literal-coverage-main-20260822
Aug 25, 2026
Merged

seonghobae merged 6 commits into
mainfrom
test/reference-numeric-literal-coverage-main-20260822

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

PR #303 exposed a protected-main Runtime CI defect before its PostgreSQL catalog tests became the limiting boundary: exact line coverage failed because src/reference.rs had one uncovered line (98.11% for that source; 99.96% total) while all 248 tests passed. Branch coverage and later jobs were then cancelled by fail-fast behavior. This is shared protected-main coverage debt, not an instrument-catalog production defect.

RCA and remedy

  • Exact failing evidence: feat(instrument): list durable startable releases #303 head d871470f7e3182c270f1e723f284cb9d60775de7, Runtime CI run 32510880053, line-coverage job 96861472608.
  • First failing boundary: cargo llvm-cov --workspace --all-features --all-targets --fail-under-lines 100.
  • Shared source implicated by the coverage report: src/reference.rs, 53 lines / 1 missed, 70 regions / 2 missed.
  • Root-cause hypothesis: the shared numeric-like reference predicate has separator/sign alternatives that are semantically implemented but not all executed by the protected-main test suite.
  • Smallest remedy: add an integration contract that drives every supported numeric-literal sign/separator path through the public ParticipantRecord constructor, while also proving punctuation remains valid inside mixed opaque references. No production source, workflow threshold, or dependency changes.

The test covers ASCII sign/decimal/thousands/exponent spellings, Arabic decimal/thousands separators (U+066B/U+066C), and fullwidth decimal/thousands separators (U+FF0E/U+FF0C) with Unicode numeric code points.

Scope

This PR is test-only and intentionally avoids modifying src/reference.rs, which is under active semantic review elsewhere. It does not change ID normalization, persistence, authorization, psychometric arithmetic, or any read-only dependency.

Acceptance

Merge only if this unchanged exact head restores 100% owned line and branch coverage and independently passes Runtime CI, rustfmt/Clippy/rustdoc, Security/SAST, SBOM/provenance, zero valid unresolved findings, and the live non-author review requirement. Pending, skipped, cancelled, absent, neutral, stale, predecessor, synthetic, or model-only evidence is not passing.


Open in Devin Review

Summary by CodeRabbit

  • 버그 수정
    • 숫자로만 구성된 참가자 및 테넌트 참조를 잘못된 참조로 일관되게 처리합니다.
    • ASCII 및 지원되는 유니코드 숫자를 포함한 숫자형 참조에도 동일한 검증 규칙을 적용합니다.
    • 숫자와 문자가 혼합된 불투명 참조에서는 숫자 구두점과 부호를 허용하고, 입력된 참조 값을 그대로 보존합니다.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 909c2833-13aa-43ab-8f9b-bcc253f54289

📝 Walkthrough

Walkthrough

참가자 및 테넌트 참조에 대한 숫자 리터럴 거부 계약 테스트를 추가했습니다. ASCII·Unicode 숫자와 구분자·부호 조합을 검증합니다. 숫자와 문자가 혼합된 불투명 참조의 생성 및 원본 보존도 검증합니다.

Changes

숫자 참조 계약

Layer / File(s) Summary
참조 유효성 검증 테스트
tests/reference_numeric_literal_contract.rs
숫자 전용 및 숫자 리터럴 형식의 참가자·테넌트 참조가 InvalidReference로 거부되는지 검증합니다. 숫자와 구두점을 포함한 혼합 참조가 생성되고 입력값을 보존하는지도 검증합니다.

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

Merge Risk: 🔵 Low · up to e4ef7

This test-only PR expands numeric-reference coverage without changing production behavior. It is mergeable with explicit owner awareness that mixed opaque references should also verify tenant placement and preservation of the original text.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 숫자 리터럴 참조 파싱의 테스트 커버리지 보강이라는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
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.
✨ 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 test/reference-numeric-literal-coverage-main-20260822

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.

@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

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 22, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review the current exact head e4ef7eebbaa3e094a6f088d54356c61b5f3ea57e. The previous CodeRabbit review covered predecessor cda0c1a41c5d0940993b1e74f7611831a1fa64a3; this request is specifically for fresh exact-head review evidence.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026 •

Copy link
Copy Markdown

@seonghobae I will perform a fresh full review of exact head e4ef7eebbaa3e094a6f088d54356c61b5f3ea57e. The previous review covered cda0c1a41c5d0940993b1e74f7611831a1fa64a3.

✅ Action performed

Full review finished.

coderabbitai[bot]

This comment was marked as resolved.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 6da6fff177cd301220f3522e39782a1934e04f1b.

  • Head SHA: 6da6fff177cd301220f3522e39782a1934e04f1b

  • Workflow run: 32700401957

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Test: reference_numeric_literal_contract.rs"]
  S1 --> I1["regression suite"]
  I1 --> R1["Review risk: Test: reference_numeric_literal_contract.rs"]
  R1 --> V1["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 6da6fff177cd301220f3522e39782a1934e04f1b
  • Workflow run: 32700401957
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 6da6fff177cd301220f3522e39782a1934e04f1b.

  • Head SHA: 6da6fff177cd301220f3522e39782a1934e04f1b

  • Workflow run: 32700401957

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Test: reference_numeric_literal_contract.rs"]
  S1 --> I1["regression suite"]
  I1 --> R1["Review risk: Test: reference_numeric_literal_contract.rs"]
  R1 --> V1["targeted test run"]
Loading

@seonghobae
seonghobae merged commit ee88201 into main Aug 25, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant