Repository navigation
feat: implement issue #817 — Clean up upsert output before fleet apply: conditional negation tail + migrated-comment dedup - #818
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
2 similar comments
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Updates the gitignore-baseline upsert logic to reduce noisy output by making the “negation tail” conditional (only re-emitting negations that L2 patterns actually re-hide) and improving migration output by deduplicating migrated baseline comments, with corresponding test updates to treat the raw canonical .gitignore as the steady state again.
Changes:
- Implement conditional negation tail generation via
git check-ignore, emitting only necessary negations (or none) instead of always appending a full tail. - Deduplicate migrated baseline comment lines in L2 when they exactly match non-bare-
#block comment lines. - Update bats tests to reflect the new fixed-point behavior (canonical
.gitignoreis byte-for-byte stable again).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/scripts/sync-gitignore-baseline/dry-run.bats | Adjusts the “already current” dry-run fixture to treat raw canonical as the steady state. |
| test/scripts/lib/gitignore-baseline.bats | Expands coverage for conditional tail behavior and migrated-comment dedup rules. |
| test/scripts/compliance-remediate/gitignore-baseline.bats | Updates remediation “already current” fixture to align with canonical fixed-point behavior. |
| scripts/lib/gitignore-baseline.sh | Adds conditional negation tail computation and comment dedup during L2 neutralization. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
…y: conditional negation tail + migrated-comment dedup
269c44a to
72af4d7
Compare
|
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 72af4d70a992a9114482f51501498c1f768c113b
Review mode: triage-approved (single reviewer)
Summary
Implements issue #817 in scripts/lib/gitignore-baseline.sh: (A) the re-allow negation tail is now conditional — composed block+neutralized-L2 is probed with git check-ignore in a throwaway repo and only negations whose paths are actually re-hidden are re-emitted; (B) L2 comment lines byte-identical to a block comment (except bare '#' separators) are deduped during migration. The two #815 fixtures are reverted to the raw-canonical steady state as the issue required, and four new bats tests cover the clean-L2 no-tail fixed point, comment dedup, bare-# survival, and canonical byte-for-byte idempotency. Failure direction is safe: omitting a negation only over-ignores (paths stay hidden), never exposes a secret pattern.
Linked issue analysis
Closes #817. Both parts (conditional negation tail, migrated-comment dedup) are substantively implemented, and the mandated side effect — restoring the dry-run.bats and compliance-remediate fixtures to feed the raw canonical — is handled. Acceptance criteria backed by new/updated bats tests; the Gitignore Baseline Tests and Compliance Audit Tests CI jobs pass.
Findings
- The single Copilot review thread (BSD/macOS mktemp portability, git check-ignore exit-code handling under set -euo pipefail) is RESOLVED: head commit uses 'mktemp -d -t gitignore-baseline.XXXXXX' and captures the exit code explicitly, treating 1 as the no-ignored happy path.
- Informational (non-blocking): on a hard check-ignore error (exit >1) the tail is suppressed rather than falling back to the full pre-#817 tail as the function comment implies for the git-unavailable case. The failure direction is still conservative (over-ignoring, never secret exposure), so this is acceptable; consider aligning behavior or comment in a follow-up.
- Secret scan: run_secret_scanning MCP tool not available in this environment; gitleaks CI check passed (no findings).
CI status
All checks green: Lint, ShellCheck, Agent Security Scan, Secret scan (gitleaks), CodeQL, Compliance Audit Tests, Gitignore Baseline Tests, Dependency audit (npm audit passed, others skipped/no ecosystem), SonarCloud quality gate passed (0 new issues, 0 hotspots), AgentShield, CodeRabbit status success.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



Closes #817
Implemented by dev-lead agent. Please review.