Skip to content

test: pre-1.0 coverage — provider config, flows, surface authoring, governance, parity - #83

Merged
ryandmonk merged 1 commit into
mainfrom
test/pre1-coverage
Aug 12, 2026
Merged

test: pre-1.0 coverage — provider config, flows, surface authoring, governance, parity#83
ryandmonk merged 1 commit into
mainfrom
test/pre1-coverage

Conversation

@ryandmonk

Copy link
Copy Markdown
Contributor

D13 of the pre-1.0 milestone: close the e2e gaps on the surfaces a new team touches first. Zero product source changed (git diff --name-only main -- apps packages is empty).

  • Provider configuration (had zero specs — the only path a BYO-inference user takes): Ollama discovery + persistence + the provider actually selected in Build; OpenAI base URL, discovery, and manual entry when /models 404s; unreachable-endpoint failure text asserted to configure nothing; agent-absent honesty. The credential invariant is proved end-to-end, not cosmetically — a fixture endpoint 401s unless the exact key arrives, so the model chip can only appear if the key travelled browser → agent → provider, and storage is then asserted to hold endpoint + model with no credential.
  • Flows (the whole Phase-C surface had no spec): plan editing, planning creating nothing, pending-step creation, per-step rebuild and binding, Preview's outline state matching flow-lint, cancel creating nothing, walk completion on a real emitted action, and a step over an emit-refused surface showing the emitter's own reason.
  • Surface authoring: author → gates → preview → save → human title in the listing → rendered in Preview → survives reload → reported by Checks. Both honest-failure directions (a must rule blocks and writes nothing; a should rule warns without blocking).
  • Governance: rule round trips (rationale gate, impact panel, Checks, removal). Intent assertions are presentation-only because intents are add-only — reported as a finding, not papered over.
  • Browser/agent parity at product level: a repository project exported and re-imported as a browser project yields the same refusal text and the same surface-scoped findings.

Testids uncovered: 62 → 22. Suites: smoke 14 → 28, agent 44 → 49, production 14 → 15, exhibit unchanged at 110. No sleeps — every wait is on an outcome.

Also fixed config hygiene: the exhibit config excluded composer specs by hand-typed name (the same brittle shape as the CI filter list), silently pulling new specs into the wrong suite; now excluded by pattern.

🤖 Generated with Claude Code

The audit found 62 of 134 composer testids in no spec, all of them on the
paths a NEW team touches first. The Build/Preview path was well covered;
provider configuration, surface authoring, flow decomposition, and
governance authoring were not covered at all. This closes those four gaps
with behaviour-level tests — state changes, persisted results, honest error
text, the thing actually rendering — never "the element exists".

No product source is touched. No spec makes a model call.

Provider configuration (e2e/composer-settings.spec.ts, agent config)
  Ollama and OpenAI-compatible endpoints configured through the real agent
  against e2e/serve-provider.mjs — a real HTTP server speaking both discovery
  protocols, added as a third webServer. It serves discovery only: a build
  against it would be a model call. Covers discovery (including the agent's
  embedding-model filter), model choice, persistence and re-open, manual model
  entry when a server does not enumerate, and the honest failure text from an
  unreachable endpoint (which configures nothing).

  The credential invariant is proved end to end rather than asserted
  cosmetically: the fixture's /keyed endpoint 401s unless the exact key
  arrives, so the model list only appears if the key travelled browser →
  agent → provider — and localStorage/sessionStorage are then asserted to
  contain no trace of it.

  The agent-ABSENT half lives where it is true by construction, in
  composer-prod-smoke.spec.ts: with the agent probe blocked, "Agent not
  running" is a setup step with real instructions, and both provider forms
  are inert rather than dead-looking.

Flows (e2e/composer-flows.spec.ts, agent-free config)
  Plan editing before anything is built (rename, retitle, reorder with a real
  swap, add, trim) and that planning creates nothing; the drive creating the
  flow immediately with PENDING steps, the plan freezing into per-step
  rebuilds, Preview's outline state and flow-lint's matching warning; a
  rebuilt step binding on accept; the editor's cancel creating nothing; a walk
  completing on the surface's own emitted action; and a step over a surface
  the emitter refuses showing the emitter's own reason.

Surface authoring (e2e/composer-surfaces.spec.ts, agent-free config)
  Author → live gates → live preview → save → listed under its HUMAN title →
  rendered in Preview → survives reload → reported by Checks against that
  surface. Plus both honest-failure directions: a `must` rule blocks the save
  and nothing is written (before or after a reload), and fixing the violation
  unblocks it; a `should` rule warns without blocking.

Governance (e2e/composer-governance.spec.ts, agent-free config)
  Intent authoring gated on a real description, then governing Build and the
  surface editor; the rationale gate on rules; a saved rule visibly firing in
  the impact panel and in Checks, and its removal undoing exactly that; the
  typed-rule form projections; and the session-scope honesty a browser
  project states about governance edits.

Browser/agent parity (e2e/composer-parity.spec.ts, agent config)
  The product-level twin of the emit-seam unit equivalence: one repository
  project is EXPORTED and imported back as a browser project, so both carry
  byte-equal vocabulary, and the same authored surface must get the same
  verdict — same refusal text, same clean state, same surface-scoped findings
  in Checks (compared non-vacuously). Scoped to the surface on purpose: a
  repository additionally emits its surfacesDir, a documented corpus
  asymmetry that would make whole-table equality a lie.

Config hygiene: the exhibit config ignored composer specs by hand-typed name —
the same shape as the CI filter list of #81, where adding a spec silently
opted it into the wrong suite. It now ignores them by pattern.

Counts: composer-smoke 14 → 28, composer-agent 44 → 49, composer-production
14 → 15, exhibit 110 → 110 (unchanged, verified). Uncovered testids 62 → 22,
and the 22 are all on surfaces outside this milestone (Catalog, Mapper,
Components, Repository, hub).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 12, 2026 16:40
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
dspack-studio-composer 63816ab Aug 12 2026, 04:42 PM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands Playwright E2E coverage for the pre-1.0 milestone by adding new agent-free and agent-mode Composer suites (provider configuration, flows, surfaces, governance, and browser/agent parity), plus a local provider fixture and configuration hygiene improvements—without changing product source.

Changes:

  • Add new Composer E2E specs covering provider configuration, flows, surface authoring, governance, and browser/agent parity.
  • Introduce a local “provider fixture” HTTP server used by agent-mode tests for real discovery/probing without any model calls.
  • Tighten suite separation by ignoring Composer specs in the main Studio Playwright config via a pattern and updating CI workflow step naming/comments accordingly.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
playwright.config.ts Ignores all composer-*.spec.ts in the Studio config via pattern to prevent suite bleed.
playwright.composer-smoke.config.ts Adds a second project (composer-product) to run new agent-free product suites on the hosted/demo artifact.
playwright.composer-agent.config.ts Expands agent-mode coverage (settings + parity) and starts the provider fixture server.
e2e/support/composer-browser.ts New shared helpers for agent-free Composer suites (project creation, scripted build, surface authoring).
e2e/serve-provider.mjs New local provider fixture implementing Ollama/OpenAI discovery endpoints and credential-gated discovery.
e2e/composer-surfaces.spec.ts New surface authoring coverage: lint/preview/save/list/reload, warnings vs must-fail refusal, emitter refusal UX.
e2e/composer-settings.spec.ts New provider configuration coverage through the agent, including discovery, manual model entry, unreachable endpoint UX, and “no secret in storage” invariant.
e2e/composer-prod-smoke.spec.ts Adds an agent-absent settings test asserting Local AI is honestly unavailable and forms are inert.
e2e/composer-parity.spec.ts New product-level parity check between repository-backed (agent) and browser-backed projects.
e2e/composer-governance.spec.ts New governance authoring coverage for intents and typed rules, including impact and Checks round-trips.
e2e/composer-flows.spec.ts New flows coverage: editable plans, pending steps, rebuild/binding, cancel-no-write, completion, and unrenderable step refusal UX.
.github/workflows/ci.yml Updates CI step naming/comments to reflect the expanded Composer hosted/demo and agent-mode suites (incl. fixture server).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/serve-provider.mjs
Comment on lines +28 to +30
/** Must match FIXTURE_KEY in e2e/composer-settings.spec.ts. */
const EXPECTED_KEY = "sk-fixture-credential-0123456789";

Comment on lines +22 to +26
const FIXTURE = "http://localhost:3314";
/** Must match EXPECTED_KEY in e2e/serve-provider.mjs. */
const FIXTURE_KEY = "sk-fixture-credential-0123456789";
/** Nothing listens here — the honest "unreachable endpoint" case. */
const DEAD_ENDPOINT = "http://localhost:3399";
@ryandmonk
ryandmonk merged commit 6b411e5 into main Aug 12, 2026
3 checks passed
@ryandmonk
ryandmonk deleted the test/pre1-coverage branch August 12, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants