← Back to Pull requests

πŸ› fix(hooks): the finish check projects only the files in scope #168

Closed
unknown closed this pull request without merging on Oct 22, 2026 09:59 UTC
View on GitHub
unknown unknown commented on Oct 22, 2026 08:15 UTC
Author

User description


Why

On platform-images S-0002, T-0003's attempts 1 and 2 were convicted by scope. The implement finish check correctly owed only the drifted AGENTS.md files inside the contract's scope. Its instruction, though, was a bare torve spec project, which rewrites every drifted projection in the tree. The agent ran it and committed 19 projections, and the ones outside the scope convicted the attempt (commit dd1b579 on torve/S-0002).

What

  • torve spec project gains --only <file>, repeatable. Files not named are neither written nor removed, and --check reports drift only for the named files.

  • finish_check.drift_owed names the command file by file: torve spec project --only <owed>….

  • The engine does not regenerate projections itself, so the instruction stays and is narrowed rather than dropped.
  • Tests

  • tests/test_colocation.py: --only writes the named file and nothing else, and removal honours it too.

  • tests/test_equipment.py: the owed-drift block names torve spec project --only pages/AGENTS.md.

  • Full suite: 2851 tests, 0 failed, 18 skipped. ruff check, ruff format --check and mypy are clean on the touched files.
  • No CHANGELOG entry here; it goes into the 0.6.2 release cut.

    πŸ€– Generated with Claude Code

    https://claude.ai/code/session_01X5XatXv3dQLan6TyQoHFyF

    <!-- This is an auto-generated description by cubic. -->
    ---

    Summary by cubic


    Fixes the implement finish check so it only projects the drifted files inside the contract's scope, preventing out-of-scope projections from convicting the attempt.

  • torve spec project gains --only <file>, repeatable; files not named are neither written, removed, opened, nor reported as drift in --check mode.

  • The finish check now names each owed file explicitly (torve spec project --only <file> instead of a bare torve spec project).
  • <sup>Written for commit b0ccd464f480e2e47b802ea54ebcf30ae2b19807. Summary will update on new commits.</sup>

    <a href="https://cubic.dev/pr/morzecrew/torve/pull/168?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/morzecrew/torve/168?returnTo=https%3A%2F%2Fgithub.com%2Fmorzecrew%2Ftorve%2Fpull%2F168&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>

    <!-- End of auto-generated description by cubic. -->

    ___

    CodeAnt-AI Description


    Keep projection fixes within the attempt’s scope

    What Changed


  • Projection commands can now write, check, or remove only the named files, leaving other projected files untouched.

  • Finish checks now tell attempts to update only drifted files within their scope.
  • Impact


    βœ… Fewer out-of-scope projection changes
    βœ… In-scope drift fixes avoid scope violations
    <details><summary><strong>πŸ’‘ Usage Guide</strong></summary>

    Checking Your Pull Request


    Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

    Talking to CodeAnt AI


    Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
    <pre>
    <code>@codeant-ai ask: Your question here</code>
    </pre>
    This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

    Example


    <pre>
    <code>@codeant-ai ask: Can you suggest a safer alternative to storing this secret?</code>
    </pre>

    Preserve Org Learnings with CodeAnt


    You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
    <pre>
    <code>@codeant-ai: Your feedback here</code>
    </pre>
    This helps CodeAnt AI learn and adapt to your team's coding style and standards.

    Example


    <pre>
    <code>@codeant-ai: Do not flag unused imports.</code>
    </pre>

    Retrigger review


    Ask CodeAnt AI to review the PR again, by typing:
    <pre>
    <code>@codeant-ai: review</code>
    </pre>

    Check Your Repository Health


    To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

    </details>

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: Misery7100 Review duration: 104m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) Γ— (1 βˆ’ Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 Β· Change Risk (XGBoost)
    Score: 0.52 Β· 650 lines diff across 8 files
    0.52
    Model 2 Β· Review Depth (DistilBERT)
    Depth Score: 0.17 Β· 1 substantive comment(s)
    0.17
    Model 3 Β· Review Timing & Attention
    Session adequacy: 100% Β· Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 Β· Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 Β· Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #168"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk Β· Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) Β· Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence Β· Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% Β· Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk Β· Core Equation
    Residual = Change Γ— (1 βˆ’ Confidence)
    Unmitigated risk surviving review. β‰₯ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% Β· Safe to merge
    20.5%