Skip to content

test(core): add the RFC 0001 alias write-path red gate (RFC0001.12-.16) - #152

Merged
jensholdgaard merged 2 commits into
mainfrom
rfc0001-alias-red-gate
Jun 7, 2026
Merged

test(core): add the RFC 0001 alias write-path red gate (RFC0001.12-.16)#152
jensholdgaard merged 2 commits into
mainfrom
rfc0001-alias-red-gate

Conversation

@jensholdgaard

Copy link
Copy Markdown
Owner

What

The RED gate (specified → red) for the RFC 0001 alias-index write path, just specified in docs/rfcs/0001-template-miner.md §6.7 (the 2026-06-07 operator-driven-alias amendment, #151) and enumerated as §5 scenarios RFC0001.12–.16.

Five #[ignore]'d unimplemented!() stubs in crates/ourios-core/tests/rfc0001_alias.rs, one per scenario. No implementation — this is purely the red gate; the alias types/API land in following slices.

Stub Scenario
RFC0001.12 An alias assertion is durably recorded (alias_asserted, WAL-before-ack §3.4) and the class {A, B} appears in the per-tenant map with derived canonical A.
RFC0001.13 resolves_to(A) and resolves_to(B) both expand to {A, B} (member↔representative symmetry); resolves_to(C){C}.
RFC0001.14 Cross-tenant isolation [§3.7]: an alias in T1 never affects T2.
RFC0001.15 Retraction removes any member incl. the canonical (alias_retracted, audited); canonical re-derived as min; a one-member class is no longer an alias set.
RFC0001.16 A non-aliased id resolves to itself.

Verification (reproduced locally)

  • cargo fmt --all --check — clean
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo test --all-features — green; the five stubs report ignored, nothing else changes
  • cargo test -p ourios-core --test rfc0001_alias -- --include-ignored — exits non-zero, all five unimplemented!() fire (the inner-loop red signal per docs/verification.md §3)

Each stub carries the §2.3 greppable doc-comment form (Scenario RFC0001.<n> — … + See docs/rfcs/0001-template-miner.md §5.) so the spec↔test mapping resolves bidirectionally.

Placement

crates/ourios-core/tests/rfc0001_alias.rs. The alias events are new AuditPayload variants in ourios-core::audit, and the per-tenant alias map is consumed by both ourios-miner (emission) and ourios-querier (resolves_to reads), so the shared crate is the natural home. The querier-side resolves_to DSL surface is RFC0002.9's separate gate (crates/ourios-querier/tests/rfc0002_dsl.rs).

Implementation follows in slices

  1. core alias events (alias_asserted / alias_retracted) + the per-tenant alias-map projection + the operator assertion/retraction API
  2. querier resolves_to expansion wired to the map (closes RFC0002.9)

🤖 Generated with Claude Code

Stubs the five §5 acceptance criteria for the operator-driven
alias-index write path specified in RFC 0001 §6.7 (2026-06-07
amendment): durable alias_asserted/alias_retracted audit events on
the §6.4 stream under the §3.4 WAL-before-ack barrier, the per-tenant
alias-map projection, and resolves_to expansion by set membership.

Per docs/verification.md §3 this crosses the specified → red gate:
five #[ignore]'d unimplemented!() stubs, one per scenario, each
carrying the §2.3 greppable doc-comment form so the spec↔test mapping
resolves bidirectionally. Default cargo test stays green (outer loop);
cargo test -- --include-ignored fires all five (inner loop / red
signal). No implementation — the alias types/API land in following
slices.

Placed in ourios-core (tests/rfc0001_alias.rs): the alias events are
new AuditPayload variants in ourios-core::audit and the per-tenant
alias map is consumed by both ourios-miner (emission) and
ourios-querier (resolves_to reads), so the shared crate is the home.
The querier-side resolves_to DSL surface is RFC0002.9's separate gate.

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

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

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 24 minutes and 49 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: 6101c0b8-0eda-43b5-bbbc-1962ebcd03b5

📥 Commits

Reviewing files that changed from the base of the PR and between d9f0d66 and 622e235.

📒 Files selected for processing (1)
  • crates/ourios-core/tests/rfc0001_alias.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0001-alias-red-gate

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

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

Adds the RFC 0001 alias-index write-path red-gate acceptance-test stubs (RFC0001.12–.16) to ourios-core, establishing the spec↔test traceability for the newly specified operator-driven aliasing model before implementation lands.

Changes:

  • Introduces five #[ignore]’d unimplemented!() integration-test stubs for RFC0001.12–.16 in ourios-core.
  • Adds greppable scenario doc-comments (/// Scenario RFC… + /// See docs/rfcs/… §5.) per the verification process.

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

Comment thread crates/ourios-core/tests/rfc0001_alias.rs Outdated
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 1 out of 1 changed files in this pull request and generated no new comments.

@jensholdgaard
jensholdgaard merged commit 72a2982 into main Jun 7, 2026
11 checks passed
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