Skip to content

Gate cognitive complexity with the macro-aware lint at 9 - #744

Merged
leynos merged 1 commit into
mainfrom
macc-opt-in
Nov 25, 2026
Merged

leynos merged 1 commit into
mainfrom
macc-opt-in

Conversation

@leynos

@leynos leynos commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Replaces Clippy's cognitive_complexity with Whitaker's experimental macro_aware_cognitive_complexity at max_complexity = 9, the threshold Clippy held, so macro-generated branching no longer counts. The three scenario test bodies it flagged were split in #743 (merged).

  • dylint.toml opts in; clippy.toml loses cognitive-complexity-threshold; Cargo.toml loses cognitive_complexity = "deny".
  • Drops the eight #[expect(clippy::cognitive_complexity)] (src/login.rs, test-util/src/server/launch.rs, shared_core.rs, sqlite.rs), unfulfilled once the Clippy lint is off.
  • Splits visible_root_files_merge_body once more (grant helper), which the lint scored at 10 once active.
  • Developers' guide gains a "Cognitive complexity" section.

Validation: make fmt, make check-fmt, make lint (sqlite and postgres Whitaker passes) and make markdownlint green; a probe at limit 1 failed as expected.

Open PRs touching these files: none of the open PRs touch them.

Summary by Sourcery

Enforce macro-aware cognitive complexity at the existing threshold while removing the obsolete Clippy-based gate.

Enhancements:

  • Replace Clippy’s macro-sensitive cognitive-complexity check with Whitaker’s macro-aware lint enforced at a complexity limit of 9.
  • Refactor the remaining flagged test scenario by extracting its access-granting helper.
  • Document the cognitive-complexity linting policy and developer workflow.

Documentation:

  • Add developer guidance for configuring, running, and maintaining the macro-aware cognitive-complexity lint.

Chores:

  • Remove the obsolete Clippy cognitive-complexity configuration and suppressions.

Opt in to the experimental macro_aware_cognitive_complexity lint at
max_complexity = 9, the threshold Clippy's cognitive_complexity held. Drop
Clippy's threshold, the workspace deny and the eight now-unfulfilled
clippy::cognitive_complexity expectations. Split
visible_root_files_merge_body once more, which the lint scored at 10.
Document the gate in the developers' guide.
@sourcery-ai

sourcery-ai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Sorry @leynos, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 13 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@buzzybee-df12

Copy link
Copy Markdown
Collaborator

@coderabbitai Please review the head commit: the macro-aware cognitive complexity opt-in at 9, removal of the Clippy threshold and deny, eight unfulfilled expects dropped, one extra helper split, and a developers guide section. Any blocking defect?

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 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-25T11:10:20.401035Z 3de5662 PR opened
🔒 Security Review ✅ Completed 2026-11-25T11:11:51.380794Z 3de5662 PR opened
ℹ️ 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.

@sourcery-ai

sourcery-ai Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Implementation

Remove obsolete Clippy cognitive-complexity expectations from the login flow and server-launch helpers now that Clippy no longer gates this lint.

  • src/login.rs L8 (removed lines)
  • test-util/src/server/launch.rs L55 (removed lines), L73 (removed lines)

Configuration

Replace Clippy’s cognitive-complexity gate with Whitaker’s experimental macro-aware lint at the same threshold of 9.

  • clippy.toml L2-4
  • dylint.toml L1-11
  • Cargo.toml L168 (removed lines)

Documentation

Document how the Whitaker gate is enabled, enforced, and refreshed when the installed suite is stale.

  • docs/developers-guide.md L1021-1033

Tests

Remove obsolete test expectations and extract the grant setup from the visible-root-files scenario to keep it within the new complexity limit.

  • src/db/tests/file_node_tests/sqlite.rs L153-172 (+6 small edits)
  • src/db/tests/file_node_tests/shared_core.rs L29 (removed lines), L79 (removed lines), L161 (removed lines)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Replaces Clippy's cognitive_complexity lint with Whitaker's experimental macro_aware_cognitive_complexity lint, with a maximum score of 9. Changes across 8 files (+49/-44):

  • dylint.toml: enables the Whitaker lint at 9.
  • clippy.toml: removes cognitive-complexity-threshold.
  • Cargo.toml: removes the cognitive_complexity deny.
  • Removes eight unfulfilled #[expect(clippy::cognitive_complexity)] attributes in four files.
  • Splits visible_root_files_merge_body with a grant helper.
  • Adds a "Cognitive complexity" section to the developers' guide.

Walkthrough

The workspace replaces Clippy’s cognitive-complexity gate with Whitaker’s macro-aware lint, configured at a maximum score of 9. The change also removes existing Clippy expectation attributes and extracts SQLite test grant setup into a helper.

Changes

Cognitive complexity lint

Layer / File(s) Summary
Configure and document the Whitaker gate
Cargo.toml, clippy.toml, dylint.toml, docs/developers-guide.md
The workspace removes Clippy’s cognitive-complexity denial and threshold setting. It enables Whitaker’s macro-aware lint with a maximum score of 9 and documents the lint gate and its use under make lint.
Update existing lint expectations and test setup
src/db/tests/file_node_tests/shared_core.rs, src/db/tests/file_node_tests/sqlite.rs, src/login.rs, test-util/src/server/launch.rs
The code removes existing Clippy cognitive-complexity expectation attributes. The SQLite visibility test moves modern-node and legacy-file access grants into a helper; its visibility checks remain.

Possibly related issues

  • leynos/ortho-config#738: This change also replaces the Clippy gate with Whitaker’s macro-aware lint at a limit of 9. The supplied summaries do not establish whether the Windows-only coverage gap reported for the sibling repository also applies here.

Suggested reviewers: codescene-access

Change: Other

Merge Risk: Minimal · up to 3de56

This change moves the cognitive-complexity check from Clippy to Whitaker's macro-aware lint and splits one test function. It touches only lint configuration, documentation and tests, so production behavior should not change. No merge-blocking risk was found.

Pre-merge checks: Passed 14

