Skip to content

test(pril): make C4 tracked-file assertion bite on its own (review sa…#97

Merged
DYAI2025 merged 1 commit into
mainfrom
agileteam-improved
Jul 8, 2026
Merged

test(pril): make C4 tracked-file assertion bite on its own (review sa…#97
DYAI2025 merged 1 commit into
mainfrom
agileteam-improved

Conversation

@DYAI2025

@DYAI2025 DYAI2025 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

…lvage)

Independent-review finding (salvaged from a session-limit-killed reviewer, then verified by mutation probe): the tracked-but-ignore-matching assertion ran against a changed-list that also carried an independently-blocking file, so it would have passed even if tracked files were wrongly exempted. Now a single-file tracked-only list decides purely on the tracked/untracked split, plus a roundtrip assertion (untracked again -> exempt again).

Mutation probes: disabling only the tracked-split still blocks (git check-ignore itself excludes tracked files — independent second defense); unconditional exemption makes BOTH assertions fail. Reverted after probe.

Summary by Sourcery

Tests:

  • Adjust the C4 tracked-file ignore test to use a single tracked-only changed-file list and add a roundtrip assertion verifying exemption after returning to untracked.

…lvage)

Independent-review finding (salvaged from a session-limit-killed reviewer,
then verified by mutation probe): the tracked-but-ignore-matching assertion
ran against a changed-list that also carried an independently-blocking file,
so it would have passed even if tracked files were wrongly exempted. Now a
single-file tracked-only list decides purely on the tracked/untracked split,
plus a roundtrip assertion (untracked again -> exempt again).

Mutation probes: disabling only the tracked-split still blocks (git
check-ignore itself excludes tracked files — independent second defense);
unconditional exemption makes BOTH assertions fail. Reverted after probe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR strengthens the C4 runtime integrity test by ensuring the tracked-but-ignore-matching assertion is exercised in isolation on a single-file changed list and adds a roundtrip check that the same path becomes exempt again when untracked, directly validating the tracked/untracked split behavior.

File-Level Changes

Change Details Files
Make the C4 tracked-but-ignore-matching assertion operate on a single tracked file and add a roundtrip assertion to verify behavior when the file is untracked again.
  • Create a dedicated changed-files list containing only the tracked ignore-matching path to ensure the assertion fails if tracked files are ever wrongly exempted.
  • Update the tracked-but-ignore-matching assertion to use the new single-file changed list instead of a list that also includes another independently-blocking file.
  • Add a new assertion that, after removing the file from the index, the same single-file changed list is exempt again, proving that the decision is based on tracked vs untracked status rather than the path itself.
config/claude/tests/test_runtime_integrity_layer.sh

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@DYAI2025
DYAI2025 merged commit 4dd2be8 into main Jul 8, 2026
9 checks passed
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