Skip to content

feat(analysis): bind template-copy identity refusals to an analysis-run profile - #416

Draft
seonghobae wants to merge 45 commits into
mainfrom
feat/copy-identity-analysis-run-gap-004
Draft

feat(analysis): bind template-copy identity refusals to an analysis-run profile#416
seonghobae wants to merge 45 commits into
mainfrom
feat/copy-identity-analysis-run-gap-004

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Consolidation status

landing_vehicle_candidate — Validation / Analysis Run simple-refusal/census landing vehicle tracked by #435. It is not a new bounded context. Folded profiles preserve domain refusal semantics and focused tests here; per-profile ADR numbers remain implementation lineage pending #437 repository-wide ADR normalization.

Fold lineage already preserved here: #473 inferred_status_v1, #430 location_membership_v1, #461 episode_membership_v1, #478 subevent_containment_v1, and #434 membership_target_v1. Those closed children are lineage into this Draft branch, not protected-main delivery.

Cross-profile contract repairs on the current head

Protected-main AnalysisResultSummary.validation_status is a provider-authored validation status, not a domain inference claim. Existing RED/repair lineage separates domain inference_status from terminal validation_status == "validated" and normalizes RFC 3339 cutoff identity through typed KnowledgeCutoff::instant() comparisons for folded profiles.

Generic RED ffee655404716bf8d33c898a3c1a87a543abe701 and repair 0b7155cc238defb1e55129ff3000658f04b343cf enforce the landing-vehicle leakage invariant: apply AvailableTime <= knowledge_cutoff before duplicate-identity admission. Future-unavailable evidence cannot change identity conflicts, counts, membership totals, or terminal state at an earlier historical cutoff; duplicate IDs among evidence actually available at the cutoff still fail closed. Current branch head aa730c63563eb4a33048d822b581036c8487bd47 is six fast-forward commits beyond that repair and retains it in ancestry.

#487 adds another scientific repair that must survive the fold: observed Allen relation classes are data, not run prerequisites. Its RED a2892b6ad4f632882f63da39eed2d4706ddf9213 and repair a64020152300232cb3214a66b45d97225b6d2b5b require sparse covered-only or contradiction-only censuses to report truthful zero class counts. Fresh docs-to-code repair on child head e07b2ff9f78ef456ff911b8643710af20921fe54 also changes ADR 0079 from premature Accepted branch authority to Proposed implementation lineage and removes its stale mixed-four-class eligibility claim. The eventual fold must inherit that corrected ADR semantics, not the predecessor wording.

Profiles preserved on this head

  • copy_identity_v1: copy versus source identity/transition refusal, typed cutoff equality, bounded digest artifact.
  • inferred_status_v1: observed versus inferred remain distinct; inferred is neither observed evidence nor transition.
  • location_membership_v1: location remains distinct from entity identity and language channel; inspect remains recovery-metric-free.
  • episode_membership_v1: membership windows are checked against episode intervals with cutoff-safe admission; identity_recovery_rate stays library-side.
  • subevent_containment_v1: child intervals cannot escape parent intervals; TRACEABILITY excludes both containment_recovery_rate and identity_recovery_rate from inspect.
  • membership_target_v1: language/episode/template/department/opportunity-pool target kinds stay distinct from entity/project.

Current fold children

#458 outcome_order_v1 at 08165e3b3c929b4ae77396689549f72723ff8ff5, #460 relation_absence_v1 at dfab4eab5ff733731e565a9348072b8dab2e4912, #482 role_contradiction_v1 at 506dbae236a4484301b704b6c6a05b20faf0fe69, #483 retrospective_edge_v1 at 847d96f913bb261803ac0bd751ad7e4f51324cee, #484 summarizes_edge_v1 at 9a1be78b5342ff65e3cf2aac1e9331c68943f246, #485 support_edge_v1 at f71591864efc2beff336ced7ef35d5a013305c36, and #487 prediction_contradiction_v1 at e07b2ff9f78ef456ff911b8643710af20921fe54 remain conflict-resolving fold children.

#484, #485, and #487 change the same shared Analysis Run integration surface as this vehicle (Cargo.lock, analysis_engine Cargo/lib, DOCUMENTATION.md, TRACEABILITY and ADR index). They remain non-destructively retargeted here; their unique source/tests/doctoring stay intact until a real conflict-resolving fold verifies inheritance. Merely closing children or landing them independently is not consolidation.

DDD boundary

