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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ Cleanup follow-ups from the 1.5.1 review and a companion system prompt section t

### Changed

- Windows relies on the user profile's default per-user permissions. Windows no longer queries, applies or repairs ACLs, and no longer refuses a root for its owner, its permissions or the permissions of an ancestor, so a store or custom root in a folder other users can write to is accepted (stated in `docs/setup.md`). Windows keeps drive-qualified path syntax, canonical path, symbolic link and junction refusal, hard-link refusal for owned state files, content-ownership markers, hashes and schema validation; Linux and macOS uid and mode checks are unchanged, and existing installs whose roots carry private ACLs keep working with those ACLs untouched. The per-request spawn ceiling, the helper cold-start budgets and the PowerShell mutex barrier are removed; steps reserve a fixed 2.5 s of time headroom instead of spawn-count reservations, and the work and response deadlines, writer slots and fresh validation of every mutation stay. `accounting.securitySpawns` stays on the wire as a constant 0, and the retired diagnostic codes are still accepted but no longer produced (#175, reported in #172).
- The companion's system prompt section holds only the fixed activation guidance and is byte-identical on every request where it is present. The one-request hint after a dispatch or plan write, the sub-agent resume capsule and the delegation refusal note keep their text and eligibility but are delivered after the cacheable prefix: as a text part after a user message, or at the end of the last tool result of a tool message, never on the Code Mode `execute` wrapper's result or a non-text result, and otherwise on the next request with a valid carrier. A delivered note stays in the same place on later requests built from the same history, keyed per session and bounded to 128 sessions, 256 carriers and 128 KiB of note text per session; notes due together are joined in a fixed order, a capsule or refusal is delivered again when its text changed or its last carrier is gone, and one fixed line clears a refusal that no longer applies. Every path that removes the section removes the added notes. Providers that drop plugin system sections now also receive these notes. Cache hit rates were not measured; tests assert the byte-for-byte prefix (#165, #167; reported in #161).
- Companion inline and packaged guidance tells an agent to clear a task's dependency block against the plan's current prerequisites, read before a handoff and when a prerequisite finishes: a prerequisite the plan no longer lists no longer holds the task, and a skipped prerequisite that is still listed counts as unfinished. Decision, review and external blockers are left alone, and the guidance stays advisory (#162).
- Coordinator refusal guidance validates a pending or reserved delegation receipt against its dispatch and declared tasks before inferring that cleanup retired it, and reports incomplete guidance when the check fails. Cancellation receipts, bound receipts and the explicit-link recovery are read as before (#162).
- `docs/ui.md` and `docs/contracts.md` state when chosen plans are checked by `/v1/search-state` point lookup, when loaded rows or a list scan are used instead, and which revision a retry compares against (#162).
- The large-library gate bounds each timed window by request and reply offsets read in the browser evaluation that starts and stops it, counts cadence, list starts and both inbox forms by the requests sent inside it, and shows run reads per window as an informational row. It records how an artifact attributed its traffic, compares the list-carried inbox form on its own, and reports a budget it cannot compare as unverified with exit status 2 instead of passing it. QA tooling only; no shipped behaviour changes (#166).
- The `release-1-5-2` OpenSpec change records the proposal, design and tasks (#160). The 1.5.0, 1.5.1 and 1.5.2 changes are archived in that order with their task lists reconciled, the 1.5.1 deltas corrected to keep the scenario names and requirement lengths the specs hold, and a Purpose written for each of the ten capabilities the first two archives created; the third creates none.
- The `release-1-5-2` OpenSpec change records the proposal, design and tasks (#160). The 1.5.0, 1.5.1 and 1.5.2 changes are archived in that order with their task lists reconciled, the 1.5.1 deltas corrected to keep the scenario names and requirement lengths the specs hold, and a Purpose written for each of the ten capabilities the first two archives created; the third creates none. The `windows-default-permissions` change (#175) is archived after them and creates none either.
- Portable tests run faster, locally and in CI, with no test removed or relaxed. The serial backend group that takes Setup coordination ports runs beside a second lane (both typechecks, the parallel backend group, and the browser-model and automation tests) instead of before them, in one `--test-concurrency=1` invocation that nothing else joins; the second lane has its worker count capped at cores minus two and runs under `nice`. With `CP_BUILT_SERVICE=1`, the one file that takes ports moves into the serial group. New `bun run test:fast` (everything except the serial port-bound group) and `bun run test:all` (everything portable CI tests except packaging and the rebuild comparison) share one plan with CI through a POSIX-first runner whose stop path on Windows is best effort and was not run there. Node's compile cache, emptied at the start of each run, serves every step. The Linux jobs install the ZIP tools only when the image lacks them, and the Windows job starts its two native test files as two processes at once. The Linux test step fell from about 305 s to about 150 to 230 s in CI (#170).

### Fixed

- On Windows the companion no longer blocks OpenCode's event loop while loading, running tool hooks or answering status polls. Every ownership, privacy and ancestor check started Windows PowerShell synchronously (1 to 2.4 s each): about 10 to 20 times while loading, once per tool hook and twice per status inspection, which stalled OpenCode for 28 to 43 s, so its model catalogue request timed out and `/api/provider` answered 503. No product code now starts a child process, on any platform; the fix removes the Windows ACL queries from the companion, service and setup (#175, reported in #172).
- Tidy and Select all result lines separate plans that were skipped (refused as changed, closed, reused or not found, store busy, left out of the view or never sent after Stop) from plans whose request got no valid answer and may have been applied, in English, Russian and Simplified Chinese with plural rules. Undo still restores only validated receipts; Try again recounts skipped and unconfirmed plans together, or sends the restore again for the remainder after a partial Undo (#163).
- A bulk run that ends after an account, store or binding change the frame observed, including a switch away and back, no longer resets caches, changes the selection, closes the opened plan or shows a result on the board then shown; a validated Delete receipt still removes the review marker of the account and store the run started in. The busy state belongs to the request that set it, so an observed switch releases it and a late answer cannot complete, release or reset a newer run. Cleanup controls follow the latest health reply the controller accepted, whichever remembered list is shown, and a failed list read applies its health facts in both directions (#164).
- A count that finishes in the background, a run's progress and the end of a run with its result line repaint as background data and wait while a control is held, so a press on Stop or a click on another control is not lost; a refresh no longer expires a result that has not been painted yet. A deferred cleanup focus move is decided when it is applied and dropped if focus has moved to another control (#168).
Expand Down
13 changes: 11 additions & 2 deletions openspec/specs/managed-companion-delivery/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The extension SHALL declare the existing companion directory through `contribute

### Requirement: Single private verified binding

Service and managed companion SHALL discover the same single descriptor in a dedicated product-owned subfolder of the canonical OpenCode data root derived from XDG data/HOME. They SHALL preserve marker, canonical-path, ownership, private-mode or equivalent ACL, binding and Store/source validation. They MUST NOT scan roots, fall back from invalid state, auto-adopt legacy selectors or put private state in the extension code folder.
Service and managed companion SHALL discover the same single descriptor in a dedicated product-owned subfolder of the canonical OpenCode data root derived from XDG data/HOME. They SHALL keep marker, canonical-path, binding and Store/source validation, and private modes on Linux and macOS. Windows relies on the user profile's default permissions: no ACL is queried, applied or repaired. They MUST NOT scan roots, fall back from invalid state or auto-adopt legacy selectors.

#### Scenario: Service environment omits state root
- **WHEN** the service lacks `XDG_STATE_HOME` and an explicit binding variable but shares the supported XDG data root with managed OpenCode
Expand All @@ -32,7 +32,7 @@ Service and managed companion SHALL discover the same single descriptor in a ded
- **THEN** the state is unconfigured and no directory, ownership marker, descriptor or store is automatically created or adopted

#### Scenario: Invalid selection
- **WHEN** the selected directory, marker, descriptor, source scope or Store is invalid, modified, aliased, foreign, non-private or unsupported
- **WHEN** the selected directory, marker, descriptor, source scope or Store is invalid, modified, aliased, foreign, unsupported or, on Linux and macOS, non-private
- **THEN** capture fails closed and existing bytes remain intact
- **AND** a present invalid selection is not treated as absence or permission to try another root

Expand Down Expand Up @@ -145,3 +145,12 @@ Folder, ZIP and Git distributions SHALL include the declared resolvable plugin d
- **WHEN** the accepted built candidate is installed on an isolated 2.7.1 host with credential-free local scripted reporting
- **THEN** plugin approval, reporting in all three views, lifecycle, legacy migration, retained history and below-floor installer refusal have behavioral evidence
- **AND** screenshots and diagnostics use synthetic content, with unavailable platform coverage explicitly identified rather than certified

### Requirement: Companion checks start no process

The managed companion's load, guard, tool-hook and status paths SHALL start no child process on any platform. Re-reading the binding uses plain filesystem calls only.

#### Scenario: Windows companion in the host
- **WHEN** the companion loads on native Windows, guards a report, runs a tool hook or answers a status inspection
- **THEN** no child process is started, so the host event loop is never blocked waiting on one
- **AND** a changed or invalid binding still retires the companion and refuses the call
Loading