Skip to content

[#375] 🤖 - featlocalization localize setup doctor diagnostics - #375

Merged
efraespada merged 3 commits into
developfrom
codex/localized-setup-doctor
Sep 14, 2026
Merged

efraespada merged 3 commits into
developfrom
codex/localized-setup-doctor

Conversation

@efraespada

@efraespada efraespada commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

📌 Summary

Localizes the complete copilot doctor experience using the repository locale, with English as the default and atomic fallback. The doctor report now reuses one resolved catalog across checks, merge-queue readiness, and terminal presentation while setup remains English during profile creation.


🎯 Related Issues / Tickets


🧩 Scope of Changes

  • Added:
    • Typed setup-doctor and merge-queue message catalogs.
    • Dynamic BCP-47 catalog resolution with exact, base-locale, and English fallback behavior.
    • Semantic merge-queue reason codes and localized recovery messages.
    • Wide-character-aware terminal width and wrapping support for CJK and RTL content.
  • Updated:
    • Doctor checks, presenters, setup readiness, deployment decisions, documentation, specifications, tests, coverage budgets, and generated bundles.
    • Locale handling so issue and pull-request overrides remain diagnosed facts and do not select terminal language.
  • Removed:
    • Feature-local English/Spanish branching from setup and deployment decisions.
    • Raw provider, workflow, rule, and credential-health prose from user-visible diagnostics.
  • Refactored:
    • Doctor and merge-queue rendering around stable message IDs, immutable resolved catalogs, and semantic reason codes.

🛠️ Technical Details

  • repository-locale defaults to en-US and controls repository-aware doctor output.
  • Reviewed English and Spanish catalogs resolve by exact locale or compatible base language. Other valid BCP-47 locales use one schema-constrained language-agent request for the complete catalog.
  • Missing, invalid, or unavailable dynamic catalog data falls back atomically to English so a report cannot contain mixed-language sections.
  • A single resolved catalog is reused for the complete doctor artifact, including merge-queue readiness and CLI presentation.
  • Setup passes an explicit English catalog while it creates the repository profile.
  • Stable check IDs, status values, evidence keys, refs, branch names, and credential names remain machine facts.
  • Provider and credential diagnostics are reduced to bounded semantic outcomes and actionable recovery steps.
  • Terminal rendering measures display width rather than code-unit length and splits oversized visible tokens for narrow output.

🔍 How to Test

  1. Run copilot doctor --config <setup.yml> with no explicit locale and verify that the complete report is in English and does not change repository configuration.
  2. Configure repository-locale as es-ES or a compatible locale such as es-MX, then verify that the complete doctor report, including merge-queue checks, uses the Spanish catalog.
  3. Configure a valid non-bundled BCP-47 locale with a language agent and verify that one complete catalog is reused across all doctor output.
  4. Make the dynamic catalog unavailable or invalid and verify that the entire report falls back to English without raw provider or credential diagnostics.
  5. Exercise narrow terminal widths with CJK and RTL content and verify that the rendered boxes remain aligned.
  6. Run the project validation commands listed in Additional Context.

🧪 Test Coverage

  • Unit tests
  • Integration tests
  • End-to-end (E2E) tests

The change adds focused catalog, doctor use-case, merge-queue, presenter, rendering, architecture, deployment-policy, and CLI coverage. Coverage budgets were updated for the new catalog, use-case, presenter, and rendering code.


📸 Screenshots / Recordings (UI changes only)

No screenshots or recordings are included. Terminal rendering is covered by automated width and localization tests.


⚠️ Breaking Changes

  • None

🚀 Deployment Notes

  • No special deployment steps

Details:

Generated CLI and GitHub Action bundles are synchronized. No database migration, environment variable change, or feature flag is required.


🔒 Security Considerations

  • No security impact
  • Input validation changes
  • Authentication / authorization changes
  • Sensitive data handling changes

Raw provider, workflow, rule, PAT, and credential-health prose is no longer copied into user-visible doctor or merge-queue output. Diagnostic values remain bounded and sanitized, while credential names and stable status facts are preserved.


📈 Performance Impact

  • No performance impact
  • Improves performance
  • Potential performance regression (explain)

Non-bundled valid locales may perform one bounded language-agent request per doctor run. The resolved catalog is reused throughout the artifact, and bundled English and Spanish locales do not require that request.


📝 Notes for Reviewers

Please review the complete-artifact fallback guarantee, repository-locale precedence over issue and pull-request overrides, setup’s explicit English ownership, suppression of raw provider diagnostics, and narrow-width rendering for CJK and RTL content.


✅ Checklist

  • I have self-reviewed my code
  • Code follows project standards and conventions
  • Tests have been added or updated
  • Documentation has been updated (if applicable)
  • No new warnings or lint errors
  • Breaking contract changes and required consumer updates are documented

The validation gates cover typecheck, lint, coverage, documentation, specifications, workflows, package, bundle, and architecture validation, plus git diff --check.


📚 Additional Context

Related specifications and catalog evidence are updated in specs/merge-queue-readiness.md, specs/repository-locale-and-localization.md, specs/setup-configuration-credentials-and-doctor.md, and specs/setup-doctor-architecture-hardening.md.

Recommended verification commands:

corepack pnpm@​10.12.4 run typecheck
corepack pnpm@​10.12.4 run lint
corepack pnpm@​10.12.4 run test:coverage
corepack pnpm@​10.12.4 run build
corepack pnpm@​10.12.4 run validate:documentation
corepack pnpm@​10.12.4 run validate:workflows
corepack pnpm@​10.12.4 run validate:specifications
corepack pnpm@​10.12.4 run validate:npm-package
git diff --check

@docs-page

docs-page Bot commented Sep 14, 2026

Copy link
Copy Markdown

To preview the documentation for this pull request, visit the following URL:

docs.page/vypdev/copilot~375

Documentation is deployed and generated using docs.page

@vypbot vypbot changed the title feat(localization): localize setup doctor diagnostics [#375] 🤖 - featlocalization localize setup doctor diagnostics Sep 14, 2026
@vypbot
vypbot self-requested a review September 14, 2026 21:26
@vypbot vypbot added this to vypdev Sep 14, 2026
@vypbot vypbot moved this to In Progress in vypdev Sep 14, 2026
@vypbot
vypbot changed the base branch from develop to master September 14, 2026 21:26
@vypbot
vypbot changed the base branch from master to develop September 14, 2026 21:27
@codecov-commenter

codecov-commenter commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.88636% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.59%. Comparing base (274db40) to head (4d86d65).
⚠️ Report is 725 commits behind head on develop.

Files with missing lines Patch % Lines
src/application/usecases/setup/doctor_use_case.ts 88.88% 2 Missing and 2 partials ⚠️
src/cli/setup_prompt_rendering.ts 85.71% 0 Missing and 4 partials ⚠️
src/cli/commands/doctor.ts 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #375      +/-   ##
===========================================
+ Coverage    90.94%   92.59%   +1.65%     
===========================================
  Files          135      646     +511     
  Lines         6251    16722   +10471     
  Branches      1338     4272    +2934     
===========================================
+ Hits          5685    15484    +9799     
- Misses         172      481     +309     
- Partials       394      757     +363     
Files with missing lines Coverage Δ
...application/policies/deployment_message_catalog.ts 100.00% <100.00%> (ø)
src/application/policies/deployment_plan_policy.ts 92.42% <100.00%> (ø)
...pplication/policies/merge_queue_message_catalog.ts 100.00% <100.00%> (ø)
...plication/policies/setup_doctor_message_catalog.ts 100.00% <100.00%> (ø)
...application/policies/setup_doctor_report_policy.ts 100.00% <100.00%> (ø)
...ation/services/deployment_orchestration_runtime.ts 88.11% <100.00%> (ø)
...n/usecases/setup/merge_queue_readiness_use_case.ts 88.46% <100.00%> (ø)
...pplication/usecases/setup/setup_wizard_use_case.ts 95.45% <100.00%> (ø)
src/cli/setup_doctor_presenter.ts 100.00% <100.00%> (ø)
...cture/composition/setup_doctor_composition_root.ts 100.00% <100.00%> (ø)
... and 3 more

... and 695 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vypbot vypbot 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.

Current status: Overall coverage is partial; this snapshot does not prove that all of its findings are resolved.
Last reconciled on 4d86d65. See aggregate Bugbot status.

🤖 Bugbot review snapshot

Bugbot reported 1 potential problem when commit 96352f1 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.

Findings

  • low: Inherited locales can report dynamic success after catalog fallback — src/application/policies/setup_doctor_report_policy.ts:121

Comment thread src/application/policies/setup_doctor_report_policy.ts
@vypbot

vypbot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Bugbot: review incomplete

Current status: The review of 4d86d65 has partial coverage and cannot declare the whole pull request clean.

Action: Inspect the omitted items or reduce the pull request scope. Rerun the review only after changing the scope, limits, or access.

Incomplete coverage
  • selection: complete; retained=1
  • issue-comments: complete; retained=3
  • pull-request-comments: complete; retained=1
  • review-threads: complete; retained=1
  • diff: partial; retained=18, omitted=20, truncated=3
  • previous-findings: complete; retained=1
  • human-conversation: partial; retained=1, truncated=1
  • rules: complete; retained=0

Pull request · Verified commit · Workflow run

@efraespada
efraespada merged commit 5f0fa89 into develop Sep 14, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in vypdev Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants