Skip to content

fix(review): harden capture, retries, and navigation - #293

Merged
simota merged 4 commits into
mainfrom
fix/review-widget-reliability
Nov 28, 2026
Merged

simota merged 4 commits into
mainfrom
fix/review-widget-reliability

Conversation

@simota

@simota simota commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Review could capture the wrong repository or an incomplete target, spend correction retries on the same leftover reply, and lose the user's intended navigation during asynchronous state changes. This PR addresses the concrete defects found in a review of capture, persistence, the review engine, agent lifecycle, validation, and the UI.

What changed

  • Capture the intended bytes safely. Isolate Git from inherited repository-selection variables; disable clean/process filters and filesystem-monitor hooks; compare with a private, mode-0600 index copy. Handle file/symlink type changes and index-only removals, preserve spaces and literal backslashes in paths, reject non-UTF-8 names, and deduplicate overlapping selections before enforcing file limits.
  • Keep file operations bound to the checked directory. Read, replace, create, and remove files through opened directory descriptors. Reject FIFOs without blocking, refuse symlinked session logs, and read the same log descriptor that is locked for append.
  • Let reviews recover correctly. Re-read an unchanged rejected reply without spending another retry or blocking its correction. Keep stale send notifications from clearing the current permission wait, apply backoff after post-connect failures, and store absolute working directories.
  • Bound agent discovery. Cap login-shell output at 64 KiB, disable job control for the probe body, and clean up its process group on success or timeout before reaping its leader. This also prevents macOS shell background jobs from escaping cleanup.
  • Keep review evidence and controls consistent. Validate resumed panels and round limits, require non-empty rationale updates and skip reasons, preserve exact finding/coverage paths, and use cumulative coverage in both matrix and report. Prevent duplicate start/resume actions, cancel a pending start when reviewing again, and reveal linked findings while retaining keyboard focus, and size the footer to fit its controls and focus rings.
  • Add 35 regression tests and update the changelog and Review specification. Existing retry-limit tests still exercise exhaustion using distinct invalid replies.

Verification

  • Rust 1.92.0 formatting and git diff --check: passed.
  • cargo test --manifest-path widgets/review/Cargo.toml --locked --offline -- --test-threads=2: 403 passed, 0 failed (160 library, 222 binary/UI, and 21 integration tests). The two pre-existing ignored entries are the manual installed-agent CLI smoke test (not run) and a subprocess helper explicitly invoked by its parent test; no test was disabled to pass.
  • scripts/verify.sh: passed for the affected scope.
  • scripts/verify.sh --full: attempted again locally. Review, browser, discussion, and competition build gates passed, as did formatting, dependency boundaries, widget registration, hook tests, skill-install tests, and registration tests. The remaining local failures were uncached offline dependencies and missing appstreamcli. The repository's full macOS/Linux CI is the final environment-complete gate.
  • Independent reviews of the model/engine, capture/filesystem/store, and live/UI changes: all identified findings addressed and re-reviewed.
  • Rendered six actual Review CLI snapshots on Linux: start, finding detail at 1440×900 and 720×600, matrix, report, and a held review at 720×600. Static inspection found footer clipping, which is fixed and protected by an eight-case layout regression test. The compact held view and wide finding view were re-rendered and inspected after the fix.
  • macOS/native runs exposed regression-fixture assumptions about APFS invalid-byte filenames, Git ignore rules, text-store lifetime, and canonical /var paths; the fixes retain their intended assertions. The macOS process-group failure was reproduced on Linux with monitor mode forced on, then fixed without increasing timeouts.
  • Full CI and Codex code/security reviews will be checked on the final head before the final report.

Not verified

  • Interactive macOS windows and a live multi-agent review against a running Noa instance have not been exercised in this Linux environment.
  • Static snapshots do not establish macOS visual parity or exercise every scroll position, menu, or live interaction.

Risks

  • Snapshot capture intentionally uses raw worktree bytes instead of running Git clean/process filters; the diff and copied post-images now use the same representation.
  • Link-safe operations retain the existing trusted-base/ancestor assumption. They prevent intermediate path substitution below that base; they do not claim protection against every concurrent replacement of the trusted base itself.
  • Git split-index reads may update sharedindex.* timestamps. The original index contents are preserved; the implementation does not promise that every Git metadata timestamp is unchanged.
  • The event format, dependencies, and lockfiles are unchanged.

Risk class

medium — behavior changes within the Review widget, including capture, persistence, agent lifecycle, and navigation.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T15:48:34.484840Z 6cc6da2 Manual request
🔒 Security Review ✅ Completed 2026-11-28T15:51:22.824147Z 6cc6da2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

simota commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 453d1f0b50

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

simota commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner Author

The first native and macOS runs exposed three regression-fixture issues, now corrected in a9728da:

  • Preserve the same TextStore across layout and keyboard dispatch, matching a real window's lifetime.
  • Give the relative-workdir fixture its own Git boundary so the parent repository's target/ ignore does not hide the file being reviewed.
  • Exercise invalid UTF-8 rejection directly on the original path bytes on every platform; APFS rejects creating that fixture before capture can run. The valid replacement-character filename still passes through real capture and snapshot verification.

The actual Review crate now passes 402 tests locally (160 library, 221 binary/UI, and 21 integration tests). The two pre-existing ignored entries are the manual installed-agent CLI smoke test (not run) and a subprocess helper invoked by its parent test. The affected scripts/verify.sh gate also passes. No test was disabled and no verification gate was changed.

@codex review

simota commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

Please review the current head a9728da411ee272f7943fcc5a39cbb210883592c, including the portable regression-fixture follow-up.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: a9728da411

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

simota commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: a9728da411

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

simota commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Follow-up in 1afac07 addresses the remaining macOS failures and the visual check:

  • Keep the installation probe's background jobs in its managed process group by disabling monitor mode for the command body. A forced-monitor Bash fixture reproduces the macOS failure on Linux; the normal and forced-monitor cases now verify cleanup after both success and timeout. Timeouts and output limits are unchanged.
  • Compare persisted working directories with their canonical paths, including macOS's /var → /private/var alias, while retaining the automatic-assignment persistence assertions.
  • Let the Review footer fit its buttons and focus rings. An eight-case layout regression fails with the old fixed-height footer and passes with the fix. The compact and wide snapshots were re-rendered and visually checked.

The final source passes 403 Review tests (160 library, 222 binary/UI, 21 integration) and the affected scripts/verify.sh gate. The two pre-existing ignored entries remain a manual installed-agent CLI smoke test and a subprocess helper invoked by its parent test. Independent review found no remaining findings in these follow-ups.

@codex review

simota commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 1afac07e0d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1afac07e0d

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

simota commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Integrated the updated main (8dc4352, including #292 and #294) in 6cc6da2 and resolved the changelog conflict by retaining both the Review and Verify entries. The merged tree passes all 403 Review tests. The PR's own changes remain scoped to the Review widget, its specification, and its changelog entries.

@codex review

simota commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6cc6da22bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6cc6da22bb

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@simota
simota merged commit 0c2180f into main Nov 28, 2026
3 checks passed
@simota
simota deleted the fix/review-widget-reliability branch November 28, 2026 15:55
@simota simota mentioned this pull request Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant