refactor(status): decouple status from doctor internals#52
Merged
synsoftworksdev merged 1 commit intomainfrom Apr 15, 2026
Merged
refactor(status): decouple status from doctor internals#52synsoftworksdev merged 1 commit intomainfrom
synsoftworksdev merged 1 commit intomainfrom
Conversation
Harden the status path so `gitrole status` and `status --short` no longer depend on diagnosis check-label internals. Also: - add a small shared alignment evaluator in `src/application/alignment.ts` - move role matching into a neutral shared primitive - compute `overall`, `commit`, `remote`, and `auth` directly from observed state, matched role, and repo policy - rework `status` to build from observed state and the new alignment summary instead of calling `doctor()` - keep `doctor` as the detailed explanation surface while reusing the shared role-matching seam - add regression coverage proving status summary behavior is derived from stable evaluation logic rather than diagnosis labels Verified with: - npm run build - npm test - npm run test:e2e - npm run test:release
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.
Summary
Harden the
gitrole statuspath by decoupling it fromdoctorinternals whilepreserving current public behavior.
Changed
src/application/alignment.tsas a small shared alignment evaluatorsummarizeAlignment(...)to compute:overallcommitremoteauthdirectly from observed state, matched role, and repo policy
src/application/use-cases/status.tsso it no longer callsdoctor()or groupsdoctor.checksby labeldoctoras the detailed diagnosis surface while reusing the shared role-matching primitivestatuswarnings are derived from observed state directly, not diagnosis label/check textVerification
npm run buildnpm testnpm run test:e2enpm run test:release