feat(topic): logistic-normal ALR coordinates with true-parameter RMSE - #48
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough
Changes토픽 측정 좌표 확장
Rust 커버리지 판별 계약
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🟡 Moderate · up to 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 거리 반환
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 heada3de3fb1179708f18dee414ef4c5ff63e711e77d. -
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"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart 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"]
Merge Conflict Guidance
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 |
ADR 0012 first production slice: additive log-ratio maps on the unit simplex, fail-closed invalid compositions, and refusal of TF-IDF/BM25 keyword scores as inferential coordinates. No new migration.
* 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>
* 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>
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 head6110d3660607ba46b312b4d76f048f1bcc4f3bc5. -
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"]
| || lowered.contains("secret") | ||
| || lowered.contains("credential") | ||
| || lowered.contains("openai") | ||
| || lowered.contains("anthropic") | ||
| || lowered.contains("bytez") | ||
| || lowered.contains("openrouter") |
There was a problem hiding this comment.
📝 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).
Was this helpful? React with 👍 or 👎 to provide feedback.
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>
| 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) |
There was a problem hiding this comment.
📝 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
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>
| let covariate_count = covariate_rows.as_ref().map_or(0, |rows| { | ||
| rows.iter() | ||
| .flatten() | ||
| .map(|(column, _)| *column) | ||
| .max() | ||
| .map_or(0, |value| value + 1) | ||
| }); |
There was a problem hiding this comment.
📝 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| require_rfc3339_knowledge_cutoff(&self.knowledge_cutoff)?; | ||
| SystemTime::parse_rfc3339(&self.completed_at).map_err(|_| ApiError::InvalidWirePayload)?; |
There was a problem hiding this comment.
🔍 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.
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
c3951af to
6510405
Compare
| ```text | ||
| crates/analysis_engine | ||
| crates/assertion_clock | ||
| crates/available_clock | ||
| crates/checkpoint_authority | ||
| crates/citation_edge |
There was a problem hiding this comment.
🟡 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if folded.is_empty() || matches!(folded.as_str(), "tfidf" | "bm25" | "keyword") { | ||
| return Err(TopicMeasurementError::LexicalWeightForbidden); | ||
| } |
There was a problem hiding this comment.
📝 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
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
| | `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 | |
There was a problem hiding this comment.
🟡 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.
| | `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 | |
Was this helpful? React with 👍 or 👎 to provide feedback.
| // 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)), | ||
| ); |
There was a problem hiding this comment.
📝 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
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>
Summary
ADR 0012 first production slice: compositional topic coordinates. Rebased onto
mainafter #47.topic_measurementcrate (no migration;0007remains owned by feat(persistence): retention deletion legal-hold SQL contracts (0007) #45)additive_log_ratio/from_additive_log_ratiowith max-shifted stable mapsrefuse_lexical_inferential_weightrejects TF-IDF / BM25 / keyword as estimator coordinatestopic_measurementSerial
Test plan
Summary by CodeRabbit