Run background workers through bounded HarnessAgent sessions
Move document descriptions and research stages to parsed structured output. Bind public web_search through read-only host GitHub MCP, retire the temporary Copilot worker runtime, and select a reviewed harness at startup with a loopback guard for host-login fallback auth. Keep one native Copilot session for every credit-limited harness session, so all description chunks and reductions share the registered 64-credit limit. Refuse settings drift, concurrent or failed turns rather than open a new credit window. Unlimited Planner turns retain their per-turn session lifecycle. The pinned HarnessAgent fixes output per agent, so research has separate private stage agents. The shipped Copilot adapter receives HARNESS_AUTH but continues using each owner's App token; shared-key billing risks are documented without promising Chopin billing quotas. Part of #181 (slice 4 of 5). Assistant-model: GPT-6 Sol Assistant-workflow: harness-stack (run 00494056-aec3-47c1-891f-395ff15960d5) Assistant-duration: 92m converged, estimated 65m Assistant-verification: Bun focused regression passed: one 64-credit native session across two parsed turns failed before repair (two sessions) and passed after; 23 adapter tests cover drift, abort, error and unlimited behavior Assistant-verification: Bun unit passed: mise exec -- bun test (1581 pass, 2 PostgreSQL skips) Assistant-verification: Bun ci passed: mise exec -- bun run ci (one pre-existing unrelated oxlint warning) Assistant-verification: Bun typecheck passed: mise exec -- bun run types (all workspaces and E2E) Assistant-verification: Playwright E2E failed: exact unflagged parallel runs 226/230 and 227/230 with UI timing failures under AGENT=off Assistant-verification: Playwright E2E passed: flock /tmp/chopin-e2e.lock mise exec -- bun run e2e --workers=1 (230/230 on final checkout) Assistant-verification: Playwright CI-profile E2E passed: CI=1 flock /tmp/chopin-e2e.lock mise exec -- bun run e2e (227 passed, 3 flaky recovered on retry, exit 0) Assistant-verification: terminal startup passed: HARNESS_AUTH=auto refused 0.0.0.0 and served HTTP 200 on 127.0.0.1:8787 on final source Assistant-verification: agent-browser Edge E2E passed: 25,336-byte document completed at least seven description turns through one native session; earlier /research published a sourced child Assistant-verification: exact-case link check passed: 40 documentation links and anchors resolve Assistant-verification: qlty metrics and smells passed: changed adapter analyzed; existing complexity reported Assistant-verification: ffprobe QA video passed: 173.133s WebM of signed-in Edge multi-turn description scenario User-preference: Run live Edge checks with github-copilot/gpt-6-luna without changing other tabs or sign-in settings. Co-authored-by: Alex Lavaee <lavaman131@github.com>
Parent43d99b7
22 files changed+1535-1418
StackedSplit