ci(jobnik-e2e): make the e2e suite a gate on unreleased code - #8
Open
CptSchnitz wants to merge 1 commit into
Open
ci(jobnik-e2e): make the e2e suite a gate on unreleased code#8CptSchnitz wants to merge 1 commit into
CptSchnitz wants to merge 1 commit into
Conversation
Coverage Report for apps/jobnik-manager
File CoverageNo changed files found. |
Replace the e2e composition's sibling-repo build with the pruned build: both the manager and migrator services now build docker/backend.Dockerfile from the repository root with APP_NAME=jobnik-manager, instead of a `./jobnik-manager` context that only ever existed for the cross-repository checkout. The migrator's `npx prisma ...` also picks up the `prisma@6` pin ticket 05 flagged — without it, a fresh image build resolves Prisma 7 and the migration fails outright, for the same reason the image build itself does. The suite is wired into the single entry point for real: turbo's existing `e2e` task already dispatched to a package script, but `vitest run` alone never brought the composition up. It now does, via a `globalSetup`/`teardown` pair mirroring the manager's own integration-test convention (tests/configurations/integration/ globalSetup.ts) — `docker compose up --build --wait` before the suite, `down` after it in CI only, so a local run leaves the stack up for faster iteration. `--build` is unconditional rather than skip-if- running, because the whole point of this ticket is that the suite tests the current checkout, never a stale container. `jobnik-e2e` gained a `type-check` script and a `jobnik-manager` workspace:* devDependency it doesn't import from — the former wires `tsc --noEmit` into the existing type-check task for free (all it needed was the script to exist), the latter gives turbo's package graph an edge from the suite to the service it tests, which is what `--affected` actually walks. Without it, a manager-only change with no SDK or spec involvement would never mark the suite affected. Verified by touching apps/jobnik-manager/src/index.ts and confirming `turbo run e2e --affected --dry=json` includes jobnik-e2e. A new `e2e` job in pull_request.yaml runs `turbo run e2e --affected`, following the existing matrix jobs' pattern of always running but doing nothing when unaffected — there is no scheduled trigger. Wiring in type-check surfaced the staleness ticket 02 called out: the workspace SDK's generated types no longer accept the status values pause.spec.ts and wait.spec.ts were setting. Checked both against the current OpenAPI contract (stageOperationStatus: PENDING only; taskOperationStatus: COMPLETED/FAILED only) and against the manager's actual transition logic, not just the type error: tasks are created PENDING by TaskManager.addTasks regardless of the stage's status, and a stage created via startAsWaiting is already WAITING, so both specs' redundant status-setting calls were dead weight even before they became type errors — removed rather than retargeted at a different value. The one remaining explicit PENDING call in pause.spec.ts (on a stage that's already PENDING at creation, being the job's first stage) stays: it's a no-op the manager already treats as idempotent, still valid against the contract, and not what tsc flagged. Verified end-to-end: `turbo run e2e` builds both images from this checkout, runs migrations through the pinned prisma@6, brings up the full composition, and all 24 tests across 9 files pass, including the two fixed specs. `turbo run type-check lint test` stays green repo-wide, confirming the manager's own integration tests — which resolve their compose file by the same upward search, from a sibling directory that still has none — are unaffected by anything here. Refs: .scratch/monorepo-migration/issues/06-e2e-suite-branch-gate.md Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CptSchnitz
force-pushed
the
migration/06-e2e-gate
branch
from
August 23, 2026 12:03
34bd7ec to
0e2699c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the e2e composition's sibling-repo build with the pruned
build: both the manager and migrator services now build
docker/backend.Dockerfile from the repository root with
APP_NAME=jobnik-manager, instead of a
./jobnik-managercontext thatonly ever existed for the cross-repository checkout. The migrator's
npx prisma ...also picks up theprisma@6pin ticket 05 flagged —without it, a fresh image build resolves Prisma 7 and the migration
fails outright, for the same reason the image build itself does.
The suite is wired into the single entry point for real: turbo's
existing
e2etask already dispatched to a package script, butvitest runalone never brought the composition up. It now does, viaa
globalSetup/teardownpair mirroring the manager's ownintegration-test convention (tests/configurations/integration/
globalSetup.ts) —
docker compose up --build --waitbefore the suite,downafter it in CI only, so a local run leaves the stack up forfaster iteration.
--buildis unconditional rather than skip-if-running, because the whole point of this ticket is that the suite
tests the current checkout, never a stale container.
jobnik-e2egained atype-checkscript and ajobnik-managerworkspace:* devDependency it doesn't import from — the former wires
tsc --noEmitinto the existing type-check task for free (all itneeded was the script to exist), the latter gives turbo's package
graph an edge from the suite to the service it tests, which is what
--affectedactually walks. Without it, a manager-only change with noSDK or spec involvement would never mark the suite affected. Verified
by touching apps/jobnik-manager/src/index.ts and confirming
turbo run e2e --affected --dry=jsonincludes jobnik-e2e. A newe2ejob in pull_request.yaml runs
turbo run e2e --affected, followingthe existing matrix jobs' pattern of always running but doing nothing
when unaffected — there is no scheduled trigger.
Wiring in type-check surfaced the staleness ticket 02 called out: the
workspace SDK's generated types no longer accept the status values
pause.spec.ts and wait.spec.ts were setting. Checked both against the
current OpenAPI contract (stageOperationStatus: PENDING only;
taskOperationStatus: COMPLETED/FAILED only) and against the manager's
actual transition logic, not just the type error: tasks are created
PENDING by TaskManager.addTasks regardless of the stage's status, and
a stage created via startAsWaiting is already WAITING, so both specs'
redundant status-setting calls were dead weight even before they
became type errors — removed rather than retargeted at a different
value. The one remaining explicit PENDING call in pause.spec.ts (on a
stage that's already PENDING at creation, being the job's first
stage) stays: it's a no-op the manager already treats as idempotent,
still valid against the contract, and not what tsc flagged.
Verified end-to-end:
turbo run e2ebuilds both images from thischeckout, runs migrations through the pinned prisma@6, brings up the
full composition, and all 24 tests across 9 files pass, including the
two fixed specs.
turbo run type-check lint teststays greenrepo-wide, confirming the manager's own integration tests — which
resolve their compose file by the same upward search, from a sibling
directory that still has none — are unaffected by anything here.
Refs: .scratch/monorepo-migration/issues/06-e2e-suite-branch-gate.md
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Stack created with GitHub Stacks CLI • Give Feedback 💬