Skip to content
Open
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
7 changes: 7 additions & 0 deletions .github/workflows/ci_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
ci-check:
name: CI Check
Expand Down Expand Up @@ -100,5 +104,8 @@ jobs:
- name: Validate product specification catalog
run: pnpm run validate:specifications

- name: Validate setup acceptance ledger
run: pnpm run validate:setup-acceptance

- name: Validate Git diff
run: git diff --check
4 changes: 4 additions & 0 deletions .github/workflows/copilot_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- '!master'
- '!develop'

defaults:
run:
shell: bash

jobs:
copilot-commits:
if: ${{ vars.COPILOT_BOT_LOGIN == '' || github.actor != vars.COPILOT_BOT_LOGIN }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/copilot_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
pull_request:
types: [opened, reopened, closed, synchronize]

defaults:
run:
shell: bash

jobs:
copilot-pull-requests:
if: ${{ (vars.COPILOT_BOT_LOGIN == '' || github.actor != vars.COPILOT_BOT_LOGIN) && github.event.pull_request.head.repo.full_name == github.repository }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/copilot_pull_request_merge_queue.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Copilot - Pull Request Merge Queue

defaults:
run:
shell: bash
run-name: Copilot PR · ${{ github.event_name }}:${{ github.event.action }}

on:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/hotfix_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Task - Hotfix

defaults:
run:
shell: bash

on:
workflow_dispatch:
inputs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Task - Release

defaults:
run:
shell: bash

on:
workflow_dispatch:
inputs:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/setup_platform_smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Setup Platform Smoke

on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:

permissions:
contents: read

defaults:
run:
shell: bash

jobs:
setup-platform-smoke:
name: Setup package and local session (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: pnpm/action-setup@v5
with:
version: 10.12.4
standalone: false
- uses: actions/setup-node@v7
with:
node-version: '24.x'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm run validate:build
- run: pnpm run typecheck
- name: Local setup fixtures only
run: pnpm exec jest src/application/usecases/setup/__tests__/setup_session_coordinator.test.ts src/cli/__tests__/web_setup_server.test.ts src/cli/__tests__/setup_session_guard.test.ts src/cli/__tests__/setup_apply_snapshot.test.ts src/tooling/__tests__/setup_acceptance_path.test.ts --runInBand --silent
- name: Isolated npm package checks
run: pnpm run validate:npm-package && pnpm run smoke:npm-package
1,201 changes: 753 additions & 448 deletions build/cli/index.js

Large diffs are not rendered by default.

39 changes: 23 additions & 16 deletions build/github_action/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions build/web/assets/index-CaPMoT2_.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions build/web/assets/index-CcOfHgj1.js

This file was deleted.

2 changes: 1 addition & 1 deletion build/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="light dark" />
<title>Copilot · Setup studio</title>
<script type="module" crossorigin src="./assets/index-CcOfHgj1.js"></script>
<script type="module" crossorigin src="./assets/index-CaPMoT2_.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-7TY0kYbf.css">
</head>
<body>
Expand Down
5 changes: 5 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@
"href": "/development/testing",
"icon": "vial"
},
{
"title": "Local setup assistant review",
"href": "/development/setup-assistant-review",
"icon": "clipboard"
},
{
"title": "Product specifications",
"href": "/development/specifications",
Expand Down
13 changes: 10 additions & 3 deletions docs/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ For Projects, this early choice is only **whether you want the integration**.
Listing private organization Projects requires authorization, so the assistant
cannot reliably ask you to select Project numbers before the setup PAT exists.
If you opt in, the guided setup PAT requests organization **Projects: read**.
The read-only check lists at most one accessible organization Project. A
non-public Project confirms the read grant. If the result contains only public
Projects or is empty, discovery can continue but the PAT grant remains
`Unverifiable`; access to each selected Project is checked again later.
After you enter that PAT, the assistant lists the accessible Projects and lets
you choose their numeric Project numbers and, when available, their Status
options. You can enter a Project URL or number manually if discovery is
Expand Down Expand Up @@ -108,7 +112,7 @@ these states:
|---|---|---|
| `✅ Verified` | A safe authentication-bound GitHub operation proved the requested read capability. | Continue. |
| `❌ Missing` | GitHub deterministically rejected a required capability after identity and repository access were established. | Stop before the dependent mutation and name the permission to grant. |
| `? Unverifiable` | GitHub does not expose a safe non-mutating proof of the PAT grant, or the response was ambiguous/transient. | Required reads block unless the exact successful public-repository read has separate operational evidence. Required writes pause for a separate explicit acknowledgement and remain non-verified. |
| `? Unverifiable` | GitHub does not expose a safe non-mutating proof of the PAT grant, or the response was ambiguous/transient. | Required reads block unless an exact successful public-repository read or organization Projects list has separate operational evidence. Required writes pause for a separate explicit acknowledgement and remain non-verified. |

A `403` is not automatically a missing-permission result. Copilot reports it as
`Missing` only when bounded GitHub metadata explicitly identifies a permission
Expand All @@ -130,6 +134,9 @@ access, so setup requires explicit acknowledgement for those rows. Public
organization Issue Types reads remain `Unverifiable` as PAT evidence.
After valid token identity, a successful public repository read can be used
for that exact operation while its PAT permission row stays `Unverifiable`.
An organization Projects list containing only public Projects, or no Projects,
is similarly usable for discovery without proving the PAT grant. A malformed
or denied Projects response is not usable.
The public organization members list can omit concealed members, so it cannot
establish Members-read capability. Copilot instead checks the authenticated
user's active organization membership through GitHub's permission-bound
Expand Down Expand Up @@ -271,8 +278,8 @@ For comment-driven assistance, read-only commands are available to anyone who ca
Read the required-permissions table before creating the token, then review
the permission-check table after entry. A `❌ Missing` required row must be
corrected before setup can continue. An ambiguous required
`? Unverifiable` read blocks; only a successful public-repository read can
remain unverified as PAT evidence but operationally usable. A required
`? Unverifiable` read blocks unless a successful public-repository read or
organization Projects list has separate operational evidence. A required
write row means to compare the PAT settings with the
requested access level and explicitly acknowledge it; it is never a pass.
</Step>
Expand Down
12 changes: 12 additions & 0 deletions docs/development/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ graph tests reject transitive dependencies from these use cases into CLI,
infrastructure, Action, or browser code, and browser components can import
only redacted application contracts as types.

`SetupSessionCoordinator` now owns the common repository → choices → setup PAT
→ plan → credentials → Apply sequence for terminal and browser setup. Its
semantic phase ports compose the existing use cases; it checks live-session
state after asynchronous work and classifies a possible write as partial if
the result is unknown. The initial setup workflow emits value-free resource
transitions through an optional progress port. The local Action path passes
those facts to the browser bridge, while the final structured receipt remains
authoritative for completed, skipped, and uncertain resources. The browser
never sees provider request bodies or credential values.
The [fixture-only acceptance review](/development/setup-assistant-review)
records the human browser, language, accessibility, and platform gates.

Inside `web/src`, `App.svelte` is only the page shell. The session client owns
same-origin bootstrap, polling and revision-bound commands; it holds no pasted
PAT in a store. Presenters in `components/` render progress, prompts, context,
Expand Down
1 change: 1 addition & 0 deletions docs/development/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ Documentation changes must also update `docs.json`, links, component usage, icon
- [Build artifacts](/development/build-artifacts)
- [Product specifications](/development/specifications)
- [Testing](/development/testing)
- [Local setup assistant acceptance review](/development/setup-assistant-review)
- [Agents](/agents)
- [Security & Operations](/security-operations)
74 changes: 74 additions & 0 deletions docs/development/setup-assistant-review.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Local setup assistant acceptance review

The [350-case acceptance ledger](../../specs/local-web-setup-assistant-acceptance.json)
is the source of truth for case status. Automated tests establish structural
and behavioral facts. The 40 human rows remain **open** until a reviewer
records the environment and observation for each row. Do not infer a visual,
linguistic, assistive-technology, or operating-system pass from Jest, SSR HTML,
or a screenshot alone.

## Safe fixture setup

1. Build the package with `pnpm run build` in a disposable checkout. Do not
run `copilot setup` against this or any other real repository for review.
2. Run `node scripts/serve-web-setup-review.cjs pending`. The script serves
the compiled browser UI and canned redacted views on `127.0.0.1`. It has
no GitHub, filesystem mutation, PAT, Issue, or Action adapter. Open the
printed local URL and enter the printed **fixture** pairing code.
3. Repeat with `action-required`, `blocked`, `partial`, `completed`,
`cancelled`, and `expired`. Stop the previous fixture before switching.
The fixture rejects answer and close commands; use it to review visible
content, navigation, focus and contrast, not to claim a successful setup.
4. Keep the browser console and network panel available. Record any missing
static asset or unintended external request. The GitHub PAT settings link
is informational; do not follow it to create a token for this review.

## Required observations

For each of the seven states above, review light and dark modes (`U041–U054`).
At 320 px, tablet width, desktop width, and 200% browser zoom, check that the
status, completed facts, next action, affected resource and inspection action
remain visible without horizontal page scrolling. Verify the focus indicator,
contrast, reduced-motion behavior, headings and landmarks. A screenshot may
supplement the recorded observation but cannot replace keyboard or screen
reader inspection.

For each of English, Spanish, French and Portuguese, review keyboard order,
screen reader announcements, 200% zoom, 320 px and tablet layouts (`U075–U094`).
Check the pairing field, action-required prompt, progress changes, error text,
resource receipt and PAT cleanup link. Use a named screen reader and browser;
record actual announcements and any field whose label or correction is unclear.
English is the CLI language. Review the CLI's English prompts and result
wording separately. Review the meaning and consistency of the four web
languages with a fluent reviewer; automated key parity is not linguistic
approval. No other web language is in scope.

On macOS, Linux and Windows, inspect packaged `--web` launch and browser-open
fallback (`I037–I042`) in an isolated fixture repository with fake ports and
no network credentials. Record the package version, OS, Node version,
browser, launcher output, URL, pairing behavior and whether fallback
instructions are usable. The CI fixture jobs check build and local server
behavior, but they do not replace these desktop observations. Do not use this
project or a live GitHub repository as a setup target.

Controlled GitHub account switching, 2FA on GitHub, wrong-account handling,
and PAT deletion require a separate authorized human review with test accounts
outside this repository. They remain open here. Never create a real PAT, test
Issue, or Action run to fill a ledger row in this task.

## Evidence record

For each human row, record:

| Field | Required content |
|---|---|
| Case ID | Exact `U` or `I` ID from the ledger |
| Reviewer and date | Person who performed the observation and local date |
| Environment | OS/version, browser/version, viewport, zoom, palette, locale, screen reader/version when relevant |
| Fixture | One of the seven states and the local build/commit ID |
| Observation | What was read, announced, focused or blocked; include the expected next action |
| Result | Pass or fail with a link to a redacted screenshot/recording if useful |

Update the ledger row only after direct observation. A pass needs all fields;
leave it open when a platform, assistive technology or language reviewer is
unavailable. Run `pnpm run validate:setup-acceptance` after editing it.
5 changes: 5 additions & 0 deletions docs/how-to-use.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ already deleted the setup PAT in GitHub, run `copilot doctor --read-only`
with a valid setup PAT instead. A failed or partial Apply does
not offer this button: inspect the itemized result and use the CLI command
after resolving the uncertain resources.
While Apply runs, the page reports each resource as in progress and then as
completed, skipped, or needing inspection. If the process stops mid-write,
the operation may already have reached GitHub; inspect that resource before
starting a new setup session. A new process always requires a fresh review
and approval.
The language selector starts in English and offers Spanish, French, and
Portuguese. Switching language does not change the repository locale or reset
your answers. Question headings, explanations, options, permission details,
Expand Down
26 changes: 22 additions & 4 deletions docs/security-operations/operations/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ not imply a setup failure: open the exact `127.0.0.1` URL printed by the CLI.
Enter the terminal's 16-character pairing code in the page; after a refresh,
enter it again. Do not share the code. TCP loopback can be reached by other
local OS users; the code, not the public URL or OS-user identification, grants
access to this setup session. After five wrong codes, restart setup.
access to this setup session. After five wrong codes, pairing and takeover
pause for 30 seconds; wait, then retry the code printed by the launcher.
If the local bind or bundled assets fail, stop and use `copilot setup` in the
terminal. A second browser tab is read-only until you select **Take control
in this tab**; the former tab then cannot submit decisions. A rejected stale
answer means the page should refresh to the current decision, not replay it.
If the page closes during Apply, inspect the terminal result and run
`copilot doctor` before retrying; do not assume that completed local or remote
writes were rolled back. No local session shutdown revokes a PAT in GitHub.
If the page closes during Apply, reopen it and pair with the launching
terminal's code while that process is alive. The per-resource progress view
shows completed, skipped, in-progress, and uncertain operations. If the
process exits during a write, treat its result as needing inspection: check
the local checkout and corresponding GitHub resource names/scopes, then run
`copilot doctor --read-only` with a valid setup PAT before retrying. The
previous approval and secrets are not restored by a new process. Completed
local or remote writes are not rolled back. No local session shutdown revokes
a PAT in GitHub.

If setup reports a lock belonging to a stopped process, it will not delete
that lock automatically: another setup could have acquired the same path in
Expand All @@ -59,6 +66,13 @@ directory. The lock contains no PAT or other credential.
</Accordion>

<Accordion title="PAT permission table shows Missing or Unverifiable" icon="key">
In the web assistant, a PAT-related blocked result lists the required
grants that could not be confirmed, including scope, access level, and
status. It does not display the PAT. The terminal's aggregate error alone
may not name the grant; use the browser result before closing the local
session. If GitHub identity itself was rejected, fix account, repository
selection, token expiry, or organization approval before reviewing grants.

**`❌ Missing`:** GitHub rejected a safe read-only capability probe after
setup confirmed the token identity and repository selection. Grant the named
repository or organization permission to the correct resource owner, ensure
Expand Down Expand Up @@ -89,6 +103,10 @@ directory. The lock contains no PAT or other credential.
workflow files remain `Unverifiable` unless repository metadata proves the
repository is private. Public organization member and issue-type responses
are likewise inconclusive as PAT evidence or full-membership readiness.
An organization Projects list with only public Projects, or no Projects,
can support discovery while the `Projects: read` grant remains
`Unverifiable`; a non-public Project proves that read access. A denied or
malformed list still blocks and must be corrected or retried.
Members read is verified only by a valid active self-membership response
from the permission-bound endpoint; Issue Types, ambiguous responses, and
writes remain blocking.
Expand Down
10 changes: 10 additions & 0 deletions docs/security-operations/security/self-hosted-runners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ A self-hosted runner that can access agent credentials MUST be dedicated or isol

A shared persistent runner is not equivalent to an ephemeral trusted runner.

The `codex` label can route a job to macOS, Windows or Linux. Install Git and
Bash on every runner; Windows needs Git for Windows with its Bash available to
the Actions runner service. Installed workflows select `shell: bash` for
`run` steps so Windows does not create PowerShell scripts subject to local
execution policy. Keep Node.js 24 and pnpm provisioning available to jobs that
build the Action. Verify each operating system with an actual runner job before
claiming Action-wide compatibility; the setup fixture matrix exercises only
its isolated setup paths. In particular, inspect timeout and cancellation of
agent child processes on Windows separately from POSIX process-group behavior.

The Action passes agent children an allowlisted runtime environment plus only the credential selected for that provider; unrelated GitHub, cloud, database, and PAT variables are not inherited. Codex review capabilities are forced to `--sandbox read-only --ignore-user-config --ignore-rules`; fixer capabilities use `workspace-write`, with network and extra writable roots disabled. Cursor receives a per-invocation configuration/home with sandboxing and default-deny network policy. OpenCode receives a pure, inline default-deny permission profile with shell, task, skill, web, and external-directory tools disabled. Dangerous bypass flags are rejected for every runtime. These controls complement rather than replace runner/container isolation.

Configured verification commands also receive a temporary `HOME` and credential-free allowlisted environment. They are repository processes, not model tools, so the runner must still prevent them from reading unrelated host paths through OS-level isolation.
Expand Down
Loading
Loading