Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
998 changes: 777 additions & 221 deletions build/cli/index.js

Large diffs are not rendered by default.

225 changes: 174 additions & 51 deletions build/github_action/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/configuration-checklist.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ description: Required checks before enabling Copilot automation.
- [ ] Empty `issues-locale` and `pull-requests-locale` values intentionally inherit the repository locale; explicit overrides are documented.
- [ ] Every non-bundled target locale has an available planner/language agent, or operators accept the observable atomic English fallback.
- [ ] `copilot doctor` reports the effective repository, issue, and pull-request locales plus `exact`, `base`, `dynamic`, or `fallback` catalog paths.
- [ ] Doctor headings, summaries, states, and actions use one repository-locale catalog; raw PAT, credential-health, rule, and workflow-provider prose is absent, and any dynamic-catalog failure produces a complete English report.
- [ ] Legacy underscore tags such as `pt_BR` have been rewritten to canonical tags such as `pt-BR` after the one-time setup warning.
- [ ] Unattended setup uses `--non-interactive --yes` plus every required external credential; `--yes` is treated only as plan approval.
- [ ] Cancellation (`Ctrl-C` or EOF) has been observed to exit 130 with no writes; declining the final plan exits 0 with no writes.
Expand Down
2 changes: 2 additions & 0 deletions docs/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Copilot provides extensive configuration options to customize your workflow. Use
- `pull-requests-locale`: Optional pull-request-surface override. Its empty default inherits `repository-locale`; an explicit existing value remains authoritative.

Addressed comments are interpreted in the effective surface locale with at most one agent call. Copilot never edits the human-authored source comment. When translation is needed, the useful bot response includes a collapsed, escaped copy of the interpreted request and original text. Unaddressed comments remain inert. Commands, paths, refs, URLs, identifiers, machine-readable fields, and operational logs are not localized. See [Agent CLI configuration](/agents/cli-configuration).

Repository-aware `copilot doctor` output uses `repository-locale`, not the issue or pull-request overrides. English is the default and atomic fallback; Spanish exact/base variants use reviewed bundled copy, while any other valid BCP-47 locale requires one complete schema-constrained catalog response from the configured planner/language agent. Raw provider and credential diagnostics are replaced with semantic state and recovery copy. Setup remains English while it creates this profile.
- `ai-ignore-files`: Comma-separated list of paths to ignore for AI operations (e.g. progress detection, Bugbot; not used for PR description, where the agent computes the diff in the workspace).
- `bugbot-severity`: Minimum severity for Bugbot findings to report: `info`, `low`, `medium`, or `high` (default: `low`). Findings below this threshold are not posted on the issue or PR.
- `bugbot-comment-limit`: Maximum number of findings to publish as individual issue comments or inline PR review comments (default: `20`). Extra findings are summarized in the PR review body or in one issue-only overflow comment. Clamped between 1 and 200.
Expand Down
11 changes: 11 additions & 0 deletions docs/development/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ cached language-agent request. A missing or invalid dynamic slice falls back
atomically to English and records only locale, source, descriptor count, and a
stable reason in the Job Summary.

`copilot doctor` applies that boundary before constructing any visible check.
The doctor use case resolves one complete catalog from the repository locale,
passes the same immutable view into merge-queue readiness, returns it with the
semantic report, and the CLI presenter uses that exact view. Setup passes an
explicit English catalog to embedded readiness because setup is still creating
the profile. Stable check IDs, evidence keys, verdicts, refs, and credential
names remain machine facts; raw provider and credential-health prose is never
rendered. Pull-request-mode selection returns reason codes rather than localized
strings, so neither application use cases nor composition roots branch on `en`
or `es`.

Product-facing agent calls cross a second closed locale boundary. The fixed
inventory is Think, initial help, recommendations, progress, pull-request
descriptions, and Bugbot review. Each call uses the common structured-query
Expand Down
2 changes: 2 additions & 0 deletions docs/security-operations/operations/verification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ node scripts/verify-agent-clis.cjs
The verifier MUST report the selected binary, version/help result, credential-reference status, and failures without secret values. A successful binary check does not prove a successful model request.

For a provider smoke test, use a bounded prompt that requests exactly `READY`, read-only workspace permissions, and the explicit qualified model. Record exit status and sanitized diagnostics only.

Run `copilot doctor --config <setup.yml>` to verify repository configuration and locale behavior without changing repository configuration. The human report uses `repository-locale` (`en-US` by default); issue and pull-request locale overrides appear as diagnosed facts but do not select terminal language. A non-bundled valid locale requires a ready planner/language agent and otherwise produces one complete English fallback report. Verify that stable check IDs and enums remain unchanged and that no raw provider response or credential value appears.
17 changes: 17 additions & 0 deletions docs/single-actions/workflow-and-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ All commands support `-h, --help`. The `-d, --debug` option enables additional d

Initializes the current GitHub repository through an interactive English-language wizard. It can select the workflows and templates to install, route each Copilot task to Codex, OpenCode, or Cursor, configure repository behavior and AI policy, inspect and provision GitHub Actions Variables and Secrets at repository or organization scope, verify access, and create the configured labels and issue types. If the repository has no version tags, setup asks whether it should create `v1.0.0`.

Setup is the profile-creation surface, so its questionnaire, plan, confirmation, and embedded readiness checks stay in authoritative English until the repository configuration is installed. The selected `repository-locale` governs subsequent repository-aware output, including `copilot doctor`; issue and pull-request overrides do not change setup or doctor language.

| Option | Required | Description |
| --- | --- | --- |
| `-t, --token <token>` | No | Setup PAT override. Otherwise uses the hidden prompt interactively or `PERSONAL_ACCESS_TOKEN` from the environment. |
Expand Down Expand Up @@ -207,6 +209,21 @@ The explicit `--workflow-pat` and `--secret` options are provided for automation

Checks the setup PAT, selected workflow templates, Repository Variables, Secret presence, remote credential health, and live merge-queue readiness for production and development targets. It combines classic branch protection with effective rulesets and emits stable, ordered checks with `pass`, `warn`, `fail`, or dependency-blocked `skipped` status. Active release branches are discovered and revalidated at hotfix runtime. A failed setup PAT does not hide independent local drift: local checks continue and remote dependants name the blocking check. Independent remote probes use a fixed maximum concurrency of four, but their completion order never changes report order. Doctor exits non-zero exactly when at least one check fails.

The complete human-readable report uses the configured repository locale and defaults to English (`en-US`). English and Spanish use reviewed bundled catalogs with exact or compatible-base matching. Any other valid BCP-47 locale uses one schema-constrained planner/language-agent request for the complete report catalog. If that request is unavailable or invalid, the whole report falls back atomically to Englishβ€”never a mixture of translated headings and English diagnostics. Check IDs, status enums, branch names, credential names, and other machine facts remain stable. Raw provider and credential-health messages are not echoed into the report.

This reduced two-check fixture shows the default English shape:

```text
Copilot Doctor

βœ“ PASS Configuration β€” Setup configuration is valid.
βœ— FAIL Merge queue production β€” Target policy could not be inspected because the provider request failed.
Action: Check the setup PAT permissions and target branch policy, then retry.

Checks: 1 pass, 0 warn, 1 fail, 0 skipped.
No repository configuration was changed.
```

Doctor's composition contains query ports only: it never creates, updates, deletes, or overwrites repository configuration. The credential health query may dispatch the already-installed `copilot_credential_health.yml` workflow, which creates an Actions run but does not modify repository configuration or expose Secret values. Only setup owns the separate temporary health-workflow bootstrap capability.

```bash
Expand Down
8 changes: 8 additions & 0 deletions scripts/coverage-budgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@
"src/domain/locale.ts",
"src/domain/message_catalog.ts",
"src/application/policies/comment_translation_policy.ts",
"src/application/policies/merge_queue_message_catalog.ts",
"src/application/policies/publication_message_catalog.ts",
"src/application/policies/setup_doctor_message_catalog.ts",
"src/cli/setup_doctor_presenter.ts",
"src/application/usecases/localization/resolve_message_catalog_use_case.ts"
],
"mode": "each",
Expand All @@ -265,18 +268,23 @@
"src/application/policies/copilot_interaction_policy.ts",
"src/application/policies/publication_message_catalog.ts",
"src/application/policies/semantic_result_publication_policy.ts",
"src/application/policies/merge_queue_message_catalog.ts",
"src/application/policies/setup_configuration_defaults.ts",
"src/application/policies/setup_configuration_plan.ts",
"src/application/policies/setup_doctor_message_catalog.ts",
"src/application/policies/setup_doctor_report_policy.ts",
"src/application/policies/status_command_policy.ts",
"src/application/usecases/localization/resolve_message_catalog_use_case.ts",
"src/application/usecases/setup/doctor_use_case.ts",
"src/application/usecases/setup/merge_queue_readiness_use_case.ts",
"src/application/usecases/setup/setup_wizard_use_case.ts",
"src/application/usecases/steps/common/comment_language_translation_workflow.ts",
"src/application/usecases/steps/common/publish_resume_use_case.ts",
"src/application/usecases/steps/common/publish_resume_workflow.ts",
"src/application/usecases/steps/common/reply_publication_workflow.ts",
"src/application/usecases/steps/common/status_card_publication_workflow.ts",
"src/cli/setup_doctor_presenter.ts",
"src/cli/setup_prompt_rendering.ts",
"src/domain/locale.ts",
"src/domain/message_catalog.ts"
],
Expand Down
Loading