Commit Graph

16 Commits

Author SHA1 Message Date
pulse-triage[bot] 57beb6010f test: reap isolated browser writers before credential cleanup
Shell-only signal traps could leave browser descendants writing sensitive state after cleanup, and simultaneous runs shared the same cookie cache. Give the Linux qualification runner an invocation-owned cookie root and a child-subreaper supervisor so catchable interruption waits for writers before removing owned artifacts. Preserve normal reports for inspection and fail closed if writers cannot be reaped. Focused fixtures cover all three signals, late detached writers, concurrent isolation and forced termination; no real-browser cleanup or release readiness is claimed.

Change-source: pulse-maintainer
2026-09-05 16:31:12 +01:00
pulse-triage[bot] 0b73d36011 test(e2e): separate quarantined multi-tenant diagnostic from tier gates
The shell multi-tenant suite previously selected a spec ignored by every project, preventing real backend diagnosis. Add an explicit desktop-only configuration that rejects tier identity, while retaining the normal quarantine. Cover discovery and tier refusal and document the evidence boundaries. A local source-built diagnostic returned five passes, one failure at organisation-switch login, and one skip; this is not release qualification.

Change-source: pulse-maintainer
2026-09-05 14:39:37 +01:00
pulse-triage[bot] a6a02847ef test: isolate shell runner browser artifacts and multi-tenant auth
Concurrent qualification runs could overwrite shared browser artifacts and authentication state, while an inherited PLAYWRIGHT_BASE_URL could send browser traffic outside the shell-owned stack. Scope outputs and fixture credentials to each invocation and clear that endpoint override so isolation evidence refers to the intended stack.

Focused runner checks cover inherited overrides and cleanup. Recorded concurrent Docker diagnostics reached healthy stacks but browser execution remained blocked by the existing multi-tenant quarantine; this test-only repair does not claim browser or release qualification and changes no user-visible application surface.

Change-source: pulse-maintainer
2026-09-05 13:13:28 +01:00
pulse-triage[bot] 6e156f59fe Merge source-built integration runner repair
Integrate the reviewed source-stage selection and run-owned entitlement targeting on top of the existing teardown-failure guard. The merge preserves the candidate commit unchanged and combines compatible qualification harness repairs.

Change-source: pulse-maintainer
2026-09-05 12:30:21 +01:00
pulse-triage[bot] c979637368 fix(test): select source server and scope entitlement bootstrap
The integration runner otherwise selects the final prebuilt-agent Docker stage, which requires release payload inputs and prevents source-server qualification. Entitlement helpers also use a legacy container variable and inherited overrides that can target an unrelated runtime. Select the source-server stage explicitly and bind the managed shell path to its run-owned server, with regression assertions for both behaviours.

Contract-Neutral: integration harness and regression tests only; no product surface or runtime contract changes.
Change-source: pulse-maintainer
2026-09-05 12:01:51 +01:00
pulse-triage[bot] 7b096f82bb fix(test): stop integration suites after setup teardown failure
Reproduced startup, health and entitlement failures continuing through all ten suites despite failed teardown. Use the same fatal teardown guard on setup and port discovery failures so later scenarios cannot inherit dirty state.

Contract-Neutral: qualification harness only; no user-visible product surface. Focused stubbed runner tests and bash syntax checks pass; no runtime qualification claimed.

Change-source: pulse-maintainer
2026-09-05 11:58:10 +01:00
pulse-triage[bot] 9c81488a81 Merge teardown-failure qualification guard
Combine the reviewed teardown guard with per-invocation integration isolation while preserving both candidate commits.

Change-source: pulse-maintainer
2026-09-05 11:40:14 +01:00
pulse-triage[bot] f1bdc44ea5 test: isolate shell integration runs and scope cleanup
Shared image tags, container names and host ports let concurrent checkout qualification collide or inspect another runtime. Give each shell integration invocation its own identities and allocated listeners, and scope failure cleanup to those resources so results cannot silently qualify unrelated bytes.

Contract-Neutral: Integration harness isolation and documentation only; no user-visible frontend, product contract or release surface changes.
Change-source: pulse-maintainer
2026-09-05 11:36:38 +01:00
pulse-triage[bot] ff2a173206 fix(test): stop integration runs when teardown fails
Prevent a successful test command from hiding failed Docker cleanup and letting subsequent suites inherit dirty state. Stubbed core/all regressions fail on the original runner and pass with explicit termination.

Contract-Neutral: qualification harness correction only; no product surface changes.
Change-source: pulse-maintainer
2026-09-05 11:36:23 +01:00
pulse-triage[bot] 69a129e39c fix(test): rebuild integration images from the qualifying checkout
Existing local test tags could silently run older server or mock API bytes. Always invoke cached Docker builds and stop on build failure. Three stubbed runner regressions fail before this repair and pass after it; no installed or browser qualification is claimed.

