Skip to content

feat: ship working demo passthrough pipeline + prove harness teeth#8

Merged
JacobPEvans-personal merged 4 commits into
mainfrom
feat/baseline-validation
Apr 26, 2026
Merged

feat: ship working demo passthrough pipeline + prove harness teeth#8
JacobPEvans-personal merged 4 commits into
mainfrom
feat/baseline-validation

Conversation

@JacobPEvans-personal
Copy link
Copy Markdown
Member

Why

The template's test workflow has been guarded by if: github.event.repository.is_template == false, which means every CI run on template main has been a no-op skip — including the merges of PRs #4#7 that introduced the TS harness. The harness has never actually executed on this repo.

This PR fixes that by:

  1. Replacing the REPLACE_* placeholder route + (missing) pipeline conf with a real working demo (a passthrough that stamps sourcetype / index / datatype on every event).
  2. Adding a fixture pair that drives the auto-discovered Vitest case.
  3. Lifting the is_template == false guard so CI runs end-to-end against the demo content on every template push/PR.

What this proves

After this lands, the template ships a known-good baseline:

  • validate job: structural checks against real (not placeholder) pack files.
  • test job: full Vitest run against a live Cribl container, with the demo fixture exercising both pipelines.test.ts (partial-match assertion + required-fields check) and routes.test.ts (dynamic route flow against the synthetic event).

I'll deliberately break the expected fixture in a follow-up push on this branch to confirm CI fails with a useful diff, then restore before merging — receipts that the harness has teeth, not just that it exits 0 against its own output.

Demo content can be replaced freely

When a consumer scaffolds from this template via gh repo create --template, they inherit:

  • default/pipelines/passthrough/ — replace with their pipelines
  • default/pipelines/route.yml — replace with their routes
  • tests/fixtures/passthrough/ — replace with their fixtures

Names are intentionally generic so it's obvious they're demo content.

The template now ships a real working demo (passthrough pipeline +
matching route + fixture pair) instead of placeholders that fail
validation. This:

- Gives the test harness real content to exercise on the template
  itself (lifts the is_template skip guard)
- Provides consumers a known-working starting point they can replace
- Lets us prove the harness has teeth: deliberate fixture breaks
  surface as CI failures, restoration restores green

Files:
- default/pipelines/passthrough/conf.yml — Eval stamps sourcetype,
  index, datatype on every event
- default/pipelines/route.yml — replaces REPLACE_* placeholders
  with a real passthrough route (filter datatype=='cribl-demo')
- tests/fixtures/passthrough/sample.{json,expected.json} — input
  + expected output pair driving the auto-discovered Vitest case
- .github/workflows/test.yml — drops is_template==false guard so
  CI runs end-to-end against the demo content
Copilot AI review requested due to automatic review settings April 26, 2026 18:34
The Vitest harness installs the pack and then queries it by name; with
'REPLACE-WITH-PACK-NAME' it 404s. Switch to 'cc-edge-demo-io' which
satisfies the cc-{edge,stream}-<source>-io validator convention and
makes it obvious it's demo content for consumers to replace.
This commit will be reverted in the next push. Pushing it to confirm
the Vitest assertion produces a useful diff and the test job exits
non-zero in GitHub Actions — proving the harness has teeth instead of
passing tautologically.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the template pack to ship a working demo pipeline + fixtures and enables CI to actually execute the TypeScript/Vitest harness on the template repository itself.

Changes:

  • Replaces the placeholder route.yml entry with a real passthrough route and adds a corresponding default/pipelines/passthrough/conf.yml.
  • Adds fixture input/expected-output JSON for the passthrough pipeline to drive the auto-discovered Vitest tests.
  • Removes the template-only skip condition from the test workflow so CI runs on the template repo.

Reviewed changes

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

Show a summary per file
File Description
tests/fixtures/passthrough/sample.json Adds a demo input event fixture for the passthrough pipeline.
tests/fixtures/passthrough/sample.expected.json Adds expected (partial-match) output assertions for the demo pipeline.
default/pipelines/route.yml Replaces placeholder route with a demo passthrough route that matches the fixture datatype.
default/pipelines/passthrough/conf.yml Introduces a demo pipeline that stamps sourcetype, index, and datatype.
.github/workflows/test.yml Enables CI execution on the template repo by removing the is_template guard.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test.yml
Comment thread .github/workflows/test.yml
@JacobPEvans-personal JacobPEvans-personal merged commit 83b1b95 into main Apr 26, 2026
2 checks passed
@JacobPEvans-personal JacobPEvans-personal deleted the feat/baseline-validation branch April 26, 2026 19:28
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