Skip to content

test: diagnose Windows OAuth rollback timeout phase - #279

Merged
mohanagy merged 1 commit into
developmentfrom
fix/278-windows-oauth-rollback-diagnostic
Jul 27, 2026
Merged

test: diagnose Windows OAuth rollback timeout phase#279
mohanagy merged 1 commit into
developmentfrom
fix/278-windows-oauth-rollback-diagnostic

Conversation

@mohanagy

@mohanagy mohanagy commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a Windows-only 4.5-second watchdog to ci: diagnose Windows OAuth profile-rename audit rollback timeout #278's required-audit-finalization rollback test.
  • Emits only fixed phase labels for forward transaction, audit finalization, config restore, vault rollback, metadata rollback, journal cleanup, assertions, or test cleanup.
  • Forwards the real config transaction and filesystem cleanup; no rollback, audit, timeout, or containment behavior changes.

Validation

  • Controlled RED: the new observer first failed with startProfileRenameTimeoutDiagnostic is not defined.
  • npx vitest run tests/oauth-profile-rename-transaction.test.ts
  • npm run test:oauth-console (37 files, 462 passed, 4 expected skips)
  • npm run typecheck
  • npm run lint

Refs #278

Summary by CodeRabbit

  • Tests
    • Added timeout diagnostics for the OAuth profile-rename rollback test.
    • Improved tracking of rollback and audit-finalization phases during failures.
    • Enhanced cleanup and state restoration between test runs.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 64f8dc72-c52b-4bda-b9e6-d3f20cdedc0b

📥 Commits

Reviewing files that changed from the base of the PR and between 9ddd1d1 and ba29579.

📒 Files selected for processing (1)
  • tests/oauth-profile-rename-transaction.test.ts

📝 Walkthrough

Walkthrough

The OAuth profile-rename transaction test now tracks rollback phases, emits timeout diagnostics through stderr, resets diagnostic state between tests, and instruments Windows audit-finalization recovery paths.

Changes

OAuth profile-rename timeout diagnostics

Layer / File(s) Summary
Diagnostic lifecycle and phase tracking
tests/oauth-profile-rename-transaction.test.ts
Adds typed phase state, timeout reporting, filesystem/config phase hooks, cleanup resets, and a focused diagnostic test.
Rollback test phase instrumentation
tests/oauth-profile-rename-transaction.test.ts
Tracks audit failure, transaction forwarding, credential rollback, metadata restoration, and assertion phases in the Windows recovery test.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

  • mohanagy/miftah#260 — Covers related OAuth profile-rename transaction and journal recovery behavior in the same test suite.

Poem

I’m a rabbit with phases to spare,
Tracking each rollback with care.
When the timer bells ring,
stderr makes them sing,
And cleanups leave carrots laid bare.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning Summary and validation are present, but the required Security impact section is missing. Add a Security impact section covering credential handling, audit/failure behavior, subprocesses, and whether the impact is none after review.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main change: adding a Windows OAuth rollback timeout diagnostic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/278-windows-oauth-rollback-diagnostic

Comment @coderabbitai help to get the list of available commands.

@mohanagy
mohanagy merged commit 283ad9d into development Jul 27, 2026
12 checks passed
@mohanagy
mohanagy deleted the fix/278-windows-oauth-rollback-diagnostic branch July 27, 2026 22:54
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