Check name Status Explanation
Title check Passed The title states the main change: the PR gates cognitive complexity with Whitaker's macro-aware lint at a threshold of 9. The changeset replaces Clippy's cognitive_complexity lint with macro_aware_cog…
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.
Description check Passed The description states that the PR replaces Clippy's cognitive_complexity lint with Whitaker's macro_aware_cognitive_complexity at a limit of 9. It lists the changed files (dylint.toml, clippy.toml, C…
Testing (Overall) Passed The check applies to new functionality or behavioural changes. This PR changes lint configuration and removes obsolete suppressions. It adds no product functionality. Changed files, from the reviewed …
User-Facing Documentation Passed The check is not applicable to this pull request. It changes no user-facing functionality or behaviour. Evidence from the reviewed range (refs/coderabbit/pre-merge-check/base to head): - Changed files…
Developer Documentation Passed The PR changes internal tooling and build requirements, and it documents them in docs/developers-guide.md, which is the location the check names. - Developers' guide: The diff adds a "Cognitive …
Module-Level Documentation Passed The check passes for the modules this pull request changes. The PR changes four Rust files, and each already has a leading module docstring (//!) at head: - `src/db/tests/file_node_tests/shared_core…
Testing (Unit And Behavioural) Passed The check applies to unit and behavioural tests. This PR changes lint configuration and removes eight #[expect(clippy::cognitive_complexity)] attributes. It adds no new tests and does not change run…
Testing (Property / Proof) Passed The check is not triggered by this pull request. It recommends property or proof tooling only when a change introduces an invariant over a range of inputs, states, orderings or transitions, or introdu…
Testing (Compile-Time / Ui) Passed The check does not apply to this pull request. The changed-file inventory has eight files: Cargo.toml, clippy.toml, docs/developers-guide.md, dylint.toml (added), two test files under src/db/tests/fil…
Unit Architecture Passed The check applies to changed code. The pull request changes are mostly configuration and lint management: it removes cognitive_complexity = "deny" from Cargo.toml, removes `cognitive-complexity-th…
Domain Architecture Passed The Domain Architecture check does not fail for this pull request. The PR changes lint configuration (Cargo.toml, clippy.toml, new dylint.toml), the developers' guide, and removes eight `#[expect(clip…
Observability Passed The Observability check does not apply to this pull request. It changes no operational behaviour. The changed-file inventory (refs/coderabbit/pre-merge-check/base..head) contains eight files: - Lint c…
Full details: Title check

Explanation

The title states the main change: the PR gates cognitive complexity with Whitaker's macro-aware lint at a threshold of 9. The changeset replaces Clippy's cognitive_complexity lint with macro_aware_cognitive_complexity at max_complexity 9, as the description and objectives confirm. The title does not reference a roadmap item or an issue number, and the requirements only call for those where the PR references them. The title is therefore related to the main change and passes.

Full details: Description check

Explanation

The description states that the PR replaces Clippy's cognitive_complexity lint with Whitaker's macro_aware_cognitive_complexity at a limit of 9. It lists the changed files (dylint.toml, clippy.toml, Cargo.toml, the eight removed expect attributes), the helper split in visible_root_files_merge_body, and the developers' guide section. It also reports validation runs. This matches the changeset closely.

Full details: Testing (Overall)

Explanation

The check applies to new functionality or behavioural changes. This PR changes lint configuration and removes obsolete suppressions. It adds no product functionality. Changed files, from the reviewed range: - Cargo.toml: removes cognitive_complexity = "deny". - clippy.toml: removes cognitive-complexity-threshold and adds comments. - dylint.toml: new file. It opts in to Whitaker's macro_aware_cognitive_complexity lint with max_complexity = 9. This is configuration for a third-party tool. The check excludes tests that only confirm third-party tool behaviour. - docs/developers-guide.md: documentation only. - src/login.rs, test-util/src/server/launch.rs, shared_core.rs: remove #[expect(clippy::cognitive_complexity)] attributes. No logic changes. - src/db/tests/file_node_tests/sqlite.rs: extracts the grant setup from visible_root_files_merge_body into grant_modern_and_legacy_access. The diff shows the same grant calls. The test still asserts that no files are visible before grants. It still asserts ["legacy.txt", "modern.txt"] after grants. Removing the grants would make the post-grant assertion fail, so the test remains non-vacuous. The refactor changes no behaviour. The PR does not require new tests under this criterion. The author's reported make lint and probe results are context only and were not re-run here.

Full details: User-Facing Documentation

Explanation

The check is not applicable to this pull request. It changes no user-facing functionality or behaviour. Evidence from the reviewed range (refs/coderabbit/pre-merge-check/base to head): - Changed files: Cargo.toml, clippy.toml, dylint.toml (added), docs/developers-guide.md, and four Rust files with test or lint attributes (src/login.rs, test-util/src/server/launch.rs, and two test files under src/db/tests/file_node_tests/). The Rust changes remove #[expect(clippy::cognitive_complexity)] attributes. One test body is split into a helper, and the summary states that no runtime behaviour changed. - The only documentation change is a "Cognitive complexity" section in docs/developers-guide.md. That guide addresses contributors, so it is not an end-user document. - docs/users-guide.md exists but the pull request does not change it. The change affects the developer lint gate only. No end-user or API-consumer surface changes, so no user's guide update is required. The check does not require a migration document, because no breaking change or new user-facing function is introduced.

Full details: Developer Documentation

Explanation

The PR changes internal tooling and build requirements, and it documents them in docs/developers-guide.md, which is the location the check names. - Developers' guide: The diff adds a "Cognitive complexity" section under the lint guidance. It states that Clippy no longer gates cognitive complexity. It names Whitaker's macro_aware_cognitive_complexity lint at max_complexity = 9, the [whitaker] experimental opt-in in dylint.toml, and the make lint run under -D warnings. It also tells readers to rerun whitaker-installer when the installed suite predates the lint. - In-repo configuration comments: dylint.toml (new) and the revised clippy.toml comment explain the same change where the settings live. The new dylint.toml also links the tracker issue. - Stale references: A search of docs/, AGENTS.md, README.md and Makefile finds no remaining cognitive-complexity-threshold or cognitive_complexity references that describe the old Clippy gate. - Design documents and ADRs: The PR does not change the architecture. It swaps one lint gate for another at the same threshold. The decision is small in scope, and the guide and config comments record it. I found no design document or ADR that the change must update. - Roadmap and execplans: The diff adds no execplan and does not touch docs/roadmap.md. The check does not require a roadmap entry for this change. - Locales: I found no translated copies of the developers' guide in the repository, so no locale sync applies. The documentation covers the new tooling requirement, so the check passes.

Full details: Module-Level Documentation

Explanation

The check passes for the modules this pull request changes. The PR changes four Rust files, and each already has a leading module docstring (//!) at head: - src/db/tests/file_node_tests/shared_core.rs: "Core backend-agnostic file-node scenario bodies." - src/db/tests/file_node_tests/sqlite.rs: "Legacy file-node test bodies and SQLite entry points." - src/login.rs: a five-line docstring covering purpose, validation, session update and logging. - test-util/src/server/launch.rs: "Spawns the server process on an ephemeral port and waits for readiness." The PR does not add a new Rust module. The other changes are configuration files (Cargo.toml, clippy.toml, dylint.toml) and the developers' guide, so the check does not apply to them. I also scanned the 223 .rs files at head. One file, tests/transaction.rs, has no //! module docstring. The PR does not touch it, so this gap is pre-existing and the PR does not introduce or worsen it. It does not cause a FAIL under the decision contract. Two of the changed docstrings are brief. The shared_core.rs and sqlite.rs docstrings state purpose but say little about relationships to other components. This does not breach the check, because the relationship only needs stating when it is not obvious, and the new helper in sqlite.rs does not change the module's role.

Full details: Testing (Unit And Behavioural)

Explanation

The check applies to unit and behavioural tests. This PR changes lint configuration and removes eight #[expect(clippy::cognitive_complexity)] attributes. It adds no new tests and does not change runtime behaviour, so no new test coverage is required by the check. The one test-code change is in src/db/tests/file_node_tests/sqlite.rs. The diff shows visible_root_files_merge_body now calls a new private helper, grant_modern_and_legacy_access, which seeds the download permission, grants the modern node and inserts the legacy file_acl row. The assertions remain: - The visible-before-grants list is still asserted empty. - The post-grant visible names are still asserted as ["legacy.txt", "modern.txt"]. The permission seeding moved after the first assertion but still runs before the grants, so the scenario keeps its meaning. The refactor does not weaken the test. The other changed files (Cargo.toml, clippy.toml, dylint.toml, docs/developers-guide.md, src/login.rs, test-util/src/server/launch.rs, shared_core.rs) only remove attributes or update configuration and documentation. No externally observable workflow, integration contract, persistence path or command-line behaviour changes, so end-to-end tests are not required.

Full details: Testing (Property / Proof)

Explanation

The check is not triggered by this pull request. It recommends property or proof tooling only when a change introduces an invariant over a range of inputs, states, orderings or transitions, or introduces lemmas or proof assumptions. The changed files (from git diff --name-status) are lint configuration and test scaffolding: - dylint.toml (new) enables Whitaker's experimental macro_aware_cognitive_complexity lint with max_complexity = 9. - clippy.toml and Cargo.toml drop the Clippy cognitive-complexity threshold and deny setting. - Eight #[expect(clippy::cognitive_complexity)] attributes are removed from src/login.rs, test-util/src/server/launch.rs, shared_core.rs and sqlite.rs. - visible_root_files_merge_body in src/db/tests/file_node_tests/sqlite.rs moves its grant steps into a new helper, grant_modern_and_legacy_access. The diff shows the same inserts and the same final assertion, so the scenario is unchanged. - docs/developers-guide.md gains a documentation section. None of these changes adds a new invariant over many inputs or a new state-transition property. None adds a lemma or a proof assumption. The existing scenario tests stay as parameterized, fixed-scenario tests, which fits the check's guidance for complete, small tables. Recommending a property test, a bounded model check or a formal proof would not follow from this diff.

Full details: Testing (Compile-Time / Ui)

Explanation

The check does not apply to this pull request. The changed-file inventory has eight files: Cargo.toml, clippy.toml, docs/developers-guide.md, dylint.toml (added), two test files under src/db/tests/file_node_tests/, src/login.rs and test-util/src/server/launch.rs. The change does not add or alter compile-time behaviour. It does not add or change any proc macro, macro_rules!, build script, trybuild fixture, or compile_fail or .stderr output. The Rust edits remove #[expect(clippy::cognitive_complexity)] attributes and extract a runtime test helper in sqlite.rs. The lint configuration (dylint.toml, clippy.toml, Cargo.toml) governs static analysis, not compiled output. The keyword hits from the search are pre-existing. The trybuild section in docs/developers-guide.md is unchanged context, and const fn readiness_address in launch.rs is not part of the added lines. The change also introduces no text, structured, or UI-adjacent output that would need snapshot tests. The test refactor keeps its existing assertions, so no new snapshot is needed.

Full details: Unit Architecture

Explanation

The check applies to changed code. The pull request changes are mostly configuration and lint management: it removes cognitive_complexity = "deny" from Cargo.toml, removes cognitive-complexity-threshold from clippy.toml, adds dylint.toml to enable Whitaker's macro_aware_cognitive_complexity lint at 9, and deletes eight #[expect(clippy::cognitive_complexity)] attributes. The only code-logic change is in src/db/tests/file_node_tests/sqlite.rs. There, visible_root_files_merge_body moves its permission seeding, modern-node grant, and legacy file_acl insert into a new helper, grant_modern_and_legacy_access. The helper returns Result<(), AnyError>, so its fallibility stays explicit. The visibility query and its assertion remain in the test body after the setup writes, so the query and command steps stay separate and visible. The helper takes its dependencies (conn, user, node, and legacy IDs) as explicit parameters. The other changed files (src/login.rs, test-util/src/server/launch.rs, shared_core.rs) only remove attributes, and the scenario bodies are unchanged. No change makes fallibility, state mutation, dependencies, or responsibilities less visible.

Full details: Domain Architecture

Explanation

The Domain Architecture check does not fail for this pull request. The PR changes lint configuration (Cargo.toml, clippy.toml, new dylint.toml), the developers' guide, and removes eight #[expect(clippy::cognitive_complexity)] attributes. The only non-configuration code change is in src/db/tests/file_node_tests/sqlite.rs. There, visible_root_files_merge_body moves its grant logic (seed permission, grant_resource_permission, and a direct legacy_file_acl insert) into a new test-only helper, grant_modern_and_legacy_access. The diesel insert and the repository calls already existed in the test body. The diff only relocates them, so it adds no new adapter or persistence leakage into domain code. No domain module under the changed files gains an HTTP, SQL, ORM, or transport dependency. The check's criteria about command honesty and repository shape do not apply to this change.

Full details: Observability

Explanation

The Observability check does not apply to this pull request. It changes no operational behaviour. The changed-file inventory (refs/coderabbit/pre-merge-check/base..head) contains eight files: - Lint configuration: Cargo.toml, clippy.toml, and the new dylint.toml. These switch the complexity gate from Clippy's cognitive_complexity to Whitaker's macro_aware_cognitive_complexity, set at 9. - Documentation: docs/developers-guide.md. - Test code: src/db/tests/file_node_tests/shared_core.rs and sqlite.rs. These remove expectation attributes and extract a test-only grant helper. - Source attributes: src/login.rs and test-util/src/server/launch.rs. The diff for these two files shows only removed #[expect(clippy::cognitive_complexity)] attributes. No function bodies or runtime logic change. No production code path, service boundary, queue, retry, cache, or metric changes. Therefore the check's requirements for logs, metrics, tracing, and alerts are not triggered. The provider-reported PR author is leynos (PR #744, base main, head macc-opt-in).

Set the lint to nine and let macros unfold,
Keep each test’s access grants neatly told.
Move Clippy’s old threshold out of sight,
Let Whitaker score the branches right.
Run the gate, and keep the code light.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 7ec558b5-5ad5-4a4e-87e3-453455cbab5b
Commits

Reviewing files that changed from the base of the PR and between 1b46464 and 3de5662.

Files selected for processing: 8

  • Cargo.toml
  • clippy.toml
  • docs/developers-guide.md
  • dylint.toml
  • src/db/tests/file_node_tests/shared_core.rs
  • src/db/tests/file_node_tests/sqlite.rs
  • src/login.rs
  • test-util/src/server/launch.rs
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Files with no reviewable changes: 4

  • Cargo.toml
  • src/db/tests/file_node_tests/shared_core.rs
  • src/login.rs
  • test-util/src/server/launch.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@codescene-access codescene-access 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.

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor
Analysis chain

Script executed:

#!/bin/bash
set -u
printf '%s\n' '--- PR metadata ---'
gh api repos/leynos/mxd/pulls/744 --jq '{state,base:{sha:.base.sha,ref:.base.ref},head:{sha:.head.sha,ref:.head.ref},mergeable,updated_at,body}' || true
printf '%s\n' '--- checkout ---'
git rev-parse HEAD
git status --short
printf '%s\n' '--- PR diff ---'
gh pr diff 744 --repo leynos/mxd || true
printf '%s\n' '--- PR check status ---'
gh pr checks 744 --repo leynos/mxd || true
printf '%s\n' '--- instruction files ---'
fd -H -t f '(^AGENTS\.md$|^CLAUDE\.md$)' . -E target -E .git || true
printf '%s\n' '--- lint workflow and version references ---'
rg -n -i -C2 'whitaker|dylint|macro_aware_cognitive_complexity|cognitive.complexity|(^|[ /])lint:' Cargo.toml clippy.toml dylint.toml Makefile docs/developers-guide.md .github 2>/dev/null || true

Length of output: 27604


Script executed:

#!/bin/bash
set -u
printf '%s\n' '--- repository instructions ---'
cat AGENTS.md
printf '%s\n' '--- sqlite source outline ---'
ast-grep outline src/db/tests/file_node_tests/sqlite.rs --items all
printf '%s\n' '--- sqlite helper and surrounding scenario ---'
cat -n src/db/tests/file_node_tests/sqlite.rs | sed -n '1,225p'
printf '%s\n' '--- permission seeding definitions and usage ---'
rg -n -C3 'fn seed_permission\s*\(|seed_permission\(' src/db/tests
printf '%s\n' '--- workflow installation and lint steps ---'
cat -n .github/workflows/ci.yml | sed -n '155,220p'
printf '%s\n' '--- pinned installer action definition ---'
gh api 'repos/leynos/shared-actions/contents/.github/actions/install-whitaker/action.yml?ref=0eabb6bc07148981de5da395e30cd78d83f5c7c2' --jq .content | base64 -d || true
printf '%s\n' '--- latest checks ---'
gh pr checks 744 --repo leynos/mxd || true

Length of output: 104210


Script executed:

#!/bin/bash
set -u
printf '%s\n' '--- workspace lint levels ---'
cat -n Cargo.toml | sed -n '145,205p'
printf '%s\n' '--- remaining cognitive complexity references ---'
rg -n -C2 'cognitive_complexity|cognitive-complexity' -g '*.rs' -g '*.toml' . || true
printf '%s\n' '--- permission and visibility implementations ---'
rg -n -C4 '(async )?fn (seed_permission|list_visible_root_file_nodes_for_user)\s*\(' src
printf '%s\n' '--- Whitaker upstream relevant source paths ---'
paths="$(gh api 'repos/leynos/whitaker/git/trees/main?recursive=1' --jq '.tree[] | select(.type == "blob") | .path' | grep -Ei '(cognitive|experimental)' | head -60)"
printf '%s\n' "$paths"
printf '%s\n' '--- Whitaker upstream root metadata ---'
gh api repos/leynos/whitaker --jq '{default_branch,pushed_at}' || true
printf '%s\n' '--- Whitaker cognitive source excerpts ---'
printf '%s\n' "$paths" | grep '\.rs$' | head -8 | while IFS= read -r path; do
  [ -n "$path" ] || continue
  printf '\n--- %s ---\n' "$path"
  gh api "repos/leynos/whitaker/contents/${path}?ref=main" --jq .content | base64 -d | nl -ba | sed -n '1,200p'
done

Length of output: 62250


Script executed:

#!/bin/bash
set -u
printf '%s\n' '--- database source outline ---'
ast-grep outline src/db/files.rs --items all --match 'seed_permission|list_visible_root_file_nodes_for_user'
printf '%s\n' '--- seed and visibility code ---'
cat -n src/db/files.rs | sed -n '112,155p;320,435p'
printf '%s\n' '--- Whitaker lint declaration and diagnostic boundary ---'
for path in crates/macro_aware_cognitive_complexity/src/lib.rs crates/macro_aware_cognitive_complexity/src/driver/mod.rs crates/macro_aware_cognitive_complexity/src/driver/diagnostic.rs; do
  printf '\n--- %s ---\n' "$path"
  gh api "repos/leynos/whitaker/contents/${path}?ref=main" --jq .content | base64 -d | nl -ba | sed -n '1,200p'
done
printf '%s\n' '--- current checks ---'
gh pr checks 744 --repo leynos/mxd || true

Length of output: 20181


@buzzybee-df12 I reviewed head commit 3de5662. I found no blocking defect in the changes inspected.

  • The Whitaker opt-in and limit match the upstream configuration. CI installs the rolling suite and runs Whitaker with warnings denied.
  • The helper preserves both grants and the visibility assertions. Moving the permission seed does not grant access before the pre-grant query.
  • The PR reports a successful lint run and a threshold-1 probe. I did not run those checks independently.

Before merging, verify that the pending CI jobs pass and that make test, or the equivalent required suites, pass. The SQLite, PostgreSQL and wireframe-only jobs were still pending at the latest check.

Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

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.

@leynos
leynos merged commit b7bbb65 into main Nov 25, 2026
20 checks passed
@leynos
leynos deleted the macc-opt-in branch November 25, 2026 11:39
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