Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions design/project-management/ai-observations.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ Entry format:
- Expected pattern: inspect the resolver's actual distribution and package metadata before attributing configuration-cache failures to transport. A bounded official Adoptium metadata input to Gradle's native generator preserves generator ownership without inventing Foojay IDs or unsupported platform aliases.
- Current status: the maintenance helper now validates one official Java 21 release across six supported platforms; successful generation and hosted exact-head proof must be recorded separately.
- Reconsideration trigger: revisit resolver-only maintenance after official Foojay metadata again provides the required Temurin platforms; retain the metadata validation and generated-artifact proof.

- `2026-10-10`: Completed Hosted replay can conceal a late publication batch
- Context: PR #3134's CodeRabbit publication reported 14 findings across two explicitly linked batches, but the controller imported 13 from the first batch and repeated sync reported success without reading the continuation.
- Observation: a substantive primary review and an idempotent terminal record do not prove the provider publication is complete; freezing the first batch's timestamp also excludes later finding evidence.
- Expected pattern: require complete immutable publication membership before completion, and recover verified older partial unfinalized runs additively without replacing dispositions or inventing another round. Retain original and supplemental evidence together.
- Current status: the bounded controller repair passes focused local regression proof; trusted promotion and canonical live recovery remain separate steps, so the live missing finding is not yet confirmed recovered.
2 changes: 2 additions & 0 deletions dev-tools/pr_review/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ If the process is killed before the atomic exchange, the JSON path remains a reg

Before both the shared state directory has completed its SQLite cutover and the review-record schema has been bootstrapped or migrated, CLI reviews may still start with durable legacy capture. Those prerequisites gate recording a CLI attempt in SQLite and registering a new Hosted attempt, not the ability to start a CLI review. After both prerequisites, `run cli` records each attempt and complete provider JSON in SQLite, including failures and rate limits. A completed CLI result commits its attempt, source run, and link in one transaction. New Hosted requests register their attempt before posting. `records sync-hosted` observes already-posted requests and stores their terminal GitHub review, comment, and thread evidence; a completed result commits its attempt, source run, and link in one transaction. It also recovers older partial completions from their archived exact evidence. The status server runs sync during scheduled refresh when its configured controller supports the command. Sync does not post a review or change taper. Subagent passes use `records subagent start --model <actual-tool-model>` (and optional `--reasoning-effort <actual-effort>`), followed by `complete` or `fail`. New native attempts require the actual bounded model identifier from tool metadata in both the CLI and storage API; version names are not hardcoded. Historical attempts and exceptional curated imports may retain an unknown model and are never inferred from reviewer prose. Declared model/effort are projected once with the existing batched attempt history and displayed in the linked browser review header, without changing counts or admission; every finding supplied to a routine `complete` command requires an exact `severity` of `Critical`, `Major`, `Minor`, or `Trivial`, while a zero-finding completed pass remains valid. The label is persisted as `display_severity` on the finding and its structured routes, and never changes counts, taper, queue selection, or review admission. Historical imports may retain unspecified severity. Before both prerequisites are met, follow the pre-cutover capture and routing behavior described below and in the lifecycle guidance.

Explicit CodeRabbit publication batches form one Hosted result: all uniquely numbered batches must identify the same provider publication, attempt, exact reviewed head and captured trigger window before completion is recorded; multiple complete eligible publications remain ambiguous. The primary batch retains its response ID while the last submitted batch sets the coverage cutoff. Its explicit actionable-comment count must match all uniquely owned attached root comments with valid original timestamps and `originalCommit` heads; an absent or unparseable count never implies zero. Summary-only outside-diff and duplicate findings retain their separate handling. A comment's current commit may move after fixes without changing its original reviewed head or granting credit on the new head. `records sync-hosted` also recovers an older completed but unfinalized partial publication into its original run, preserving original archives, import payload, accepted/rejected decisions and round/quota identities. Newly recovered findings remain unresolved until adjudicated; complete supplemental evidence and a recovery receipt are retained for ordinary finding readers. Conflicting identities or findings and finalized partial runs fail closed. Completed unmarked legacy results retain their existing replay behavior.

Set or correct display-only severity on an exact retained observation with `records source set-severity --run-id <run> --finding-key <key> --severity Critical|Major|Minor|Trivial`. This updates only the nullable observation field; immutable import payloads, provider artifacts, finding text, decisions, and counts remain unchanged. A stored value takes display precedence over provider-derived severity, while an unspecified value retains the existing provider projection.

If a completed subagent pass mistakenly recorded an implementation handoff or another non-finding as a rejected finding, use `records subagent correct --run-id <run> --finding-key <key> --actor <operator> --reason "<classification correction>"`. The exact native attempt must be completed and linked to its finalized subagent run. Accepted, routed, unresolved, or fix-associated observations cannot become notes. The correction retains the original observation, source decision, immutable import payload, and terminal timestamps; it appends bounded provenance to the existing attempt metadata. History and batch history expose the retained note under `record_corrections`, show effective discovery counts, and retain `original_counts` on the affected run. Exact replay is idempotent; a different provenance for the same correction is refused. Original completion replay remains valid and reports effective counts. Provider reviews, taper, queue selection, and accepted finding obligations are unaffected. This requires no database migration or writer-build change; select the updated trusted controller reader for both operators and the status site before using the correction, because older readers continue showing the original classification and counts.
Expand Down
6 changes: 3 additions & 3 deletions dev-tools/pr_review/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def run_gh_query(query: str, variables: dict[str, str | int]) -> dict[str, Any]:
changedFiles
commits(last:1) { nodes { commit { oid committedDate statusCheckRollup { state } } } }
reviewThreads(first:100) { nodes { id isResolved isOutdated path line comments(first:20) {
nodes { id databaseId author { login } body url createdAt updatedAt }
nodes { id databaseId author { login } body url createdAt updatedAt pullRequestReview { databaseId } originalCommit { oid } }
pageInfo { hasNextPage endCursor }
} } pageInfo { hasNextPage endCursor } }
comments(first:100) { nodes { id databaseId author { login } body createdAt updatedAt url }
Expand All @@ -419,7 +419,7 @@ def run_gh_query(query: str, variables: dict[str, str | int]) -> dict[str, Any]:

def _connection_query(connection: str) -> str:
fields = {
"reviewThreads": "nodes { id isResolved isOutdated path line comments(first:20) { nodes { id databaseId author { login } body url createdAt updatedAt } pageInfo { hasNextPage endCursor } } }",
"reviewThreads": "nodes { id isResolved isOutdated path line comments(first:20) { nodes { id databaseId author { login } body url createdAt updatedAt pullRequestReview { databaseId } originalCommit { oid } } pageInfo { hasNextPage endCursor } } }",
"comments": "nodes { id databaseId author { login } body createdAt updatedAt url }",
"reviews": "nodes { id databaseId author { login } body state submittedAt url commit { oid } }",
}[connection]
Expand All @@ -438,7 +438,7 @@ def _thread_comments_query() -> str:
node(id:$threadId) {
... on PullRequestReviewThread {
comments(first:20, after:$after) {
nodes { id databaseId author { login } body url createdAt updatedAt }
nodes { id databaseId author { login } body url createdAt updatedAt pullRequestReview { databaseId } originalCommit { oid } }
pageInfo { hasNextPage endCursor }
}
}
Expand Down
Loading
Loading