feat: check-events v2 — streaming test results (fg-check, adapters, live CI page) #421

Closed
gmackie wants to merge 7 commits from feat/check-events-v2 into main
Owner

Implements the check-events v2 plan (https://7uo9xiwyp0dd.postplan.dev).

  • @forgegraph/check-events 0.1.3 (published): envelope, tail/parse consumer, adapters (go test -json, nextest libtest-json-plus, pytest --report-log sidecar, RSpec formatter in rb/, TAP, TeamCity, scrape) behind a sniffing dispatcher; fg-check CLI with CTRF fold; vitest/jest reporters.
  • Agent: internal/checkevents (ParseLine/Tail/Collect/Summarize), manifestci collects RunResult.Tests + streams 2s OnProgress folds; dispatch/client forward both.
  • Server: ci-report tests field + new POST /api/agent/ci-progress → builds.metadata.tests (jsonb merge, no migration).
  • Web: CI run page checks strip via LiveChecks polling GET /api/ci/[id]/checks while active.

Bob consumes the same envelope on cockpit-v2 (shim swapped to the shared CLI).

🤖 Generated with Claude Code

Implements the check-events v2 plan (https://7uo9xiwyp0dd.postplan.dev). - @forgegraph/check-events 0.1.3 (published): envelope, tail/parse consumer, adapters (go test -json, nextest libtest-json-plus, pytest --report-log sidecar, RSpec formatter in rb/, TAP, TeamCity, scrape) behind a sniffing dispatcher; fg-check CLI with CTRF fold; vitest/jest reporters. - Agent: internal/checkevents (ParseLine/Tail/Collect/Summarize), manifestci collects RunResult.Tests + streams 2s OnProgress folds; dispatch/client forward both. - Server: ci-report tests field + new POST /api/agent/ci-progress → builds.metadata.tests (jsonb merge, no migration). - Web: CI run page checks strip via LiveChecks polling GET /api/ci/[id]/checks while active. Bob consumes the same envelope on cockpit-v2 (shim swapped to the shared CLI). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The shared streaming test-results contract (plan: 7uo9xiwyp0dd.postplan.dev).
JS: envelope types, NDJSON writer, tail/parse consumer (v1 bob-check lines
upgrade in place), adapters (go test -json, TAP, TeamCity service messages,
scrape) behind a sniffing dispatcher that locks onto the first structured
format and reports honest confidence, target detection (pkg scripts ->
justfile -> Makefile -> forge-ci.toml override), runPhase with go -json
injection, fg-check CLI with CTRF fold, first-class vitest + jest reporters.
Go: agent/internal/checkevents ParseLine/Tail/Collect/Summarize mirror for
the CI runner (per-stream count summing, failed-stream-sticks semantics).
Published 0.1.0 to npm.forgegraf.com.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ChecksSummary renders builds.metadata.tests as the per-configuration phase
strip with failing tests; the route test pins the jsonb merge contract.
Package 0.1.2 adds the ./cli export (published via pnpm so publishConfig
exports apply — npm publish shipped a tarball whose exports pointed at the
pruned src/ tree).

The wiring edits to ci-report/route.ts, page.tsx, build-queue.ts,
manifestci/runner.go, agentci/dispatch.go, and pkg/client/client.go remain
in the working copy: those files also carry the in-flight mise-toolchains
WIP and a path-scoped commit would sweep it along.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(check-events): native adapters, live CI progress, page wiring (0.1.3)
Some checks failed
CI / gitleaks (pull_request) Has been cancelled
CI / storybook (pull_request) Has been cancelled
CI / ci (pull_request) Has been cancelled
a085252f11
Rebase of the check-events v2 build onto landed main (mise #399 +
verification suites both merged meanwhile; hunks re-applied on the new
base):

- fg-check 0.1.3: libtest adapter (cargo nextest libtest-json-plus,
  injected + NEXTEST_EXPERIMENTAL_LIBTEST_JSON=1), pytest --report-log
  sidecar (flag injected only when the plugin import-probes clean), RSpec
  formatter shipped in rb/ (no gem; --require'd, streams v2 lines to
  --out), prepareCommand + sidecar tailing in runPhase, sniffer knows
  libtest. Published to npm.forgegraf.com.
- Agent: manifestci collects .fg/check-events.ndjson into RunResult.Tests
  and streams 2s progress folds via RunRequest.OnProgress; dispatch
  forwards both (ci-report tests field, new client.ReportCIProgress).
- Server: ci-report + new ci-progress ingest the summary (shared zod
  schema) into builds.metadata.tests via jsonb merge — no migration;
  ci-progress is stale-silent once the build is terminal.
- Web: CI run page renders the checks strip (per-configuration bars,
  failing tests, scraped-counts badge) via LiveChecks, polling
  GET /api/ci/[id]/checks every 4s while active (poll on purpose: prod
  runs on Workers, the in-process bus can't fan out).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(check-events): fg-check on every CI worktree PATH + best-practices docs
Some checks failed
CI / gitleaks (pull_request) Has been cancelled
CI / storybook (pull_request) Has been cancelled
CI / ci (pull_request) Has been cancelled
071210c53a
agent/internal/fgcheck embeds the built CLI (assets synced from the
package by scripts/sync-agent-assets.sh — dist itself is gitignored) and
installs it into each build worktree: .fg/libexec + a .fg/bin/fg-check
shim, with the bin dir prepended to the sandbox PATH (opts.Env layers
after the pinned default, now exported as sandbox.DefaultCIPath). Repos
opt in with `command = "fg-check test"` in forge-ci.toml — zero
installs, zero network. End-to-end test runs the embedded CLI under host
node. Plus docs/check-events.md (conventions, samples, adapter ladder,
env knobs) and an fg-onboard-repo step for conventional check targets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docs(plan): all four check-events phases built
Some checks failed
CI / gitleaks (pull_request) Has been cancelled
CI / storybook (pull_request) Has been cancelled
CI / ci (pull_request) Has been cancelled
2b9b999fa4
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gmackie force-pushed feat/check-events-v2 from 2b9b999fa4
Some checks failed
CI / gitleaks (pull_request) Has been cancelled
CI / storybook (pull_request) Has been cancelled
CI / ci (pull_request) Has been cancelled
to b1677959b4
All checks were successful
CI / gitleaks (pull_request) Successful in 6s
CI / storybook (pull_request) Successful in 1m37s
forgegraph/ci CI passed
CI / ci (pull_request) Successful in 9m35s
2026-08-24 21:32:42 +00:00
Compare
feat(check-events): dogfood in the monorepo's own CI (0.1.4)
Some checks failed
CI / gitleaks (pull_request) Has been cancelled
CI / storybook (pull_request) Has been cancelled
CI / ci (pull_request) Has been cancelled
1b1d08868d
The vitest reporter runs in apps/web and in the package's own suite; the
ci job exports one shared FG_CHECK_EVENTS_PATH and a non-blocking step
folds the stream into the job summary (per-configuration table, failing
tests) plus a CTRF artifact — executed straight off the agent's committed
embedded CLI, no build. 0.1.4: reporters now stamp a stream discriminator
(package name by default) so multi-suite counts SUM instead of the last
suite winning — found by running two suites into one file. Env-isolation
hardening: the writer unit tests and the Go shim e2e pin explicit paths
so a job-level FG_CHECK_EVENTS_PATH can't hijack their fixtures (it did).
Embedded assets re-synced + ESM type marker.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(check-events): fg ci checks, CTRF artifact beside the log, storybook story
All checks were successful
CI / gitleaks (pull_request) Successful in 7s
CI / storybook (pull_request) Successful in 1m37s
forgegraph/ci CI passed
CI / ci (pull_request) Successful in 9m36s
a66784a8b4
- `forge ci checks <run-id>`: the exact-stream view of a run — per-
  configuration results with counts and failing test names, live during
  the run — backed by GET /api/fg/ci/runs/[id]/checks (token auth,
  UUID or Forgejo run number). Complements `forge ci failures`.
- The manifest runner now folds the full event stream into a CTRF
  report written beside the build log (<log>.ctrf.json) — the artifact
  half of the storage decision, on node disk like the logs it joins.
  Go FoldToCtrf mirrors the TS fold.
- Storybook: Web/CI/ChecksSummary with failing/green/mid-run/scraped/
  empty states, per the mock-harness conventions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gmackie closed this pull request 2026-08-24 22:51:09 +00:00
Author
Owner

Superseded: #423 landed the core of this branch while it was queued; the strict remainder is #427.

Superseded: #423 landed the core of this branch while it was queued; the strict remainder is #427.
All checks were successful
CI / gitleaks (pull_request) Successful in 7s
Required
Details
CI / storybook (pull_request) Successful in 1m37s
forgegraph/ci CI passed
CI / ci (pull_request) Successful in 9m36s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gmackie/ForgeGraph!421
No description provided.