Skip to content

feat: add recovery and integrity management - #297

Draft
cxymds wants to merge 2 commits into
mainfrom
cxymds/mrf-management-integrity
Draft

cxymds wants to merge 2 commits into
mainfrom
cxymds/mrf-management-integrity

Conversation

@cxymds

@cxymds cxymds commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Description

Add a Recovery & Integrity page so operators can inspect retained MRF responsibilities and retrieve independent integrity evidence. Idle queues, absent observations, accepted risk and completed jobs are explicitly distinguished from verified data.

The page follows the latest main navigation: Operations → Recovery & Integrity, immediately after Running Status, at /recovery/. MRF summaries use bounded polling, hidden-page pause and failure backoff. Responsibility pages load on demand and replace the current page. Node/ID details preserve source identity; risk acceptance freezes the confirmation target and preserves the original request when the outcome is unknown, without automatically retrying it.

Integrity results can be queried, imported from CLI receipts and exported. Job creation and execution remain explicit CLI operations. Heal, DescribeBatchJob and ServerInfo capabilities gate their respective functions; the navigation scope grants no underlying admin capability.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed

Node 22: pnpm install --frozen-lockfile, pnpm type-check, pnpm lint, pnpm format:check and pnpm test:run passed. At head 5fbf08e, the full suite passed 1,060/1,060 and the navigation suite passed 46/46. All 10 current-head CI checks passed, including the production build, quality workflow and test/build workflow.

The final menu was checked in Chinese and English, light/dark desktop, and 390×844 mobile with drawer closure after navigation. The latest-head English fixture run also covered jobs-only permissions, empty/partial/stale/denied/unsupported observations, not-observed and changed-identity details, unknown action outcomes, mixed integrity results, expanded mobile evidence and local protection configuration. Independent correctness, tester, UX and simplicity reviews completed without remaining findings.

Earlier browser acceptance at 2b09c0e covered manual pagination, receipt import/export, denied/unsupported/not-observed/identity-drift/unknown-action states, keyboard focus and long keys. That earlier run recorded zero MRF/readiness requests over 185.9 seconds for a jobs-only account; this timed result was not repeated for the new menu. An exported unknown action remained unconfirmed and unverified.

These browser checks used the actual Console with controlled HTTP fixtures. They are not live Console-to-RustFS integration evidence. Backend/CLI VM acceptance is recorded separately in the companion PRs. Hidden-page behavior passed hook tests; a real hidden-tab transition was not established. Existing development warnings remain recorded in the evidence.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Implements the Console portion of rustfs/backlog#3177 following the accepted P1/P2 plan and performance constraints.

Companion changes: rustfs/rustfs#9399 and rustfs/cli#419 (merged). The merged P0 change rustfs/rustfs#9391 is unchanged.

Screenshots (if applicable)

All 18 screenshots show the final 5fbf08e implementation in English, with the current Operations navigation from main d74c90e. These are after captures of a new page using controlled HTTP fixtures. Focused result and configuration captures show their relevant evidence sections.

Operations menu: light desktop Operations menu: dark desktop
recovery-menu-desktop-light-en recovery-menu-desktop-dark-en
Mobile navigation Mobile page after selection
recovery-menu-mobile-open-en recovery-menu-mobile-loaded-en
Independent verification, evidence and permission boundaries

Completed job with digest-match, mismatch and unsupported items

integrity-results-desktop-dark-en

Expanded identity and digest evidence

integrity-evidence-desktop-dark-en

Mobile evidence card

integrity-evidence-mobile-en

Jobs-only account: result access and unavailable configuration permission

recovery-jobs-only-results-en

Responding-node configuration: writes disabled, external fleet qualification required

integrity-protection-config-en
Empty, partial, read-error, denied and unsupported observations

Empty observations do not establish integrity

recovery-menu-empty-en

Partial observations preserve node coverage

recovery-menu-partial-en

Read errors retain stale evidence with a warning

recovery-menu-read-error-en

Permission denied

recovery-menu-permission-denied-en

Unsupported backend

recovery-menu-unsupported-en
Uncertain observations, identity drift and risk acceptance

Not observed remains unverified

recovery-not-observed-en

Changed bucket identity blocks unsafe recheck

recovery-identity-drift-en

Risk form validation and keyboard focus

recovery-risk-form-focus-en

Unconfirmed action preserves its request and disables duplicate submission

recovery-unknown-action-en

Additional Notes

The upstream menu translations remain preserved in all 15 locales. New feature text is translated in English, Simplified Chinese and Traditional Chinese; other locales retain English fallback for this feature. Unsupported older backends are reported explicitly. Neither a local configuration response, completed job, accepted risk nor these UI checks qualifies protected writes or migration for production rollout.

Expose bounded MRF observations and identity-bound operator actions, and retrieve independent verification jobs with explicit uncertainty, permission gates, and portable receipts.
Merge the current product-domain navigation and place Recovery & Integrity after Running Status. Preserve permission-aware landing, upstream navigation behavior, and translations.
@cxymds
cxymds marked this pull request as ready for review November 13, 2026 12:27
Copilot AI balanced review requested due to automatic review settings November 13, 2026 12:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human confirmation of live Console-to-RustFS behavior and contract compatibility is needed because validation uses controlled HTTP fixtures and the backend companion remains draft.

No open issues 🎉

What changed in this PR

Adds Recovery & Integrity to the Console’s Operations area, separating retained recovery work and operator risk decisions from independent integrity evidence.

Changes:

  • Adds permission-gated navigation, recovery summaries, on-demand responsibility pages, and integrity-result access.
  • Introduces bounded polling, cancellation, failure backoff, and explicit handling of unverified or uncertain outcomes.
  • Adds regression tests, English and Chinese feature text, English fallback for other locales, and UI-review records.
File Description
types/​recovery.ts Defines recovery, integrity-job, and receipt contracts.
tests/​lib/​top-nav-breadcrumb.test.ts Checks the recovery breadcrumb label.
tests/​lib/​sidebar-navigation.test.ts Tests menu order, visibility, and route matching.
tests/​lib/​recovery-permissions.test.ts Tests navigation scope and independent backend permissions.
tests/​lib/​recovery-i18n.test.ts Tests interpolation and recovery-specific translations.
tests/​lib/​recovery-display.test.ts Tests action eligibility, confirmation, and evidence labels.
tests/​hooks/​use-recovery.test.ts Tests polling, cancellation, identity changes, and on-demand reads.
lib/​recovery-display.ts Adds status labels and action-confirmation helpers.
lib/​permission-capabilities.ts Maps recovery capabilities to admin permissions.
lib/​dashboard-route-meta.ts Registers the menu-controlled recovery route.
lib/​console-policy-parser.ts Keeps recovery navigation separate from backend grants.
lib/​console-permissions.ts Defines the recovery page scope.
lib/​api-client.ts Adds caller-managed raw responses and redirect options.
i18n/​locales/​zh-TW.json Adds Traditional Chinese feature translations.
i18n/​locales/​zh-CN.json Adds Simplified Chinese feature translations.
i18n/​locales/​vi-VN.json Adds English fallback feature text.
i18n/​locales/​tr-TR.json Adds English fallback feature text.
i18n/​locales/​ru-RU.json Adds English fallback feature text.
i18n/​locales/​pt-BR.json Adds English fallback feature text.
i18n/​locales/​ko-KR.json Adds English fallback feature text.
i18n/​locales/​ja-JP.json Adds English fallback feature text.
i18n/​locales/​it-IT.json Adds English fallback feature text.
i18n/​locales/​id-ID.json Adds English fallback feature text.
i18n/​locales/​fr-FR.json Adds English fallback feature text.
i18n/​locales/​es-ES.json Adds English fallback feature text.
i18n/​locales/​en-US.json Adds English feature labels and safety explanations.
i18n/​locales/​de-DE.json Adds English fallback feature text.
i18n/​locales/​ar-MA.json Adds English fallback feature text.
hooks/​use-recovery.ts Implements scoped reads, polling, backoff, and pagination.
docs/​ui-review/​register.md Records resolved recovery UI issues and fixture evidence.
config/​navs.ts Places Recovery & Integrity after Running Status.
components/​recovery/​summary.tsx Displays sampled counters and node observations.
components/​recovery/​status.tsx Provides status, error, coverage, and export helpers.
components/​recovery/​management.tsx Coordinates capability-gated tabs and responsibility details.
components/​recovery/​list.tsx Displays paginated responsibilities grouped by source identity.
app/​(dashboard)/​recovery/​page.tsx Adds the recovery route and client-loading state.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

2 participants