Skip to content

Adopt LOC gate from lean-ctx (#660) - #218

Merged
getappz merged 3 commits into
masterfrom
task/150
Jul 17, 2026
Merged

Adopt LOC gate from lean-ctx (#660)#218
getappz merged 3 commits into
masterfrom
task/150

Conversation

@getappz

@getappz getappz commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Auto-opened on item done for 019f6f54-413f-78f1-afd2-d17f3b842a8b.

Summary by CodeRabbit

  • Chores
    • Added an automated Rust source line-count enforcement check to keep files within set size limits.
    • Included an allowlist for legacy Rust files with a higher threshold, ensuring they remain eligible.
    • The check fails when limits are exceeded and reports success when all files comply.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f17091f7-d6bb-4666-b718-2de19fbc672c

📥 Commits

Reviewing files that changed from the base of the PR and between 46c314e and 6242c52.

📒 Files selected for processing (1)
  • scripts/loc-gate.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/loc-gate.sh

📝 Walkthrough

Walkthrough

Adds scripts/loc-gate.sh, which scans repository Rust files, enforces standard and frozen line limits, validates the legacy allowlist, and exits nonzero on violations.

Changes

Rust LOC gate

Layer / File(s) Summary
Rust file LOC validation
scripts/loc-gate.sh
Scans .rs files excluding target/, applies limits for regular and allowlisted files, verifies allowlisted entries, and prints failures or LOC gate OK.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is a placeholder and omits the required Summary, Test plan, and Notes for reviewers sections. Replace the placeholder with the template sections and briefly describe the change, tests run, risk areas, and backwards compatibility.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adopting the LOC gate from lean-ctx.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/150

Comment @coderabbitai help to get the list of available commands.

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

Actionable comments posted: 2

🤖 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.

Inline comments:
In `@scripts/loc-gate.sh`:
- Around line 24-35: Normalize each path emitted by find before passing it to
is_allowed and before using it in related checks or messages, removing the
leading ./ so it matches the relative paths stored in ALLOWLIST. Update the loop
around is_allowed in the loc-gate script while preserving the existing frozen
and regular limit behavior.
- Around line 24-35: The Rust file traversal in the LOC gate must fail closed
when find encounters an error. Update the loop around the find pipeline to
capture and validate find’s exit status, returning a failure instead of
reporting success when traversal fails; also use null-delimited output with read
-d '' to preserve paths safely.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2b534e38-d7c3-48a9-81be-82cbf974fa89

📥 Commits

Reviewing files that changed from the base of the PR and between 2b58ffd and 46c314e.

📒 Files selected for processing (1)
  • scripts/loc-gate.sh

Comment thread scripts/loc-gate.sh Outdated
@getappz
getappz merged commit a8e44de into master Jul 17, 2026
15 checks passed
@getappz
getappz deleted the task/150 branch July 17, 2026 12:35
getappz added a commit that referenced this pull request Jul 19, 2026
…269)

* feat(mcp): knowledge fact import + session snapshot in flare_handoff

Recovers work that was stashed instead of landed (item #218/#220 review).
Fixes a copy-pasted schema description on HandoffRequest.facts.

* fix(mcp): scope handoff fact import to project, run after asset commit
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