Files
Pulse/tests/integration/e2e-tiering.mjs
rcourtman 28172a907b Retire the Assistant chat window; alert Investigate runs Patrol
Pulse Assistant was a chat drawer beside the monitoring UI. Operators who
want to talk to their infrastructure already use Claude Code, Codex, or
another MCP client, and Pulse MCP gives those agents the same governed
tools. Keeping a second, weaker chat in the web app cost a 66 kB chunk,
a launcher on every page, hand-off buttons on alerts, findings, approvals
and drawers, and thousands of lines of OpenCode-parity drawer code, for a
feature the maintainer judged ineffective.

This removes the browser chat and everything that only fed it:

- The drawer, its launcher (desktop and phone), the command-palette
  Assistant commands, the Escape and blocking-dialog shell plumbing, and
  the chat store, client, dev stream fixture and generated SSE types.
- Every "Open in Assistant", "Explain with Assistant", "Discuss" and
  "Ask Assistant" hand-off on alerts, incident timelines, Patrol findings,
  approvals, run history, the attention workbench and resource drawers,
  with their context models and the chat-only helpers they used.
- The Assistant settings page and its session maintenance section. The
  page becomes "External agents" at /settings/pulse-intelligence/agents;
  the old /assistant path, ?tab=assistant and system-ai-assistant redirect
  there with the hash kept.

Alert Investigate now starts a targeted Patrol run (resource, alert ID and
type) and says where the findings land, and it ignores repeat clicks while
the request is in flight. The run route needs an admin with ai:execute, so
security status gains settingsCapabilities.patrolRun, derived from the same
snapshot as the other admin capabilities but following the route for
org-scoped admins, organization-bound tokens and a cookie beside a token,
and Investigate is offered only where it is true. The Patrol
tool transcript block moves to components/patrol. A small aiAvailability
store holds the session assistantEnabled fact that gates Patrol entry
points and Investigate; it now clears and refreshes on organization switch,
refreshes when organization loading settles on another org and after
provider removal, and ignores answers that arrive after a newer one.

The backend chat service stays: Patrol investigations run on it and
Pulse Mobile chat uses it until 31 March 2027, so /api/ai/chat, the
session endpoints and the stream contract are unchanged. A new contract
snapshot pins the steer_applied event that only the deleted TypeScript
projection used to cover.

highlight.js, used only by the chat's code highlighter, leaves the
dependencies, as does the DOMPurify carve-out that kept its fence hints.

Contracts, registry and readiness proofs drop the retired surfaces; the
ai-runtime contract loses about 1,600 lines of drawer rules while keeping
every backend session, stream and provider rule. The production build
ships about 100 kB less gzipped JavaScript.
2026-10-23 00:15:04 +01:00

74 lines
3.4 KiB
JavaScript

/**
* Specs that are deliberately not run. Quarantine is reserved for known,
* unresolved product/spec incompatibilities and is never an automatic result
* of an infrastructure failure.
*/
export const QUARANTINED_SPECS = [
// Multi-tenant scenarios 6/7 have an unresolved org-resolution bug (see
// core-e2e-failure-taxonomy): after switchOrg+reload the UI still resolves
// the default org. CI runs a multi-tenant environment, so delisting this
// spec turns that open bug into a permanent red.
'**/03-multi-tenant.spec.ts',
];
/**
* Specs that run on every push but do not gate the Core E2E verdict. The
* stable tier is every non-quarantined spec not listed here.
*
* Audit (2026-08-11): the 10 most recent completed main workflow records at
* 2026-08-11T20:22:40Z contained six executed runs and four concurrency
* cancellations with no jobs. Only explicit Playwright `failed` or `flaky`
* summaries in the 48 executed shard logs count as incidents; progress lines
* and cancelled/non-executed runs do not. The audit found 13 stable-spec
* incidents and no shard-wide environment collapse. Existing probation specs
* remain because six evidence-bearing runs cannot prove the promotion rule.
*
* Promotion rule: a spec returns to stable after 10 consecutive executed Core
* E2E runs on main with neither a failure nor a retry-pass (`flaky`). Demotion
* rule: one genuine spec failure/flake on main returns a stable spec here. A
* shared environment or runner failure is recorded separately and never
* demotes every spec that happened to be scheduled on the affected shard.
*/
export const PROBATION_SPECS = [
'**/01-core-e2e.spec.ts',
'**/02-navigation-perf.spec.ts',
'**/04-mobile.spec.ts',
'**/05-settings-mobile-audit.spec.ts',
'**/06-theme-visual.spec.ts',
'**/11-first-session.spec.ts',
'**/15-settings-shell-consistency.spec.ts',
'**/20-local-doc-links.spec.ts',
'**/21-truenas-connections-workspace.spec.ts',
'**/28-truenas-alert-resource-links.spec.ts',
'**/39-vmware-resource-detail-drawer.spec.ts',
'**/40-vmware-storage-source-filter.spec.ts',
'**/41-vmware-phase1-exclusion-integrity.spec.ts',
'**/43-platform-mock-runtime.spec.ts',
'**/44-workloads-chart-spacing.spec.ts',
'**/45-workloads-memory-tail.spec.ts',
'**/46-storage-summary-continuity.spec.ts',
'**/47-inline-selection-scroll-stability.spec.ts',
'**/49-demo-scenario-curation.spec.ts',
'**/50-storage-physical-disk-io-history.spec.ts',
'**/52-ai-settings-provider-setup.spec.ts',
'**/53-demo-mode-commercial-boundary.spec.ts',
'**/55-self-hosted-upgrade-return.spec.ts',
'**/56-pulse-account-upgrade-bootstrap.spec.ts',
'**/59-self-hosted-plans-entitlement-summary.spec.ts',
'**/59-workloads-column-layout.spec.ts',
'**/62-storage-growth-column.spec.ts',
'**/64-workloads-proxmox-refresh-stability.spec.ts',
'**/68-infrastructure-onboarding.spec.ts',
'**/68-platform-pages-shell.spec.ts',
'**/70-self-hosted-manual-activation-success.spec.ts',
'**/75-agent-integrations-surface-contract.spec.ts',
'**/77-msp-isolation.spec.ts',
'**/78-monitor-first-patrol-workbench.spec.ts',
'**/79-update-flow.spec.ts',
'**/81-actions-inbox.spec.ts',
'**/90-operational-trust-protection-posture.spec.ts',
'**/91-operational-trust-attention-workbench.spec.ts',
'**/91-proxmox-node-display-names.spec.ts',
'**/92-operational-trust-availability-facet.spec.ts',
];