Skip to content

feat(relation): refuse a summary as the source identity - #139

Merged
seonghobae merged 7 commits into
mainfrom
agent/summarizes-edge
Aug 24, 2026
Merged

feat(relation): refuse a summary as the source identity#139
seonghobae merged 7 commits into
mainfrom
agent/summarizes-edge

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

A summary may point at earlier event time (ADR 0003). It cannot become a state transition or reuse the source document identity. Recovery is the computed share of recovered kinds that match known truth versus collapsing every summary to the source.

Complementary to #120 citation, #130 support, #136 translation, #137 retrospective, and #138 outcome_order. This crate owns the remaining closed provenance kind `summarizes`.

Local gates:

  • `cargo test -p summarizes_edge --all-targets` GREEN after RED (package did not exist)
  • clippy `-D warnings` PASS
  • workspace contract PASS
  • docstring contract PASS
  • lines 14/14; nightly-2026-08-01 branches 6/6

Does not allocate migration `0008`. Does not recreate `outcome_order` or other in-flight crates.

Keep this PR draft. Preferred merge remains #46 only when exact-head required Checks pass and a qualifying independent (non-Cursor/CodeRabbit) APPROVE exists. OpenCode `CHANGES_REQUESTED` on #46 is a coverage-evidence race — do not empty-commit.

A summary may point at earlier event time (ADR 0003). It cannot become
a state transition or reuse the source document identity. Recovery is
the computed share of summary kinds that match known truth versus
collapsing every summary to the source.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 11 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fec2d9e6-7a28-455f-9e82-1ebdfb796fd5

📥 Commits

Reviewing files that changed from the base of the PR and between 23e0f81 and 5893d0e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • ARCHITECTURE.md
  • CHANGELOG.md
  • Cargo.toml
  • README.md
  • crates/summarizes_edge/Cargo.toml
  • crates/summarizes_edge/src/error.rs
  • crates/summarizes_edge/src/kind.rs
  • crates/summarizes_edge/src/lib.rs
  • crates/summarizes_edge/tests/crate_contract.rs
  • crates/summarizes_edge/tests/summarizes_edge_contract.rs
  • docs/TRACEABILITY.md
  • docs/adr/0003-relational-event-multiple-membership.md
  • docs/adr/README.md
  • docs/research/standards-and-literature.md
  • docs/research/summarizes-edge-identity.md
  • docs/validation/temporal-event-foundation.md
  • scripts/check_workspace_contract.py

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.

@seonghobae
seonghobae marked this pull request as ready for review August 20, 2026 18:10
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current head bb277d9 now includes origin/main; the only merge conflict was the changelog. Exact-head proof passed: cargo fmt --all -- --check; cargo test -p summarizes_edge --offline (6 tests); workspace contract; documentation validation; Rust docstring contract; git diff --check. Protected merge still requires current Checks and an independent approval.

@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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation update (7108baa): fixed the quality contract to derive the Rust crate count from scripts/check_workspace_contract.py instead of hard-coding 10. Local evidence: 89 quality tests passed; coverage 100% (991/991 statements, 442/442 branches); workspace, docstring, documentation, and diff checks passed. Please review and rerun Checks against this exact head; merge remains subject to the repository's two independent approvals and protected rules.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Review-only request for exact current head 7108baa11d724265c2cd6422371642f3424ad205. Re-review source-identity refusal for summaries, temporal/relational semantics, realistic tests, docs/APA traceability, and protected-merge requirements. Do not merge or enable auto-merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Queued @cwl-noema-review and @opencode-agent for PR #139 at head 7108baa11d724265c2cd6422371642f3424ad205. Central exact-name Actions artifacts are the durable dispatch ledger; existing review workflows remain authoritative for the final verdict and failure evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review refresh for 7108baa:

  • A summary artifact cannot replace the source identity required for relation and measurement provenance.
  • git diff --check, documentation validation, workspace contract, docstring contract, and cargo fmt --all -- --check passed locally.
  • The displayed failed checks were cancelled runs, not failed steps. The Rust Foundation CI run was explicitly requeued for this exact head and is currently queued; merge remains withheld until revalidation and qualifying approvals complete.
  • No source defect was found at this exact head; no approval is being self-issued.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Rebased current head 43ebbda onto origin/main. The changelog conflict retains both the summary-edge and current-main entries; inherited documentation trailing whitespace was removed. Local merge-tree, git diff --cached --check, and cargo fmt --all -- --check pass. Exact-head hosted checks and required independent approvals remain required before protected merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review request: exact head 43ebbda0d35f9bf227c5764d53d429fff0f08c8c has no actionable inline findings in the available review data; all terminal checks are green and coverage-evidence remains queued. Please review this exact head. No merge bypass is requested.

@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 00:56
@seonghobae

Copy link
Copy Markdown
Contributor Author

Maintainer exact-head disposition

  • Exact head: 43ebbda0d35f9bf227c5764d53d429fff0f08c8c
  • Exact base: c45be17a9dbce95ef81cee230e9d128abc7160ac
  • CodeGraph indexed the current checkout before review.
  • Reviewed summary/source identity refusal, provenance-versus-transition semantics, backward citation behavior, graph cycle boundaries, and realistic recovery contracts. No actionable source defect was found at this exact head.
  • Local verification: pinned Rust format, summarizes_edge and relation_graph tests, clippy -D warnings, workspace contract, documentation validation, Rust documentation contract, and git diff --check passed.
  • Hosted Checks: all required checks pass, including Strix, Noema, OpenCode, coverage, SAST, dependency, PostgreSQL, and contract gates.
  • Review/merge state: GitHub reports REVIEW_REQUIRED; no qualifying independent human approval is present. Decision: WAIT_AND_REMEDIATE; protected normal merge remains pending approval.

# Conflicts:
#	ARCHITECTURE.md
#	CHANGELOG.md
#	Cargo.lock
#	Cargo.toml
#	README.md
#	docs/TRACEABILITY.md
#	docs/adr/0003-relational-event-multiple-membership.md
#	docs/adr/README.md
#	docs/research/standards-and-literature.md
#	docs/validation/temporal-event-foundation.md
#	scripts/check_workspace_contract.py
#	tests/quality/test_check_docstrings.py
@seonghobae
seonghobae merged commit c098e84 into main Aug 24, 2026
19 of 22 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 1 new potential issue.

Open in Devin Review

Comment on lines +71 to +85
pub fn identity_recovery_rate(
truth: &[SummarizesKind],
decided: &[SummarizesKind],
) -> Result<f64, SummarizesEdgeError> {
if truth.is_empty() || truth.len() != decided.len() {
return Err(SummarizesEdgeError::InvalidEdgePayload);
}
let mut matches = 0_u32;
for (truth_kind, decided_kind) in truth.iter().zip(decided) {
if truth_kind == decided_kind {
matches += 1;
}
}
Ok(f64::from(matches) / truth.len() as f64)
}

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: identity_recovery_rate cast precision is intentionally allowed

identity_recovery_rate at kind.rs casts truth.len() as f64, which would normally trip clippy::cast_precision_loss under the workspace's denied pedantic lints. This is intentionally permitted via #![allow(clippy::cast_precision_loss)] in lib.rs. The empty/mismatched-length guard at line 75 ensures no division by zero, and match counting is correct.

Open in Devin Review

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

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.

1 participant