Skip to content

fix(tests): e2e-journey Step 4 uses offline data validate instead of push --dry-run#318

Merged
saadqbal merged 1 commit into
developfrom
fix/e2e-journey-step4-data-validate
Jul 7, 2026
Merged

fix(tests): e2e-journey Step 4 uses offline data validate instead of push --dry-run#318
saadqbal merged 1 commit into
developfrom
fix/e2e-journey-step4-data-validate

Conversation

@saadqbal

@saadqbal saadqbal commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

Closes #317. Follow-up to #316 (which fixed the create_cluster exit-127 regression that was stopping the E2E last-mile journey before Step 4 ever ran).

With #316 merged, the E2E job reaches Step 4 for the first time with a working guard() and fails:

── Step 4: dataset push --dry-run smoke ──
Error: table name is required (set --table)
exit code 2

Why the old Step 4 can't work here

dataset push --dry-run is no longer an offline check. The current CLI (internal/cli/data.go) runs cluster discovery and a Bound-PVC check (resolveClusterTarget(..., needPVC=true)) and a destination-table check before the dry-run stop. This harness's credential-free stub creates no PVC, so dataset push --dry-run can't pass against it regardless of which flags we add.

Fix

Switch Step 4 to tracebloc data validate <spec> — the CLI's purpose-built offline schema check (validates a spec against the embedded ingest.v1.json, never touches the cluster). That's exactly the "offline-validatable, no creds, no reachable platform" smoke the step was always documented to be.

  • Committed spec mirrors the CLI's own known-good fixture (testdata/smoke/valid-image-classification.yaml); the /data/shared paths are schema-only (validate never reads them).
  • Asserts both directions — valid spec passes (exit 0), invalid spec (missing required intent) is rejected (exit 2) — so a green run isn't vacuous, same discipline as the guard() self-test.

Verification

Built the actual released binary tracebloc/cli v0.6.0 (what releases/latest resolves to; the version the E2E installs) and ran both files:

ingest.yaml: ok                                    exit=0
ingest-invalid.yaml: schema validation failed …    exit=2   (missing property 'intent')

bash -n clean.

🤖 Generated with Claude Code


Note

Low Risk
Test-only change to the E2E journey script; no production code or runtime behavior is modified.

Overview
Step 4 of e2e-journey.sh no longer runs tracebloc dataset push … --dry-run on a sample CSV. It now exercises tracebloc data validate against a generated IngestConfig YAML (aligned with the CLI smoke fixture), which stays credential-free and does not need cluster discovery or a Bound PVC.

The step asserts both outcomes: a complete spec must exit 0, and a spec missing required intent must fail non-zero so a broken validator cannot pass vacuously. Header comments for the journey are updated to describe this offline schema smoke instead of dataset push dry-run.

Reviewed by Cursor Bugbot for commit 6db20af. Bugbot is set up for automated code reviews on this repo. Configure here.

… --dry-run

Step 4 only ran for real once #316 fixed the create_cluster exit-127
regression (the old vacuous guard() and then the step-1 crash had hidden
it). It failed with "table name is required (set --table)".

`dataset push --dry-run` is no longer an offline check: the current CLI
runs cluster discovery AND a Bound-PVC check (resolveClusterTarget with
needPVC=true) before its dry-run stop, and this harness's credential-free
stub creates no PVC — so that path can't pass here regardless of flags.

Switch to `tracebloc data validate <spec>`, the CLI's purpose-built
offline schema check (validates against the embedded ingest.v1.json, no
cluster) — exactly the "offline-validatable, no creds, no reachable
platform" smoke the step was always meant to be. Assert both directions
(valid spec passes, invalid spec rejected) so a green run isn't vacuous,
mirroring the guard() self-test. Spec shape matches the CLI's own
known-good fixture (testdata/smoke/valid-image-classification.yaml).

Verified against the real released binary (tracebloc/cli v0.6.0, which
releases/latest resolves to): valid -> exit 0, missing-intent -> exit 2.

Closes #317. Follow-up to #316 / #310.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@saadqbal saadqbal added the e2e Run the full E2E last-mile journey (create_cluster → CLI → cluster info → data validate) label Jul 7, 2026
@saadqbal saadqbal self-assigned this Jul 7, 2026
@saadqbal saadqbal merged commit 90f6d19 into develop Jul 7, 2026
60 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run the full E2E last-mile journey (create_cluster → CLI → cluster info → data validate)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants