Skip to content

feat: Phase 1 foundation — config, webhooks, JUnit, tests (v0.5.0)#1

Merged
drewstone merged 2 commits intomainfrom
feat/phase-1-foundation
Feb 28, 2026
Merged

feat: Phase 1 foundation — config, webhooks, JUnit, tests (v0.5.0)#1
drewstone merged 2 commits intomainfrom
feat/phase-1-foundation

Conversation

@drewstone
Copy link
Contributor

Summary

  • Config file systemagent-browser-driver.config.ts with defineConfig() for IDE autocomplete. loadConfig() searches up the directory tree, mergeConfig() does last-wins for scalars/arrays, concat for sinks only. CLI --config flag; all CLI flags override config values without clobbering unrelated config file settings.

  • WebhookSinkArtifactSink implementation that POSTs artifact metadata (and optionally base64 data) to any webhook URL. Event type filtering, custom headers, configurable max payload size, exponential backoff retry (1s/2s/4s). Never throws (infra-as-best-effort). close() accepts optional pass/fail summary.

  • JUnit XML reportergenerateJUnitXml() produces standard JUnit XML for GitHub Actions, Jenkins, GitLab CI. Full XML escaping in both attributes and body text. Tests grouped by testCase.category. Failures include verdict, criteria results, and last 5 actions. Wired into generateReport() via format: 'junit'.

  • Test suite — 51 vitest unit tests across 6 files. No browser, no LLM, no network. Runs in ~35ms (133ms total with transform/import).

Metrics

Metric Value
Tests 51
Test execution time 35ms
Total pnpm test time ~133ms
New source files 3 (config.ts, webhook-sink.ts, reporters/junit.ts)
New test files 6
Edited files 5 (index.ts, cli.ts, test-report.ts, package.json, README.md)
Package size (dist/) 664K
New code added ~24K across 3 source files
Version 0.4.0 → 0.5.0

Test plan

  • pnpm build — zero TypeScript errors
  • pnpm test — 51/51 pass
  • JUnit XML validated: no unescaped special chars in attributes or body text
  • Config loading validated end-to-end: file → merge defaults → CLI override
  • All exports verified: 10 new exports (defineConfig, defineTests, loadConfig, mergeConfig, toAgentConfig, generateJUnitXml, generateReport, WebhookSink, FilesystemSink, CompositeSink)
  • Boolean CLI flags don't clobber config file (headless, vision, goalVerification)
  • Reporters array replaces (not concats) on merge — ['junit'] replaces default ['json']

….5.0)

Phase 1 foundation — makes the package self-sufficient and CI-ready:

- Config file system: agent-browser-driver.config.ts with defineConfig(),
  loadConfig() (searches up dir tree), mergeConfig() (last-wins scalars,
  concat sinks only). CLI --config flag, all CLI flags override config.

- WebhookSink: ArtifactSink that POSTs to any URL. Event filtering,
  includeData toggle, exponential backoff retry, never throws.

- JUnit XML reporter: generateJUnitXml() produces valid XML for GitHub
  Actions/Jenkins/GitLab. Full XML escaping in attributes and body text.
  Grouped by category, failures include verdict + last actions.

- Test suite: 51 vitest unit tests across 6 files covering config,
  webhook-sink, junit, filesystem-sink, composite-sink, and snapshot.
  Runs in ~35ms.

Bump version to 0.5.0.
…CI tests

- Add slackFormatter() for Slack Block Kit webhook notifications
- Add formatPayload callback to WebhookSinkOptions for custom transformations
- Wire reporters config into CLI — writes all configured formats to disk
- Add report-junit to ArtifactType union
- Update CI workflow to run pnpm test
- Add tests for slack formatter and formatPayload
@drewstone drewstone merged commit 5b3aeda into main Feb 28, 2026
3 checks passed
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.

1 participant