@effect-agent/pr-review 0.1.0-beta.24 → 0.1.0-beta.26

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.
@@ -281,6 +281,18 @@ declare const ReviewMission_base: Schema.Class<ReviewMission, Schema.Struct<{
281
281
  readonly baseRef: Schema.NonEmptyString;
282
282
  readonly headRef: Schema.NonEmptyString;
283
283
  readonly changedFileCount: Schema.Int;
284
+ /**
285
+ * Maintainer-adjudicated identities rendered as bounded context lines; the
286
+ * reviewer must not re-raise them without materially new evidence. Absent
287
+ * from fingerprint missions so an adjudication never invalidates the
288
+ * skip-unchanged authority.
289
+ */
290
+ readonly adjudicatedContext: Schema.optionalKey<Schema.$Array<Schema.String>>;
291
+ /**
292
+ * Prior-round findings on re-reviewed scope, rendered as bounded context
293
+ * lines; each must be confirmed, declared fixed, or explicitly withdrawn.
294
+ */
295
+ readonly priorFindingContext: Schema.optionalKey<Schema.$Array<Schema.String>>;
284
296
  }>, {}>;
285
297
  declare class ReviewMission extends ReviewMission_base {}
286
298
  declare const FindingSeverity: Schema.Literals<readonly ["blocking", "important", "nit"]>;
@@ -308,6 +320,7 @@ declare class ReviewFinding extends ReviewFinding_base {}
308
320
  declare const ReviewVerdict: Schema.Literals<readonly ["approve", "comment", "request-changes"]>;
309
321
  type ReviewVerdict = typeof ReviewVerdict.Type;
310
322
  declare const ReviewConcern_base: Schema.Class<ReviewConcern, Schema.Struct<{
323
+ readonly evidencePaths: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
311
324
  readonly severity: Schema.Literals<readonly ["blocking", "important", "nit"]>;
312
325
  readonly title: Schema.NonEmptyString;
313
326
  readonly body: Schema.NonEmptyString;
@@ -316,8 +329,11 @@ declare const ReviewConcern_base: Schema.Class<ReviewConcern, Schema.Struct<{
316
329
  * A concern with no diff line to anchor to: a missing deletion or cleanup,
317
330
  * rollout or migration sequencing, a coverage gap the diff implies but does
318
331
  * not add, or a scope question only the author can answer. Rendered as a
319
- * review-body section never as an inline comment, so it needs no anchor and
320
- * is never demoted.
332
+ * review-body section instead of an inline comment. `evidencePaths` binds the
333
+ * concern to changed files so a later incremental review can invalidate and
334
+ * recheck it when any supporting path changes. It remains optional only for
335
+ * decoding review output and continuity state written before path binding was
336
+ * introduced; a pathless concern cannot authorize incremental continuity.
321
337
  */
322
338
  declare class ReviewConcern extends ReviewConcern_base {}
323
339
  /** The per-entry walkthrough summary bound, and the entries bound (the changeset cap). */
@@ -380,6 +396,360 @@ declare const PullRequestReviewer: import("effect-agent").Definition<typeof Revi
380
396
  }, PullRequestSource>;
381
397
  }>, undefined>;
382
398
  //#endregion
399
+ //#region src/internal/review-state.d.ts
400
+ declare const ReviewMode: Schema.Literals<readonly ["incremental", "final"]>;
401
+ type ReviewMode = typeof ReviewMode.Type;
402
+ declare const ReviewScopeMode: Schema.Literals<readonly ["incremental", "full"]>;
403
+ type ReviewScopeMode = typeof ReviewScopeMode.Type;
404
+ declare const GitCommitSha: Schema.NonEmptyString;
405
+ declare const StoredReviewFinding_base: Schema.Class<StoredReviewFinding, Schema.Struct<{
406
+ readonly path: Schema.NonEmptyString;
407
+ readonly startLine: Schema.Int;
408
+ readonly endLine: Schema.Int;
409
+ readonly severity: Schema.Literals<readonly ["blocking", "important", "nit"]>;
410
+ readonly title: Schema.NonEmptyString;
411
+ readonly body: Schema.NonEmptyString;
412
+ }>, {}>;
413
+ /** A compact unresolved finding suitable for the bounded review-body marker. */
414
+ declare class StoredReviewFinding extends StoredReviewFinding_base {}
415
+ declare const StoredReviewConcern_base: Schema.Class<StoredReviewConcern, Schema.Struct<{
416
+ /** Absent only on legacy state written before concern path binding. */
417
+ readonly evidencePaths: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
418
+ readonly severity: Schema.Literals<readonly ["blocking", "important", "nit"]>;
419
+ readonly title: Schema.NonEmptyString;
420
+ readonly body: Schema.NonEmptyString;
421
+ }>, {}>;
422
+ /** A compact unresolved non-anchored concern with its invalidation paths. */
423
+ declare class StoredReviewConcern extends StoredReviewConcern_base {}
424
+ /** How a maintainer settled a previously raised finding or concern. */
425
+ declare const AdjudicationDisposition: Schema.Literals<readonly ["accepted-risk", "refuted", "obsolete"]>;
426
+ type AdjudicationDisposition = typeof AdjudicationDisposition.Type;
427
+ /** The adjudications bound carried by the ReviewState schema. */
428
+ declare const MAX_STORED_ADJUDICATIONS = 20;
429
+ declare const StoredAdjudication_base: Schema.Class<StoredAdjudication, Schema.Struct<{
430
+ readonly path: Schema.optionalKey<Schema.NonEmptyString>;
431
+ readonly startLine: Schema.optionalKey<Schema.Int>;
432
+ readonly endLine: Schema.optionalKey<Schema.Int>;
433
+ readonly title: Schema.NonEmptyString;
434
+ readonly disposition: Schema.Literals<readonly ["accepted-risk", "refuted", "obsolete"]>;
435
+ readonly reason: Schema.optionalKey<Schema.NonEmptyString>;
436
+ /** GitHub login of the maintainer whose comment adjudicated the identity. */
437
+ readonly actor: Schema.NonEmptyString;
438
+ }>, {}>;
439
+ declare class StoredAdjudication extends StoredAdjudication_base {}
440
+ /**
441
+ * The one finding-identity composition shared by retirement, adjudication,
442
+ * and settlement. A tagged JSON tuple keeps anchored findings in a namespace
443
+ * disjoint from title-only concerns and remains unambiguous even when
444
+ * untrusted path or title text contains delimiter characters.
445
+ */
446
+ declare const findingIdentity: (finding: {
447
+ readonly path: string;
448
+ readonly startLine: number;
449
+ readonly endLine: number;
450
+ readonly title: string;
451
+ }) => string;
452
+ /** The disjoint title-only identity namespace for unanchored concerns. */
453
+ declare const concernIdentity: (concern: {
454
+ readonly title: string;
455
+ }) => string;
456
+ /**
457
+ * An adjudication's identity: the shared finding identity when anchored, the
458
+ * disjoint concern identity when unanchored.
459
+ */
460
+ declare const adjudicationIdentity: (adjudication: StoredAdjudication) => string;
461
+ /** The carried-scope bound; a run that cannot fit its leftovers publishes no state. */
462
+ declare const MAX_STORED_UNREVIEWED_PATHS = 100;
463
+ /** Failed-pass records stored beside the leftover paths; one per unit stage. */
464
+ declare const MAX_STORED_UNREVIEWED_PASSES = 24;
465
+ /** Stages a leftover path may need retried without a second general discovery. */
466
+ declare const UnreviewedStage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
467
+ type UnreviewedStage = typeof UnreviewedStage.Type;
468
+ declare const StoredUnreviewedPass_base: Schema.Class<StoredUnreviewedPass, Schema.Struct<{
469
+ readonly stage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
470
+ readonly paths: Schema.$Array<Schema.NonEmptyString>;
471
+ }>, {}>;
472
+ /** One failed fan-out pass whose paths should be retried, not rediscovered. */
473
+ declare class StoredUnreviewedPass extends StoredUnreviewedPass_base {}
474
+ declare const ReviewState_base: Schema.Class<ReviewState, Schema.Struct<{
475
+ readonly version: Schema.Literal<1>;
476
+ readonly repository: Schema.NonEmptyString;
477
+ readonly pullRequestNumber: Schema.Int;
478
+ readonly baseRef: Schema.NonEmptyString;
479
+ readonly baseSha: Schema.NonEmptyString;
480
+ readonly headRef: Schema.NonEmptyString;
481
+ readonly reviewedHeadSha: Schema.NonEmptyString;
482
+ readonly profileFingerprint: Schema.String;
483
+ readonly settledScopeFingerprint: Schema.String;
484
+ readonly reviewedPathCount: Schema.Int;
485
+ readonly unresolvedFindings: Schema.$Array<typeof StoredReviewFinding>;
486
+ readonly unresolvedConcerns: Schema.$Array<typeof StoredReviewConcern>;
487
+ /** Retryable review gaps carried into the next incremental run's scope. */
488
+ readonly unreviewedPaths: Schema.$Array<Schema.NonEmptyString>;
489
+ /** Which failed pass produced those leftovers. */
490
+ readonly unreviewedPasses: Schema.$Array<typeof StoredUnreviewedPass>;
491
+ /**
492
+ * True only when the producing run had complete input coverage, no
493
+ * unsettled pass, and nothing carried. Skip-unchanged authority: an
494
+ * unchanged patch may skip re-review only over a settled state.
495
+ */
496
+ readonly settled: Schema.Boolean;
497
+ readonly lastReviewMode: Schema.Literals<readonly ["incremental", "full"]>;
498
+ /**
499
+ * Maintainer adjudications standing against this pull request. optionalKey
500
+ * so state markers signed before the field existed still decode.
501
+ */
502
+ readonly adjudications: Schema.optionalKey<Schema.$Array<typeof StoredAdjudication>>;
503
+ }>, {}>;
504
+ /**
505
+ * Versioned state embedded after EVERY completed run that can be signed. The
506
+ * head plus full-scope fingerprint forms an incremental baseline; an absent
507
+ * unresolved item never means the path is defect-free. `unreviewedPaths`
508
+ * carries retryable review gaps (failed passes) forward so the next
509
+ * incremental run re-reviews exactly them plus the new delta — the baseline
510
+ * advances monotonically instead of freezing on one flaky pass and reopening
511
+ * the whole post-baseline scope. Storing hundreds of path strings separately
512
+ * would not fit GitHub's bounded review body in the worst case.
513
+ */
514
+ declare class ReviewState extends ReviewState_base {}
515
+ declare const toStoredFinding: (finding: ReviewFinding) => StoredReviewFinding;
516
+ declare const fromStoredFinding: (finding: StoredReviewFinding) => ReviewFinding;
517
+ declare const toStoredConcern: (concern: ReviewConcern) => StoredReviewConcern;
518
+ declare const fromStoredConcern: (concern: StoredReviewConcern) => ReviewConcern;
519
+ declare const MAX_REVIEW_STATE_MARKER_CHARS = 24000;
520
+ declare const ReviewStateMarker: Schema.brand<Schema.NonEmptyString, "@effect-agent/pr-review/ReviewStateMarker">;
521
+ type ReviewStateMarker = typeof ReviewStateMarker.Type;
522
+ declare const ReviewStateAuthenticationFailure_base: Schema.Class<ReviewStateAuthenticationFailure, Schema.TaggedStruct<"ReviewStateAuthenticationFailure", {
523
+ readonly operation: Schema.Literals<readonly ["sign", "verify"]>;
524
+ readonly reason: Schema.NonEmptyString;
525
+ }>, import("effect/Cause").YieldableError>;
526
+ declare class ReviewStateAuthenticationFailure extends ReviewStateAuthenticationFailure_base {}
527
+ declare const ReviewStateMarkerTooLarge_base: Schema.Class<ReviewStateMarkerTooLarge, Schema.TaggedStruct<"ReviewStateMarkerTooLarge", {
528
+ readonly observedChars: Schema.Int;
529
+ readonly maximumChars: Schema.Int;
530
+ }>, import("effect/Cause").YieldableError>;
531
+ declare class ReviewStateMarkerTooLarge extends ReviewStateMarkerTooLarge_base {}
532
+ declare const ReviewStateAuthenticator_base: Context.ServiceClass<ReviewStateAuthenticator, "@effect-agent/pr-review/ReviewStateAuthenticator", {
533
+ readonly status: "available" | "unavailable";
534
+ readonly unavailableReason: string | undefined;
535
+ readonly render: (state: ReviewState) => Effect.Effect<ReviewStateMarker, ReviewStateAuthenticationFailure | ReviewStateMarkerTooLarge>;
536
+ readonly extract: (body: string) => Effect.Effect<Option.Option<ReviewState>, ReviewStateAuthenticationFailure>;
537
+ }>;
538
+ declare class ReviewStateAuthenticator extends ReviewStateAuthenticator_base {}
539
+ /** Validated WebCrypto adapter selected at the Action composition root. */
540
+ declare const webCryptoReviewStateAuthenticatorLayer: (secret: Redacted.Redacted<string>) => Layer.Layer<ReviewStateAuthenticator>;
541
+ /** Explicit no-state implementation for hosts without a stable authentication secret. */
542
+ declare const unavailableReviewStateAuthenticatorLayer: (reason: string) => Layer.Layer<ReviewStateAuthenticator>;
543
+ declare const ReviewHeadComparison_base: Schema.Class<ReviewHeadComparison, Schema.Struct<{
544
+ readonly status: Schema.Literals<readonly ["ahead", "behind", "diverged", "identical"]>;
545
+ readonly baseSha: Schema.NonEmptyString;
546
+ readonly headSha: Schema.NonEmptyString;
547
+ readonly mergeBaseSha: Schema.NonEmptyString;
548
+ readonly files: Schema.$Array<typeof ChangedFile>;
549
+ /** GitHub caps compare-file payloads at 300; equality is conservatively truncated. */
550
+ readonly truncated: Schema.Boolean;
551
+ }>, {}>;
552
+ /** The bounded result of GitHub's previous-head...current-head comparison. */
553
+ declare class ReviewHeadComparison extends ReviewHeadComparison_base {}
554
+ /** Internal review selection applied as a decorator over the full PR source. */
555
+ interface ReviewSelection {
556
+ readonly mode: ReviewScopeMode;
557
+ readonly reason: string;
558
+ readonly files: ReadonlyArray<ChangedFile>;
559
+ /** Paths whose changes invalidate prior findings, including paths reverted out of the PR. */
560
+ readonly affectedPaths: ReadonlyArray<string>;
561
+ /**
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.
564
+ */
565
+ readonly retryPaths: ReadonlyArray<string>;
566
+ readonly retryStages: ReadonlyArray<UnreviewedStage>;
567
+ readonly totalFiles: number;
568
+ readonly baselineSha: string | undefined;
569
+ readonly priorState: ReviewState | undefined;
570
+ /** Absent only for an explicit full review with no continuity profile. */
571
+ readonly profileFingerprint: string | undefined;
572
+ /** Action-owned authentication capability, constructed at the composition root. */
573
+ readonly stateAuthenticator?: ReviewStateAuthenticator["Service"] | undefined;
574
+ }
575
+ declare const fullReviewSelection: (input: {
576
+ readonly reason: string;
577
+ readonly files: ReadonlyArray<ChangedFile>;
578
+ readonly totalFiles: number;
579
+ readonly profileFingerprint?: string | undefined;
580
+ }) => ReviewSelection;
581
+ /** Three-dot lineage from the reviewed head to the current head is usable. */
582
+ declare const isLineageAncestor: (comparison: ReviewHeadComparison, priorState: ReviewState, currentHeadSha: string) => boolean;
583
+ /**
584
+ * Validate that persisted state belongs to this exact PR/base lineage and the
585
+ * same review profile. A mismatch is a full-review reason, never an error that
586
+ * silently suppresses review work.
587
+ */
588
+ declare const validateReviewState: (state: ReviewState, current: PullRequestMetadata, profileFingerprint: string) => string | undefined;
589
+ /** Pure, deterministic range selection with conservative full-review fallbacks. */
590
+ declare const selectReviewRange: (input: {
591
+ readonly requestedMode: ReviewMode;
592
+ readonly current: PullRequestMetadata;
593
+ readonly fullFiles: ReadonlyArray<ChangedFile>;
594
+ readonly profileFingerprint: string;
595
+ readonly priorState: ReviewState | undefined;
596
+ readonly comparison: ReviewHeadComparison | undefined;
597
+ readonly baseComparison?: ReviewHeadComparison | undefined;
598
+ /**
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.
602
+ */
603
+ readonly contentComparison?: ReviewHeadComparison | undefined;
604
+ readonly lookupFailure?: string | undefined;
605
+ }) => ReviewSelection;
606
+ declare const ReviewExecutionContext_base: Context.ServiceClass<ReviewExecutionContext, "@effect-agent/pr-review/ReviewExecutionContext", ReviewSelection>;
607
+ /** Per-run context consumed by orchestration and publication, not by the model. */
608
+ declare class ReviewExecutionContext extends ReviewExecutionContext_base {}
609
+ /**
610
+ * Explicit direct-run adapter for callers that intentionally review the full
611
+ * source without authenticated incremental continuity.
612
+ */
613
+ declare const fullReviewExecutionContextLayer: (reason: string) => Layer.Layer<ReviewExecutionContext, PullRequestSourceFailure, PullRequestSource>;
614
+ /**
615
+ * Decorate the full source with the selected review range. Full anchor files
616
+ * remain available to host-side publication validation; model tools see only
617
+ * the selected delta and may read head context only for that delta's paths.
618
+ */
619
+ declare const selectedPullRequestSourceLayer: (selection: ReviewSelection) => Layer.Layer<PullRequestSource, never, PullRequestSource>;
620
+ /** Build the full-surface mission used only to resolve profile guidance. */
621
+ declare const buildProfileMission: (metadata: PullRequestMetadata, files: ReadonlyArray<ChangedFile>) => ReviewMission;
622
+ //#endregion
623
+ //#region src/internal/adjudication.d.ts
624
+ /** Maximum authorized command candidates retained for one inline thread. */
625
+ declare const MAX_THREAD_ADJUDICATION_COMMANDS = 100;
626
+ declare const AdjudicationComment_base: Schema.Class<AdjudicationComment, Schema.Struct<{
627
+ readonly body: Schema.String;
628
+ /** GitHub's author_association for the comment author, verbatim. */
629
+ readonly authorAssociation: Schema.String;
630
+ readonly authorLogin: Schema.NonEmptyString;
631
+ /** Creation time; a comment without one loses every later-wins tie. */
632
+ readonly createdAt: Schema.NullOr<Schema.DateTimeUtc>;
633
+ /** Stable zero-based order in the source listing, before thread grouping. */
634
+ readonly sourceOrder: Schema.Int;
635
+ }>, {}>;
636
+ /** One reply or top-level comment observed through the adjudication host. */
637
+ declare class AdjudicationComment extends AdjudicationComment_base {}
638
+ declare const AdjudicableThread_base: Schema.Class<AdjudicableThread, Schema.Struct<{
639
+ readonly path: Schema.NonEmptyString;
640
+ readonly startLine: Schema.NullOr<Schema.Int>;
641
+ readonly endLine: Schema.NullOr<Schema.Int>;
642
+ /** The root comment's body; its first line carries the finding title. */
643
+ readonly rootBody: Schema.String;
644
+ readonly replies: Schema.$Array<typeof AdjudicationComment>;
645
+ }>, {}>;
646
+ /** One of the action's own inline finding threads, replies in creation order. */
647
+ declare class AdjudicableThread extends AdjudicableThread_base {}
648
+ declare const ReviewAdjudicationFailure_base: Schema.Class<ReviewAdjudicationFailure, Schema.TaggedStruct<"ReviewAdjudicationFailure", {
649
+ readonly operation: Schema.String;
650
+ readonly reason: Schema.String;
651
+ }>, import("effect/Cause").YieldableError>;
652
+ /** A GitHub adjudication read failed. */
653
+ declare class ReviewAdjudicationFailure extends ReviewAdjudicationFailure_base {
654
+ get message(): string;
655
+ }
656
+ declare const ReviewAdjudicationHost_base: Context.ServiceClass<ReviewAdjudicationHost, "@effect-agent/pr-review/ReviewAdjudicationHost", {
657
+ /** This action's own inline finding threads with their replies. */
658
+ readonly listFindingThreads: Effect.Effect<ReadonlyArray<AdjudicableThread>, ReviewAdjudicationFailure>;
659
+ /** Top-level pull-request conversation comments. */
660
+ readonly listIssueComments: Effect.Effect<ReadonlyArray<AdjudicationComment>, ReviewAdjudicationFailure>;
661
+ }>;
662
+ /**
663
+ * Host-side GitHub reads used by adjudication. Domain code never reaches into
664
+ * REST directly, and deterministic tests substitute this port. Both listings
665
+ * return comments in creation order.
666
+ */
667
+ declare class ReviewAdjudicationHost extends ReviewAdjudicationHost_base {}
668
+ /** Explicit program-edge adapter for runs that intentionally perform no host reads. */
669
+ declare const noReviewAdjudicationHost: {
670
+ /** This action's own inline finding threads with their replies. */
671
+ readonly listFindingThreads: Effect.Effect<ReadonlyArray<AdjudicableThread>, ReviewAdjudicationFailure>;
672
+ /** Top-level pull-request conversation comments. */
673
+ readonly listIssueComments: Effect.Effect<ReadonlyArray<AdjudicationComment>, ReviewAdjudicationFailure>;
674
+ };
675
+ /** Layer form of {@link noReviewAdjudicationHost}. */
676
+ declare const noReviewAdjudicationHostLayer: Layer.Layer<ReviewAdjudicationHost, never, never>;
677
+ /** author_associations allowed to adjudicate; everything else is ignored. */
678
+ declare const AUTHORIZED_ADJUDICATION_ASSOCIATIONS: ReadonlySet<string>;
679
+ interface ParsedAdjudicationCommand {
680
+ readonly disposition: AdjudicationDisposition;
681
+ /** Present only for the issue-comment grammar's quoted target title. */
682
+ readonly title?: string | undefined;
683
+ readonly reason?: string | undefined;
684
+ }
685
+ /**
686
+ * Parse one inline-thread reply: `/adjudicate <disposition>(: <reason>)?`.
687
+ * The thread itself names the target identity. Returns undefined for a
688
+ * non-command body and "malformed" for a command that fails the grammar.
689
+ */
690
+ declare const parseThreadAdjudication: (body: string) => ParsedAdjudicationCommand | "malformed" | undefined;
691
+ /**
692
+ * Parse one top-level PR comment:
693
+ * `/adjudicate <disposition> "<exact title>"(: <reason>)?`. The quoted title
694
+ * is required because the conversation names no finding thread; it targets
695
+ * the title-alone identity of an unanchored concern.
696
+ */
697
+ declare const parseIssueAdjudication: (body: string) => ParsedAdjudicationCommand | "malformed" | undefined;
698
+ /** The finding identity an inline thread names, or undefined when unparsable. */
699
+ declare const threadFindingTarget: (thread: AdjudicableThread) => {
700
+ readonly path: string;
701
+ readonly startLine: number;
702
+ readonly endLine: number;
703
+ readonly title: string;
704
+ } | undefined;
705
+ interface DerivedAdjudications {
706
+ readonly adjudications: ReadonlyArray<StoredAdjudication>;
707
+ /** Commands ignored fail-closed: unauthorized authors and malformed bodies. */
708
+ readonly ignored: ReadonlyArray<string>;
709
+ /** Later-wins winners dropped oldest-first at the storage bound. */
710
+ readonly droppedOldest: number;
711
+ }
712
+ /**
713
+ * Derive the standing adjudications from the host's listings. Every command
714
+ * is screened fail-closed (authorization, grammar, a parsable target); later
715
+ * adjudications of the same identity win by comment creation order; the
716
+ * result is capped at the ReviewState bound dropping the oldest winners.
717
+ */
718
+ declare const deriveAdjudications: (input: {
719
+ readonly threads: ReadonlyArray<AdjudicableThread>;
720
+ readonly issueComments: ReadonlyArray<AdjudicationComment>;
721
+ }) => DerivedAdjudications;
722
+ /** Later-wins merge of stored prior adjudications with freshly derived ones. */
723
+ declare const mergeAdjudications: (prior: ReadonlyArray<StoredAdjudication>, fresh: ReadonlyArray<StoredAdjudication>) => ReadonlyArray<StoredAdjudication>;
724
+ /**
725
+ * Collect the standing maintainer adjudications: freshly derived through the
726
+ * host, merged later-wins over the prior state's stored set. The host is a
727
+ * visible Effect requirement; program edges that intentionally perform no
728
+ * reads provide {@link noReviewAdjudicationHost}. Fail-open — any listing
729
+ * fault keeps the complete prior set and never fails the review, because NOT
730
+ * suppressing a finding is the conservative direction.
731
+ */
732
+ declare const collectReviewAdjudications: (prior: readonly StoredAdjudication[]) => Effect.Effect<readonly StoredAdjudication[], never, ReviewAdjudicationHost>;
733
+ /** One adjudication as a bounded reviewer-prompt context line. */
734
+ declare const renderAdjudicationContextLine: (adjudication: StoredAdjudication) => string;
735
+ /** One prior-round finding as a bounded reviewer-prompt context line. */
736
+ declare const renderPriorFindingContextLine: (finding: StoredReviewFinding) => string;
737
+ /** Prior-review context threaded into fan-out discovery briefs, per path. */
738
+ interface PriorReviewContext {
739
+ /** Adjudicated identities; path-free entries apply to every unit. */
740
+ readonly adjudicated: ReadonlyArray<{
741
+ readonly path: string | undefined;
742
+ readonly line: string;
743
+ }>;
744
+ /** Prior-round findings whose paths are being re-reviewed. */
745
+ readonly priorFindings: ReadonlyArray<{
746
+ readonly path: string;
747
+ readonly line: string;
748
+ }>;
749
+ }
750
+ /** Build the fan-out prior-review context from the resolved continuity data. */
751
+ declare const buildPriorReviewContext: (adjudications: ReadonlyArray<StoredAdjudication>, priorFindingsOnScope: ReadonlyArray<StoredReviewFinding>) => PriorReviewContext;
752
+ //#endregion
383
753
  //#region src/internal/anchors.d.ts
384
754
  /** Why a finding cannot anchor to the current new-version diff, if any. */
385
755
  declare const anchorViolation: (finding: ReviewFinding, files: ReadonlyArray<ChangedFile>) => string | undefined;
@@ -389,8 +759,6 @@ declare const anchorViolation: (finding: ReviewFinding, files: ReadonlyArray<Cha
389
759
  declare const MAX_REVIEW_UNITS = 8;
390
760
  /** A unit never carries more files than this, regardless of their size. */
391
761
  declare const MAX_UNIT_FILES = 12;
392
- /** Compatibility export; complete evidence chars now own unit packing. */
393
- declare const UNIT_CHANGED_LINE_BUDGET = 800;
394
762
  /**
395
763
  * Bound the complete model-visible evidence assigned to one child. This is a
396
764
  * character bound rather than a token estimate because it is deterministic,
@@ -406,8 +774,6 @@ declare const MAX_UNIT_EVIDENCE_SHARDS = 12;
406
774
  * authority for whether input coverage is complete.
407
775
  */
408
776
  declare const MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS: number;
409
- /** @deprecated Use `MAX_PATCH_CHARS`; this is now the per-shard bound. */
410
- declare const MAX_FILE_EVIDENCE_CHARS = 60000;
411
777
  /** The merged review never exceeds the `CodeReview` findings bound. */
412
778
  declare const MAX_MERGED_FINDINGS = 20;
413
779
  declare const ReviewUnitId: Schema.NonEmptyString;
@@ -519,32 +885,18 @@ declare const planReviewUnits: (files: ReadonlyArray<ChangedFile>, options: {
519
885
  */
520
886
  declare const rankAndDedupeFindings: (findings: ReadonlyArray<ReviewFinding>) => ReadonlyArray<ReviewFinding>;
521
887
  /**
522
- * The concern analogue of `rankAndDedupeFindings`: dedupe by exact content
523
- * keeping the most severe duplicate, rank by severity, and cap at the
888
+ * Stable identity for one concern. The paths are part of the claim: identical
889
+ * prose about two independent files must not collapse into one item.
890
+ */
891
+ declare const reviewConcernKey: (concern: ReviewConcern) => string;
892
+ /**
893
+ * The concern analogue of `rankAndDedupeFindings`: dedupe by exact scoped
894
+ * content keeping the most severe duplicate, rank by severity, and cap at the
524
895
  * `CodeReview` concerns bound.
525
896
  */
526
897
  declare const rankAndDedupeConcerns: (concerns: ReadonlyArray<ReviewConcern>) => ReadonlyArray<ReviewConcern>;
527
898
  //#endregion
528
899
  //#region src/internal/coverage.d.ts
529
- declare const FailedReviewUnit_base: Schema.Class<FailedReviewUnit, Schema.Struct<{
530
- readonly unitId: Schema.NonEmptyString;
531
- readonly errorTag: Schema.NonEmptyString;
532
- }>, {}>;
533
- declare class FailedReviewUnit extends FailedReviewUnit_base {}
534
- declare const ReviewCoverage_base: Schema.Class<ReviewCoverage, Schema.Struct<{
535
- readonly status: Schema.Literals<readonly ["complete", "incomplete"]>;
536
- readonly requiredPaths: Schema.$Array<Schema.NonEmptyString>;
537
- readonly reviewedPaths: Schema.$Array<Schema.NonEmptyString>;
538
- readonly unreviewedPaths: Schema.$Array<Schema.NonEmptyString>;
539
- readonly failedUnits: Schema.$Array<typeof FailedReviewUnit>;
540
- readonly reasons: Schema.$Array<Schema.NonEmptyString>;
541
- }>, {}>;
542
- /**
543
- * Compatibility diagnostic retained for callers that consumed the original
544
- * `coverage` field. New UI and state decisions use ReviewInputCoverage and
545
- * ReviewAssurance directly.
546
- */
547
- declare class ReviewCoverage extends ReviewCoverage_base {}
548
900
  declare const ReviewInputCoverage_base: Schema.Class<ReviewInputCoverage, Schema.Struct<{
549
901
  readonly status: Schema.Literals<readonly ["complete", "incomplete"]>;
550
902
  readonly requiredPaths: Schema.$Array<Schema.NonEmptyString>;
@@ -596,6 +948,26 @@ declare const ReviewAssurance_base: Schema.Class<ReviewAssurance, Schema.Struct<
596
948
  declare class ReviewAssurance extends ReviewAssurance_base {}
597
949
  /** Render a bounded, deterministic "label (n): a, b, … (+k more)" reason line. */
598
950
  declare const boundedListReason: (label: string, values: Iterable<string>) => string;
951
+ interface CarriedScope {
952
+ /** Carried paths a retry can actually settle (failed passes, overflow). */
953
+ readonly retryablePaths: ReadonlyArray<string>;
954
+ /** Carried paths no retry can settle (binaries, oversized files). */
955
+ readonly undiffablePaths: ReadonlyArray<string>;
956
+ /** Whether any incompleteness beyond the undiffable files exists. */
957
+ readonly retryableGap: boolean;
958
+ }
959
+ /**
960
+ * Split carried scope into paths a retry can settle and paths it never can.
961
+ * Undiffable files are a property of the pull request, not a transient
962
+ * reviewer-side failure: gate reasons and rendered callouts must never promise
963
+ * they are "retried automatically" — the honest instruction is to remove them
964
+ * from the pull request or exclude them with ignore globs.
965
+ */
966
+ declare const splitCarriedScope: (input: {
967
+ readonly inputCoverage?: ReviewInputCoverage | undefined;
968
+ readonly assurance?: ReviewAssurance | undefined;
969
+ readonly unreviewedPaths?: ReadonlyArray<string> | undefined;
970
+ }) => CarriedScope;
599
971
  /** The flat reviewer's honest constant assurance: one pass, no verifier. */
600
972
  declare const flatAssurance: () => ReviewAssurance;
601
973
  interface FlatReviewAssessment {
@@ -629,181 +1001,6 @@ declare const fanOutInputCoverage: (input: {
629
1001
  readonly anchorFiles: ReadonlyArray<ChangedFile>;
630
1002
  readonly totalAnchorFiles: number;
631
1003
  }) => ReviewInputCoverage;
632
- /** Compatibility aggregate over the two precise claims. */
633
- declare const compatibilityCoverage: (inputCoverage: ReviewInputCoverage, assurance: ReviewAssurance) => ReviewCoverage;
634
- //#endregion
635
- //#region src/internal/review-state.d.ts
636
- declare const ReviewMode: Schema.Literals<readonly ["incremental", "final"]>;
637
- type ReviewMode = typeof ReviewMode.Type;
638
- declare const ReviewScopeMode: Schema.Literals<readonly ["incremental", "full"]>;
639
- type ReviewScopeMode = typeof ReviewScopeMode.Type;
640
- declare const GitCommitSha: Schema.NonEmptyString;
641
- declare const StoredReviewFinding_base: Schema.Class<StoredReviewFinding, Schema.Struct<{
642
- readonly path: Schema.NonEmptyString;
643
- readonly startLine: Schema.Int;
644
- readonly endLine: Schema.Int;
645
- readonly severity: Schema.Literals<readonly ["blocking", "important", "nit"]>;
646
- readonly title: Schema.NonEmptyString;
647
- readonly body: Schema.NonEmptyString;
648
- }>, {}>;
649
- /** A compact unresolved finding suitable for the bounded review-body marker. */
650
- declare class StoredReviewFinding extends StoredReviewFinding_base {}
651
- declare const StoredReviewConcern_base: Schema.Class<StoredReviewConcern, Schema.Struct<{
652
- readonly severity: Schema.Literals<readonly ["blocking", "important", "nit"]>;
653
- readonly title: Schema.NonEmptyString;
654
- readonly body: Schema.NonEmptyString;
655
- }>, {}>;
656
- /** A compact unresolved non-anchored concern carried until a final audit. */
657
- declare class StoredReviewConcern extends StoredReviewConcern_base {}
658
- /** The carried-scope bound; a run that cannot fit its leftovers publishes no state. */
659
- declare const MAX_STORED_UNREVIEWED_PATHS = 100;
660
- /** Failed-pass records stored beside the leftover paths; one per unit stage. */
661
- declare const MAX_STORED_UNREVIEWED_PASSES = 24;
662
- /** Stages a leftover path may need retried without a second general discovery. */
663
- declare const UnreviewedStage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
664
- type UnreviewedStage = typeof UnreviewedStage.Type;
665
- declare const StoredUnreviewedPass_base: Schema.Class<StoredUnreviewedPass, Schema.Struct<{
666
- readonly stage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
667
- readonly paths: Schema.$Array<Schema.NonEmptyString>;
668
- }>, {}>;
669
- /** One failed fan-out pass whose paths should be retried, not rediscovered. */
670
- declare class StoredUnreviewedPass extends StoredUnreviewedPass_base {}
671
- declare const ReviewState_base: Schema.Class<ReviewState, Schema.Struct<{
672
- readonly version: Schema.Literal<2>;
673
- readonly repository: Schema.NonEmptyString;
674
- readonly pullRequestNumber: Schema.Int;
675
- readonly baseRef: Schema.NonEmptyString;
676
- readonly baseSha: Schema.NonEmptyString;
677
- readonly headRef: Schema.NonEmptyString;
678
- readonly reviewedHeadSha: Schema.NonEmptyString;
679
- readonly profileFingerprint: Schema.String;
680
- readonly acceptedScopeFingerprint: Schema.String;
681
- readonly reviewedPathCount: Schema.Int;
682
- readonly unresolvedFindings: Schema.$Array<typeof StoredReviewFinding>;
683
- readonly unresolvedConcerns: Schema.$Array<typeof StoredReviewConcern>;
684
- /** Retryable review gaps carried into the next incremental run's scope. */
685
- readonly unreviewedPaths: Schema.$Array<Schema.NonEmptyString>;
686
- /**
687
- * Which failed pass produced those leftovers. Absent on state-v2 markers
688
- * written before this field existed; those leftovers still re-enter scope
689
- * but cannot skip rediscovery. Present (including empty) on new markers.
690
- */
691
- readonly unreviewedPasses: Schema.optionalKey<Schema.$Array<typeof StoredUnreviewedPass>>;
692
- /**
693
- * True only when the producing run had complete input coverage, no
694
- * unsettled pass, and nothing carried. Skip-unchanged authority: an
695
- * unchanged patch may skip re-review only over a settled state.
696
- */
697
- readonly settled: Schema.Boolean;
698
- readonly lastReviewMode: Schema.Literals<readonly ["incremental", "full"]>;
699
- }>, {}>;
700
- /**
701
- * Versioned state embedded after EVERY completed run that can be signed. The
702
- * head plus full-scope fingerprint forms an incremental baseline; an absent
703
- * unresolved item never means the path is defect-free. `unreviewedPaths`
704
- * carries retryable review gaps (failed passes) forward so the next
705
- * incremental run re-reviews exactly them plus the new delta — the baseline
706
- * advances monotonically instead of freezing on one flaky pass and reopening
707
- * the whole post-baseline scope. The `acceptedScopeFingerprint` name is
708
- * retained for wire compatibility. Storing hundreds of path strings
709
- * separately would not fit GitHub's bounded review body in the worst case.
710
- */
711
- declare class ReviewState extends ReviewState_base {}
712
- declare const toStoredFinding: (finding: ReviewFinding) => StoredReviewFinding;
713
- declare const fromStoredFinding: (finding: StoredReviewFinding) => ReviewFinding;
714
- declare const toStoredConcern: (concern: ReviewConcern) => StoredReviewConcern;
715
- declare const fromStoredConcern: (concern: StoredReviewConcern) => ReviewConcern;
716
- declare const MAX_REVIEW_STATE_MARKER_CHARS = 24000;
717
- declare const ReviewStateMarker: Schema.brand<Schema.NonEmptyString, "@effect-agent/pr-review/ReviewStateMarker">;
718
- type ReviewStateMarker = typeof ReviewStateMarker.Type;
719
- declare const ReviewStateAuthenticationFailure_base: Schema.Class<ReviewStateAuthenticationFailure, Schema.TaggedStruct<"ReviewStateAuthenticationFailure", {
720
- readonly operation: Schema.Literals<readonly ["sign", "verify"]>;
721
- readonly reason: Schema.NonEmptyString;
722
- }>, import("effect/Cause").YieldableError>;
723
- declare class ReviewStateAuthenticationFailure extends ReviewStateAuthenticationFailure_base {}
724
- declare const ReviewStateMarkerTooLarge_base: Schema.Class<ReviewStateMarkerTooLarge, Schema.TaggedStruct<"ReviewStateMarkerTooLarge", {
725
- readonly observedChars: Schema.Int;
726
- readonly maximumChars: Schema.Int;
727
- }>, import("effect/Cause").YieldableError>;
728
- declare class ReviewStateMarkerTooLarge extends ReviewStateMarkerTooLarge_base {}
729
- declare const ReviewStateAuthenticator_base: Context.ServiceClass<ReviewStateAuthenticator, "@effect-agent/pr-review/ReviewStateAuthenticator", {
730
- readonly status: "available" | "unavailable";
731
- readonly unavailableReason: string | undefined;
732
- readonly render: (state: ReviewState) => Effect.Effect<ReviewStateMarker, ReviewStateAuthenticationFailure | ReviewStateMarkerTooLarge>;
733
- readonly extract: (body: string) => Effect.Effect<Option.Option<ReviewState>, ReviewStateAuthenticationFailure>;
734
- }>;
735
- declare class ReviewStateAuthenticator extends ReviewStateAuthenticator_base {}
736
- /** Validated WebCrypto adapter selected at the Action composition root. */
737
- declare const webCryptoReviewStateAuthenticatorLayer: (secret: Redacted.Redacted<string>) => Layer.Layer<ReviewStateAuthenticator>;
738
- /** Explicit no-state implementation for hosts without a stable authentication secret. */
739
- declare const unavailableReviewStateAuthenticatorLayer: (reason: string) => Layer.Layer<ReviewStateAuthenticator>;
740
- declare const ReviewHeadComparison_base: Schema.Class<ReviewHeadComparison, Schema.Struct<{
741
- readonly status: Schema.Literals<readonly ["ahead", "behind", "diverged", "identical"]>;
742
- readonly baseSha: Schema.NonEmptyString;
743
- readonly headSha: Schema.NonEmptyString;
744
- readonly mergeBaseSha: Schema.NonEmptyString;
745
- readonly files: Schema.$Array<typeof ChangedFile>;
746
- /** GitHub caps compare-file payloads at 300; equality is conservatively truncated. */
747
- readonly truncated: Schema.Boolean;
748
- }>, {}>;
749
- /** The bounded result of GitHub's previous-head...current-head comparison. */
750
- declare class ReviewHeadComparison extends ReviewHeadComparison_base {}
751
- /** Internal review selection applied as a decorator over the full PR source. */
752
- interface ReviewSelection {
753
- readonly mode: ReviewScopeMode;
754
- readonly reason: string;
755
- readonly files: ReadonlyArray<ChangedFile>;
756
- /** Paths whose changes invalidate prior findings, including paths reverted out of the PR. */
757
- readonly affectedPaths: ReadonlyArray<string>;
758
- /**
759
- * Leftover paths whose contents did not change. Fan-out retries only the
760
- * recorded failed stages on these paths and keeps their stored findings.
761
- */
762
- readonly retryPaths: ReadonlyArray<string>;
763
- readonly retryStages: ReadonlyArray<UnreviewedStage>;
764
- readonly totalFiles: number;
765
- readonly baselineSha: string | undefined;
766
- readonly priorState: ReviewState | undefined;
767
- readonly profileFingerprint: string;
768
- /** Action-owned authentication capability, constructed at the composition root. */
769
- readonly stateAuthenticator?: ReviewStateAuthenticator["Service"] | undefined;
770
- }
771
- /** Three-dot lineage from the reviewed head to the current head is usable. */
772
- declare const isLineageAncestor: (comparison: ReviewHeadComparison, priorState: ReviewState, currentHeadSha: string) => boolean;
773
- /**
774
- * Validate that persisted state belongs to this exact PR/base lineage and the
775
- * same review profile. A mismatch is a full-review reason, never an error that
776
- * silently suppresses review work.
777
- */
778
- declare const validateReviewState: (state: ReviewState, current: PullRequestMetadata, profileFingerprint: string) => string | undefined;
779
- /** Pure, deterministic range selection with conservative full-review fallbacks. */
780
- declare const selectReviewRange: (input: {
781
- readonly requestedMode: ReviewMode;
782
- readonly current: PullRequestMetadata;
783
- readonly fullFiles: ReadonlyArray<ChangedFile>;
784
- readonly profileFingerprint: string;
785
- readonly priorState: ReviewState | undefined;
786
- readonly comparison: ReviewHeadComparison | undefined;
787
- readonly baseComparison?: ReviewHeadComparison | undefined;
788
- /**
789
- * Two-dot tree comparison used when the reviewed head is not a git ancestor
790
- * (rebase, amend, force-push). Intersected with the current PR path set so
791
- * main-drift outside the pull request never re-enters scope.
792
- */
793
- readonly contentComparison?: ReviewHeadComparison | undefined;
794
- readonly lookupFailure?: string | undefined;
795
- }) => ReviewSelection;
796
- declare const ReviewExecutionContext_base: Context.ServiceClass<ReviewExecutionContext, "@effect-agent/pr-review/ReviewExecutionContext", ReviewSelection>;
797
- /** Per-run context consumed by orchestration and publication, not by the model. */
798
- declare class ReviewExecutionContext extends ReviewExecutionContext_base {}
799
- /**
800
- * Decorate the full source with the selected review range. Full anchor files
801
- * remain available to host-side publication validation; model tools see only
802
- * the selected delta and may read head context only for that delta's paths.
803
- */
804
- declare const selectedPullRequestSourceLayer: (selection: ReviewSelection) => Layer.Layer<PullRequestSource, never, PullRequestSource>;
805
- /** Build the full-surface mission used only to resolve profile guidance. */
806
- declare const buildProfileMission: (metadata: PullRequestMetadata, files: ReadonlyArray<ChangedFile>) => ReviewMission;
807
1004
  //#endregion
808
1005
  //#region src/internal/render.d.ts
809
1006
  declare const ReviewEvent: Schema.Literals<readonly ["COMMENT", "APPROVE", "REQUEST_CHANGES"]>;
@@ -901,6 +1098,12 @@ declare const planPublication: (review: CodeReview, files: ReadonlyArray<Changed
901
1098
  /** Unchanged unresolved items carried from the prior reviewed baseline. */
902
1099
  readonly carriedFindings?: ReadonlyArray<ReviewFinding> | undefined;
903
1100
  readonly carriedConcerns?: ReadonlyArray<ReviewConcern> | undefined;
1101
+ /**
1102
+ * Standing maintainer adjudications. The caller excludes their identities
1103
+ * from the review, the carried items, and every severity count; this
1104
+ * planner only renders them as the collapsed adjudicated section.
1105
+ */
1106
+ readonly adjudications?: ReadonlyArray<StoredAdjudication> | undefined;
904
1107
  /** Selected review scope, made visible whenever orchestration chose it. */
905
1108
  readonly reviewMode?: ReviewScopeMode | undefined;
906
1109
  readonly reviewReason?: string | undefined;
@@ -971,6 +1174,11 @@ interface ReviewRetirementDecision {
971
1174
  readonly resolvedFindings: ReadonlyArray<StoredReviewFinding>;
972
1175
  readonly priorFindingCount: number;
973
1176
  }
1177
+ /**
1178
+ * The first line of every inline finding comment this package posts. Shared
1179
+ * with adjudication so both parse the identical title shape.
1180
+ */
1181
+ declare const INLINE_FINDING_TITLE_PATTERN: RegExp;
974
1182
  /** The host-authored metadata marker is the authority gate for any edit. */
975
1183
  declare const hasReviewMetadataMarker: (body: string) => boolean;
976
1184
  /** Compute one prior review's resolved subset and deterministic retired body. */
@@ -1049,6 +1257,14 @@ declare const gitHubPullRequestSourceLayer: Layer.Layer<PullRequestSource, never
1049
1257
  declare const gitHubReviewPublisherLayer: Layer.Layer<ReviewPublisher, never, GitHubReviewTarget | HttpClient.HttpClient>;
1050
1258
  /** GitHub-backed host operations for cosmetic retirement after publication. */
1051
1259
  declare const gitHubReviewRetirementHostLayer: Layer.Layer<ReviewRetirementHost, never, GitHubReviewTarget | HttpClient.HttpClient>;
1260
+ /**
1261
+ * GitHub-backed host reads for maintainer adjudication, installed by
1262
+ * `gitHubReviewLayers` in `github-env.ts` at the public composition root: this action's own
1263
+ * inline finding threads (roots authored by the configured review author)
1264
+ * with their replies, and the pull request's top-level conversation comments.
1265
+ * Both listings are creation-ordered.
1266
+ */
1267
+ declare const gitHubReviewAdjudicationHostLayer: Layer.Layer<ReviewAdjudicationHost, never, GitHubReviewTarget | HttpClient.HttpClient>;
1052
1268
  declare const PriorReviewLookupFailure_base: Schema.Class<PriorReviewLookupFailure, Schema.TaggedStruct<"PriorReviewLookupFailure", {
1053
1269
  readonly reason: Schema.String;
1054
1270
  }>, import("effect/Cause").YieldableError>;
@@ -1159,8 +1375,8 @@ declare const DiscoveredConcern_base: Schema.Class<DiscoveredConcern, Schema.Str
1159
1375
  /**
1160
1376
  * Concern candidates need explicit paths internally to bind the claim to
1161
1377
  * scheduled evidence. The verifier receives the complete bounded unit so it
1162
- * can use neighboring evidence to falsify the claim. The public ReviewConcern
1163
- * remains path-free after the host confirms and projects it.
1378
+ * can use neighboring evidence to falsify the claim. The host copies these
1379
+ * validated paths onto a confirmed public concern for incremental continuity.
1164
1380
  */
1165
1381
  declare class DiscoveredConcern extends DiscoveredConcern_base {}
1166
1382
  declare const FileReviewEvidence_base: Schema.Class<FileReviewEvidence, Schema.Struct<{
@@ -1185,6 +1401,10 @@ declare const FileReviewBrief_base: Schema.Class<FileReviewBrief, Schema.Struct<
1185
1401
  /** Empty for discovery; the exact discovered set for unit verification. */
1186
1402
  readonly candidates: Schema.$Array<Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>>;
1187
1403
  readonly evidence: Schema.$Array<typeof FileReviewEvidence>;
1404
+ /** Maintainer-adjudicated identities on this unit; do not re-raise. */
1405
+ readonly adjudicatedContext: Schema.optionalKey<Schema.$Array<Schema.String>>;
1406
+ /** Prior-round findings on this unit's re-reviewed paths. */
1407
+ readonly priorFindingContext: Schema.optionalKey<Schema.$Array<Schema.String>>;
1188
1408
  }>, {}>;
1189
1409
  /** Host-prepared child input with complete bounded diff/content evidence. */
1190
1410
  declare class FileReviewBrief extends FileReviewBrief_base {}
@@ -1252,6 +1472,12 @@ interface FanOutPipelineInput {
1252
1472
  readonly paths: ReadonlyArray<string>;
1253
1473
  readonly stages: ReadonlyArray<FailedReviewPass["stage"]>;
1254
1474
  } | undefined;
1475
+ /**
1476
+ * Adjudicated identities and prior-round findings injected as discovery
1477
+ * context on the units whose paths they touch. Context only — they never
1478
+ * enter candidates or publication.
1479
+ */
1480
+ readonly priorContext?: PriorReviewContext | undefined;
1255
1481
  }
1256
1482
  /**
1257
1483
  * Run the complete host-scheduled fan-out pipeline over one selected
@@ -1271,5 +1497,5 @@ declare const runFanOutReview: <Provider, ModelProvides, ModelRequires>(binding:
1271
1497
  turns: number;
1272
1498
  }, never, import("effect-agent").IdGenerator | Exclude<Exclude<ModelRequires, import("effect-agent").EngineProvidedToolServices>, import("effect/Scope").Scope>>;
1273
1499
  //#endregion
1274
- export { decideReviewRetirement as $, listChangedFilesHandler as $n, MAX_REVIEW_UNITS as $t, makeFileReviewerInstructions as A, ListChangedFilesQuery as An, fromStoredFinding as At, fingerprintUnchanged as B, ReviewConcern as Bn, FailedReviewUnit as Bt, ReviewWorkPerspective as C, FileDiffView as Cn, ReviewStateMarkerTooLarge as Ct, defaultFileReviewerPolicy as D, FindingCategory as Dn, UnreviewedStage as Dt, confirmedFindingForPublication as E, FileSliceQuery as En, StoredUnreviewedPass as Et, GitHubReviewTarget as F, MAX_WALKTHROUGH_SUMMARY_CHARS as Fn, toStoredFinding as Ft, parseGitHubSubmittedAt as G, ReviewToolkit as Gn, assessFlatReview as Gt, gitHubPullRequestSourceLayer as H, ReviewGuidance as Hn, ReviewAssurance as Ht, PriorReviewLookupFailure as I, PullRequestReviewer as In, unavailableReviewStateAuthenticatorLayer as It, ReviewRetirementDecision as J, WalkthroughEntry as Jn, fanOutInputCoverage as Jt, RetirableReview as K, ReviewToolkitLayer as Kn, boundedListReason as Kt, PriorReviews as L, REVIEW_TOOL_RESULT_MAX_BYTES as Ln, validateReviewState as Lt, runFanOutReview as M, MAX_FINDINGS as Mn, selectReviewRange as Mt, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as N, MAX_PATCH_CHARS as Nn, selectedPullRequestSourceLayer as Nt, fileReviewerInstructions as O, FindingSeverity as On, buildProfileMission as Ot, GitHubApiFailure as P, MAX_WALKTHROUGH_ENTRIES as Pn, toStoredConcern as Pt, ReviewRetirementReport as Q, fileReviewEvidenceChunks as Qn, MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as Qt, PublishedReview as R, ReadFile as Rn, webCryptoReviewStateAuthenticatorLayer as Rt, ReviewPassMisbehaved as S, FileDiffQuery as Sn, renderReviewContent as Sr, ReviewStateMarker as St, assessmentSettlesSuggestionExactly as T, FileSlice as Tn, StoredReviewFinding as Tt, gitHubReviewPublisherLayer as U, ReviewInstructionOptions as Un, ReviewCoverage as Ut, gitHubPriorReviewsLayer as V, ReviewFinding as Vn, FlatReviewAssessment as Vt, gitHubReviewRetirementHostLayer as W, ReviewMission as Wn, ReviewInputCoverage as Wt, ReviewRetirementHost as X, defaultReviewPolicy as Xn, MAX_FILE_EVIDENCE_CHARS as Xt, ReviewRetirementFailure as Y, clampMaxFindings as Yn, flatAssurance as Yt, ReviewRetirementInput as Z, fileDiffView as Zn, MAX_MERGED_FINDINGS as Zt, MAX_REVIEW_CHILDREN as _, rankAndDedupeFindings as _n, annotatePatch as _r, ReviewScopeMode as _t, FanOutPipelineInput as a, ReviewEvidenceShardId as an, MAX_CHANGED_FILES as ar, ReviewPublicationPlan as at, ReviewCandidate as b, ChangedFilesView as bn, isReviewableFile as br, ReviewStateAuthenticationFailure as bt, FileReviewEvidence as c, ReviewUnit as cn, PullRequestSource as cr, planWalkthrough as ct, FileReviewer as d, UNIT_CHANGED_LINE_BUDGET as dn, normalizeRepoRelativePath as dr, MAX_REVIEW_STATE_MARKER_CHARS as dt, MAX_UNIT_EVIDENCE_SHARDS as en, makeReviewInstructions as er, hasReviewMetadataMarker as et, FileReviewerBinding as f, UNIT_EVIDENCE_CHAR_BUDGET as fn, ChangedFile as fr, MAX_STORED_UNREVIEWED_PASSES as ft, MAX_FILE_REVIEW_TOOL_CALLS as g, rankAndDedupeConcerns as gn, PatchLine as gr, ReviewMode as gt, MAX_CHILD_FINDINGS as h, planReviewUnits as hn, MAX_REVIEW_CONTENT_CHARS as hr, ReviewHeadComparison as ht, FanOutInstructionOptions as i, ReviewEvidenceShard as in, reviewInstructions as ir, ReviewEvent as it, reviewCandidateSubjectKey as j, MAX_CONCERNS as jn, isLineageAncestor as jt, makeFileReviewerDefinition as k, ListChangedFiles as kn, fromStoredConcern as kt, FileReviewReport as l, ReviewUnitId as ln, PullRequestSourceFailure as lr, renderAgentPrompt as lt, MAX_CHILD_CONCERNS as m, findingAnchorInUnitEvidence as mn, ChangedPath as mr, ReviewExecutionContext as mt, ConcernCandidate as n, ReviewDiscoveryPass as nn, readFileHandler as nr, AGENT_PROMPT_PREAMBLE as nt, FanOutPipelineOutcome as o, ReviewPassId as on, MAX_FILE_CHARS as or, estimateReviewEffort as ot, FindingCandidate as p, classifyReviewRisks as pn, ChangedFileStatus as pr, MAX_STORED_UNREVIEWED_PATHS as pt, RetirableReviewComment as q, ReviewVerdict as qn, compatibilityCoverage as qt, DiscoveredConcern as r, ReviewDiscoveryPerspective as rn, resolveGuidance as rr, ReviewCommentDraft as rt, FileReviewBrief as s, ReviewRiskCategory as sn, PullRequestMetadata as sr, planPublication as st, CandidateAssessment as t, MAX_UNIT_FILES as tn, readFileDiffHandler as tr, retireStaleReviews as tt, FileReviewToolkit as u, ReviewUnitPlan as un, ReviewInputViolation as ur, GitCommitSha as ut, MAX_UNIT_CANDIDATES as v, anchorViolation as vn, commentableLines as vr, ReviewSelection as vt, ReviewWorkPhase as w, FileReviewEvidenceChunk as wn, StoredReviewConcern as wt, ReviewCandidateId as x, CodeReview as xn, parsePatch as xr, ReviewStateAuthenticator as xt, REVIEW_UNIT_CONCURRENCY as y, ChangedFileSummary as yn, hasReviewableContent as yr, ReviewState as yt, ReviewPublisher as z, ReadFileDiff as zn, FailedReviewPass as zt };
1275
- //# sourceMappingURL=fan-out-Bi1v0VaU.d.mts.map
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