Skip to content

feat(topic): logistic-normal ALR coordinates with true-parameter RMSE - #48

Merged
seonghobae merged 42 commits into
mainfrom
agent/topic-logratio-coordinates
Aug 25, 2026
Merged

feat(topic): logistic-normal ALR coordinates with true-parameter RMSE#48
seonghobae merged 42 commits into
mainfrom
agent/topic-logratio-coordinates

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

ADR 0012 first production slice: compositional topic coordinates. Rebased onto main after #47.

  • New topic_measurement crate (no migration; 0007 remains owned by feat(persistence): retention deletion legal-hold SQL contracts (0007) #45)
  • additive_log_ratio / from_additive_log_ratio with max-shifted stable maps
  • True-parameter recovery RMSE on known simplex
  • refuse_lexical_inferential_weight rejects TF-IDF / BM25 / keyword as estimator coordinates
  • Workspace contract includes topic_measurement

Serial

Test plan

  • Exact-head Rust CI / coverage / docs quality
  • OpenCode APPROVE when org gates allow (cannot self-approve)
  • Squash-merge when CLEAN

Summary by CodeRabbit

  • 새로운 기능
    • 토픽 비율을 안정적인 ALR 및 순차 ILR 좌표로 변환·복원하는 기능을 추가했습니다.
    • ILR 기반 Aitchison 거리를 계산하고 거리 보존을 지원합니다.
    • 잘못된 조성, 비유한 값, 차원 오류 및 수치 불안정 입력을 안전하게 거부합니다.
    • TF-IDF, BM25, 키워드 기반 점수를 추론 좌표로 사용하는 것을 제한합니다.
  • 문서
    • ALR·ILR 좌표의 적용 기준, 수치 처리, 구현 상태 및 추적성 정보를 갱신했습니다.
  • 검증
    • 변환 정확도, 거리 보존, 극단값 처리 및 입력 검증 테스트를 추가했습니다.
    • 커버리지 검증에서 문자열·주석·문자 리터럴 처리를 보강했습니다.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

topic_measurement Rust 크레이트에 ALR·sequential Egozcue ILR 변환과 역변환, Aitchison 거리, fail-closed 검증 및 어휘 가중치 거부를 추가했습니다. 워크스페이스 계약, 관련 문서 및 Rust LCOV 실행 라인 판별도 갱신했습니다.

Changes

토픽 측정 좌표 확장

Layer / File(s) Summary
크레이트 계약과 공개 API
crates/topic_measurement/Cargo.toml, crates/topic_measurement/src/error.rs, crates/topic_measurement/src/coordinates.rs, crates/topic_measurement/src/lib.rs, crates/topic_measurement/tests/crate_contract.rs
topic_measurement 패키지와 오류 타입을 추가했습니다. 조성 검증 규칙과 ALR·ILR·Aitchison API를 공개했습니다.
ALR·ILR 변환과 수치 검증
crates/topic_measurement/src/coordinates.rs, crates/topic_measurement/tests/*
ALR·ILR 변환과 역변환을 추가했습니다. 거리 일치, RMSE, 합산 오버플로우, 언더플로우 및 비유한 입력을 검증합니다.
어휘 가중치 거부 계약
crates/topic_measurement/src/lexical.rs, crates/topic_measurement/tests/logratio_recovery_contract.rs
정규화된 tfidf, bm25, keyword 방법을 LexicalWeightForbidden으로 거부합니다. 허용 및 거부 방법을 검증합니다.
워크스페이스 연결과 구현 기록
Cargo.toml, scripts/check_workspace_contract.py, tests/quality/test_check_docstrings.py, ARCHITECTURE.md, README.md, CHANGELOG.md, DOCUMENTATION.md, docs/*
새 크레이트를 워크스페이스와 계약 검사에 연결했습니다. 구현 상태, 연구 근거, 추적성 및 검증 문서를 갱신했습니다.

Rust 커버리지 판별 계약

Layer / File(s) Summary
실행 가능 행 판별과 검증
scripts/check_coverage.py, tests/quality/test_check_coverage.py
Rust 멀티라인 문자열 continuation 행과 순수 구조 행을 실행 가능 대상에서 제외했습니다. 중첩 주석, raw 문자열, 문자 리터럴, feature 조건 및 LCOV fixture 검증을 갱신했습니다.

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

Merge Risk: 🟡 Moderate · up to 16899

This PR adds logistic-normal topic coordinates and recovery validation, but the current head is not merge-ready because the coverage checker can incorrectly exclude executable code after block comments and the recovery contract validates the wrong RMSE metric. These issues can weaken release checks and fail the stated validation requirement; they should be fixed or explicitly accepted before merging.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant isometric_log_ratio
  participant from_isometric_log_ratio
  participant aitchison_distance
  Caller->>isometric_log_ratio: 양의 조성 벡터 전달
  isometric_log_ratio-->>Caller: ILR 좌표 반환
  Caller->>from_isometric_log_ratio: ILR 좌표 전달
  from_isometric_log_ratio-->>Caller: 조성 벡터 반환
  Caller->>aitchison_distance: 두 조성 전달
  aitchison_distance-->>Caller: CLR Aitchison 거리 반환
Loading
🚥 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 제목은 logistic-normal ALR 좌표와 true-parameter RMSE를 명확히 설명하며, 변경 사항의 주요 목적과 일치합니다.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
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 agent/topic-logratio-coordinates

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.

@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 a3de3fb1179708f18dee414ef4c5ff63e711e77d.

  • Head SHA: a3de3fb1179708f18dee414ef4c5ff63e711e77d

  • Workflow run: 31844834687

  • 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["Changed file (15 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (15 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs (6 files)"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs (6 files)"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test: test_check_docstrings.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_check_docstrings.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 6110d3660607ba46b312b4d76f048f1bcc4f3bc5
  • Workflow run: 32699563289
  • 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 6110d3660607ba46b312b4d76f048f1bcc4f3bc5.

  • Head SHA: 6110d3660607ba46b312b4d76f048f1bcc4f3bc5

  • Workflow run: 32699563289

  • 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["Changed file (66 files)"]
  S1 --> I1["repository behavior"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["required checks"]
  Evidence --> S2["Workflow (2 files)"]
  S2 --> I2["GitHub Actions review job"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["actionlint plus required checks"]
  Evidence --> S3["Docs (24 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["Test (4 files)"]
  S4 --> I4["regression suite"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["targeted test run"]
Loading

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: main
  • Head branch: agent/topic-logratio-coordinates
  • Fix direction: merge or rebase origin/main into agent/topic-logratio-coordinates, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 48 --repo ContextualWisdomLab/TEPP
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:agent/topic-logratio-coordinates
# rebase path only: git push --force-with-lease origin HEAD:agent/topic-logratio-coordinates

@seonghobae
seonghobae marked this pull request as draft August 15, 2026 06:11
@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 09:22
@seonghobae
seonghobae marked this pull request as draft August 16, 2026 10:45
devin-ai-integration[bot]

This comment was marked as resolved.

* feat(model): statistical Pareto K gates refuse LLM numerical authority

ADR 0012 requires held-out likelihood/complexity comparison before any
blinded LLM review. This crate admits K>=2 statistical candidates, drops
dominated alternatives, and recovers known truth K with computed RMSE.

* feat(topic): keep one identity across dormancy and reactivation

ADR 0012 selects one global topic identity for the modeled period.
Activity may become dormant or reactivated without minting a new
identity; recovery is the computed match rate against known truth.

* feat(api): serve naruon POSTs on loopback with a live deadline

PR #87 accepted analysis-run bodies with knowledge_cutoff "k" and hung
when a client sent a partial request. The named live listener now
installs a read/write deadline, requires a loopback Host, refuses
Transfer-Encoding and NIM/proxy headers, parses RFC 3339 cutoffs,
keys idempotency by tenant plus key, and proves export over TCP.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* test(api): reproduce missing LineageWeave consumer contract

The live TEPP listener currently accepts only tepp-consumer: naruon and
keys idempotency without the consumer identity. These regressions require a
credential-free LineageWeave exchange, a published consumer code, accepted
202 handling, cross-consumer idempotency isolation, and fail-closed unknown
consumers.

* feat(api): admit LineageWeave on the modular run boundary

Publish a credential-free LineageWeave analysis-run exchange and a
consumer-neutral loopback ingress. Accepted-run idempotency is isolated by
consumer, tenant, and caller key; unpublished consumers and hostile headers
fail closed. The acknowledgement remains asynchronous and does not claim a
completed psychometric result.

* ci: stage LineageWeave contract formatting repair

The one-shot workflow removes test-only imports from production code, runs the pinned Rust formatter, verifies formatting, commits the repair, and removes itself.

* fix(api): format and compile the LineageWeave contract

* feat(api): publish terminal analysis result contract

* fix(api): preserve existing contract documentation

* fix(api): restore strict terminal result implementation

* test(api): cover terminal analysis result contract

* test(api): require cutoff-safe LineageWeave project history

* feat(api): expose cutoff-safe project history contracts

* feat(api): add cutoff-safe project history projection

* feat(api): publish the LineageWeave project history exchange

* ci: materialize the PR 159 availability-clock repair

* ci: verify and publish the project-history availability contract

* ci: verify TEPP LineageWeave project-history contract

* feat(api): add analysis run status contract

* fix(api): declare temporal core workspace version

* fix(api): align project-history clocks and non-causal evidence

* fix(api): harden analysis result serialization bindings

* docs(adr): record consumer-scoped analysis-run ingress

* docs(adr): index modular consumer ingress

* test(api): require live project-history service route

* ci: prove and implement the live project-history route

* fix(api): validate localhost ports in live host checks

* fix(api): share strict loopback host validation

* fix(api): satisfy strict contract lint

* fix(ci): align the TEPP history repair with the live contract

* fix(ci): make the TEPP live-route repair exact-head compatible

* fix(ci): install pinned Rust components correctly

* test(api): complete naruon live branch coverage

* fix(ci): remove the superseded analysis-run body-limit import

* ci: remove superseded PR 159 verification workflow

* test(api): close project-history line and branch coverage gaps

* ci: verify the TEPP history coverage contract before publish

* chore: close accidental placeholder issue

* chore: remove accidental placeholder cleanup workflow

* test(api): close analysis-run live coverage gaps

* chore(ci): remove completed project-history repair workflow

* test(coverage): merge branch outcomes by source coordinate

* ci: finalize TEPP project-history contract

* test(api): close analysis-run live coverage gaps

* ci: pin project history verification actions

* ci: pin finalization workflow actions

* ci: pin and rerun TEPP project-history finalization

* ci: dispatch pinned PR 159 finalizer

* test(api): close project-history coverage edges

* ci: remove completed project-history finalizers

* docs: doctor the LineageWeave project-history contract

* test(api): reproduce idempotency delimiter collision

* fix(api): reject control characters in wire identities

* test(api): preserve multiline wire text

* fix(api): bound accepted analysis run payloads

* test(api): align control character contract

* test: close project history coverage gaps

* fix: validate terminal result bindings

* test(topic): use independent identity recovery oracle

* fix(api): revalidate project history projections

* test(api): cover empty https origin

* test(api): close unreachable HTTP branch

* test(api): cover localhost live host acceptance

* test(api): close naruon HTTP branch coverage gap

* test(api): close project history coverage gaps

* test(api): cover project history invariants

* test(api): cover project history response invariants

* test(api): remove timing-sensitive timeout assertion

* test(topic-lineage): complete identity branch contracts

* test(model-selection): complete pareto gate coverage

* ci: restack LineageWeave consumer contract on merged ingress

* fix(docs): align naruon maturity with protected main

* ci: trigger LineageWeave consumer restack from PR

* fix(api): complete lineageweave restack safely

* docs: bind consumer ingress to merged main lineage

* ci: verify and repair PR 155 review findings

* test: stage PR 155 review-finding repair

* ci: execute the PR 155 repair through a recognized workflow

* test: stage PR 159 timeout contract repair

* ci: verify PR 159 loopback timeout contract

* fix: close PR 155 review findings

* fix: complete PR 155 coverage gates

* test: strengthen coverage report regressions

* fix(api): harden accepted receipts and provider headers

* fix(ci): keep timeout verification in committed tests

* Remove unreachable project history host branch

* fix: enforce project history response size symmetry

* docs: record project history service boundary

* docs: remove ADR trailing whitespace

* fix: harden analysis result contract boundaries

* fix: enforce strict project history timestamps

* docs: keep ADR index wording current

* test: close coverage and match guarded arms

* test: cover provider credential header branches

* fix(api): reject delimiter-free credential headers

* test: configure repository root for pytest

* fix(coverage): preserve multiline match guards

* fix(coverage): respect match arm boundaries

* fix(coverage): reject block-boundary false guards

* fix coverage guard after destructuring match arm

* cover nested and long match guards

* cover split nested match guard

* retain guards after sibling match arms

* style(api): apply rustfmt to project history tests

* fix(api): close project history live ingress gaps

* test(model-selection): validate repeated truth recovery

* fix(model-selection): validate llm candidate K

* feat(api): expose temporal evidence context for LineageWeave Ask (#158)

* test(api): define LineageWeave temporal context contract

* feat(api): add temporal context contract

* fix(api): declare temporal core workspace version

* fix(api): share strict loopback host validation

* test(api): close live contract branch coverage

* test(api): adapt temporal parser coverage to shared iterator

* fix(api): enforce temporal context trust boundaries

* test(api): cover temporal tie ordering branches

* fix: remove fabricated temporal context idempotency

* fix(api): allow temporal context reads without idempotency

* feat(engine): execute cutoff-safe analysis runs (#178)

* feat(engine): execute cutoff-safe analysis runs

* docs(api): record analysis execution boundary

* fix(engine): propagate artifact serialization errors

* docs(engine): separate local and hosted verification

* docs(engine): avoid duplicate gap-register landing file

* docs(engine): remove absent register reference

* docs(engine): preserve canonical documentation map

* fix(engine): bound opaque analysis identifiers

* Align analysis execution with accepted receipt contract

* Guard analysis execution receipt identity

* docs: register analysis gap doctoring

* docs: align LineageWeave wire evidence

* fix(api): bound temporal context serialization

* fix(api): bound serialization before allocation

* feat(api): package loopback temporal context service (#186)

* feat(api): package loopback temporal context service

* chore(api): healthcheck temporal context sidecar

* test(api): execute packaged loopback ingress

* fix(api): keep loopback service alive after request errors

* feat(topic): add bounded TRSL reference estimator

* feat(analysis): publish topic lineage artifacts

* fix(deps): version topic workspace paths

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: CWL TEPP Contract Repair <actions@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

github-advanced-security[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 00:59
seonghobae added a commit that referenced this pull request Aug 24, 2026
* docs: add live product technical gap baseline

* docs: refresh live delivery baseline

* docs: record psychometric draft state

* docs: refresh temporal and image delivery queue

* docs: record Unicode identity PR in gap baseline

* docs: refresh buyer gap baseline for psychometric PR

* docs: refresh baseline for branch coverage repair

* docs: refresh baseline with current PR heads

* docs: record validation claim promotion head

* docs: refresh live PR baseline

* docs: bind baseline to refresh head

* docs: refresh gap baseline current heads

* docs: refresh live pull request evidence

* docs: expand TEPP completion gaps and issue roadmap

* docs: add product and technical gap baseline

* docs: normalize buyer gap maturity

* docs: remove duplicate gap baseline index entry

* docs(gap): refresh live queue snapshot

* docs(gap): split executable product capabilities

* docs(gap): align queue snapshot timestamp

* docs(gap): normalize maturity and authority fields

* docs: refresh live pull request gap evidence

* docs: record hot partition readiness gap

* docs: refresh live product gap snapshot

* docs: route Strix gap evidence to canonical owner

* docs: link exact Strix failure records

* docs: bound Strix evidence to public records

* docs(gaps): refresh live PR snapshot

* docs(gaps): bind snapshot to refreshed head

* docs: refresh live buyer-gap baseline

* docs: refresh live PR head register

* docs: require dated exact-head gap baseline

Refresh the live 2026-08-23 GitHub inventory, add a structure validator
that rejects queued-Checks-as-shipped claims, and cover it with quality
tests. PR #164 remains the single gap-baseline authority.

* docs: drop closed duplicate #179 from live register

Refresh the exact-head inventory to 93 open PRs after closing the
duplicate gap-baseline snapshot. PR #164 remains the single authority.

* docs: bind gap heads to the live 95-PR register

Refresh the exact-head inventory to 2026-08-23T13:31:34Z and set each
buyer-gap current head SHA to that snapshot, including #164, #48, #50,
#63, and #157. Queued Checks remain not implemented-main.

* fix(docs): honor negated queued-Checks wording in the gap validator

The promotion guard treated any same-line 'queued Checks'...'implemented-main'
window as a shipped claim, so correct negation failed and a wrapped
affirmative claim could evade. Require an un-negated match, including
across a line break.

* docs: refresh 96-PR exact-head gap register

Bind the live 2026-08-23T13:57:34Z inventory, including #49 extra-lag
underflow coverage and hourly #180/#164 repairs. Buyer-gap current
heads match that snapshot. Queued Checks are not implemented-main.

* docs: replace Buyer language in the live gap register

TEPP is not a purchase catalog. The gap baseline, validator, and
CHANGELOG now name operator-visible gaps and operator-gap closure
evidence.

* docs: refresh 96-PR exact-head gap register after #49 90b08bb

Bind GAP current-head SHA prefixes to the 2026-08-23T14:08:41Z live
inventory, including #49 extra-process lag underflow and #164 8b78797.
Queued Checks remain not implemented-main.

* docs: refresh 98-PR exact-head operator-gap register

Snapshot 2026-08-23T14:52:16Z. GAP-015 records this register's prior
exact head 33bf824. TEPP remains an operator-gap register, not a
purchase catalog.

* docs: refresh 97-PR exact-head gap register after stacked #191

Drop closed stacked #191, bind GAP current-head SHAs to the
2026-08-23T15:07:33Z REST inventory, and keep queued Checks off
implemented-main.

* docs: refresh 97-PR exact-head gap register after #49 1e3e2eb

Bind GAP current-head SHAs to the 2026-08-23T15:57:48Z REST inventory,
including #49 exp/expm1 overflow rewrites. Queued Checks remain off
implemented-main.

* docs: refresh 99-PR exact-head gap register after stacked #193/#194

Bind GAP current-head SHAs to the 2026-08-23T16:52:27Z REST inventory.
#49 nightly 1701/1702 on 1e3e2eb is logged, not treated as
implemented-main. Queued Checks remain off protected-main.

* docs: refresh 101-PR exact-head gap register after #49 dd6cf43

Bind GAP current-head SHAs to the 2026-08-23T17:59:26Z REST inventory,
including unique-fold coverage on #49 and stacked drafts #195/#196.
Queued Checks remain off implemented-main.

* fix(docs): require promotion-denial wording for queued-Checks guard

An unrelated `not` in `queued Checks are not required; this PR is
implemented-main` was treated as negation. Only never/do not/does not/
cannot/must not plus promote/treat/make/mean licenses the span.

* docs: refresh 103-PR exact-head gap register after stacked #197/#198

Bind GAP current-head SHAs to the 2026-08-23T18:48:36Z REST inventory.
#49 unique-fold nightly is green on dd6cf43 and is not implemented-main.
Queued Checks remain off protected-main.

* docs: refresh 105-PR exact-head gap register after stacked #199/#200

Bind GAP current-head SHAs to the 2026-08-23T19:48:22Z REST inventory.
#49 unique-fold nightly remains green on dd6cf43 and is not
implemented-main. Queued Checks remain off protected-main.

* docs: refresh 106-PR exact-head gap register after #201 span units

Bind GAP-005 to #201 5344729 as a first span-unit slice only, not
concept alignment and not implemented-main. Queued Checks remain off
protected-main.

* docs: refresh 109-PR exact-head gap register after #201 6afd650

Bind GAP-005 to the RFC 5646-once citation head and include stacked
drafts #202#204. Queued Checks remain off implemented-main.

* fix(docs): deny queued-Checks promotion by governed negation

Replace the fixed-window denial regex with sentence-scoped negation
governance: a claim passes only when a negation cue directly governs a
promotion verb inside the same sentence and no adversative conjunction
separates that pair from the maturity assertion. Honest wordings whose
negation precedes the phrase are accepted, while unrelated negated
clauses joined by 'but' can no longer license an implemented-main claim.

* docs: refresh 117-PR exact-head gap register after #205-#212

Eight new draft PRs opened in the Driver-recovery psychometric series
since the last snapshot. Protected-main SHA and non-draft count (70)
are unchanged -- no new mergeable work landed, this is a pure register
refresh.

* docs: refresh live product gap evidence

* docs(changelog): align gap-baseline snapshot entry with committed register

The Changed entry still described the predecessor 2026-08-23T21:46:37Z
snapshot (109 open / 39 drafts) while the committed baseline document
records the refreshed 2026-08-24T05:41:54Z snapshot (118 open / 48
drafts). Align the changelog narrative with the register the validator
enforces so the exact-head evidence stays internally consistent.

---------

Co-authored-by: seonghobae <seonghobae@users.noreply.github.com>
Co-authored-by: opencode-agent <agent@contextualwisdomlab.dev>
@github-actions
github-actions Bot disabled auto-merge August 24, 2026 08:18

@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 6110d3660607ba46b312b4d76f048f1bcc4f3bc5.

  • Head SHA: 6110d3660607ba46b312b4d76f048f1bcc4f3bc5

  • Workflow run: 32699563289

  • 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["Changed file (66 files)"]
  S1 --> I1["repository behavior"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["required checks"]
  Evidence --> S2["Workflow (2 files)"]
  S2 --> I2["GitHub Actions review job"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["actionlint plus required checks"]
  Evidence --> S3["Docs (24 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["Test (4 files)"]
  S4 --> I4["regression suite"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["targeted test run"]
Loading

@seonghobae
seonghobae enabled auto-merge August 25, 2026 01:20

@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 3 new potential issues.

Open in Devin Review

Comment thread docs/research/standards-and-literature.md Outdated
Comment thread crates/tepp_api/src/analysis_result.rs
Comment on lines +161 to +166
|| lowered.contains("secret")
|| lowered.contains("credential")
|| lowered.contains("openai")
|| lowered.contains("anthropic")
|| lowered.contains("bytez")
|| lowered.contains("openrouter")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Credential-header substring match may over-block

header_is_credential now denies any extra header whose name contains secret, credential, openai, anthropic, bytez, or openrouter. Intended hardening, but substring matching would also reject future benign headers containing those tokens (e.g. x-openai-region).

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions
github-actions Bot disabled auto-merge August 25, 2026 02:03
Restore the 100% Python branch-coverage gate after the main rebase by
exercising empty-predecessor structural commas, escaped Rust character
literals, and the past-EOF fail-closed scanner path.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
@seonghobae
seonghobae enabled auto-merge August 25, 2026 02:11

@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 2 new potential issues.

Open in Devin Review

Comment on lines +40 to +61
let mut maximum = 0.0_f64;
for &value in coordinates {
if !value.is_finite() {
return Err(TopicMeasurementError::InvalidLogRatioDimension);
}
maximum = maximum.max(value);
}

let reference_weight = (-maximum).exp();
if reference_weight == 0.0 {
return Err(TopicMeasurementError::InvalidLogRatioDimension);
}
let mut shifted_weights = Vec::with_capacity(coordinates.len() + 1);
for &value in coordinates {
let weight = (value - maximum).exp();
if weight == 0.0 {
return Err(TopicMeasurementError::InvalidLogRatioDimension);
}
shifted_weights.push(weight);
}
shifted_weights.push(reference_weight);
normalize_positive_weights(shifted_weights)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: ALR inverse max-shift includes reference coordinate

from_additive_log_ratio initializes maximum to 0.0 before folding the coordinate max, correctly including the implicit reference part (ALR value 0). The shift stays non-negative and the softmax reference exp(0) term is stable. Underflow paths fail closed as the tests assert.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread crates/topic_measurement/src/reference.rs
The protected-main rebase changed Neubig, G. to Neubig, P. in the APA
register. Keep the published ACM Computing Surveys author initial and
pin it with a quality-gate regression.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

@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.

Open in Devin Review

Comment on lines +145 to +151
let covariate_count = covariate_rows.as_ref().map_or(0, |rows| {
rows.iter()
.flatten()
.map(|(column, _)| *column)
.max()
.map_or(0, |value| value + 1)
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Empty trailing covariate columns silently dropped

build_design computes covariate_count from the maximum present column index rather than covariates.columns(). A sparse covariate matrix whose trailing column is all-zero yields one fewer Covariate prevalence feature than declared. The fit is unaffected (a zero column contributes nothing), but the reported feature layout can mismatch the caller's declared covariate dimension.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 02:22

@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.

Open in Devin Review

Comment on lines +243 to +244
require_rfc3339_knowledge_cutoff(&self.knowledge_cutoff)?;
SystemTime::parse_rfc3339(&self.completed_at).map_err(|_| ApiError::InvalidWirePayload)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Terminal-result parsing rejects future cutoffs against wall clock

AnalysisRunTerminalResult::validate reuses require_rfc3339_knowledge_cutoff, which compares the cutoff to Timestamp::now(). Terminal cutoffs are past-dated in normal flow, but this ties deserialization validity to the current wall clock. Confirm the future-cutoff rule belongs on stored terminal results and not only on inbound requests.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

# Conflicts:
#	ARCHITECTURE.md
#	CHANGELOG.md
#	Cargo.toml
#	README.md
#	docs/TRACEABILITY.md
#	docs/adr/0012-temporal-relational-shared-latent-topic-measurement.md
#	docs/adr/README.md
#	docs/validation/temporal-event-foundation.md
#	scripts/validate_documentation.py
@seonghobae
seonghobae force-pushed the agent/topic-logratio-coordinates branch from c3951af to 6510405 Compare August 25, 2026 02:34

@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 3 new potential issues.

Open in Devin Review

Comment thread scripts/validate_documentation.py Outdated
Comment thread README.md
Comment on lines +13 to +18
```text
crates/analysis_engine
crates/assertion_clock
crates/available_clock
crates/checkpoint_authority
crates/citation_edge

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Unbalanced code fence in README breaks docs check

The edit leaves README.md with 5 triple-backtick fences, an odd count. validate_markdown flags any file whose fence count is odd and raises, so the documentation check fails. A new ```text crate-list block was inserted without a matching closing fence, tangling with the existing crate-list block.

Prompt for agents
README.md now contains an odd number of ``` code fences (5), which validate_markdown rejects as an unbalanced fence. The inserted ```text block near the top (listing crates/analysis_engine ...) was added mid-file without a matching closing fence and overlaps the pre-existing crate-list block, producing garbled duplicate content. Reconcile the top-of-file 'Current implementation state' section: keep a single well-formed ```text crate list with matching open/close fences, remove the duplicated/half-merged lines, and verify README.md has an even number of ``` fences.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +21 to +23
if folded.is_empty() || matches!(folded.as_str(), "tfidf" | "bm25" | "keyword") {
return Err(TopicMeasurementError::LexicalWeightForbidden);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Lexical-weight gate accepts "keywords" and other variants

refuse_lexical_inferential_weight rejects only exact folded tfidf, bm25, keyword. A label like keywords folds to keywords and passes, so keyword-based scoring can slip through under a near-synonym. Narrower than the ADR-0012 intent of refusing lexical retrieval weights.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

cursoragent and others added 2 commits August 25, 2026 02:41
Protected-main consolidation #215 already owns ADR 0020 span-grounded
units and ADR 0021 LineageWeave project-history. Move this PR's
analysis-run decision to ADR 0022 and restore a single balanced README
crate list that includes topic_measurement and analysis_engine.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
# Conflicts:
#	ARCHITECTURE.md
#	CHANGELOG.md
#	Cargo.toml
#	README.md
#	docs/adr/README.md
#	docs/validation/temporal-event-foundation.md
#	scripts/check_workspace_contract.py
@seonghobae
seonghobae merged commit c1c47d1 into main Aug 25, 2026
19 of 26 checks passed

@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 2 new potential issues.

Open in Devin Review

Comment thread ARCHITECTURE.md
Comment on lines +69 to +71
| `validation_core` | RMSE, bias, coverage, graph, and Monte Carlo metrics |
| `tepp_api` | versioned DTO, schema, terminal-result, and export contracts |
| `location_membership` | location is not entity identity and not a language channel |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Duplicate rows in ARCHITECTURE foundation-crate table

The added rows for validation_core and tepp_api duplicate the existing rows immediately below them, each now listed twice with conflicting descriptions. location_membership is also re-added though it already appears in the file.

Suggested change
| `validation_core` | RMSE, bias, coverage, graph, and Monte Carlo metrics |
| `tepp_api` | versioned DTO, schema, terminal-result, and export contracts |
| `location_membership` | location is not entity identity and not a language channel |
| `topic_measurement` | logistic-normal ALR and sequential Egozcue ILR topic coordinates |
| `analysis_engine` | bounded cutoff-safe temporal evidence readiness execution and digest-bound terminal artifacts |
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +306 to +315
// The corpus bound makes this conversion and sum strictly smaller than
// `u64::MAX`: 100,000 * u32::MAX is below the 64-bit range.
let eligible_evidence_count = eligible.len() as u64;
let eligible_membership_count = eligible
.iter()
.fold(0_u64, |sum, unit| sum + u64::from(unit.membership_count));
let (earliest, latest) = eligible.iter().fold(
(eligible[0].event_time, eligible[0].event_time),
|(earliest, latest), unit| (earliest.min(unit.event_time), latest.max(unit.event_time)),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Membership-count fold cannot overflow u64

With MAX_EVIDENCE_UNITS = 100,000 and u32 counts, the summed membership total is at most ~4.29e14, far below u64::MAX, so the fold is safe. The eligibility filter available_time <= cutoff matches the availability rule, and duplicate detection scans all units before filtering so duplicates are always caught.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

cursor Bot pushed a commit that referenced this pull request Aug 25, 2026
The #48 merge listed location_membership, validation_core, and tepp_api
twice. Keep one row each and retain terminal-result wording on tepp_api.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
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.

3 participants