Skip to content

fix(train): settle as a no-op on a dataset with nothing ingested yet (#1186) - #1188

Merged
athvin merged 2 commits into
mainfrom
issue/1186-train-noop
Nov 23, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/1186-train-noop

Conversation

@athvin

@athvin athvin commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Closes #1186

🚧 Claimed by an agent session — 2026-11-23T18:49:55Z, session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on Mac.
The claim is this open draft PR: closing it releases the claim.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

train settles as a no-op on a dataset with no standardized records yet, instead of failing on the missing int_std_records table. register_model registers nothing for that outcome, and the active model stays until data exists.

Why

#1186, found by the #1013 launch proof. A customer's first config publish on a fresh dataset enqueued a train that failed, so an API-only tenant saw a failed job right after onboarding. (frontend/dev/seed.mjs pre-seeds the lake with the CLI to avoid it.) The check lives on the lake rather than on delivery history in the publish handler, because bring-your-own tenants ingest from drop directories without delivery rows.

Proof

  • pg_launch_proof now asserts the publish-time train succeeds and /models shows no trained- row. Mutation-checked: disabling the no-op brings back the original int_std_records failure.
  • pg_train (training with data registers a draft) is unchanged and passes.
  • make check: exit 0, 1134 passed / 0 failed.

Risk & rollback

  • Only the never-ingested case changes. A lake that has int_std_records trains exactly as before.
  • Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on Mac · 2026-11-23T20:04:25Z

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: 802127db. rust 45249930073, frontend 45249930190, infra 45249929999 and devcontainer 45249930147 are all success.
  • images built, or correctly never ran because nothing that goes into
    an image changed: images 45249930164 success.
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: verified 2026-11-23 after SSO refresh: dev ci/web-api-green-55b8644b5d-kh675 and prod app/web-api-blue-84f48dd5cb-g7jv9 both run er-api@sha256:b6ed9097…, ECR-tagged 802127db, and their er-server container emitted "message":"er-server listening","addr":"0.0.0.0:8000" (dev 21:50:56Z, prod 19:36:00Z). The dispatcher in both runs the same digest. 802127db contains this merge (git merge-base --is-ancestor). Earlier evidence: deploy 45250458243 carries DEPLOY_SHA 802127db; the new colour answered /readyz -> 200 and traffic was verified in dev and prod. A pod log line could not be read: local SSO expired.
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change: deploy is green. drift and kind have been red since before this change (the known kind-probe red).
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: First config publish on a never-ingested dataset enqueues a train job that fails #1186 CLOSED by the merge, and the card is Done.
  • follow-ups are open for everything deferred here — numbers: none new; API launch proof: configure, ingest, dedupe and retrieve results without Salesforce #1013 keeps its remaining acceptance.
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: TrainedModel's doc and Train's comment record the empty-lake no-op and why it is lake-based, not delivery-based.

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

#1186. A customer's first config publish on a never-ingested dataset
enqueues `train`, which failed:
`Table with name int_std_records does not exist`. An API-only tenant
saw a failed job right after onboarding, though nothing was wrong.
frontend/dev/seed.mjs works around it by pre-seeding with the CLI.

- `Train` probes `int_std_records`. When it is absent, the task returns
  `Outcome::NoOp` with an empty `TrainedModel`. The active model stays
  until data exists.
- `RegisterModel` registers nothing for an empty `model_path`.
- `TrainedModel` derives Default; its doc says empty paths mean nothing
  was trained.

The check is on the lake, not on delivery history in the publish
handler: bring-your-own tenants ingest from drop directories without
delivery rows and would have stopped retraining.

pg_launch_proof now asserts the publish-time `train` succeeds and that
`/models` shows no `trained-` row. Mutation-checked: disabling the
no-op brings back the original failure. pg_train (training with data)
is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin
athvin force-pushed the issue/1186-train-noop branch from b018d44 to 420f291 Compare November 23, 2026 19:24
@athvin
athvin marked this pull request as ready for review November 23, 2026 19:24
@athvin
athvin merged commit 802127d into main Nov 23, 2026
41 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 23, 2026 19:32 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 420f291e Deployed Nov 23, 2026 by athvin via remove closed PR previews #19
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.

First config publish on a never-ingested dataset enqueues a train job that fails

2 participants