Skip to content

feat(analysis): bind inferred-status refusals to an analysis-run profile - #473

Merged
seonghobae merged 3 commits into
feat/copy-identity-analysis-run-gap-004from
feat/inferred-status-analysis-run-gap-004
Sep 2, 2026
Merged

feat(analysis): bind inferred-status refusals to an analysis-run profile#473
seonghobae merged 3 commits into
feat/copy-identity-analysis-run-gap-004from
feat/inferred-status-analysis-run-gap-004

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Consolidation status

fold_into_landing_vehicle — this PR is now retargeted directly onto the provisional Validation / Analysis Run simple-refusal landing vehicle #416 (feat/copy-identity-analysis-run-gap-004). It binds the existing inferred_status refusal family into that bounded-context vehicle; it is not an independently shippable bounded context. Preserve its source, focused tests, doctoring and review/RED-GREEN evidence before closing it. ADR 0073 remains implementation lineage pending #437 normalization, not per-rule architecture authority.

Current micro-profile exact head: 9ae0488e44bc0775b2289c71d83d88c57e660b0d.
Current landing base at retarget: #416@a6ba5d79c8d9acc1e7b4a53b3be5ef3d70ab19e7.

GitHub currently reports this retargeted stack as non-mergeable because #416 and this branch independently changed the shared Analysis Run integration files (Cargo.toml, lib.rs, lockfile and common documentation/index surfaces). That is a consolidation conflict, not permission to merge the micro-profile independently. Resolve it by preserving #416's copy-identity repairs and this branch's inferred-status implementation/tests in one landing head; do not overwrite either side and do not close this PR until the surviving head contains the unique source/test evidence.

Current repair

Fresh review found that execution enforced MAX_EVIDENCE_UNITS but a compact serialized InferredStatusArtifact could claim a larger census because artifact validation lacked the same upper bound. The repair on this branch makes serialization/deserialization enforce evidence_count <= MAX_EVIDENCE_UNITS, with a compact max+1 regression proving an impossible census fails closed without allocating an oversized evidence vector. The documentation repair also removed the duplicated second DOCUMENTATION.md map and made the exact-head hosted verification rule code-current.

The profile preserves:

  • cutoff-safe AvailableTime exclusion;
  • digest-bound mixed observed / inferred census;
  • matching inferred-as-observed and inferred-as-transition refusal counts;
  • duplicate/profile/snapshot/cutoff refusal;
  • metric-free inspect behavior; identity_recovery_rate stays library-side and scientific_acceptance is not exposed;
  • no GPU/MCMC/topic birth-split-merge claim.

Landing gate

After conflict resolution, the surviving #416 exact head must reacquire hosted Rust/documentation/security/SAST evidence and qualifying independent review. Queued, stale, predecessor-head, or this micro-profile's prior evidence does not transfer. Do not self-approve, bypass protection, force-push, or treat this Draft as a production dependency.

GAP-004 leftover / ADR 0073. Bind existing EvidenceStatus,
refuse_inferred_as_observed, and refuse_inferred_as_transition to
cutoff-safe inferred_status_v1. Mixed observed/inferred corpora emit a
digest-bound census. identity_recovery_rate stays library-side.

Fixes #472.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Operator-visible GAP-004 leftover / ADR 0073. Binds existing inferred_status::EvidenceStatus + refuse_inferred_as_observed + refuse_inferred_as_transition to inferred_status_v1 (tepp.inferred_status.v1). Inference inferred_is_not_observed_and_not_transition. AvailableTime cutoff exclusion and MAX_EVIDENCE_UNITS enforced. identity_recovery_rate stays library-side. unobserved and no_relationship are not wire statuses. Distinct from #461 episode-membership, #460 relation-absence, #458 outcome-order, #434 membership-target, #430 location-membership, and #416 copy-identity. Author COMMENT is not independent APPROVE. Two independent current-head APPROVEs required. Exact-head Checks on 3c66702 only. Do not self-approve.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

analysis_engineinferred_status_v1 실행 프로필을 추가했습니다. 증거를 cutoff-safe하게 집계하고, 추론 상태를 관찰·상태 전이로 거부합니다. 검증된 결과를 SHA-256 digest-bound 아티팩트와 종료 결과로 생성합니다. 관련 ADR, 추적성, doctoring 문서도 추가했습니다.

Changes

추론 상태 분석 실행 프로필

