Skip to content

feat(core): operator-driven alias map + audited alias events (RFC0001.12-.16) - #153

Merged
jensholdgaard merged 3 commits into
mainfrom
slice-a-rfc0001-alias
Jun 7, 2026
Merged

feat(core): operator-driven alias map + audited alias events (RFC0001.12-.16)#153
jensholdgaard merged 3 commits into
mainfrom
slice-a-rfc0001-alias

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Implements SLICE A of the RFC 0001 §6.7 alias-index write path (the merged 2026-06-07 amendment) in ourios-core, and flips the five red-gate stubs RFC0001.12–.16 from ignored unimplemented!() to real AAA tests.

The alias index is operator-driven, audited, reversible — never silently inferred (§3.1).

What landed

Audited alias events (src/audit.rs)

  • New AuditPayload::AliasAsserted / AuditPayload::AliasRetracted variants on the existing §6.4 audit stream, routed through AuditSink exactly like Template / Compaction. They inherit the §3.4 WAL-before-ack durability contract (the alias event log is the source of truth).
  • Each carries representative_id: u64 (the operator's anchor id — carries no contract weight beyond naming the assertion), member_ids: Vec<u64>, the new ActorId newtype (validated non-empty — aliasing is never anonymous), and a reason: String validated ≤ 256 B (mirroring the §6.4 triggering-line-sample cap).
  • New stable event_kind / event_type ordinals (4 / 5, alias_asserted / alias_retracted). Alias events do not count toward merges_total (that stays reserved for the two structural widenings).

Per-tenant alias map (src/alias.rs)

  • AliasMap: the per-tenant equivalence-class projection (§3.7 isolation — an alias in tenant A never touches tenant B).
  • Operator API assert(...) / retract(...) takes an Operator { actor, reason, timestamp } context, (a) validates, (b) emits the audited event through an injected AuditSink, (c) updates the in-memory classes: union-on-overlap on assert (assertions sharing any member merge into one class, order-independent), remove-and-resplit on retract.
  • The asserted set is the union {representative_id} ∪ member_ids. The canonical representative is derived as min(members) — a display/identity convenience, re-derived on every membership change, not what defines membership. Retraction is representative-independent (retracting the canonical re-derives it from the remainder); a class that drops below two members is no longer an alias set.
  • resolves(tenant, id) returns the whole class containing id, or {id} for a non-aliased id.
  • Foldable from the event log: apply / from_events rebuild the same classes by replaying the durable stream (a unit test asserts replay == the live projection). The physical on-disk map artifact (serialization format + snapshot cadence) is explicitly out of scope — that is the RFC 0005 storage split (sibling to RFC 0005 amendment: queryable/pruneable attribute columns (service.name + attr predicates) #147). No new on-disk write plane is added.

Counters (§6.8 telemetry table)

  • alias_assertions_total / alias_retractions_total instrumented via the OpenTelemetry meter API (global::meter("ourios.miner")), tenant_id attribute, seeded at init for collect-on-read — matching the compaction-metrics pattern. ourios-core now depends on the lightweight opentelemetry API crate only (the SDK/exporter stays in ourios-telemetry, per the §6.8 API/SDK split). The un-namespaced metric names are kept per §6.8 ("deliberately does not rename the metrics … pending the dotted-semconv redesign"), so the weaver registry is untouched.

Stubs flipped

RFC0001.12 (assert is durably recorded + in the map), .13 (resolves symmetry; non-member → itself), .14 (per-tenant isolation), .15 (retraction removes a member incl. the canonical, re-derives, audited, counter increments), .16 (never-aliased id resolves to itself). Greppable §2.3 doc-comment headers retained.

Alias events × the audit Parquet writer

The audit-Parquet §3.7 schema has no columns for the alias payload (representative_id, member_ids, actor, reason). Adding them is the RFC 0005 split (#147 sibling), out of scope here. Rather than invent columns or drop events silently, the writer rejects alias events with a new AuditBatchError::AliasEventNotYetPersistable (covered by a test). The audit reader already had an other => catch-all on unknown event_kind ordinals, so it needed no change. Alias events stay durable via the alias event log meanwhile.

Invariants touched

  • §3.1 (no silent merges): every assert/retract emits an audit event with the actor and the full set; nothing is inferred.
  • §3.7 (multi-tenancy): classes are keyed per TenantId; cross-tenant isolation is RFC0001.14.

Verification (run locally in the worktree)

  • cargo test --all-features0 failures workspace-wide; tests/rfc0001_alias.rs: 5 passed; 0 failed; 0 ignored (was 5 ignored); ourios-core lib: 43 passed (incl. the new telemetry export test).
  • cargo fmt --all --check — clean.
  • cargo clippy --all-targets --all-features -- -D warnings — clean.

Design note for the maintainer

assert validates that the asserted set names ≥ 2 distinct ids (AliasError::DegenerateAssertion) — a one-id assertion is a no-op the caller almost certainly didn't intend, and the spec says a single-member class isn't an alias set. The replay path (apply) tolerates a degenerate event in the log without panicking (folds to nothing) so a hand-edited / future-writer log can't crash a rebuild. Flag if you'd rather assert silently accept and drop a one-id set instead.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Operator-driven alias management system enabling assertion and retraction of ID equivalence classes
    • OpenTelemetry metrics tracking for alias operations per tenant
  • Tests

    • Implemented RFC0001 alias write-path acceptance tests with cross-tenant isolation validation

…(RFC0001.12-.16)

Implements SLICE A of the RFC 0001 §6.7 alias-index write path:

- `AuditPayload::AliasAsserted` / `AliasRetracted` on the existing §6.4
  audit stream, carrying `representative_id`, `member_ids`, the new
  `ActorId` newtype (validated non-empty — aliasing is never anonymous,
  §3.1), and a ≤256 B `reason`. Routed through `AuditSink` exactly like
  the Template / Compaction payloads; new stable event_kind/event_type
  ordinals (4/5). Alias events do not count as `merges_total`.
- `alias::AliasMap`: the per-tenant equivalence-class projection (§3.7
  isolation). Operator API `assert` / `retract` validates, emits the
  audited event, and folds it in (union-on-overlap on assert,
  remove-and-resplit on retract). Canonical = `min(members)`, derived.
  `resolves` returns the whole class, `{id}` for a non-aliased id. The
  map is foldable from the durable event log (`apply` / `from_events`);
  the physical on-disk artifact is the RFC 0005 split (#147 sibling),
  out of scope here.
- `alias_assertions_total` / `alias_retractions_total` OTel-API counters
  on `global::meter("ourios.miner")` with the `tenant_id` attribute
  (§6.8 telemetry table), seeded at init for collect-on-read.

Flips RFC0001.12-.16 from ignored red-gate stubs to real AAA tests.

The audit-Parquet writer has no columns for alias payloads yet (that
schema extension is the RFC 0005 split), so it rejects alias events via
a new `AuditBatchError::AliasEventNotYetPersistable` rather than
inventing columns or dropping them silently — alias events stay durable
via the alias event log meanwhile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 21 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a7153244-a34c-47ca-b2ad-29a491984dd4

📥 Commits

Reviewing files that changed from the base of the PR and between bd82c35 and 0816f13.

📒 Files selected for processing (2)
  • crates/ourios-core/src/alias.rs
  • crates/ourios-core/tests/rfc0001_alias.rs
📝 Walkthrough

Walkthrough

This PR implements RFC0001 alias functionality by adding an audited, per-tenant equivalence-class index (AliasMap) with operator-driven assertions and retractions, OpenTelemetry metrics instrumentation for tracking alias cardinality, comprehensive test coverage, and an explicit rejection barrier for Parquet persistence until the schema is extended.

Changes

Alias Functionality

Layer / File(s) Summary
Audit event schema extension
crates/ourios-core/src/audit.rs
AuditPayload now includes AliasAsserted and AliasRetracted variants with representative id, member ids, actor, and reason. Event kind ordinals (4, 5) and event type strings are added; counts_as_merge() excludes alias events.
Alias map and core types
crates/ourios-core/src/alias.rs (types/initialization), crates/ourios-core/Cargo.toml, crates/ourios-core/src/lib.rs
Introduces ActorId (validated actor strings), Operator (context), AliasError (precondition failures), and AliasMap (per-tenant equivalence-class projection). OpenTelemetry counters initialized in AliasMap::new(). Module exports and dependencies added.
Assertion and retraction logic
crates/ourios-core/src/alias.rs (assert/retract implementation, union/remove helpers, reason validation)
AliasMap::assert() validates reason length, rejects degenerate single-id assertions, merges overlapping classes, emits AuditPayload::AliasAsserted, and increments assertion counter with tenant_id attribute. AliasMap::retract() removes id from classes, drops sub-two-member classes, emits retraction event, and increments retraction counter.
Query and reconstruction
crates/ourios-core/src/alias.rs (resolves, canonical, apply, from_events)
resolves() returns the full equivalence class or singleton. canonical() returns minimum member or the id itself. apply() replays alias events into a live map. from_events() reconstructs a fresh projection from an event sequence.
Core unit and metrics tests
crates/ourios-core/src/alias.rs (test modules)
Unit tests validate actor validation, reason limits, assertion rejection, union merging, and replay. Metrics test initializes in-memory OpenTelemetry provider, performs assertion and retraction, and verifies both counters export with tenant_id datapoints.
RFC0001 acceptance tests
crates/ourios-core/tests/rfc0001_alias.rs
Five previously-ignored test stubs converted to runnable tests. Module documentation updated from red-gate (pending) to green-gate (landed). Tests verify assertion, bidirectional expansion, per-tenant isolation, retraction, and self-reference semantics. Helper functions added for consistent test setup.
Parquet persistence barrier
crates/ourios-parquet/src/audit_record_batch.rs
AuditBatchError::AliasEventNotYetPersistable variant added to document alias events lack Parquet columns. Builders::append() explicitly rejects AliasAsserted and AliasRetracted events. Test verifies rejection with expected event_type.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant AliasMap
    participant AuditSink
    participant MetricsCounter
    Caller->>AliasMap: assert(sink, tenant, representative, members, operator)
    AliasMap->>AliasMap: validate_reason length
    AliasMap->>AliasMap: merge overlapping equivalence classes
    AliasMap->>AuditSink: emit AliasAsserted event
    AliasMap->>MetricsCounter: increment assertions_counter with tenant_id
    AliasMap-->>Caller: Ok(())
    Caller->>AliasMap: retract(sink, tenant, id, operator)
    AliasMap->>AliasMap: remove id from classes
    AliasMap->>AuditSink: emit AliasRetracted event
    AliasMap->>MetricsCounter: increment retractions_counter with tenant_id
    AliasMap-->>Caller: Ok(())
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • jensholdgaard/ourios#46: Modifies crates/ourios-parquet/src/audit_record_batch.rs with audit_events_to_batch and AuditBatchError logic, directly intersecting with this PR's persistence rejection barrier for alias events.

Poem

🐰 A hop through equivalence classes,
Operators assert with reason to pass us,
Retractions collapse the sets with grace,
Metrics count every leap through space,
Now audit logs hold alias's trace!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: implementing an operator-driven alias map with audited alias events and enabling RFC0001.12-.16 tests.
Description check ✅ Passed The description is comprehensive and well-structured with Summary, Related (RFC section), and all checklist items marked complete (cargo fmt, clippy, tests, docs/CHANGELOG all addressed).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch slice-a-rfc0001-alias

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 and usage tips.

@jensholdgaard
jensholdgaard requested a review from Copilot June 7, 2026 21:20
@jensholdgaard

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the RFC 0001 §6.7 operator-driven alias write path in ourios-core, including audited alias events on the existing audit stream, an in-memory per-tenant alias projection, and telemetry counters; and turns RFC0001.12–.16 from ignored stubs into real acceptance tests. It also updates the audit-Parquet writer to explicitly reject alias events until the RFC 0005 schema split lands.

Changes:

  • Added AuditPayload::AliasAsserted / AliasRetracted with stable event_kind/event_type mappings and merge-count semantics.
  • Introduced AliasMap (per-tenant alias-class projection) + operator API (assert/retract) with audit emission and OTel counters.
  • Flipped RFC0001.12–.16 tests to validate alias durability, projection semantics, tenant isolation, and retraction behavior; added a Parquet-writer rejection test for alias events.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/ourios-parquet/src/audit_record_batch.rs Rejects alias audit events at the Parquet writer boundary (schema not yet extended), adds error variant + test.
crates/ourios-core/tests/rfc0001_alias.rs Converts RFC0001.12–.16 from ignored stubs to real acceptance tests for alias write-path behavior.
crates/ourios-core/src/lib.rs Exposes the new alias module publicly.
crates/ourios-core/src/audit.rs Adds audited alias payload variants plus stable kind/type constants and merge-count logic updates.
crates/ourios-core/src/alias.rs Implements ActorId, Operator, and AliasMap projection + audited operator API + metrics instrumentation + unit tests.
crates/ourios-core/Cargo.toml Adds opentelemetry API dependency and test-only deps for in-memory metrics export verification.
Cargo.lock Locks new dependency edges from the ourios-core dependency updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/ourios-core/src/alias.rs
Comment thread crates/ourios-core/src/alias.rs Outdated
…r seed

Review: canonical() now reads min via BTreeSet::first on the stored class
(no resolves() clone); removed the attribute-less add(0,&[]) counter seeds
that created a spurious tenant_id-less timeseries (the counters carry
tenant_id and materialize per-tenant on first increment).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Comment thread crates/ourios-core/src/alias.rs Outdated
Comment thread crates/ourios-core/tests/rfc0001_alias.rs
Comment thread crates/ourios-core/tests/rfc0001_alias.rs

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (3)
crates/ourios-parquet/src/audit_record_batch.rs (1)

667-691: ⚡ Quick win

Add test coverage for AliasRetracted variant.

The test validates that AliasAsserted events are rejected, but the rejection logic at line 307 also handles AliasRetracted. Adding a second test case for AliasRetracted would ensure both alias variants are covered and guard against future regressions if the match arms diverge.

🧪 Suggested additional test case
#[test]
fn alias_retracted_events_are_rejected_pending_the_rfc_0005_split() {
    let retracted = AuditEvent {
        tenant_id: TenantId::new("acme"),
        timestamp: ts(1_775_127_600),
        payload: AuditPayload::AliasRetracted {
            representative_id: 1,
            member_ids: vec![2],
            actor: ourios_core::alias::ActorId::new("op").expect("non-empty actor"),
            reason: String::new(),
        },
    };
    let err = audit_events_to_batch(std::slice::from_ref(&retracted))
        .expect_err("alias events are not yet persistable");
    assert!(matches!(
        err,
        AuditBatchError::AliasEventNotYetPersistable {
            event_type: "alias_retracted"
        }
    ));
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ourios-parquet/src/audit_record_batch.rs` around lines 667 - 691, Add
a new unit test mirroring alias_events_are_rejected_pending_the_rfc_0005_split
but for the AliasRetracted variant: construct an AuditEvent with payload
AuditPayload::AliasRetracted (using TenantId::new, ts(...),
representative_id/member_ids/actor/reason as in the existing test), call
audit_events_to_batch on a slice containing it, expect an error, and assert it
matches AuditBatchError::AliasEventNotYetPersistable with event_type
"alias_retracted" to ensure both alias variants are covered.
crates/ourios-core/src/audit.rs (1)

205-223: ⚡ Quick win

Pin the new alias wire mapping in this module’s tests.

crates/ourios-parquet/src/audit_record_batch.rs persists event_kind() and event_type() directly, but event_kind_and_type_map_per_rfc_0005_3_7() still only exercises template + compaction. Adding alias_asserted / alias_retracted coverage here would make accidental renumbering, renaming, or counts_as_merge() drift fail in ourios-core before it turns into a cross-crate compatibility break.

Also applies to: 239-258, 270-276

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ourios-core/src/audit.rs` around lines 205 - 223, Add test cases to
pin the alias wire mapping by extending
event_kind_and_type_map_per_rfc_0005_3_7()’s test coverage to include the new
alias constants: ensure EVENT_KIND_ALIAS_ASSERTED and EVENT_KIND_ALIAS_RETRACTED
map to EVENT_TYPE_ALIAS_ASSERTED and EVENT_TYPE_ALIAS_RETRACTED respectively;
update or add assertions around counts_as_merge() and any mapping lookups that
currently only validate template_widened/compaction to prevent accidental
renumbering/renaming drift across crates.
crates/ourios-core/src/alias.rs (1)

270-286: ⚡ Quick win

Single-source the live and replay mutation path.

assert() / retract() update classes separately from apply(), even though this module’s main contract is that live operator actions and replayed audit events produce the same projection. Reusing apply() for the just-emitted AuditEvent would keep that behavior pinned in one place and reduce drift risk the next time alias semantics change.

♻️ Possible refactor
         let event = AuditEvent {
             tenant_id: tenant.clone(),
             timestamp: by.timestamp,
             payload: AuditPayload::AliasAsserted {
                 representative_id,
                 member_ids,
                 actor: by.actor,
                 reason: by.reason,
             },
         };
-        sink.emit(event);
-
-        self.union_in(tenant, &asserted);
+        sink.emit(event.clone());
+        self.apply(&event);
         self.assertions_total.add(
             1,
             &[KeyValue::new(ATTR_TENANT_ID, tenant.as_str().to_owned())],
         );
         Ok(())
@@
         let event = AuditEvent {
             tenant_id: tenant.clone(),
             timestamp: by.timestamp,
             payload: AuditPayload::AliasRetracted {
                 representative_id: id,
                 member_ids: Vec::new(),
                 actor: by.actor,
                 reason: by.reason,
             },
         };
-        sink.emit(event);
-
-        self.remove_id(tenant, id);
+        sink.emit(event.clone());
+        self.apply(&event);
         self.retractions_total.add(
             1,
             &[KeyValue::new(ATTR_TENANT_ID, tenant.as_str().to_owned())],
         );
         Ok(())

Also applies to: 318-334, 376-404

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ourios-core/src/alias.rs` around lines 270 - 286, The live mutation
path should reuse the replay handler instead of duplicating updates: after
constructing and sink.emit(event) in functions like assert() and retract(), stop
calling self.union_in(...) and self.assertions_total.add(...) (and their
equivalents at the other sites) and instead call the module's replay handler
(apply) with the same AuditEvent you just emitted (e.g., pass the AuditEvent
instance to self.apply(...) or the appropriate method that handles AuditEvent
replays). Ensure AuditEvent::AliasAsserted / AliasRetracted is what apply
expects and that apply covers both updating classes/sets and updating metrics so
live and replayed events stay single-sourced. Adjust other duplicated blocks
(the regions mentioned) to follow the same pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/ourios-core/src/alias.rs`:
- Around line 270-286: The live mutation path should reuse the replay handler
instead of duplicating updates: after constructing and sink.emit(event) in
functions like assert() and retract(), stop calling self.union_in(...) and
self.assertions_total.add(...) (and their equivalents at the other sites) and
instead call the module's replay handler (apply) with the same AuditEvent you
just emitted (e.g., pass the AuditEvent instance to self.apply(...) or the
appropriate method that handles AuditEvent replays). Ensure
AuditEvent::AliasAsserted / AliasRetracted is what apply expects and that apply
covers both updating classes/sets and updating metrics so live and replayed
events stay single-sourced. Adjust other duplicated blocks (the regions
mentioned) to follow the same pattern.

In `@crates/ourios-core/src/audit.rs`:
- Around line 205-223: Add test cases to pin the alias wire mapping by extending
event_kind_and_type_map_per_rfc_0005_3_7()’s test coverage to include the new
alias constants: ensure EVENT_KIND_ALIAS_ASSERTED and EVENT_KIND_ALIAS_RETRACTED
map to EVENT_TYPE_ALIAS_ASSERTED and EVENT_TYPE_ALIAS_RETRACTED respectively;
update or add assertions around counts_as_merge() and any mapping lookups that
currently only validate template_widened/compaction to prevent accidental
renumbering/renaming drift across crates.

In `@crates/ourios-parquet/src/audit_record_batch.rs`:
- Around line 667-691: Add a new unit test mirroring
alias_events_are_rejected_pending_the_rfc_0005_split but for the AliasRetracted
variant: construct an AuditEvent with payload AuditPayload::AliasRetracted
(using TenantId::new, ts(...), representative_id/member_ids/actor/reason as in
the existing test), call audit_events_to_batch on a slice containing it, expect
an error, and assert it matches AuditBatchError::AliasEventNotYetPersistable
with event_type "alias_retracted" to ensure both alias variants are covered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c5f5b90-da18-43cb-ba50-1daf85ad56f0

📥 Commits

Reviewing files that changed from the base of the PR and between 72a2982 and bd82c35.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • crates/ourios-core/Cargo.toml
  • crates/ourios-core/src/alias.rs
  • crates/ourios-core/src/audit.rs
  • crates/ourios-core/src/lib.rs
  • crates/ourios-core/tests/rfc0001_alias.rs
  • crates/ourios-parquet/src/audit_record_batch.rs

Review pass 2: AliasMap::new doc no longer claims a zero-seed (removed);
the RFC0001.12/.15 audit-payload assertions match on &events[0].payload
(ergonomics) instead of a place + ref binding, matching the repo idiom.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jensholdgaard
jensholdgaard requested a review from Copilot June 7, 2026 21:38
@jensholdgaard
jensholdgaard merged commit 2e4704c into main Jun 7, 2026
11 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Comment on lines +263 to +279
let asserted: BTreeSet<u64> = std::iter::once(representative_id)
.chain(member_ids.iter().copied())
.collect();
if asserted.len() < 2 {
return Err(AliasError::DegenerateAssertion);
}

let event = AuditEvent {
tenant_id: tenant.clone(),
timestamp: by.timestamp,
payload: AuditPayload::AliasAsserted {
representative_id,
member_ids,
actor: by.actor,
reason: by.reason,
},
};
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.

2 participants