Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Keep layered environment choices, current byte-exact recovery snapshots, and package-manager failure details. Report pinned package drift without claiming runner resolution. Retain failed Linux installer cleanup for host-owned retry while preserving the install outcome. Reviewed fixes include #2632, #2769, #2783, #2959, #2979, #2983, #2995, #3009, and #2559. Validation: 98 focused setup/registration tests passed; 45 Linux installer tests passed. Real Linux package installation remains unverified.
# Conflicts: # src/application/SetupClientConfiguration.ts # src/application/SetupRecoveryBackup.ts # src/application/SetupSkill.ts # tests/boundary/filesystem/setupSkill.test.ts
|
CI-fix track: the Windows lane failure (inspection conformance |
|
Thanks for merging main and preserving the additional recovery cases. I've retained your merge and updated the branch to main I updated the title and description to reflect the remaining test contribution: byte-exact non-UTF-8 repair and rollback, a verified current snapshot alongside a historical first backup, snapshot reuse, and readback before publication. The public CLI case checks a successful repair, the exact recovery bytes, and an idempotent rerun. The linked-skill CLI assertions also now check parsed remediation and the doctor's exact issue path and Both focused files pass: 28 tests passed, with four POSIX permission cases skipped on Windows; all six public CLI cases passed. The complete |
Summary
Add boundary and public CLI regression coverage for byte-exact managed-skill recovery snapshots. The implementation from #2958 is already on main in ec56c1da0. The remaining PR changes only
tests/boundary/filesystem/setupSkill.test.tsandtests/acceptance/setup/selectedSkillSetup.test.ts.The added cases protect three related guarantees: snapshots preserve the current file's exact bytes, an older first backup is retained without being mistaken for the current recovery copy, and setup verifies a snapshot before publishing any replacement file. The CLI case also checks that repairing a non-UTF-8 reference leaves the selected skill aligned and that the next invocation is idempotent.
Related issue: #2958, already resolved by the implementation on main.
Problem and expected behavior
A managed skill can already have a
.rea.backupfrom its first installation when a later repair starts. If that backup contains V0 and the live file contains V2, a V2-to-current repair needs a verified V2 recovery copy. Reporting V0 as the current transaction's recovery location would lose the relationship between the file that was replaced and the file the user can recover.Byte identity also matters independently of text validity. A skill file can contain bytes from a legacy editor encoding or damaged content. Decoding those bytes as UTF-8 and re-encoding the result does not preserve the original. Setup must be able to replace the damaged file while keeping its exact previous bytes available, and a successful rollback must write those same bytes back.
The implementation on main handles these guarantees through verified snapshots and original byte buffers. These tests exercise the filesystem and CLI outcomes, including transaction error reporting, instead of introducing another snapshot-selection rule.
Change and scope
The filesystem tests create isolated managed-skill directories and exercise
installCanonicalSkillthrough its production implementation. New cases cover:unchanged; repairing the same original again reuses the existing snapshot without rewriting it.The publication and copy fault cases are deterministic transaction fixtures around real files. They check the production owner's failure semantics; they do not simulate a successful filesystem result or report a fault fixture as a developer test failure.
The acceptance test extends the existing selected-skill public CLI workflow. It writes a known non-UTF-8 byte sequence into an installed reference while keeping the historical first backup, invokes the actual setup command, and checks
status: "ready"withappliedActions: ["installed_skill"]. It verifies complete bundle alignment, the unchanged first backup, and the byte-exact content-addressed recovery file. The next CLI invocation returnsstatus: "ready"with an emptyappliedActionsarray. Existing assertions continue to protect the selected install location and caller configuration.The updated branch retains main's additional setup tests and imports alongside this coverage. All three production
Setup*.tsfiles remain identical to main. This is test-only coverage for the existing installation and recovery authority.The existing linked-skill CLI cases now inspect parsed JSON fields for the rejected link's path. On Windows, the serialized JSON representation escapes path separators; comparing an unescaped filesystem path to that representation is not a reliable check of the reported identity. The assertions check
remediationand the doctor'sissuesentry with the exact path andsymbolic_linkkind. They continue checking the nonzero result,skill_install_failed, no applied actions, the unmanaged state, and preservation of the link.Contract and boundary impact
Verification launches the local setup CLI and mutates fixture-owned files. It does not install unrelated tools, contact an external application, or execute a reverse-engineering provider.
Evidence and regression coverage
The historical recovery defect is documented in #2958. This PR preserves additional non-UTF-8, historical-backup, pre-publication verification, and idempotence coverage against the implementation that is now on main.
The filesystem cases read the actual snapshot bytes and inspect the production transaction result. The public CLI case additionally proves that the repair completes through the user-facing command and that the selected bundle is aligned afterward. A text-only snapshot comparison, a recovery path pointing at the historical backup, or publication before successful snapshot readback would violate these assertions.
Validation performed
The branch normally merges main
f75b1a416ba67b8421e7dbd248160afedb79581fand retains the maintainer's previous merge. Verification used Node.js 24.18.0 and npm 11.16.0 on Windows x64.npm run test:focused -- tests/boundary/filesystem/setupSkill.test.ts tests/acceptance/setup/selectedSkillSetup.test.ts— 28 tests passed; four POSIX permission-mode cases were skipped on Windows. All six public CLI cases passed.npm run check— passed typechecking, lint and resolved module boundaries, formatting, unused-code checks, package metadata checks, and architecture guards.git diff --check origin/main...HEADpassed and the working tree is clean.Windows x64 verification includes the production filesystem workflow and the actual local setup CLI. POSIX permission-bit assertions are not claimed as executed on Windows; platform-specific skips are reported with the results. No native provider or other operating-system installation qualification is claimed.
The current-head GitHub
CI requiredcheck has passed, including the source tests, build, static checks, and portable test suite.Compatibility, safety, and release
The remaining diff changes tests only. It adds no runtime migration, package dependency, setup effect, or release metadata. Snapshot and rollback fixtures remain confined to their owned temporary directories, and existing main coverage is retained.
Author readiness
Human owner: @dakjdakd
Before merge