Repository navigation
fix(hub): show the Wiki migration command in Health when migration is required - #272
Open
M4Y4NK-V3RM4 wants to merge 3 commits into
Open
M4Y4NK-V3RM4 wants to merge 3 commits into
M4Y4NK-V3RM4 wants to merge 3 commits into
Conversation
… required Part of mex-memory#268. Hub Health showed 'No repair recommended' for a migration_required Wiki index. Carry a bounded recoveryCommand in WikiHealthDetails and render it, sharing the wording with mex capabilities and Specs recovery. Assisted-by: AI agent (Hark) with ZCode/GLM-5.3-Flash
…Wiki health cases Assisted-by: AI agent (Hark) with ZCode/GLM-5.3-Flash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Hub Health now tells you what to do when the Wiki index is
migration_required, instead of showing "No repair recommended" with no action. This is the first fix listed in #268. The other three (population prompt wording,launchHubrouting to finalize, a migration job) are not included, and some of them overlap the setup work in #271.WikiHealthDetailsgets an optional, nullable, boundedrecoveryCommand: { label, command }field (strict, max 200 chars each). Older payloads without it still parse.projectWikiHealthStatussets it only formigration_required, to "Preview the required Wiki migration" /mex wiki migrate --dry-run. Every other state getsnull.allowedWikiOperationsandrecommendedWikiOperationare unchanged, so the Hub still never runs the migration itself (explicit-mutation rule).migration_requiredhealth summary now says to preview withmex wiki migrate --dry-runand then apply it with the CLI.HealthPage→WikiHealthReadout: when a recovery command is present and no job is recommended, the pill reads "CLI action required" and the label and command are shown in a<code>block under the facts.src/wiki/migration/recovery.ts).mex capabilitiesand the Specs recovery inteam/specs/cli/projections.tsnow build their existing--jsonstrings from it, so all three can't drift apart. Their output is byte-for-byte unchanged.Why
Part of #268. A scaffold committed before finalization leaves every clone at
migration_required, and Health was a dead end, even though the CLI already knows the next step (src/capabilities.ts, Specs recovery).Type of change
How to test
migration_required(repro steps in A setup committed before finalization leaves every clone's Wiki at migration_required, with no Hub recovery #268, or delete.mex/wiki.dbon a scaffold whose.mex/*.mdfiles have nomex:key).mex wiki migrate --dry-run.Run locally on top of
main(54f7d7a):npm run typecheck(contracts, root, hub-web): passnpx vitest run src/hub/__tests__/services.test.ts packages/hub-contracts/src/index.test.ts src/team/specs/cli/__tests__/commands.test.ts test/capabilities.test.ts test/wiki-architecture.test.ts src/hub/http/__tests__/app.test.ts: 6 files, 141 tests passcd packages/hub-web && npx vitest run src/app/page-states.test.tsx: 55 tests passNew tests: a services test (recovery command and summary for
migration_required,nullforfresh), a contracts test (optional, nullable, bounded, strict), and a Health page test (command shown, "No repair recommended" absent).Not run: the full
npm testsuite andnpm run build. I didn't add a CHANGELOG line, to avoid conflicting with the 0.8.4 release PR. Happy to add one if you'd like.Checklist
npm test). Only the targeted files above were run.Assisted-by: AI agent (Hark) with ZCode/GLM-5.3-Flash. I reviewed the change and the test results above.