Skip to content

feat(copilot): add blocked offline doctor readiness diagnostics #648

Closed

Description

@r4yharris-agent-coder

Bounded independent child of #572

Parent #572 remains open and blocked on #571 production capability qualification and human auth/data/account/model/spend approval. This child delivers only offline diagnostic value.

Spec trace: FEATURE_SPEC sections 5.2, 5.7, 5.8; respects principles3 and non-goals7. Node20 ESM; zero runtime dependencies.

Outcome and scope

  • CLI roster doctor --copilot and shell /doctor copilot, per-invocation explicit --opt-in for runtime metadata only.
  • Optional explicit runtime path, exact requested model syntax validation, actionable unknown/unqualified/auth-source/nonTTY failures and official human login/logout/install guidance.
  • Always blocked, enabled=false/qualified=false: never qualifies, launches, selects, logs in, probes entitlement or contacts Copilot.
  • No private config/fleet writes, ambient App/GH credentials inherited, token/keychain/gh reads, external CLI launch, model prompts or provider-default changes.

Exact file allowlist

  • src/lib/copilot-doctor.mjs
  • src/cli.mjs (doctor branch/help)
  • src/repl.mjs (doctor branch/import/service registration)
  • src/shell/commands.mjs (doctor help)
  • tests/copilot-doctor.test.mjs
  • tests/human-settings-shell.test.mjs
  • docs/ONBOARDING.md

Worktree: independent-offline-diagnostics-setup; base origin/main9c816f3, reviewed contracts0050ada. Worker capability modules/design document belong to #571 sibling and are untouched.

Acceptance

  • No-opt-in and missing/unqualified runtime diagnostics remain blocked.
  • NonTTY, signedout, expired/revoked, policy-disabled, permission-denied and unavailable-model fixtures produce actionable redacted output. Declared states are not live evidence.
  • CLI fixture tripwires deny auth/private-file reads, subprocess launch, writes and fetch; no secret sentinel reaches output.
  • Existing doctor/onboarding and local/stub config behavior preserved in focused Node20 regressions.
  • Related docs explain outstanding feat(copilot): add explicit opt-in setup and auth diagnostics #572/feat(copilot): adapt approved model turns to Roster-owned tools #571 gates and App-only reviewed publication.

No live Copilot calls, installations, new dependencies, Test-board changes, LAN campaign or human acceptance claims. Separate test session owns full/current-main matrix and live LAN onboarding.

Activity

  1. r4yharris-agent-coder commented on Oct 14, 2026

    @r4yharris-agent-coder
    ContributorAuthor

    Implementation ready for independent parent review. Parent #572 remains open and gated on #571 production capability/auth-mode qualification plus explicit account/data/model/spend approval. Build child status is In review, not Done.

    Seven-file bounded slice adds CLI doctor --copilot and shell /doctor copilot. --opt-in is per-invocation diagnostics consent only; runtime lstat metadata and optional exact model syntax validation never enable execution. Real auth/model availability remain unknown; every report is blocked with CLI exit1. No launch/login/model prompt/network/auth-source read/config-fleet write/dependency/policy/workflow/vendor source changes.

    Focused evidence:

    • Node20.19.5 diagnostics + existing doctor + human settings shell:49/49 passed,0skips,8265.9716ms.
    • Node20.19.5 standalone onboarding fixtures:28/28 passed,0skips,12260.6684ms.
    • Node20.19.5 CLI doctor/help/package selector:3 passed,11explicit selector skips,4054.8931ms.
    • Node20.19.5 help/session:8/8 passed,0skips,2393.2336ms.
    • AmbientNode24.19.0 diagnostics:24/24 passed,0skips,5323.6315ms.
    • Broader parallel5-file regression:91total89pass2fail0skip209052.1188ms; existing onboarding simulated-Enter fixture overflowed after model probe fallback and existing recommend fixture tempcleanup ENOTEMPTY under shared-host contention. Both passed dedicated narrower selectors. A serial broad rerun additionally hit existing ambiguous-Ask CLI10s subprocess timeout; it is not full-green evidence. No unrelated repair or timeout widening.

    No live Copilot call or entitlement/isolation/human acceptance is claimed. No PR/publisher invocation yet; independent review is required. Publication must use App helper from this feature root with both credentials, and stop on known effective Checks-grant HTTP422 without workaround. Worktree independent-offline-diagnostics-setup, branch agents/independent-offline-diagnostics-setup; base9c816f3, contracts0050ada. Separate current-main matrix/live LAN campaign remains owned by the test session.

  2. r4yharris-agent-coder commented on Oct 14, 2026

    @r4yharris-agent-coder
    ContributorAuthor

    Parent review correction handed off; NO publication attempt. Explicit UNC/network/mixed-slash/device/NT namespace and URI-like runtime paths now fail before lstat for opt-in and opt-out. All ASCII C0/DEL fail with redacted errors. Local relative/absolute paths and internal spaces remain unchanged. Mounted-drive locality is explicitly unproven; operator chooses a local filesystem and no network mount is probed.

    Node20.19.5 focused correction command: node --test --test-reporter=spec tests/copilot-doctor.test.mjs tests/human-settings-shell.test.mjs tests/doctor.test.mjs. Result:53tests53passed0failed0skipped43936.6333ms. Added pure inspect-spy tests and CLI lstat-deny tripwires; no real network path probe. Exact three-file correction patch verified with git apply --reverse --check (no application), all seven allowed files staged, no unstaged delta, cached whitespace check passed.

    Prior broad serial run is separate evidence:99tests96passed3failed0skipped741247.2553ms, unrelated CLI ambiguous-Ask10s timeout and two onboarding fixture RangeErrors; NOT full-green evidence. No unrelated fixes.

    #648 remains In review on Roster Build pending parent's independent focused correction review/rerun. Parent #572 remains open and gated on #571 production qualification and auth/data/account/model/spend approval. No PR, App publisher invocation, commit, push, live provider request, config/fleet writes, policy/workflow/vendor edits or claimed human acceptance. Stopped after this one bounded diagnostics slice.

  3. added a commit that references this issue on Oct 14, 2026
    098d67f
  4. r4yharris-agent-coder commented on Oct 14, 2026

    @r4yharris-agent-coder
    ContributorAuthor

    Verified bounded offline delivery: #648 CLOSED / Roster Build Done; App PR #651 MERGED, head 922f112, merge 098d67f.

    Required tests and trailers SUCCESS. Full Linux Node20 CI:2100 total,2097 pass,zero failures,three skips,76217.156872ms. Independent parent corrected Windows Node20:53/53 pass,31885.397ms.

    Initial parent review required rejecting explicit UNC/device/URI and ASCII control paths before metadata inspection; corrected pure inspect-spy and CLI tripwire tests pass. Mounted-drive locality remains explicitly unproven. Diagnostics are offline metadata/guidance only, always disabled/unqualified, exit1. No login, credential reads, provider call or private setting writes. Broader child Windows99test96pass3failure observation remains retained separately; no full Windows green claim.

    Parent #572 and prerequisite #571 remain open. No production setup/auth/account/data/model/spend approval granted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions