mirror of
https://github.com/stablyai/orca.git
synced 2026-10-25 16:03:53 +00:00
test(source-control): align dirty+unavailable intent expectation
Create PR preparation is allowed when review lookup is unavailable; only final create stays fail-closed. Update the local-blocker snapshot test to match.
This commit is contained in:
+3
-3
@@ -32,7 +32,7 @@ describe('resolveHostedReviewCreationProviderForTarget', () => {
|
||||
})
|
||||
|
||||
describe('buildLocalBlockerHostedReviewCreationEligibility', () => {
|
||||
it('reports dirty without offering create intent when the review lookup failed', () => {
|
||||
it('reports dirty with unavailable lookup while still allowing prepare-only Create PR intent', () => {
|
||||
const eligibility = buildLocalBlockerHostedReviewCreationEligibility('github', {
|
||||
...featureBranch,
|
||||
hasUncommittedChanges: true,
|
||||
@@ -45,7 +45,7 @@ describe('buildLocalBlockerHostedReviewCreationEligibility', () => {
|
||||
nextAction: 'commit',
|
||||
reviewLookupOutcome: 'unavailable'
|
||||
})
|
||||
// Why: branch guidance can remain specific, but a failed lookup cannot authorize creation.
|
||||
// Why: local prep (stage/commit/push) is safe without lookup authority; final create stays fail-closed in main.
|
||||
expect(
|
||||
resolveCreatePrIntentEligibility({
|
||||
stagedCount: 1,
|
||||
@@ -56,7 +56,7 @@ describe('buildLocalBlockerHostedReviewCreationEligibility', () => {
|
||||
hostedReviewCreation: eligibility,
|
||||
branchCommitsAhead: 0
|
||||
})
|
||||
).toEqual({ eligible: false, kind: null })
|
||||
).toEqual({ eligible: true, kind: 'dirty' })
|
||||
})
|
||||
|
||||
it('prefers dirty over no_upstream when both apply, matching main-process ordering', () => {
|
||||
|
||||
Reference in New Issue
Block a user