Skip to content

fix(review): materialize the provider intended-untracked selection exactly once before native START - #1271

Merged
Alan-TheGentleman merged 1 commit into
mainfrom
fix/2700-pre-start-candidate-view
Sep 20, 2026
Merged

Alan-TheGentleman merged 1 commit into
mainfrom
fix/2700-pre-start-candidate-view

Conversation

@Alan-TheGentleman

@Alan-TheGentleman Alan-TheGentleman commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes Gentleman-Programming/gentle-ai#2700

PR Type

  • Bug fix
  • New feature
  • Documentation only
  • Code refactoring
  • Maintenance/tooling
  • Breaking change

Summary

  • Ordinary START now forwards the provider's exact intendedUntracked projection to the candidate view on the first and only materialization, including an explicit empty selection.
  • Removes the legacy include-all first pass and its conditional [] retry, which could reject a stable provider target with candidate-target-projection-drift before native START (reported with full occurrences in bug(review): pre-START candidate view drifts before native admission gentle-ai#2700).
  • The fail-closed assertNativeStartCandidateBinding safety boundary is unchanged.

Changes

File Change
extensions/gentle-ai.ts Pass target.projection.intendedUntracked verbatim to CandidateViewRegistry.createOrReuse; drop the implicit-selection retry.
tests/review-controller-native-routing.test.ts Regression: an unrelated untracked file with an excluded selection creates exactly one candidate view with [] and reaches native START exactly once.

Test Plan

  • node --experimental-strip-types --test tests/review-controller-native-routing.test.ts — 72 passed, 0 failed (writer), independently re-verified 72 passed, 0 failed; named regression spot check 1 passed.
  • pnpm run typecheck — no regressions against the recorded baseline.
  • Native high-risk review (risk, resilience, readability, reliability lenses) completed approved with no admitted findings for this candidate.

Contributor Checklist

  • Linked an approved issue (bug(review): pre-START candidate view drifts before native admission gentle-ai#2700, status:approved)
  • Added exactly one type:* label
  • Ran shellcheck on modified scripts (N/A: no shell scripts modified)
  • Skills tested in at least one agent (N/A: no skill definitions changed)
  • Docs updated if behavior changed (N/A: behavior fix with regression test)
  • Conventional commit format
  • No Co-Authored-By trailers

Summary by CodeRabbit

  • Bug Fixes

    • Improved candidate view handling during ordinary start operations.
    • Ensured excluded untracked items are consistently accounted for before starting, including when none are selected.
  • Tests

    • Added coverage confirming candidate preparation occurs exactly once before the native start operation.
    • Verified successful start results and operation behavior.

…actly once before native START

Pi omitted intendedUntracked when the provider selected none, so the
candidate view was first materialized with the legacy include-all
behavior and only conditionally retried with [] when its candidate tree
differed. A stable provider STATUS could then be rejected with
candidate-target-projection-drift before native START (Gentleman-
Programming/gentle-ai#2700). The provider projection is now forwarded
verbatim on the first and only candidate creation, including the empty
array, and the fail-closed binding assertion is unchanged.

Regression: an unrelated untracked file with an excluded selection
creates exactly one candidate view with [] and reaches native START
exactly once.
@Alan-TheGentleman Alan-TheGentleman added the type:bug Bug fix label Sep 20, 2026
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: d39838e3-d3e9-4a5c-a940-609eacadc000

📥 Commits

Reviewing files that changed from the base of the PR and between df1159e and 9d717b5.

📒 Files selected for processing (2)
  • extensions/gentle-ai.ts
  • tests/review-controller-native-routing.test.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change always passes intendedUntracked to candidate view creation, including an empty array. It removes the prior mismatch recovery path and adds coverage for ordinary START routing before native admission.

Changes

Candidate admission

Layer / File(s) Summary
Candidate view routing and validation
extensions/gentle-ai.ts, tests/review-controller-native-routing.test.ts
Candidate creation now receives intendedUntracked unconditionally. The test verifies one candidate creation with intendedUntracked: [] before one successful native start.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: decode2

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main fix: forwarding the provider's intended-untracked selection exactly once before native START.
Linked Issues check ✅ Passed The PR addresses #2700 by forwarding the provider's exact intendedUntracked projection to candidate-view creation, including [], in one materialization. It removes the legacy include-all pass and …
Out of Scope Changes check ✅ Passed The reported changes are limited to the ordinary START candidate-view flow in extensions/gentle-ai.ts and its regression test in tests/review-controller-native-routing.test.ts. The implementation …
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

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

@Alan-TheGentleman
Alan-TheGentleman merged commit b3d51f9 into main Sep 20, 2026
4 checks passed
@Alan-TheGentleman
Alan-TheGentleman deleted the fix/2700-pre-start-candidate-view branch September 20, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(review): pre-START candidate view drifts before native admission

1 participant