fix(ci): loc-gate.sh scans git-tracked files only, skip hidden folders - #236
Merged
Conversation
find . -path ./target -prune only excluded the top-level target/, so running it from repo root also walked .competitive-audit/ (scratch clone of unrelated external repos) and nested target/ dirs inside other worktrees, both flagged as false positives. git ls-files scans tracked files only, which structurally can't include either.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe LOC gate now derives Rust files from Git’s tracked-file list, skips hidden paths, fails explicitly if discovery fails, and applies the existing limits and allowlist checks to the resulting files. ChangesLOC gate file selection
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
4 tasks
This was referenced Jul 29, 2026
getappz
added a commit
that referenced
this pull request
Jul 29, 2026
…icate-item reuse, assignee freeze (#365) * feat(handoff): verified continuation commit, structured payload, duplicate-item reuse, assignee freeze Item #236 (handoff hardening, QuorumGit adoption): - HandoffRequest gains last_commit: verified via `git cat-file -e` and, when the item's task/<seq> branch already exists, `git merge-base --is-ancestor` -- a fabricated or unreachable OID is rejected, not trusted. - HandoffRequest gains required completed/remaining and optional blockers fields, stored in the asset's metadata. - A handoff without item_id now reuses an existing open item assigned to the recipient (matched by name or thread_id) instead of blindly creating a duplicate; genuinely new work still auto-creates. - agentflare_backend::item::claim gains a BlockedByAssignee outcome: a freshly handed-off, never-claimed item can only be claimed by its assignee until accepted, excluding completed/cancelled items. Deferred: shim-side branch-push denial for open handoffs (spec's own review already downgraded this to defense-in-depth, covered in large part by #234's scope enforcement and the opencode branch-guard plugin). * fix(handoff): fmt, canonicalize claim owner, validate commit oid/payload off the DB lock (#366) - cargo fmt (item.rs claim closure, types.rs schemars doc attr) - item::claim: canonicalize both sides of the assignee/owner comparison so an alias owner (claude:1) isn't wrongly BlockedByAssignee against its own canonical handoff assignee (claude-code) - verify_continuation_commit: resolve the target branch under the backend DB lock, then run all git subprocess checks after releasing it, matching the existing item_claim split; validate oid is a plain hex id and force commit-type resolution (oid^{commit}) so a non-hex/flag-like value or a blob/tree/tag can't pass as a continuation commit - handoff_impl: reject empty completed/remaining instead of silently accepting an empty structured payload - mcp_prompts: document completed/remaining as required handoff fields so generated requests don't fail deserialization * fix(test): stop with_temp_home_clears_the_override_env_var_after_returning from racing concurrent with_temp_home callers The assertion read AGENTFLARE_HOME_OVERRIDE outside GLOBAL_STATE_LOCK, the lock that guards every set/remove of it. A concurrent thread's own correctly-scoped with_temp_home call could be transiently holding the var set at the exact moment this test read it, flaking the check on a var this test was never entitled to observe in the first place. Fix: acquire the same lock before reading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/loc-gate.sh's traversal only pruned the top-level./target, so running it from repo root also walked.competitive-audit/(a scratch clone of unrelated external repos) and nestedtarget/dirs inside other worktrees, both flagged as false positivesgit ls-files -- '*.rs', which scans tracked files only and structurally can't include either; added a hidden-folder skip as defense in depthsrc/mcp_server.rsis currently 7249 lines (3.6x over its own frozen 2000-line ceiling in the gate's allowlist), so turning the gate on today would fail on pre-existing debt rather than new violations. Tracked as item feat: asset MCP tool — attach/get/list/delete with storage, dedup, and tests #168 (split the file); CI wiring is a follow-up once that lands.Test plan
bash scripts/loc-gate.shbefore and after the fix; false positives from.competitive-audit/nested worktreetargetdirs are gone, only the realsrc/mcp_server.rsviolation remainsSummary by CodeRabbit