Layer / File(s) Summary
아티팩트 계약과 공개 API
crates/analysis_engine/Cargo.toml, crates/analysis_engine/src/inferred_status_artifact.rs, crates/analysis_engine/src/lib.rs
InferredStatusEvidenceInferredStatusArtifact를 추가했습니다. 스키마, 식별자, cutoff, 개수, 거부 카운터, 크기 한도와 digest를 검증합니다. 실행 계약과 오류를 공개합니다.
실행 흐름과 계약 검증
crates/analysis_engine/src/inferred_status_artifact.rs, crates/analysis_engine/tests/inferred_status_execution_contract.rs, crates/analysis_engine/src/lib.rs
실행 요청과 수락을 검증합니다. cutoff 이후 증거를 제외하고 관찰·추론 census를 생성합니다. 추론 증거에는 관찰·전이 거부를 적용합니다. 혼합 증거, 빈 입력, 중복, 불일치, 크기 초과와 변조 아티팩트를 검증합니다.
결정 문서와 추적성 연결
CHANGELOG.md, DOCUMENTATION.md, docs/TRACEABILITY.md, docs/adr/0073-inferred-status-analysis-run.md, docs/adr/README.md, docs/doctoring/inferred-status-analysis-run.md
inferred_status_v1tepp.inferred_status.v1 계약을 ADR, 추적성 매트릭스, 문서 맵과 doctoring 문서에 기록했습니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to 3c667

This PR adds a public inferred-status analysis profile and artifact, but the current implementation can accept an artifact claiming more evidence than the enforced limit, while authorization/provenance and failed-run completion remain dependent on callers. It is not merge-ready until the limit validation is fixed and the boundary and failure-handling ownership are explicitly addressed.

Sequence Diagram(s)

sequenceDiagram
  participant 실행요청
  participant execute_inferred_status_run
  participant inferred_status
  participant 종료결과
  실행요청->>execute_inferred_status_run: 요청·수락·snapshot·cutoff 검증
  execute_inferred_status_run->>inferred_status: 증거 집계 및 inferred 상태 거부
  inferred_status-->>execute_inferred_status_run: 관찰·추론 census와 거부 카운터
  execute_inferred_status_run->>종료결과: SHA-256 digest-bound 결과 생성
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 51.72% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 3 files. (7 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR은 #472의 요구사항을 충족하는 구현 증거를 제공합니다. inferred_status_v1 및 tepp.inferred_status.v1 프로필, inferred_is_not_observed_and_not_transition 결과, AvailableTime 컷오프, MAX_EVIDENCE_UNITS 제한, 혼합 관찰·추론 census, 빈 입력·단일 …
Out of Scope Changes check ✅ Passed 변경 사항은 #472의 구현, 통합 테스트, ADR, 추적성 문서, 문서 맵, changelog 및 의존성 추가로 제한됩니다. GPU, MCMC, topic birth/split/merge 또는 implemented-main 범위의 변경은 확인되지 않습니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 inferred-status 거부 동작을 analysis-run 프로필에 연결하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
Full details: Linked Issues check

Explanation

PR은 #472의 요구사항을 충족하는 구현 증거를 제공합니다. inferred_status_v1 및 tepp.inferred_status.v1 프로필, inferred_is_not_observed_and_not_transition 결과, AvailableTime 컷오프, MAX_EVIDENCE_UNITS 제한, 혼합 관찰·추론 census, 빈 입력·단일 클래스·중복·초과 입력의 fail-closed 처리를 추가했습니다. identity_recovery_rate는 라이브러리 측에 유지하고 inspect payload는 metric-free로 유지하며, 관련 없는 분석 범위도 포함하지 않습니다.

Full details: Docstring Coverage

Explanation

Docstring coverage is 51.72% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 3 files. (7 skipped: 7 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/inferred-status-analysis-run-gap-004

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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 2 potential issues.

Devin Review

Comment thread crates/analysis_engine/src/inferred_status_artifact.rs
Comment thread docs/adr/0073-inferred-status-analysis-run.md
coderabbitai[bot]

This comment was marked as resolved.

Use the review-reproduced oversized compact artifact as RED evidence. Enforce the same MAX_EVIDENCE_UNITS invariant at artifact deserialization/serialization that execution already enforces, and add regression coverage for both directions.

@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 found 1 new potential issue.

Devin Review

Comment thread crates/analysis_engine/src/inferred_status_artifact.rs
Document the artifact-count invariant and exact-head landing procedure, and collapse the duplicated documentation map into one canonical index so the new doctoring entry cannot diverge between copies.
@seonghobae
seonghobae marked this pull request as draft September 1, 2026 20:00
@seonghobae
seonghobae changed the base branch from main to feat/copy-identity-analysis-run-gap-004 September 1, 2026 22:28
@seonghobae
seonghobae changed the base branch from feat/copy-identity-analysis-run-gap-004 to main September 1, 2026 22:32
@seonghobae
seonghobae changed the base branch from main to feat/copy-identity-analysis-run-gap-004 September 2, 2026 01:11
@seonghobae
seonghobae merged commit e0e4480 into feat/copy-identity-analysis-run-gap-004 Sep 2, 2026
30 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request status: blocked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant