#5179 [GUI] add true same-turn coding-agent steering with a reproducible Harness patch

open · draft · @TaskPuppyNatani · 0 Kommentare · Auf GitHub

Setup & installLinux

Beschreibung

## Summary

Adds true same-turn coding-agent steering to Strata’s desktop interface while preserving the existing Wait, Send after, Interrupt, and Full Stop behavior.

The implementation includes:
- Ordered, duplicate-safe steering corrections with durable receipts.
- Numeric parent-turn admission checks, so a delayed correction cannot enter a later turn.
- Parent/helper lifecycle tracking, so the UI does not offer steering when only helpers remain active.
- Safe model-attempt interruption with completed output and tool results preserved.
- Existing queue, approval, permission, compaction, and session behavior.

## Integration

Updated to **Strata 0.2.13**, with **Control 0.1.59.1** and **Terminal 0.2.13.1**.

- Integration commit: **065b7305c8501fa53c0395ff268382e50f6f8ace**
- Upstream baseline: **504b143342a9fe1aa8320a7b31e11f5c0ac265c3**
- The existing upstream merge conflicts are resolved.

## DeepSeek Harness dependency

True steering requires the pinned, patched DeepSeek Harness.

- Harness source pin: **571902028a75c64c1d767f4ae5fd099485f0ddf0**
- Patch: **strata-harness-soft-cut-v2**
- Patch SHA-256: **fdac9e2dcf0cf4be9bee4c7018ff4c664c2e718552f67e2830abde9ed09dff49**

Reproducible patching and provenance checks are in `packaging/harness/`. An unpatched Harness cannot provide this feature.

## Verification

These are separate verification runs, not cumulative unique test counts.

### Host, Gateway, UI, and upstream regressions

Run in `apps/host` with copied **Node 24.12.0** on PATH:

```sh
STRATA_HARNESS_DIR=/tmp/strata-pr5179-availability/apps/desktop/src-tauri/resources/harness node --import ./tests/helpers/isolate-profile.mjs --test tests/agent-steering.test.mjs tests/chat-steering.test.mjs tests/chat-steering-ui.test.mjs tests/agent-turn-guard.test.mjs tests/agent-children.test.mjs tests/agent-compaction.test.mjs tests/chat-heartbeat.test.mjs tests/chat-store.test.mjs tests/chat-store-api.test.mjs tests/parallel-chats.test.mjs tests/native-gateway.test.mjs tests/harness-staging.test.mjs tests/df2ux-0213.test.mjs tests/arcfix-updated-control.test.mjs tests/engine-version.test.mjs tests/engine-update-model.test.mjs tests/component-updates.test.mjs tests/drafting.test.mjs tests/loop-stop.test.mjs tests/ui-do.test.mjs
npm run typecheck
npm run build
```

**211 passed, 0 failed, 0 skipped.** TypeScript checking and the Vite production build passed. Vite reported existing mixed static/dynamic imports and large chunks. The Harness/Gateway tests used a scripted HTTP model; Chromium used a fixture Host/model. These are not real-model tests.

### Control and release compatibility

```sh
UV_CACHE_DIR=/tmp/strata-0213-uv uv run --offline --no-project --with pytest python -m pytest tests/terminal/test_df2ux_0213.py tests/terminal/test_engine_component.py tests/terminal/test_release_config.py tests/terminal/test_app_prerelease_version.py -v -o faulthandler_timeout=20
python3 apps/desktop/scripts/stage-control.py
python3 apps/desktop/scripts/stage-control.py --check
```

**71 tests and 4 subtests passed** with networking blocked. The initial network-enabled pytest attempt stalled and was stopped; it is not counted. System Python lacked pytest, so isolated uv tooling was used. Control staging passed with hash-locked dependencies and pinned Python; its installer reported 22 models across 6 families. No model was downloaded or started.

### Harness patch integrity

```sh
node apps/desktop/scripts/harness-steering.mjs --src /tmp/strata-0213-harness-source --apply
```

Patch application and all **21 manifest source hashes** passed. The three retained staged artifact hashes match BUNDLE provenance and the prior verified v2 package record. Staging import regressions passed in the Host run. Fresh Harness source tests/build/deploy were not repeated because the offline dependency install lacked cached packages; the retained verified patched staging was used.

### Linux AppImage build and payload verification

Run in `apps/desktop` with Node 24 on PATH:

```sh
CARGO_TARGET_DIR=/tmp/strata-0213-target CARGO_NET_OFFLINE=true npm exec tauri build -- --debug --bundles appimage
```

The debug shell build and Tauri bundling passed with 15 compiler warnings; the Host UI inside uses the production Vite build. Linuxdeploy rewrote ELF libraries in resource directories, so the packaged Control, Harness, and Node directories were replaced with fresh copies of the verified staging before repacking. An appimagetool attempt without a runtime file failed because its runtime download was blocked; the completed Tauri runtime was reused:

```sh
ARCH=x86_64 /tmp/strata-0213-appimage-tool/squashfs-root/usr/bin/appimagetool --no-appstream --runtime-file /tmp/strata-0213-appimage-runtime /tmp/strata-0213-target/debug/bundle/appimage/Strata.AppDir /tmp/Strata-0.2.13-PR5179-Steering-v2-Test-x86_64.AppImage
python3 /tmp/strata-0213-verify-package.py /tmp/strata-pr5179-availability /tmp/strata-0213-final-extracted/squashfs-root /tmp/strata-0213-final-package-verification.json
```

The final package verification compared **31,213 payload files with zero mismatches** and found no external payload symlinks. It verified Strata 0.2.13, Control 0.1.59.1, the Harness patch identity/pin/module hashes, Node 24.12.0, Python 3.12.15, and shell/Node startup dependencies. This was a model-free packaging check; it did not load a model or independently test graphical startup.

- AppImage SHA-256: **f6f6d6495b05ffc371b0d42138391b7fa5866e914e48574a2038e3bdaf2c5abf**
- The isolated launcher targets `pr5179-v2-0.2.13-profile`.

### Contributor-performed live test

The contributor performed a live startup of the test AppImage and interactive steering testing. This is manual contributor testing, separate from the scripted tests and package checks above; it was not independently reproduced here.

Previously retained Harness event evidence from an earlier steering run verified numeric same-turn delivery: parent turn **1** began at event sequence **11** and ended at **571**. Three correction commits at sequences **44, 488, and 555** matched their steering receipts and numeric parent-turn provenance. A separate verification-helper session was linked to the parent, and a later parent turn started only after those corrections were delivered.

The November 9 live-test session receipts were **not independently located**, so the contributor-performed test cannot be correlated to those receipts or independently verified at the log level. The earlier retained record does not establish the exact AppImage provenance or local model family for that run.

## Remaining validation

- Current-head GitHub CI checks are not currently reported.
- Fresh Harness source tests/build/deploy were not repeated because required offline packages were not cached.
- Broad cross-platform and real-model compatibility remain unverified by these automated checks.
- The November 9 live-test receipt/session evidence was not independently located.

The PR remains a **draft** pending upstream review.

Refs #4004 and #4783.

Mehr auf der Site

Links zu Install, Modellen, Releases.