feat(analysis): bind posterior topic-context producer to an analysis-run profile - #432
feat(analysis): bind posterior topic-context producer to an analysis-run profile#432seonghobae wants to merge 2 commits into
Conversation
…run profile GAP-004 leftover / ADR 0068. Bind existing TopicContextPosteriorArtifact to cutoff-safe topic_context_posterior_v1. Posterior coordinates are not importance; missing draws are not collapsed; lineage events stay producer-supplied.
seonghobae
left a comment
There was a problem hiding this comment.
Author COMMENT on exact head 4ab92f3. This is not APPROVE. Independent = non-author, non-bot APPROVE. Two independent current-head APPROVEs required before merge. ADR 0068. Do not self-approve.
| pub fn execute_topic_context_posterior_run( | ||
| request: &AnalysisRunRequest, | ||
| accepted: &AnalysisRunAccepted, | ||
| snapshot_id: &str, | ||
| knowledge_cutoff: KnowledgeCutoff, | ||
| artifact: &TopicContextPosteriorArtifact, | ||
| completed_at: impl Into<String>, |
There was a problem hiding this comment.
🔴 Late supporting evidence passes cutoff
When late membership, relation, or lineage evidence supports an eligible document, document_available_at checks only the document's availability. The historical run then accepts evidence unavailable at its cutoff.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ab92f3f2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| || request.model_contract_version != TOPIC_CONTEXT_POSTERIOR_MODEL_CONTRACT_VERSION | ||
| || request.output_profile != TOPIC_CONTEXT_POSTERIOR_OUTPUT_PROFILE |
There was a problem hiding this comment.
Bind the producer model contract into the run
When an otherwise valid artifact declares any nonempty artifact.model_contract_version (for example a different or unapproved producer), this condition checks only the request's fixed profile value and still succeeds. The emitted terminal result then reports topic_context_posterior_v1 as its model contract while omitting the artifact's actual producer contract, making incompatible model output indistinguishable in run metadata; validate the artifact contract against an approved/request-bound producer version.
AGENTS.md reference: AGENTS.md:L26-L26
Useful? React with 👍 / 👎.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesPosterior topic-context 실행 프로필
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: 🔵 Low · up to This PR adds a public execution path that can produce a succeeded analysis result from caller-supplied run, manifest, and artifact data after consistency checks. If exposed beyond a trusted integration boundary, an unauthorized caller could provide internally consistent but non-authoritative inputs; the production adapter should enforce authorization and authoritative storage before relying on this path. Sequence Diagram(s)sequenceDiagram
participant Operator
participant analysis_engine
participant SnapshotManifest
participant TopicContextPosteriorArtifact
participant TerminalResult
Operator->>analysis_engine: topic_context_posterior_v1 실행 요청
analysis_engine->>SnapshotManifest: snapshot, cutoff, source digest, availability 검증
analysis_engine->>TopicContextPosteriorArtifact: producer contract와 artifact digest 검증
analysis_engine->>TerminalResult: 검증된 좌표 수와 digest-bound summary 생성
analysis_engine-->>Operator: 성공 또는 fail-closed 오류 반환
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 46.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 3 files. (5 skipped: 5 unsupported.)
✨ Finishing Touches 💡 1📝 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 |
| /// Authoritative snapshot and cutoff-eligibility manifest for one artifact. | ||
| #[derive(Clone, Debug, Eq, PartialEq)] | ||
| pub struct TopicContextPosteriorSnapshotManifest { | ||
| /// Immutable source snapshot identity. | ||
| pub snapshot_id: String, | ||
| /// Canonical digest of the resolved source snapshot bytes. | ||
| pub source_snapshot_sha256: String, | ||
| /// Historical cutoff applied while resolving eligibility. | ||
| pub knowledge_cutoff: String, | ||
| /// Canonical digest of the exact artifact admitted from this snapshot. | ||
| pub artifact_sha256: String, | ||
| /// Availability instant for every document represented by the artifact. | ||
| pub document_available_at: BTreeMap<String, String>, | ||
| } |
There was a problem hiding this comment.
|
Hour-35 exact-head review request. Current head @opencode-agent review |
|
Hour-36 re-verify: topic-context posterior head 3e09ff2. Zero independent APPROVEs. Do not duplicate. Exact-head Checks on 3e09ff2 only. Do not self-approve. @opencode-agent review. |
Summary
GAP-004 leftover / ADR 0068. Bind existing
analysis_engine::TopicContextPosteriorArtifactto a cutoff-safetopic_context_posterior_v1analysis-run profile (tepp.topic_context_posterior.v1).posterior_topic_coordinates_not_importance.lineage_criterion_v1,case_deletion_refit_v1,composed_fitted_lineage_v1,fitted_candidate_k_v1,trsl_topic_lineage_v1, andmethod_effects_v1.Not project-history GET-by-id CLI (#431). Not location-membership refusals (#430 / ADR 0066). Not project-history GET-by-id (#429). Not collection CLI (#428). Not copied-text residue (#427 / ADR 0065). Not provenance-is-not-transition (#426 / ADR 0064). Not lineage-criterion (#423 / ADR 0063). Not a Bayesian sampler. Not GPU. Not implemented-main.
Distinct from live slices
Does not duplicate #431/#430/#429/#428/#427/#426/#425/#424/#423/#422/#421/#420/#419/#418/#417/#416/#415/#414/#413/#412/#411/#410/#409/#408/#407/#406/#405/#404/#398/#376/#374/#372/#389/#364/#356/#358/#359, Leiden (#351), or Driver p.16 std-family micro-PRs.
Verification
cargo test -p analysis_enginecargo clippy -p analysis_engine --all-targets -- -D warningspython3 scripts/validate_documentation.pyMerge gate
Two independent current-head APPROVEs required. Author/bot COMMENTED is not independent APPROVE. Exact-head Checks on this SHA only. Predecessor Checks do not transfer. Do not self-approve. Do not merge without two independent approvals.
Summary by CodeRabbit
새 기능
문서화
테스트