chore(loop): bootstrap autonomous desktop-feature loop infra#38
Merged
Conversation
Prerequisites for the unattended desktop-feature loop: - e2e CDP harness (`bun run e2e`): launches the built Electron app with remote debugging, drives the real UI over the Chrome DevTools Protocol, and asserts on rendered state. Zero new deps (Bun's WebSocket + fetch). Runs against an isolated profile (config, userData, default workspace redirected under .e2e/) and is headless-aware (xvfb + --no-sandbox on Linux). Ships an app-boot smoke assertion as the template for new ones. - docs/loop/feature-ledger.md: cross-run ledger with a status state machine (proposed/in-progress/pr-open/merged/rejected/blocked). - docs/loop/capability-inventory.md: baseline inventory of current desktop capabilities to diff candidate features against.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bootstraps the three prerequisites the unattended desktop-feature loop needs before it can run end-to-end. No product/runtime behavior changes — this is tooling + docs only.
1. e2e CDP harness (
bun run e2e)A dependency-free end-to-end harness that launches the built Electron app with the Chrome DevTools Protocol enabled, drives the real UI over CDP, and asserts on what the user would actually see.
e2e/cdp.ts— minimal CDP client over Bun's globalWebSocket+fetch(evaluate,waitForFunction,waitForSelector,click,getText,screenshot). Zero new dependencies.e2e/app.ts— launcheselectron apps/electron --remote-debugging-port=<port>, finds the main renderer target, attaches a session, owns teardown.e2e/runner.ts— auto-discoverse2e/assertions/*.assert.ts, runs each against a fresh isolated app instance, screenshots on failure, exits non-zero if any fail (so it can gate a PR).e2e/assertions/app-boots.assert.ts— example/template assertion (app boots + React mounts into#root).e2e/README.md— how to run and how to add assertions.Isolation: runs against a throwaway profile under
.e2e/(gitignored) — Electron userData, app config (~/.craft-agent), and the default conversation workspace (~/Documents/...) are all redirected, so runs never touch real OpenWork data.Headless-aware: on a headless Linux host (no
DISPLAY) the launcher runs Electron underxvfb-runwith--no-sandbox, so the same harness works in CI / the cloud routine.2.
docs/loop/feature-ledger.mdCross-run ledger with a status state machine (
proposed/in-progress/pr-open/merged/rejected/blocked) and selection rules. GitHub (PRs/issues labeledloop-bot) is the source of truth; this is the loop's working memory.3.
docs/loop/capability-inventory.mdBaseline inventory of OpenWork's current desktop capabilities, grouped by area with representative file anchors, so the loop can diff candidate features against what already exists.
Verification
bun run e2epasses locally against the built app (macOS), launching the real Electron app, attaching via CDP, and asserting React mounts — clean teardown, no lingering processes, fresh isolated profile (verified no real session data leaks in).Notes
loop-bot— this is human-initiated bootstrap, not a loop-generated feature PR, so the loop should not reconcile it as its own.