Repository navigation
feat(analysis): deliver bounded offline topic-lineage CLI - #761
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
| let declared_work = (nonzeros as u128 + input.vocabulary_size as u128) | ||
| * model.topic_count as u128 | ||
| * model.seeds.len() as u128 | ||
| * model.maximum_iterations as u128; | ||
| if declared_work <= TOPIC_LINEAGE_CLI_WORK_LIMIT { |
There was a problem hiding this comment.
🔴 Allowed topic matrix exhausts memory
With 100,000 terms and 50,000 topics, check_limits admits a configuration requiring a 40 GB topic matrix. The estimator allocates that matrix before fitting, so a bounded CLI input can exhaust process memory.
Learn more
The sparse work product limits estimated iteration work, but it does not limit dense model state. fit_seed allocates a topic_count × vocabulary_size f64 matrix before its first iteration, and expectation allocates another matrix of that size per iteration. Both allocations occur after the CLI's current checks.
Example: A valid input with two documents, 100,000 vocabulary columns, 50,000 topics, one seed and two iterations has declared work of 10 billion when it has no more than two sparse entries. It passes this bound and the small-design check, then attempts a 40 GB allocation for beta.
Recommended fix: Add a checked topic-count × vocabulary-size byte budget to check_limits, accounting for the simultaneously live beta and beta_counts matrices. Return LimitExceeded before constructing ReferenceTopicInput or calling the estimator.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if source_admitted && target_admitted && cutoff_eligible(&available_time, &cutoff) { | ||
| graph | ||
| .insert(edge) | ||
| .map_err(|_| TopicLineageCliError::InvalidRelation)?; |
There was a problem hiding this comment.
🔴 Inferred transitions influence fitted lineage
When a transition has evidence_status: "inferred", admit_relations passes it to the estimator as an observed transition. collect_transition_pairs ignores evidence status, so unpromoted proposals change the fit and can appear as lineage edges.
Learn more
Relation evidence status distinguishes observed links from model-inferred proposals in RelationEvidenceStatus. The CLI accepts both, while collect_transition_pairs retains every transition edge without filtering status. Fitting then uses those edges in the network penalty, and the resulting artifact has no status field to warn consumers.
Example: Supply two otherwise valid documents with a single transitions_to relation marked inferred. The CLI accepts the relation, the estimator counts it as its required transition, and a same-dominant-topic fit emits an edge although no observed transition was supplied.
Recommended fix: Refuse inferred transition relations at CLI admission, or explicitly exclude them from the estimator graph and count them as excluded. Keep provenance-only inferred relations separate if they remain valid input; test a corpus whose only transition is inferred.
Was this helpful? React with 👍 or 👎 to provide feedback.
|
Exact committed head 0757a43: native locked Rust 1.98.0 tests 106 passed, 0 failed/ignored; fmt, strict clippy and docs exit0, checkout clean. This does NOT clear source review: newly returned Devin findings expose additional dense topic-state budgeting and inferred-transition admission gaps. Implementation and independent audit are in progress; no merge will use the infrastructure exception to waive these source defects. Prior independent ACCEPT and native PASS remain scoped historical evidence, not a final source approval. |
|
Intermediate repair b0175b1 is published: CLI preallocation fitting-payload cap and shared reference observed-only transition consumption, with preserved inferred provenance. Remaining source gap identified during parent review: dense memory checks are still CLI-local, not shared ReferenceTopicInput/build_design/fit admission. Direct library/executor/model-selection callers therefore still need common guards. A shared-boundary successor is implementing this; no merge/closure is claimed from the intermediate test PASS. Independent review of the published repair continues. |
|
Independent review of b0175b1 is now recorded at /Users/seonghobae/orca/reports/tepp-resume-20261013/cli-review-repair-evidence/INDEPENDENT-REVIEW.md. Verdict: scoped intermediate ACCEPT for observed-only relation semantics and CLI-local resource refusal, but BLOCKED for full repair because ReferenceTopicInput::new/build_design/fit_reference_topic_model and direct executor/model-selection callers remain unguarded. The shared-admission successor is in progress; no merge or source-defect bypass. |
|
Independent source review of shared-admission commit3247103b: scoped ACCEPT, closing the prior shared-library allocation blocker. Reviewer verified all14 incremental paths, preserved observed-only semantics, directexecutor/model-selection typed refusal, and292 successful four-package tests plus fmt/strictclippy/docs receipts. Current publishedhead377f4bc1 adds only the already independently reviewed PR648 main prerequisite via normal merge; latest committed-head full verification is running (whole-workspace all-targets check, four-package tests/clippy/docs). This is not RSS/GPU/release/Actions/App approval evidence; no merge yet. |
|
Current committed head377f4bc15ecb273b093d0681306c54ee0ef55512 completed all local gates: whole-workspace/all-targets cargo check, four-package292tests(0failed/ignored),fmt,all-targetsclippy-Dwarnings,rustdoc-Dwarnings; cleanstatus. Shared3247103b source independently ACCEPTed, main prerequisite6path composition independently reviewed. Both earlierDevin source defects now addressed by common preallocation planners and observed-onlyReferenceInput; real dimension-only and directconsumer regressions retained. Under user infrastructure exception merge is source integration only: remoteActions/formalAppapproval, instrumentedcompleteRustcoverage/GPU/release/liveDB acceptance remain incomplete, never credited PASS. |
…-cli-20261006 # Conflicts: # README.md
Summary
Verification
Unmet evidence
Summary by CodeRabbit
새 기능
tepp-topic-lineage명령줄 도구를 추가했습니다. 입력 JSON 파일 하나를 사용하며, 토픽 연관성 결과를 JSON으로 출력합니다.문서화