@effect-agent/pr-review 0.1.0-beta.25 → 0.1.0-beta.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -462,14 +462,14 @@ declare const adjudicationIdentity: (adjudication: StoredAdjudication) => string
462
462
  declare const MAX_STORED_UNREVIEWED_PATHS = 100;
463
463
  /** Failed-pass records stored beside the leftover paths; one per unit stage. */
464
464
  declare const MAX_STORED_UNREVIEWED_PASSES = 24;
465
- /** Stages a leftover path may need retried without a second general discovery. */
465
+ /** Stages a leftover path may need retried on the next incremental run. */
466
466
  declare const UnreviewedStage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
467
467
  type UnreviewedStage = typeof UnreviewedStage.Type;
468
468
  declare const StoredUnreviewedPass_base: Schema.Class<StoredUnreviewedPass, Schema.Struct<{
469
469
  readonly stage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
470
470
  readonly paths: Schema.$Array<Schema.NonEmptyString>;
471
471
  }>, {}>;
472
- /** One failed fan-out pass whose paths should be retried, not rediscovered. */
472
+ /** One failed fan-out pass whose stage remains attached to its exact paths. */
473
473
  declare class StoredUnreviewedPass extends StoredUnreviewedPass_base {}
474
474
  declare const ReviewState_base: Schema.Class<ReviewState, Schema.Struct<{
475
475
  readonly version: Schema.Literal<1>;
@@ -551,6 +551,20 @@ declare const ReviewHeadComparison_base: Schema.Class<ReviewHeadComparison, Sche
551
551
  }>, {}>;
552
552
  /** The bounded result of GitHub's previous-head...current-head comparison. */
553
553
  declare class ReviewHeadComparison extends ReviewHeadComparison_base {}
554
+ /**
555
+ * Current and previous paths for 300 PR files plus bounded stored continuity
556
+ * paths. The live adapter refuses a larger snapshot-comparison request.
557
+ */
558
+ declare const MAX_TREE_COMPARISON_PATHS = 750;
559
+ declare const ReviewTreeComparison_base: Schema.Class<ReviewTreeComparison, Schema.Struct<{
560
+ readonly baseSha: Schema.NonEmptyString;
561
+ readonly headSha: Schema.NonEmptyString;
562
+ readonly changedPaths: Schema.$Array<Schema.NonEmptyString>;
563
+ /** True when GitHub returned either recursive tree incompletely. */
564
+ readonly truncated: Schema.Boolean;
565
+ }>, {}>;
566
+ /** A direct comparison of two complete commit tree snapshots. */
567
+ declare class ReviewTreeComparison extends ReviewTreeComparison_base {}
554
568
  /** Internal review selection applied as a decorator over the full PR source. */
