Skip to content

test(config): include uninstall refusal reason in regression output - #8242

Merged
lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:codex/ownership-uninstall-result-20261107
Nov 7, 2026
Merged

lidge-jun merged 1 commit into
lidge-jun:devfrom
luvs01:codex/ownership-uninstall-result-20261107

Conversation

@luvs01

@luvs01 luvs01 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When the lookalike metadata-temp test is refused before removal, its status-only assertion hides the reason. Compare the complete removal result so a failure includes the refusal reason and residual paths, while continuing to require that all three unowned files are retained.

This is a test-only follow-up to the now-merged #8238 and #8239, based on dev 7ea41c3608d1a130a6d9fa2338ad3a151d87c06b. Product behavior, platform exclusions and timeouts are unchanged. It improves diagnosis; it does not claim to fix the earlier intermittent Windows ACL/journal failures.

Verification

  • Bun 1.4.4 through the repository's normal isolation wrapper: bun scripts/test.ts tests/config/config-ownership-concurrent-record.test.ts --parallel=1 — 42 passed / 6 skipped / 0 failed / 190 assertions on Windows, 41.35 seconds. The six existing platform exclusions are unchanged.
  • bun check --no-script --noEmit — 2,322 source files passed; the test file itself was compiled and executed by the focused suite.
  • Privacy scan, file-size ratchet and git diff --check passed. Independent review confirmed that no assertion was weakened and no product code changed.
  • The full repository suite is disproportionate on the shared Windows host for one assertion change. The complete affected test file was run; CI 42300096209 passed on exact head a85c4c2bddeb1341bea99c8a1d76badb3e762c58; CodeRabbit check 128176058038 also passed with no review threads.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • No public documentation change is needed for a test diagnostic.
  • No product, authentication or permission changes.
  • Current-head hosted CI and review are complete.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for manifest-like temporary files, including partial status, unowned-file details, and sorted residual paths.

Maintainer integration verification

Maintainer integration into dev is based on the independent review and the approval on exact head a85c4c2bddeb1341bea99c8a1d76badb3e762c58. PR CI passed ci, gates, and test changed; full Ubuntu shards and platform-specific jobs were filtered by PR policy.

With isolated temporary HOME, OPENCODEX_HOME, CODEX_HOME, and CLAUDE_CONFIG_DIR, the focused ownership suite passed 48 tests, the layout/ratchet/Lab guards passed 63 tests, and typecheck, privacy scan, and structure check passed. These checks also passed on the clean temporary union with dev at 6df9e1176767d5da2b674b7d9ee8a8df4bbf2b65. The temporary merge was discarded. No behavioral regression test is required for this test-only diagnostic change. The full local suite was not run due to its cost alongside concurrent repository work; broader coverage remains with batch CI.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The config ownership test now checks the full partial-removal result, including its status, reason, and sorted residual paths.

Changes: Config ownership test coverage

Layer / File(s) Summary
Assert the partial-removal result
tests/config/config-ownership-concurrent-record.test.ts:353-357
The test checks the complete result, including the "partial" status, the unowned-files reason, and sorted residual paths.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Possibly related PRs

Suggested labels: chore

Suggested reviewers: lidge-jun

Merge Risk: Minimal · up to a85c4

The change strengthens uninstall-result checks without changing product behavior. No actionable merge-blocking risk is identified; merge after normal checks pass.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title describes the test change in tests/config/config-ownership-concurrent-record.test.ts. The test compares the full uninstall result, including the refusal reason and residual paths.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7ea41c3 and a85c4c2.

Files selected for processing: 1

  • tests/config/config-ownership-concurrent-record.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@luvs01

luvs01 commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Please review head a85c4c2bddeb1341bea99c8a1d76badb3e762c58. This test-only follow-up exposes the full uninstall result instead of hiding the refusal reason behind a status-only assertion. The affected Windows file passed 42 tests with its six existing platform skips. This does not claim to fix the two earlier intermittent environment/residue failures.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Nov 6, 2026
@luvs01
luvs01 marked this pull request as ready for review November 6, 2026 22:07

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving head a85c4c2bddeb1341bea99c8a1d76badb3e762c58 (one test file, +5/-2).

  • The new whole-object toEqual is strictly stronger than the old pair of assertions: it still requires status: "partial" and the exact sorted residual set (all three lookalike files kept), and additionally pins reason. On dev the only partial branch whose residuals are the directory's remaining entries is src/lib/config-ownership.ts:933-937 with "unowned files remain in the config directory"; the other partial branches report [configDir], so the pinned reason cannot reject a currently passing outcome.
  • On failure Bun now prints the full result, including reason, which is the stated diagnostic goal. readFileSync(userData) still proves user data was not touched.
  • No product code changes. Neither this test file nor src/lib/config-ownership.ts changed on dev since the PR base; it merges cleanly onto aaa3c20f3f.
  • Hosted CI on this exact head: Cross-platform CI gates, test changed, storage policy, ci green (Windows runner selection ran; Windows shards are not part of the PR lane).

@lidge-jun
lidge-jun merged commit eedbb2b into lidge-jun:dev Nov 7, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants