PR #2916 review history
5C/5D · recovery and replay
Review rounds
Three-number pills mean: found (raw) / accepted here (useful) / routed
Recorded review history
Reviews and findings
- Subagent Review 1 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 2 CompletedModel not recordedFound: 1 Accepted: 1 Routed: 0
- Backup readback omits unreadable source-fix proof
A source resolution hidden by failed history joins could pass backup validation. Accepted owner fix adds resolution PR-set and logical readback counts; test_restore_rejects_source_resolution_hidden_from_history.
- Accepted Actual reviewer finding accepted in owner/root adjudication and fixed with focused proof; historical registration after explicit root authorization. No routed or root-only finding attributed to this pass.
- Subagent Review 3 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 4 CompletedModel not recordedFound: 3 Accepted: 3 Routed: 0
- Partial record schema can appear unbootstrapped
Record tables without review_records_metadata were treated as an absent schema and SQL-first reads could fall back to raw files. Accepted fix distinguishes damaged partial schema from truly absent records.
- Accepted Actual reviewer finding accepted in owner/root adjudication and fixed with focused proof; historical registration after explicit root authorization. No routed or root-only finding attributed to this pass.
- Exact provider origin lacks semantic checkpoint binding
Provider origin lookup did not verify its stored checkpoint fingerprint against retained parsed source metadata. Accepted fix validates the original snapshot then compares parsed semantics with only edit timestamp neutralized.
- Accepted Actual reviewer finding accepted in owner/root adjudication and fixed with focused proof; historical registration after explicit root authorization. No routed or root-only finding attributed to this pass.
- Shared allocation clearance ignores durable source proof
Accepted findings were cleared by ancestry rather than durable exact source resolutions in shared clearance guards. Accepted scoped fix honors resolved proof; ordinary human stop gains no new gate.
- Accepted Actual reviewer finding accepted in owner/root adjudication and fixed with focused proof; historical registration after explicit root authorization. No routed or root-only finding attributed to this pass.
- Subagent Review 5 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 6 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- Subagent Review 7 CompletedModel not recordedFound: 1 Accepted: 1 Routed: 0
- Archived findings can inherit mismatched source proof
A changed same-count archived finding could inherit an existing source decision and fix proof. Accepted scoped fix compares retained canonical projections; preserves redaction, bounded text and prior native title-only semantics. No complete raw-byte attestation claim.
- Accepted Actual reviewer finding accepted in owner/root adjudication and fixed with focused proof; historical registration after explicit root authorization. No routed or root-only finding attributed to this pass.
- Subagent Review 8 CompletedModel not recordedFound: 0 Accepted: 0 Routed: 0
- No findings recorded for this run
- CLI Review 1 CompletedRuntime 3m 15sFound: 5 Accepted: 0/3/2 Routed: 0
- Minor
Add a short, bounded delay before retrying after HostedAdmissionBusy in the retry handler, while preserving the final-attempt re-raise. Use increasing waits capped at a brief maximum, then continue with _target and _ensure_runnable.
- Accepted Accept bounded contention backoff: short capped increasing waits before fresh Hosted target/admission retry; retain final-attempt re-raise and no retry of actual posted/active requests.
- Trivial
Replace the hard-coded writer-build value in the bootstrap fence assertions with WRITER_BUILD, including the StateError regex, and import WRITER_BUILD from its defining module if needed. Keep the writer_build=5 rejection behavior unchanged.
- Accepted Accept maintainability correction: bootstrap expected current writer fence should derive WRITER_BUILD, while hard-coded writer_build=5 remains the deliberately rejected historical writer.
- Minor
Update the records-history lookup so transient ReviewRecordsError or OSError failures are not cached in _records_histories and yield the pending outcome. In review_stop_audit and legacy_transition_reauthorization_audit, invalidate the entry for the PR alongside the existing _histories cache invalidation so each authorization check reads fresh records history.
- Accepted Accept fresh history correction: transient records failures must return pending without caching; stop/transition audits invalidate stored history so authorization reads are fresh.
- Minor
Update the repository comparison in the provider-origin check to casefold both
origin["repository"]andself.repo, ensuring mixed-case stored values match. Validate that the origin repository is a string before casefolding, and preserve the existing rejection behavior for missing or non-string values.- Accepted Accept repository identity normalization: validate origin repository as string and casefold both stored/current values. Preserve pending outcome for absent or malformed origin.
- Trivial
Update the
source_resolveparser’s--fix-shaargument to use the existing_exact_shatype validator, so abbreviated or malformed commit SHAs are rejected during argument parsing.- Accepted Accept CLI boundary validation: source resolve --fix-sha should use existing exact SHA parser; reject abbreviated/malformed inputs before operations.
- CLI Review 2 CompletedRuntime 2m 46sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Hosted Review 1 CompletedRuntime 9m 03sFound: 5 Accepted: 2/1/2 Routed: 0
- Do not let an in-flight or not-yet-finalized native CLI attempt fail discovery for the whole PR.Major
discover_cli_capturesskips only the run IDs returned bycompleted_cli_capture_snapshots. Any other retained directory goes to_load_cli_capturewith SQL-first loading enabled. When that run has a SQL association that is not yet a completed snapshot, line 1097 re-raises_SqlCaptureInvalid. Three reachable states trigger this:- Normal run window.
run_cli_reviewwritesstdout,exit-status, andcapture-complete, then callscomplete_attempt_run. Between those steps the attempt is stillstarted.cli_capture_snapshotraises"not terminally completed", which becomes_SqlCaptureInvalid. - Failed records write. If
complete_attempt_runfails,run_cli_reviewstoresrecords_warningand the attempt staysstartedpermanently. Every later CLI history read for that PR fails until a repair runs. - Read race. The attempt completes after the
completed_cli_capture_snapshotsread but before the directory scan. The directory then loads with the syntheticaccepted=0checkpoint._cli_capture_from_sqlrequiresfinalizedand matching decisions, so it raises.
In all three states,
LiveEvidence.history(pr, "cli")raises instead of reporting a pending or active capture.Classify a non-terminal SQL attempt as not counted during discovery. Also skip retained directories whose run has any SQL attempt, because the SQL snapshot pass is authoritative for those runs.
Sketch
# sqlite_review_records.py (_cli_capture_snapshot) - if attempt[3] != "completed": - raise ReviewRecordsError("CLI SQL attempt is not terminally completed") + if attempt[3] != "completed": + raise CliCaptureInProgress("CLI SQL attempt is not terminally completed")# evidence.py (_load_cli_capture) + except CliCaptureInProgress as exc: + raise _SqlCaptureNotCounted("linked SQLite CLI attempt is still in progress") from exc except CliCaptureTerminalFailure as exc:Discovery passes
validate_checkpoint_decisions=False. For that call, also skip the checkpoint-bound finalization and count checks in_cli_capture_from_sql, for example by passingcheckpoint=None.- Accepted Accepted: in-flight native CLI attempts and the completion/finalization race must not poison PR history; SQL-associated directories cannot fall back to synthetic checkpoint validation. Focused race proof pending.
- Normal run window.
- Add the over-length and uppercase
--fix-shacases.TrivialThe parser test rejects 12-character, non-hex, and 39-character values. It has no 41-character case. If
--fix-shavalidation uses a prefix match (for examplere.matchwithout$orfullmatch), the parser accepts a 41-character value and this test still passes. The PR objectives list exact fix-SHA parsing as an accepted correction, so the upper boundary needs a test.Add
"a" * 41to the invalid values. Also assert the intended handling of an uppercase 40-character SHA (accept and normalize, or reject), so case handling is fixed by a test.♻️ Proposed test extension
- for invalid_sha in ("a" * 12, "g" * 40, "a" * 39): + for invalid_sha in ("a" * 12, "g" * 40, "a" * 39, "a" * 41, ""):Based on learnings, validation tests should cover "zero/boundary values" and invalid inputs that each assert the expected rejection.
- Accepted Accepted: add 41-character and uppercase exact-SHA parser boundary tests, preserving canonical parser normalization. Focused proof pending.
- Exclude curated
import-runrecords from native CLI capture discovery.Majorrecords import-runacceptschannel: "cli"and writes a completed run without areview_attemptsrow. The secondUNIONbranch then selects that run._cli_capture_snapshot()raises"CLI SQL association is missing its attempt", andLiveEvidence.history()can fail for the whole PR throughdiscover_cli_captures().Require a positive native CLI marker before selecting an attempt-less run. A
cli-run:<run_id>:finding:observation prefix is one suitable marker."AND NOT EXISTS (" "SELECT 1 FROM imported_artifacts i WHERE i.run_id = r.run_id) " "AND NOT EXISTS (SELECT 1 FROM provider_origins o WHERE o.run_id = r.run_id) " + "AND EXISTS (SELECT 1 FROM finding_observations fo " + "JOIN findings f USING (finding_id) " + "WHERE fo.run_id = r.run_id AND substr(f.source_finding_key, 1, " + "length('cli-run:' || r.run_id || ':finding:')) = " + "'cli-run:' || r.run_id || ':finding:') " "ORDER BY run_id",- Accepted Accepted: curated CLI import-run records without a native attempt must not enter native capture discovery; require the run-specific native marker and retain malformed-native fail-closed proof.
- Aggregate detail can exceed the 8,000-character limit.Minor
The admission loop reserves only
min(len(body), 32)characters for each body.fixedthen omits the\n\nseparators added by"\n\n".join(parts)and the\n\nbefore each body. As a result,budget * len(entries) + fixedcan exceed 8000 by about4 * len(entries) + 2characters._hosted_display_detailcaps its output with[:8000], so this function breaks the same shared display limit. Include every separator infixed, or apply a final cap.Proposed fix
- fixed = len(note) + sum(len(heading) + len(excerpt) + 6 for heading, _ in entries) + # 2 for each join separator, 2 before each body, 2 before each excerpt. + fixed = len(note) + sum(len(heading) + len(excerpt) + 8 for heading, _ in entries) budget = max(0, (8000 - fixed) // len(entries)) if entries else 0 @@ - return "\n\n".join(parts) + return "\n\n".join(parts)[:8000]- Accepted Accepted: aggregate Hosted display detail must include separators in its budget and stay within the 8000-character bound, preserving section/omission signals. Regression proof pending.
- Change only
provider_idin the mismatched-binding fixture.TrivialThe test intends to show that a wrong provider binding returns
"pending"without a resolution lookup. Themismatched_recordsorigin differs from the validhosted_recordsorigin in three ways:- It has no
"repository"key. provider_iduses a different format ("9002"instead of"review:<id>").provider_idnames a different review.
The repository check alone can make this test pass. If the provider-ID comparison in
_source_resolution_statusregresses, this case still returns"pending", so the test does not catch the regression.Copy the valid origin and change only
provider_id. Add a separate case for a missing or differentrepositoryif that rule also needs coverage.♻️ Proposed fixture change
mismatched_records = RecordsReader( [ { - "source_pr": 42, - "channel": "hosted", - "checkpoint_id": 7001, - "checkpoint_fingerprint": sqlite_provider_imports._checkpoint_fingerprint(hosted_checkpoint), - "provider_id": "9002", + **hosted_records.origins[0], + "provider_id": "review:9002", "run_id": "wrong-provider-run", } ] )- Accepted Accepted: isolate provider-ID mismatch in the fixture by copying valid origin and changing only provider_id; retain separate repository-negative cases. Focused proof pending.
- It has no
- CLI Review 3 CompletedRuntime 2m 54sFound: 1 Accepted: 0/1/0 Routed: 0
- Minor
Validate each item in observations before building by_index, requiring a dict with an integer index, and raise CaptureInvalid for malformed items so they follow the existing evidence-error handling path. Also reject duplicate indices rather than silently overwriting an observation in the mapping.
- Accepted Accepted: validate SQLite observation mappings and exact integer indices; reject malformed or duplicate indices with CaptureInvalid. Prepare focused regression proof locally; publish after active Hosted finishes.
- CLI Review 4 CompletedRuntime 2m 53sFound: 0 Accepted: 0/0/0 Routed: 0
- No findings recorded for this run
- Hosted Review 2 CompletedRuntime 7m 59sFound: 4 Accepted: 0/2/1 Routed: 0
- Before promoting this change, check that the scheduled backup runs build 6.Trivial
WRITER_BUILD = 6, together with the v7 records schema, is a schema promotion.records migrateraisescontroller_metadata.min_writer_buildto 6. Any process that still runs build 5 then fails_require_controller_compatibleor_require_compatible. The scheduled backup runs from its own checkout, so it can be one of those processes. The 2026-09-30 observation "Review-record upgrades must prove every selected controller entrypoint" names this exact risk. Its trigger is "verify the scheduled backup's selected writer and exact database readback before the next schema promotion."Before promotion, run these checks:
- Read the writer build of the backup service's checkout, for example with
dev-tools/pr-review --version. - After migration, run one backup and confirm that the remote readback succeeds.
- Check that the status site and the shared controller run the same build.
As per coding guidelines, the observation's reconsideration trigger requires this check: "verify the scheduled backup's selected writer and exact database readback before the next schema promotion".
- Accepted Make compatible scheduled-backup writer and post-migration backup/remote-readback explicit promotion gates. Do not perform live promotion before reviewed merge.
- Read the writer build of the backup service's checkout, for example with
- Use a source-resolution error for records-store failures.Minor
source_resolution_statusemits onlyNone,"pending", or"resolved"."pending"also representsReviewRecordsErrorandOSErrorwhile reading or resolving records. The controller then reports"accepted findings need a published corrected head", which can mislead operators when the records store cannot be read.Keep the fail-closed behavior, but report source-resolution failure instead of a missing corrected head for this path.
- Accepted Distinguish records-store read/resolve failures from ordinary unresolved fixes in status and request diagnostics; remain fail closed.
- Document that restoring a pre-v7 artifact needs a version-matched tool or a post-restore migration.Minor
This change adds
source_finding_resolutionsandsource_finding_resolutions_pr_idxto the exact allowlists. Because of that,_require_allowlisted_schemanow rejects every v4–v6 artifact with "database tables do not match the allowlisted FireMUD controller and review-record schema".records.history(pr)also rejects those artifacts, because_require_compatiblerequiresrecords_schema_version == 7.After promotion, the job keeps the 30 most recent versioned artifacts. Some of those artifacts were made before the cutover. A rollback or disaster recovery from one of them fails with the promoted entrypoint. The operator then needs an older checkout, and this README section does not say so.
Pick one of these fixes:
- Document the version coupling in the restore section.
- Allow restore of known older records-schema versions. Restore into an isolated destination, then run
records migrate.
📝 Proposed README note
Replace the quoted filename with the exact `lastSuccess.filename` value. + +Restore validation requires the artifact's records schema to match this +entrypoint's schema exactly. An artifact made before a records-schema +promotion (for example a v6 artifact after the v7 promotion) must be +restored with the version-matched pre-promotion entrypoint, and then +upgraded with `records migrate` from the promoted entrypoint.- Accepted Document version-matched restore of pre-v7 snapshots into isolated destination before promoted migration; preserve strict schema checks.
- Remove this completed observation.Minor
The outcome says the fixture now isolates discovery and the 115-test suite passes. The entry identifies no remaining blocker or deliberate postponement. Remove it unless one remains. As per coding guidelines, “Do not use this file as a bug log for ordinary fixes that were completed in the same piece of work” and “Retain an entry only when a genuine blocker or deliberate postponement remains.”
- Rejected The observation preserves a reusable isolation lesson and reconsideration context, not merely a bug outcome. AGENTS permits append-only outside human-authorized stewardship; retain it.
- CLI Review 5 CompletedRuntime 4m 07sFound: 3 Accepted: 0/2/1 Routed: 0
- Minor
In the closed-PR cooldown path, compare the repository metadata case-insensitively after validating it is a string, and derive the reset from the CodeRabbit response’s createdAt rather than terminal_at. Parse the response timestamp and skip the response if it is missing or later than terminal_at; pass the validated response time to hosted._rate_limit.
- Accepted Fix archived closed-PR cooldown identity case comparison and bind relative reset to response creation, rejecting missing/future timestamps.
- Trivial
Update the history-read flow containing
_add_hosted_display_titlesand_add_run_durationsso these enrichments are not performed unconditionally on every read: make them opt-in for callers that need the fields, or compute the stable display fields when records are written or imported.- Accepted Add backward-compatible opt-out for display-only history projections and use it for safety-only internal history reads; preserve default public display and immutable records.
- Minor
In the finding-title enrichment loop, validate each title independently so a ReviewRecordsError does not discard enrichment for the entire run. Update the title validation in FindingObservation handling to set only the invalid finding’s title to None, then continue building its enrichment and processing sibling findings.
- Accepted Keep optional title-validation failure local to its finding; preserve independent sibling display projections.
Routed Findings
No routes recorded
Unlinked items
no items unlinked