The Analysis Run application/Validation boundary owns request admission, cutoff-safe temporal composition, digest-bound result projection and claim refusals. Source-specific rule crates keep domain vocabulary. Folding proceeds through shared admission/artifact invariants plus profile-specific adapters, not a flat model enum or a technical god-module.

Verification / merge gate

Current exact branch head is aa730c63563eb4a33048d822b581036c8487bd47; PR-description edits do not change source identity. The generic cutoff-before-identity repair at 0b7155cc238defb1e55129ff3000658f04b343cf remains inherited, not the current head. Child-head workflow results do not transfer. This vehicle must reacquire exact-surviving-head required CI/security/documentation evidence and qualifying independent review after each real source fold. It remains Draft until the selected fold scope and current DDD/docs are coherent. No self-approval, coverage exclusion, fail-open security change, force push, destructive rebase, routine admin bypass, or predecessor-head evidence transfer.

…un profile

GAP-004 leftover / ADR 0058. Bind existing copy_identity refusals
(refuse_copy_as_source_identity, refuse_copy_as_transition) to cutoff-safe
copy_identity_v1. identity_recovery_rate stays library-side. Distinct from
simulation method-effect census (#415). Not GPU, not MCMC, and not topic
birth/split/merge.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

Devin Review

Comment thread crates/analysis_engine/src/copy_identity_artifact.rs
Comment thread crates/analysis_engine/src/copy_identity_artifact.rs
Comment thread crates/analysis_engine/src/copy_identity_artifact.rs

@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/copy_identity_artifact.rs Outdated
…profile

GAP-004 leftover / ADR 0066. Bind existing location_membership refusals
(refuse_location_as_entity_identity, refuse_location_as_language_channel)
to cutoff-safe location_membership_v1. identity_recovery_rate stays
library-side. Distinct from membership-posterior ICC (#398), copied-text
(#427), citation-edge (#426), and corpus-background (#422). Not GPU,
not MCMC, and not topic birth/split/merge.
…ofile

GAP-004 leftover / ADR 0069. Bind existing MembershipTargetKind and
refuse_collapsed_target to cutoff-safe membership_target_v1. Language,
episode, template, department, and opportunity-pool targets are not
entities; identity_recovery_rate stays library-side.
…rofile

GAP-004 leftover / ADR 0072. Bind existing EventWindow and
refuse_membership_outside_episode to cutoff-safe episode_membership_v1
(tepp.episode_membership.v1). Mixed contained/escaped census,
AvailableTime cutoff exclusion, and MAX_EVIDENCE_UNITS fail closed.
identity_recovery_rate stays library-side. Distinct from relation-absence,
outcome-order, membership-target, location-membership, and copy-identity.
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.
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.
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.

Copy link
Copy Markdown
Contributor Author

Fold complete on exact head 3ae423da203033a64dad1ffba708cb6725bbd0d8.

--no-ff lineage now preserves copy-identity, inferred-status (#473), location-membership (#430 / bd28fe5), episode-membership (#461 / 1fb1efc), and subevent-containment (#478 / this head). Shared Cargo/lib/lock/docs surfaces were unioned; neither side was discarded. TRACEABILITY keeps containment_recovery_rate and identity_recovery_rate out of inspect for the subevent profile.

Local cargo test/clippy/doc -p analysis_engine is green. Hosted exact-head checks and qualifying independent review must be reacquired. This Draft is not mergeable independently; do not self-approve, request Copilot, or treat folded children as implemented-main.

Preserve #416 copy-identity, inferred-status, location-membership,
episode-membership, and subevent-containment source/tests with #434
membership-target profile evidence. Shared Cargo/lib/lock/docs surfaces
are unioned; neither side is discarded. Per-profile ADR numbers remain
implementation lineage pending #437.

# Conflicts:
#	CHANGELOG.md
#	DOCUMENTATION.md
#	crates/analysis_engine/Cargo.toml
#	crates/analysis_engine/src/lib.rs
#	docs/TRACEABILITY.md
#	docs/adr/README.md

Copy link
Copy Markdown
Contributor Author

Additional fold: #434 membership_target_v1 is now --no-ff lineage on exact head b0d6cb8969aa0ddd386ab82a1755155fa13d18a8.

Local cargo test/clippy/doc -p analysis_engine remains green. Hosted exact-head checks must be reacquired. This Draft is not mergeable independently; do not self-approve or request Copilot. Next compatible simple-refusal siblings still targeting main are #458 (outcome_order_v1) and #460 (relation_absence_v1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant