FireMUD Delivery Status

PR data refreshed

PR #3271 review history

Add exact native CLI capture recovery

Smoke prerequisite · trusted MinIO images

Review rounds

Three-number pills mean: found (raw) / accepted here (useful) / routed

Hosted CodeRabbit2 completed
1/1/00/0/0
CLI CodeRabbit6 completed
0/0/01/1/00/0/01/1/01/1/0
Subagent Review1 completed
0/0/0

Recorded review history

Reviews and findings

  1. Subagent Review 1 CompletedModel: gpt-6-luna · Xhigh
    Found: 0 Accepted: 0 Routed: 0
    1. No findings recorded for this run
  2. CLI Review 1 CompletedRuntime 1m 16s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  3. Hosted Review 1 CompletedRuntime 5m 12s
    Found: 1 Accepted: 0/1/0 Routed: 0
    1. Reject unsupported codegenInstructions values in successful mode.Minor

      Successful mode currently accepts objects and numbers without validating them. The projection helper converts those values to empty text, so the finding can be stored without issue content. Preserve the existing list handling because _cli_instruction_text explicitly supports lists.

      🛡️ Proposed fix

      --- "a/dev-tools/pr_review/evidence.py"
      +++ "b/dev-tools/pr_review/evidence.py"
      @@ -685,8 +685,10 @@
               if not isinstance(event_type, str):
                   raise EvidenceError(f"capture stdout has an invalid event type at line {number}")
               if event_type == "finding":
                   instructions = event.get("codegenInstructions")
      +            if instructions is not None and not isinstance(instructions, (str, list)):
      +                raise EvidenceError(f"capture stdout has invalid finding instructions at line {number}")
                   if not successful and (not isinstance(instructions, str) or not instructions.strip()):
                       raise EvidenceError(f"capture stdout has a finding without instruction text at line {number}")
                   # Historical successful findings can carry title/comment or message
                   # instead of instructions. Preserve that projection contract while
      
      • Accepted Non-null object/numeric instruction values collapse to empty projection; reject unsupported types while preserving legitimate strings, lists and legacy title/comment payloads.
  4. Hosted Review 2 CompletedRuntime 13m 45s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  5. CLI Review 2 CompletedRuntime 1m 18s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  6. CLI Review 3 CompletedRuntime 1m 17s
    Found: 1 Accepted: 1/0/0 Routed: 0
    1. Verify that the stricter successful-capture grammar does not invalidate retained historical evidence.Major

      parse_capture_events now delegates to _parse_strict_capture_events(successful=True). This reader is shared. _cli_capture_from_sql (Line 1000) uses it for native SQLite archives. _parse_capture_stdout uses it for legacy capture directories. The runner uses it to classify new results.

      The updated tests show that the old successful loader accepted streams that the new grammar rejects:

      • unknown event types such as {"type":"other"}, which the missing-completion case previously used;
      • review_context events without all five string fields;
      • heartbeat events without a valid status;
      • progress events after complete;
      • any error event.

      Some already-completed runs may contain these events in archived cli_events or legacy stdout. For those runs, load_cli_capture now raises CaptureInvalid. The completed run then loses taper credit. Fix-proof clearance for its checkpoint also fails closed. No visible format error explains the change.

      Confirm that no retained archive contains such events. For example, scan review_artifacts rows where kind = 'cli_events', and scan legacy coderabbit-review-logs/*/stdout, for event types outside {finding, complete, start, reviewing, review_context, heartbeat}.

      If any match exists, choose one of these fixes:

      • Apply the strict grammar only to new writer and recovery paths. Keep the previous grammar for reading historical archives.
      • Document a deliberate fail-closed reclassification together with an explicit repair path.
      • Accepted Main accepted retroactive eligibility changes in retained successful reads; no affected live archive is claimed. Preserve original archived interpretation and explicit strict ingestion/recovery. No archive or count rewrite.
  7. CLI Review 4 CompletedRuntime 1m 14s
    Found: 0 Accepted: 0/0/0 Routed: 0
    1. No findings recorded for this run
  8. CLI Review 5 CompletedRuntime 1m 25s
    Found: 1 Accepted: 0/0/1 Routed: 0
    1. Make the strict-mode choice explicit at every caller.Trivial

      _parse_capture_stdout defaults to strict=False, which selects the lenient retained-success parsing. parse_capture_events defaults to strict=True. These two entry points sit side by side and have opposite defaults.

      If a new caller of _parse_capture_stdout omits the flag, it gets lenient parsing. That parsing ignores unknown events, ignores error events, and skips the size and event limits. The caller can then accept a success that current ingestion refuses. The runner and the strict tests already pass strict=True explicitly.

      Make strict a required keyword on both functions. Each caller then states which parsing it needs.

      ♻️ Proposed refactor

      -def _parse_capture_stdout(path: Path, *, strict: bool = False) -> tuple[list[dict[str, Any]], dict[str, Any]]:
      +def _parse_capture_stdout(path: Path, *, strict: bool) -> tuple[list[dict[str, Any]], dict[str, Any]]:
      @@
      -def parse_capture_events(value: str, *, strict: bool = True) -> tuple[list[dict[str, Any]], dict[str, Any]]:
      +def parse_capture_events(value: str, *, strict: bool) -> tuple[list[dict[str, Any]], dict[str, Any]]:
      

      Update the legacy loader call sites to pass strict=False. Update the current-ingestion call sites to pass strict=True.

      • Accepted Main accepted explicit required parser mode at every caller, including retained archive/display reads. Prevent omitted-mode mistakes; preserve strict current ingestion/recovery and original historical interpretation without schema or history changes.
  9. CLI Review 6 CompletedRuntime 1m 38s
    Found: 1 Accepted: 0/0/1 Routed: 0
    1. Add stderr and review-duration-seconds to the symlink refusal cases.Trivial

      cli-recover reads these capture files:

      • stdout
      • stderr
      • metadata.json
      • exit-status
      • review-duration-seconds
      • capture-complete

      This loop checks symlink refusal for only four of them. stderr matters most. Recovery archives its content into SQLite. A symlinked stderr could therefore copy an external file into the retained review artifacts. No test currently checks for that case. The refusal guard could miss these two files without a test failing. Add both names so the test covers every file that recovery reads.

      ♻️ Proposed change

      -        for name in ("stdout", "metadata.json", "exit-status", "capture-complete"):
      +        for name in (
      +            "stdout",
      +            "stderr",
      +            "metadata.json",
      +            "exit-status",
      +            "review-duration-seconds",
      +            "capture-complete",
      +        ):
      
      • Accepted Accepted scoped proof gap: include stderr and review-duration-seconds in the existing symlink refusal loop so every recovery-read artifact has fixture coverage. Existing guard already covers them; no runtime behavior or scope expansion.

Routed Findings

0 Open0 Accepted/Fixed0 Rejected

No routes recorded

Unlinked items

no items unlinked