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

This file was deleted.

3 changes: 0 additions & 3 deletions openspec/changes/inspect-provider-version-fallback/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions openspec/changes/inspect-provider-version-fallback/design.md

This file was deleted.

33 changes: 0 additions & 33 deletions openspec/changes/inspect-provider-version-fallback/proposal.md

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions openspec/changes/inspect-provider-version-fallback/tasks.md

This file was deleted.

26 changes: 25 additions & 1 deletion openspec/specs/agent-version-probing/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ Quantex SHALL parse a successful installed-agent version probe from stdout first

### Requirement: Version probe failures do not become installed-version evidence

Quantex MUST treat a non-zero version command exit as an unsuccessful probe and MUST NOT report a version from either output stream.
Quantex MUST treat a non-zero version command exit as an unsuccessful probe and MUST NOT treat a version-like value from either output stream of that probe as installed-version evidence.

#### Scenario: A failed command writes a version-like stderr message

- **WHEN** an installed agent version command exits with a non-zero code and writes a version-like value to stderr
- **AND** no provider observation supplies an installed version
- **THEN** Quantex reports no installed version

### Requirement: Version probe stream fallback preserves existing parser boundaries
Expand Down Expand Up @@ -63,3 +64,26 @@ For Cursor CLI, Quantex SHALL locate the executable by trying `cursor-agent` bef
- **WHEN** Quantex probes the installed version
- **THEN** Quantex uses that `binaryName` resolution and probes through its absolute path

### Requirement: Installed-version display SHALL use the provider version when the PATH probe yields none

When a catalog agent's resolved PATH executable is present and the live version probe does not produce a version (non-zero exit, crash, or unparseable output), Quantex SHALL report the provider-reported version from the merged executable observation on `list`, `inspect`, `info`, `resolve`, and `doctor`. Quantex MUST still treat `installed` / `inPath` as PATH presence. Quantex MUST NOT fill `installedVersion` from a failed probe's stdout or stderr. Frozen `--json` field names, aliases, exit-code meanings, state schema version 2, and receipt shape MUST remain unchanged, and structured output MUST NOT expose engine or route identifiers.

#### Scenario: PATH present, version probe fails, provider reports version

- **GIVEN** the agent binary is present on PATH
- **AND** the agent's version command exits non-zero, crashes, or is unparseable
- **AND** the package provider observation reports present with a version
- **WHEN** a user runs `qtx ls`, `qtx inspect <agent>`, or `qtx doctor`
- **THEN** the displayed and structured `installedVersion` is the provider-reported version
- **AND** `inspect` includes the Version row
- **AND** JSON field names, types, and meanings are unchanged
- **AND** the payload does not include engine or route identifiers

#### Scenario: PATH absent stays not installed even when the provider reports a version

- **GIVEN** the PATH executable is absent
- **AND** the package provider observation reports present with a version
- **WHEN** a user runs `qtx ls` or `qtx inspect <agent>`
- **THEN** `installed` remains false
- **AND** `installedVersion` is omitted

3 changes: 3 additions & 0 deletions src/compatibility/agent-inspection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// KEEP (L5): v1 inspection projector over lifecycle observations. Differential
// formatting (source/update labels, unmanaged lifecycle). Not a pass-through.
// Product-path keep so the inspect-provider-version-fallback archive PR still
// runs the macOS test matrix. Hang leftover classify presence on this existing
// projector file, not a restored src/lifecycle barrel.
import type { AgentInspection } from '../inspection'
import type { ResolvedAgentObservation } from '../services/lifecycle-observations'
import { formatInstalledSource, formatUpdateManagement, getInstallLifecycle } from '../utils/install'
Expand Down