Skip to content

fix(dir-sim): directory lanes bind by predicate; licence coverage follows the nextLink chain - #2108

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/dirsim-dt64-identity-coverage
Nov 16, 2026
Merged

AdaWorldAPI merged 1 commit into
mainfrom
claude/dirsim-dt64-identity-coverage

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

This fixes the two Codex P2 findings on #2107, which arrived just before it was merged. Both are real on main.

1. DirLanes::lane_of mapped by field position (#2106's code)

Before: a basis listing SMTP before UPN bound without complaint. Field 0 then read the UPN lane, and an unrelated predicate at position 0 or 1 was also accepted.

Now: lane_of resolves the field's identity. UPN_IRI (dir:userPrincipalName) and SMTP_IRI (dir:primarySmtp) are new public constants. Any other predicate has no lane, and binding it is refused as Unbound.

  • Test: directory_lanes_bind_by_predicate_not_position. Field 0 of an SMTP-first basis reads SMTP and never UPN; dir:department is Unbound.
  • Disable run: mapping by position again turns it red.

2. Licence coverage counted end pages only

Before: a first page that links onward plus the terminal page, with the middle page missing, read as Complete. LicenseLanes::over then served planes in which that page's users were silently absent.

Now:

  • LicensePlanes::build_fetched(view, version, Vec<(request_url, page)>, skus) keeps each page's request URL. coverage() walks the @odata.nextLink chain: page k+1 is the page whose request URL is page k's link, in any delivery order.
    • one unbroken chain covering every page → Complete;
    • a link to a page that is not there → Partial;
    • two starts (e.g. the middle page missing), a cycle, a stray page, or a URL requested twice → Ambiguous.
  • Without request URLs (build), pages alone can only prove a single page complete, a missing end partial, and two ends ambiguous. More than one page is now Coverage::Unverified, which LicenseLanes refuses like any non-Complete state.

Tests (license_planes.rs):

  • coverage_from_links_alone_never_claims_two_pages_complete
  • the_link_chain_sees_a_missing_middle_page: complete in two delivery orders; a missing middle page is never complete; a missing last page is Partial; a loop is Ambiguous.

The license_dt64 fixture now fetches with URLs.

Disable run: coverage ignoring the URLs turns the licence tests red.

API note: build keeps its signature. A caller that needs Complete for more than one page must use build_fetched.

Checks:

  • dir-sim: 308 passed with dt64, 299 without, 0 failed.
  • clippy -D warnings: clean with no features, with dt64 and with rbac.
  • fmt: clean.

Generated by Claude Code

…lows the nextLink chain

Codex P2 findings on #2107: DirLanes::lane_of mapped by field position (an SMTP-before-UPN basis read the wrong attribute); coverage counted end pages only, so first + last page with the middle missing read Complete. Now lane_of resolves UPN_IRI / SMTP_IRI and refuses other predicates; build_fetched keeps request URLs and coverage walks the chain; without URLs more than one page is Unverified, which LicenseLanes refuses.

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

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c569450-54dc-44a0-9fb8-9b8918debb57
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 16, 2026 14:48
@AdaWorldAPI
AdaWorldAPI merged commit 932061a into main Nov 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T14:49:30.236452Z aa922c5 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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