555
569
  interface ReviewSelection {
556
570
  readonly mode: ReviewScopeMode;
@@ -559,9 +573,12 @@ interface ReviewSelection {
559
573
  /** Paths whose changes invalidate prior findings, including paths reverted out of the PR. */
560
574
  readonly affectedPaths: ReadonlyArray<string>;
561
575
  /**
562
- * Leftover paths whose contents did not change. Fan-out retries only the
563
- * recorded failed stages on these paths and keeps their stored findings.
576
+ * Failed stages attached to the unchanged paths that own them. Verification
577
+ * retries reopen discovery for only their paths because candidates are not
578
+ * persisted in review state.
564
579
  */
580
+ readonly retryPasses?: ReadonlyArray<StoredUnreviewedPass>;
581
+ /** Flattened summaries retained for diagnostics and compatibility. */
565
582
  readonly retryPaths: ReadonlyArray<string>;
566
583
  readonly retryStages: ReadonlyArray<UnreviewedStage>;
567
584
  readonly totalFiles: number;
@@ -596,11 +613,12 @@ declare const selectReviewRange: (input: {
596
613
  readonly comparison: ReviewHeadComparison | undefined;
597
614
  readonly baseComparison?: ReviewHeadComparison | undefined;
598
615
  /**
599
- * Two-dot tree comparison used when the reviewed head is not a git ancestor
600
- * (rebase, amend, force-push). Intersected with the current PR path set so
601
- * main-drift outside the pull request never re-enters scope.
616
+ * Direct commit-tree snapshot comparison used when the reviewed head is not
617
+ * a git ancestor. Selection hydrates these paths from the current PR files.
602
618
  */
603
- readonly contentComparison?: ReviewHeadComparison | undefined;
619
+ readonly contentComparison?: ReviewTreeComparison | undefined;
620
+ /** Why the direct snapshot comparison could not produce complete evidence. */
621
+ readonly contentComparisonFailure?: string | undefined;
604
622
  readonly lookupFailure?: string | undefined;
605
623
  }) => ReviewSelection;
606
624
  declare const ReviewExecutionContext_base: Context.ServiceClass<ReviewExecutionContext, "@effect-agent/pr-review/ReviewExecutionContext", ReviewSelection>;
@@ -1280,11 +1298,11 @@ declare const PriorReviews_base: Context.ServiceClass<PriorReviews, "@effect-age
1280
1298
  /** Compare a previously reviewed head to the live current head. */
1281
1299
  readonly compareHeads: (baseSha: string, headSha: string) => Effect.Effect<ReviewHeadComparison, PriorReviewLookupFailure>;
1282
1300
  /**
1283
- * Two-dot tree comparison (`base..head`). Used when the reviewed head is
1284
- * not a git ancestor so a rebase or amend can still name the paths whose
1285
- * blob contents actually changed.
1301
+ * Compare complete commit tree snapshots for a bounded path allowlist.
1302
+ * Used when the reviewed head is not a git ancestor after a rebase,
1303
+ * amend, or force-push.
1286
1304
  */
1287
- readonly compareTrees: (baseSha: string, headSha: string) => Effect.Effect<ReviewHeadComparison, PriorReviewLookupFailure>;
1305
+ readonly compareTrees: (baseSha: string, headSha: string, paths: ReadonlyArray<string>) => Effect.Effect<ReviewTreeComparison, PriorReviewLookupFailure>;
1288
1306
  }>;
1289
1307
  /**
1290
1308
  * Read-only view of this package's previously posted reviews on the target
@@ -1465,12 +1483,19 @@ interface FanOutPipelineInput {
1465
1483
  /** Shared run budget observed by every child pass. */
1466
1484
  readonly budget?: RunBudgetHook<BudgetExceeded | BudgetAdapterError> | undefined;
1467
1485
  /**
1468
- * Unchanged leftover paths from a prior failed pass. Those units retry only
1469
- * the recorded stages no second general discovery on files nobody touched.
1486
+ * Unchanged leftovers from prior failed passes. Every stage stays attached
1487
+ * to its own paths; failed verification reopens both discovery perspectives
1488
+ * for only those paths because candidate payloads are not persisted.
1470
1489
  */
1471
1490
  readonly retry?: {
1472
- readonly paths: ReadonlyArray<string>;
1473
- readonly stages: ReadonlyArray<FailedReviewPass["stage"]>;
1491
+ readonly passes?: ReadonlyArray<{
1492
+ readonly stage: FailedReviewPass["stage"];
1493
+ readonly paths: ReadonlyArray<string>;
1494
+ }>;
1495
+ /** @deprecated Pass path-bound `passes`; this flat form cannot preserve ownership. */
1496
+ readonly paths?: ReadonlyArray<string>;
1497
+ /** @deprecated Pass path-bound `passes`; this flat form cannot preserve ownership. */
1498
+ readonly stages?: ReadonlyArray<FailedReviewPass["stage"]>;
1474
1499
  } | undefined;
1475
1500
  /**
1476
1501
  * Adjudicated identities and prior-round findings injected as discovery
@@ -1491,11 +1516,11 @@ declare const runFanOutReview: <Provider, ModelProvides, ModelRequires>(binding:
1491
1516
  plan: ReviewUnitPlan;
1492
1517
  unreviewedPaths: string[];
1493
1518
  unreviewedPasses: {
1494
- stage: "discovery" | "specialist" | "verification";
1495
- paths: readonly string[];
1519
+ readonly stage: FailedReviewPass["stage"];
1520
+ readonly paths: ReadonlyArray<string>;
1496
1521
  }[];
1497
1522
  turns: number;
1498
1523
  }, never, import("effect-agent").IdGenerator | Exclude<Exclude<ModelRequires, import("effect-agent").EngineProvidedToolServices>, import("effect/Scope").Scope>>;
1499
1524
  //#endregion
1500
- export { ReviewRetirementInput as $, FileSlice as $n, buildPriorReviewContext as $t, makeFileReviewerInstructions as A, UnreviewedStage as An, readFileHandler as Ar, ReviewEvidenceShardId as At, fingerprintUnchanged as B, selectReviewRange as Bn, ChangedFile as Br, rankAndDedupeConcerns as Bt, ReviewWorkPerspective as C, ReviewStateAuthenticator as Cn, clampMaxFindings as Cr, MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as Ct, defaultFileReviewerPolicy as D, StoredReviewConcern as Dn, listChangedFilesHandler as Dr, ReviewDiscoveryPass as Dt, confirmedFindingForPublication as E, StoredAdjudication as En, fileReviewEvidenceChunks as Er, MAX_UNIT_FILES as Et, GitHubReviewTarget as F, fromStoredConcern as Fn, PullRequestMetadata as Fr, ReviewUnitPlan as Ft, gitHubReviewRetirementHostLayer as G, validateReviewState as Gn, annotatePatch as Gr, AdjudicableThread as Gt, gitHubPullRequestSourceLayer as H, toStoredConcern as Hn, ChangedPath as Hr, reviewConcernKey as Ht, PriorReviewLookupFailure as I, fromStoredFinding as In, PullRequestSource as Ir, UNIT_EVIDENCE_CHAR_BUDGET as It, RetirableReview as J, ChangedFilesView as Jn, isReviewableFile as Jr, MAX_THREAD_ADJUDICATION_COMMANDS as Jt, parseGitHubSubmittedAt as K, webCryptoReviewStateAuthenticatorLayer as Kn, commentableLines as Kr, AdjudicationComment as Kt, PriorReviews as L, fullReviewExecutionContextLayer as Ln, PullRequestSourceFailure as Lr, classifyReviewRisks as Lt, runFanOutReview as M, buildProfileMission as Mn, reviewInstructions as Mr, ReviewRiskCategory as Mt, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as N, concernIdentity as Nn, MAX_CHANGED_FILES as Nr, ReviewUnit as Nt, fileReviewerInstructions as O, StoredReviewFinding as On, makeReviewInstructions as Or, ReviewDiscoveryPerspective as Ot, GitHubApiFailure as P, findingIdentity as Pn, MAX_FILE_CHARS as Pr, ReviewUnitId as Pt, ReviewRetirementHost as Q, FileReviewEvidenceChunk as Qn, ReviewAdjudicationHost as Qt, PublishedReview as R, fullReviewSelection as Rn, ReviewInputViolation as Rr, findingAnchorInUnitEvidence as Rt, ReviewPassMisbehaved as S, ReviewStateAuthenticationFailure as Sn, WalkthroughEntry as Sr, MAX_MERGED_FINDINGS as St, assessmentSettlesSuggestionExactly as T, ReviewStateMarkerTooLarge as Tn, fileDiffView as Tr, MAX_UNIT_EVIDENCE_SHARDS as Tt, gitHubReviewAdjudicationHostLayer as U, toStoredFinding as Un, MAX_REVIEW_CONTENT_CHARS as Ur, anchorViolation as Ut, gitHubPriorReviewsLayer as V, selectedPullRequestSourceLayer as Vn, ChangedFileStatus as Vr, rankAndDedupeFindings as Vt, gitHubReviewPublisherLayer as W, unavailableReviewStateAuthenticatorLayer as Wn, PatchLine as Wr, AUTHORIZED_ADJUDICATION_ASSOCIATIONS as Wt, ReviewRetirementDecision as X, FileDiffQuery as Xn, renderReviewContent as Xr, PriorReviewContext as Xt, RetirableReviewComment as Y, CodeReview as Yn, parsePatch as Yr, ParsedAdjudicationCommand as Yt, ReviewRetirementFailure as Z, FileDiffView as Zn, ReviewAdjudicationFailure as Zt, MAX_REVIEW_CHILDREN as _, ReviewHeadComparison as _n, ReviewInstructionOptions as _r, assessFlatReview as _t, FanOutPipelineInput as a, parseIssueAdjudication as an, MAX_CONCERNS as ar, ReviewCommentDraft as at, ReviewCandidate as b, ReviewSelection as bn, ReviewToolkitLayer as br, flatAssurance as bt, FileReviewEvidence as c, renderPriorFindingContextLine as cn, MAX_WALKTHROUGH_ENTRIES as cr, estimateReviewEffort as ct, FileReviewer as d, GitCommitSha as dn, REVIEW_TOOL_RESULT_MAX_BYTES as dr, renderAgentPrompt as dt, collectReviewAdjudications as en, FileSliceQuery as er, ReviewRetirementReport as et, FileReviewerBinding as f, MAX_REVIEW_STATE_MARKER_CHARS as fn, ReadFile as fr, CarriedScope as ft, MAX_FILE_REVIEW_TOOL_CALLS as g, ReviewExecutionContext as gn, ReviewGuidance as gr, ReviewInputCoverage as gt, MAX_CHILD_FINDINGS as h, MAX_STORED_UNREVIEWED_PATHS as hn, ReviewFinding as hr, ReviewAssurance as ht, FanOutInstructionOptions as i, noReviewAdjudicationHostLayer as in, ListChangedFilesQuery as ir, AGENT_PROMPT_PREAMBLE as it, reviewCandidateSubjectKey as j, adjudicationIdentity as jn, resolveGuidance as jr, ReviewPassId as jt, makeFileReviewerDefinition as k, StoredUnreviewedPass as kn, readFileDiffHandler as kr, ReviewEvidenceShard as kt, FileReviewReport as l, threadFindingTarget as ln, MAX_WALKTHROUGH_SUMMARY_CHARS as lr, planPublication as lt, MAX_CHILD_CONCERNS as m, MAX_STORED_UNREVIEWED_PASSES as mn, ReviewConcern as mr, FlatReviewAssessment as mt, ConcernCandidate as n, mergeAdjudications as nn, FindingSeverity as nr, hasReviewMetadataMarker as nt, FanOutPipelineOutcome as o, parseThreadAdjudication as on, MAX_FINDINGS as or, ReviewEvent as ot, FindingCandidate as p, MAX_STORED_ADJUDICATIONS as pn, ReadFileDiff as pr, FailedReviewPass as pt, INLINE_FINDING_TITLE_PATTERN as q, ChangedFileSummary as qn, hasReviewableContent as qr, DerivedAdjudications as qt, DiscoveredConcern as r, noReviewAdjudicationHost as rn, ListChangedFiles as rr, retireStaleReviews as rt, FileReviewBrief as s, renderAdjudicationContextLine as sn, MAX_PATCH_CHARS as sr, ReviewPublicationPlan as st, CandidateAssessment as t, deriveAdjudications as tn, FindingCategory as tr, decideReviewRetirement as tt, FileReviewToolkit as u, AdjudicationDisposition as un, PullRequestReviewer as ur, planWalkthrough as ut, MAX_UNIT_CANDIDATES as v, ReviewMode as vn, ReviewMission as vr, boundedListReason as vt, ReviewWorkPhase as w, ReviewStateMarker as wn, defaultReviewPolicy as wr, MAX_REVIEW_UNITS as wt, ReviewCandidateId as x, ReviewState as xn, ReviewVerdict as xr, splitCarriedScope as xt, REVIEW_UNIT_CONCURRENCY as y, ReviewScopeMode as yn, ReviewToolkit as yr, fanOutInputCoverage as yt, ReviewPublisher as z, isLineageAncestor as zn, normalizeRepoRelativePath as zr, planReviewUnits as zt };
1501
- //# sourceMappingURL=fan-out-CMEsbFLk.d.mts.map
1525
+ export { ReviewRetirementInput as $, FileDiffView as $n, buildPriorReviewContext as $t, makeFileReviewerInstructions as A, StoredReviewFinding as An, makeReviewInstructions as Ar, ReviewEvidenceShardId as At, fingerprintUnchanged as B, fullReviewSelection as Bn, ReviewInputViolation as Br, rankAndDedupeConcerns as Bt, ReviewWorkPerspective as C, ReviewStateAuthenticationFailure as Cn, ReviewVerdict as Cr, MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as Ct, defaultFileReviewerPolicy as D, ReviewTreeComparison as Dn, fileDiffView as Dr, ReviewDiscoveryPass as Dt, confirmedFindingForPublication as E, ReviewStateMarkerTooLarge as En, defaultReviewPolicy as Er, MAX_UNIT_FILES as Et, GitHubReviewTarget as F, concernIdentity as Fn, MAX_CHANGED_FILES as Fr, ReviewUnitPlan as Ft, gitHubReviewRetirementHostLayer as G, toStoredFinding as Gn, MAX_REVIEW_CONTENT_CHARS as Gr, AdjudicableThread as Gt, gitHubPullRequestSourceLayer as H, selectReviewRange as Hn, ChangedFile as Hr, reviewConcernKey as Ht, PriorReviewLookupFailure as I, findingIdentity as In, MAX_FILE_CHARS as Ir, UNIT_EVIDENCE_CHAR_BUDGET as It, RetirableReview as J, webCryptoReviewStateAuthenticatorLayer as Jn, commentableLines as Jr, MAX_THREAD_ADJUDICATION_COMMANDS as Jt, parseGitHubSubmittedAt as K, unavailableReviewStateAuthenticatorLayer as Kn, PatchLine as Kr, AdjudicationComment as Kt, PriorReviews as L, fromStoredConcern as Ln, PullRequestMetadata as Lr, classifyReviewRisks as Lt, runFanOutReview as M, UnreviewedStage as Mn, readFileHandler as Mr, ReviewRiskCategory as Mt, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as N, adjudicationIdentity as Nn, resolveGuidance as Nr, ReviewUnit as Nt, fileReviewerInstructions as O, StoredAdjudication as On, fileReviewEvidenceChunks as Or, ReviewDiscoveryPerspective as Ot, GitHubApiFailure as P, buildProfileMission as Pn, reviewInstructions as Pr, ReviewUnitId as Pt, ReviewRetirementHost as Q, FileDiffQuery as Qn, renderReviewContent as Qr, ReviewAdjudicationHost as Qt, PublishedReview as R, fromStoredFinding as Rn, PullRequestSource as Rr, findingAnchorInUnitEvidence as Rt, ReviewPassMisbehaved as S, ReviewState as Sn, ReviewToolkitLayer as Sr, MAX_MERGED_FINDINGS as St, assessmentSettlesSuggestionExactly as T, ReviewStateMarker as Tn, clampMaxFindings as Tr, MAX_UNIT_EVIDENCE_SHARDS as Tt, gitHubReviewAdjudicationHostLayer as U, selectedPullRequestSourceLayer as Un, ChangedFileStatus as Ur, anchorViolation as Ut, gitHubPriorReviewsLayer as V, isLineageAncestor as Vn, normalizeRepoRelativePath as Vr, rankAndDedupeFindings as Vt, gitHubReviewPublisherLayer as W, toStoredConcern as Wn, ChangedPath as Wr, AUTHORIZED_ADJUDICATION_ASSOCIATIONS as Wt, ReviewRetirementDecision as X, ChangedFilesView as Xn, isReviewableFile as Xr, PriorReviewContext as Xt, RetirableReviewComment as Y, ChangedFileSummary as Yn, hasReviewableContent as Yr, ParsedAdjudicationCommand as Yt, ReviewRetirementFailure as Z, CodeReview as Zn, parsePatch as Zr, ReviewAdjudicationFailure as Zt, MAX_REVIEW_CHILDREN as _, ReviewExecutionContext as _n, ReviewFinding as _r, assessFlatReview as _t, FanOutPipelineInput as a, parseIssueAdjudication as an, ListChangedFiles as ar, ReviewCommentDraft as at, ReviewCandidate as b, ReviewScopeMode as bn, ReviewMission as br, flatAssurance as bt, FileReviewEvidence as c, renderPriorFindingContextLine as cn, MAX_FINDINGS as cr, estimateReviewEffort as ct, FileReviewer as d, GitCommitSha as dn, MAX_WALKTHROUGH_SUMMARY_CHARS as dr, renderAgentPrompt as dt, collectReviewAdjudications as en, FileReviewEvidenceChunk as er, ReviewRetirementReport as et, FileReviewerBinding as f, MAX_REVIEW_STATE_MARKER_CHARS as fn, PullRequestReviewer as fr, CarriedScope as ft, MAX_FILE_REVIEW_TOOL_CALLS as g, MAX_TREE_COMPARISON_PATHS as gn, ReviewConcern as gr, ReviewInputCoverage as gt, MAX_CHILD_FINDINGS as h, MAX_STORED_UNREVIEWED_PATHS as hn, ReadFileDiff as hr, ReviewAssurance as ht, FanOutInstructionOptions as i, noReviewAdjudicationHostLayer as in, FindingSeverity as ir, AGENT_PROMPT_PREAMBLE as it, reviewCandidateSubjectKey as j, StoredUnreviewedPass as jn, readFileDiffHandler as jr, ReviewPassId as jt, makeFileReviewerDefinition as k, StoredReviewConcern as kn, listChangedFilesHandler as kr, ReviewEvidenceShard as kt, FileReviewReport as l, threadFindingTarget as ln, MAX_PATCH_CHARS as lr, planPublication as lt, MAX_CHILD_CONCERNS as m, MAX_STORED_UNREVIEWED_PASSES as mn, ReadFile as mr, FlatReviewAssessment as mt, ConcernCandidate as n, mergeAdjudications as nn, FileSliceQuery as nr, hasReviewMetadataMarker as nt, FanOutPipelineOutcome as o, parseThreadAdjudication as on, ListChangedFilesQuery as or, ReviewEvent as ot, FindingCandidate as p, MAX_STORED_ADJUDICATIONS as pn, REVIEW_TOOL_RESULT_MAX_BYTES as pr, FailedReviewPass as pt, INLINE_FINDING_TITLE_PATTERN as q, validateReviewState as qn, annotatePatch as qr, DerivedAdjudications as qt, DiscoveredConcern as r, noReviewAdjudicationHost as rn, FindingCategory as rr, retireStaleReviews as rt, FileReviewBrief as s, renderAdjudicationContextLine as sn, MAX_CONCERNS as sr, ReviewPublicationPlan as st, CandidateAssessment as t, deriveAdjudications as tn, FileSlice as tr, decideReviewRetirement as tt, FileReviewToolkit as u, AdjudicationDisposition as un, MAX_WALKTHROUGH_ENTRIES as ur, planWalkthrough as ut, MAX_UNIT_CANDIDATES as v, ReviewHeadComparison as vn, ReviewGuidance as vr, boundedListReason as vt, ReviewWorkPhase as w, ReviewStateAuthenticator as wn, WalkthroughEntry as wr, MAX_REVIEW_UNITS as wt, ReviewCandidateId as x, ReviewSelection as xn, ReviewToolkit as xr, splitCarriedScope as xt, REVIEW_UNIT_CONCURRENCY as y, ReviewMode as yn, ReviewInstructionOptions as yr, fanOutInputCoverage as yt, ReviewPublisher as z, fullReviewExecutionContextLayer as zn, PullRequestSourceFailure as zr, planReviewUnits as zt };
1526
+ //# sourceMappingURL=fan-out-C3yG1cx3.d.mts.map