Contract-Neutral: Integration harness freshness only; no product or release surface changes.
Change-source: pulse-maintainer
2026-09-05 11:09:05 +01:00
rcourtman c728539f07 Restore completed Core E2E verdicts: shard CI, drop release tag from test image
Every main push since the v6 branch flip was cancelled at the 45-minute
job timeout with no verdict. The flip brought the full 94-spec suite onto
main (the last green run, 2026-06-29, ran only 2 specs on the v5 main),
and it runs sequentially against a release-tagged image whose mock-fixture
gate returns 403 without a demo entitlement. Dozens of specs fail, retry
twice each, and burn the budget: of the 31 minutes of suite time in run
28907574469, 18.8 minutes were failing attempts.

- Add GO_BUILD_TAGS build arg (default release) and build the pulse:test
  e2e image with it empty, matching the dev harness the suite is green
  under. Shipped images keep the release tag; release-gate behavior keeps
  its dedicated -tags release Go tests.
- Shard Playwright 4 ways across a CI matrix (214/202/205/203 tests per
  shard) with per-shard report artifacts and an aggregate verdict job.
- Cap CI at 20 failures so an env-broken run reports red in minutes
  instead of grinding into a no-verdict cancellation.
2026-07-08 08:00:55 +01:00
rcourtman 99e65d7e68 Rename retired trial acquisition proof assets 2026-04-28 18:38:10 +01:00
rcourtman 0c1fafa800 Centralize demo commercial boundary policy 2026-04-07 10:24:53 +01:00
rcourtman 778a2577b6 feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
rcourtman 54fc259221 fix(ai): improve AI settings UX with validation and smart fallbacks
Backend:
- Add smart provider fallback when selected model's provider isn't configured
- Automatically switch to a model from a configured provider instead of failing
- Log warning when fallback occurs for visibility

Frontend (AISettings.tsx):
- Add helper functions to check if model's provider is configured
- Group model dropdown: configured providers first, unconfigured marked with ⚠️
- Add inline warning when selecting model from unconfigured provider
- Validate on save that model's provider is configured (or being added)
- Warn before clearing last configured provider (would disable AI)
- Warn before clearing provider that current model uses
- Add patrol interval validation (must be 0 or >= 10 minutes)
- Show red border + inline error for invalid patrol intervals 1-9
- Update patrol interval hint: '(0=off, 10+ to enable)'

These changes prevent confusing '500 Internal Server Error' and
'AI is not enabled or configured' errors when model/provider mismatch.
2025-12-17 18:30:19 +00:00
Claude 2afdca4d30 Add comprehensive integration test suite for update flow
Implements end-to-end testing infrastructure for the Pulse update flow,
validating the entire path from UI to backend with controllable test
scenarios.

## What's Included

### Test Infrastructure
- Mock GitHub release server (Go) with controllable failure modes
- Docker Compose test environment (isolated services)
- Playwright test framework with TypeScript
- 60+ test cases across 6 test suites
- Helper library with 20+ reusable test utilities

### Test Scenarios
1. Happy Path (8 tests)
   - Valid checksums, successful update flow
   - Modal appears exactly once
   - Complete end-to-end validation

2. Bad Checksums (8 tests)
   - Server rejects invalid checksums
   - Error shown ONCE (not twice) - fixes v4.28.0 issue type
   - User-friendly error messages

3. Rate Limiting (9 tests)
   - Multiple rapid requests throttled gracefully
   - Proper rate limit headers
   - Clear error messages

4. Network Failure (10 tests)
   - Exponential backoff retry logic
   - Timeout handling
   - Graceful degradation

5. Stale Release (10 tests)
   - Backend refuses flagged releases
   - Informative error messages
   - Proper rejection logging

6. Frontend Validation (15 tests)
   - UpdateProgressModal appears exactly once
   - No duplicate modals on error
   - User-friendly error messages
   - Proper accessibility attributes

### CI/CD Integration
- GitHub Actions workflow (.github/workflows/test-updates.yml)
- Runs on PRs touching update-related code
- Separate test runs for each scenario
- Regression test to verify v4.28.0 issue prevention
- Automatic artifact uploads

### Documentation
- README.md: Architecture and overview
- QUICK_START.md: Getting started guide
- IMPLEMENTATION_SUMMARY.md: Complete implementation details
- Helper scripts for setup and test execution

## Success Criteria Met

✅ Tests run in CI on every PR touching update code
✅ All scenarios pass reliably
✅ Tests catch v4.28.0 checksum issue type automatically
✅ Frontend UX regressions are blocked

## Usage

```bash
cd tests/integration
./scripts/setup.sh    # One-time setup
npm test              # Run all tests
```

See QUICK_START.md for detailed instructions.

Addresses requirements from issue for comprehensive update flow testing
with specific focus on preventing duplicate error modals and ensuring
checksum validation works correctly.
2025-11-11 09:31:52 +00:00