Skip to content

kind probe: cover the classifier's fallback rows (ApplyRecord, Canceling) with a phase that reaches them #814

Done

Description

@athvin

Found while trying to satisfy #645's second acceptance criterion — "make check-kind observed failing once (a deliberately broken classifier row) before it becomes a required check."

It cannot be satisfied as worded. Two genuine er_k8s::classify::terminal rows were broken, each deployed to the kind cluster and each verified running by imageID (not by tag), and the probe stayed green both times: exit 0, all six phases, zero FAIL lines.

row broken why the probe does not notice
ApplyRecord(record) → TimedOut clause (a) returns first: if row.finish_landed { return RecordEvidence }. The pod reports finish through the attempt channel, so by the time the watch classifies the terminal pod the row already has its verdict and the record-parsing arm is never reached. ApplyRecord only fires for a pod that died without reporting but did write a terminal record — which no phase simulates.
RowState::Canceling → Wait shadowed by executor.rs's cancel_sweep(), which calls task_instance::update::settle_canceled directly (744–776, 1126, 1205). The job still reached canceled and phase 3 passed.

So classify::terminal is a fallback layer whose rows are shadowed by the primary mechanisms (the channel for success, the sweep for cancels). Breaking the classifier does not move the gate.

What to do

  1. Restate the criterion against something the probe demonstrably depends on — the attempt channel's finish handling, or cancel_sweep itself — rather than the classifier.
  2. Decide whether check-kind should be required at all given this. The baseline probe is green (six phases, on Phase 4 — delete the legacy in-process dispatch arm #645's branch), so the gate works for what it covers; the point is that its coverage is narrower than the criterion assumed, and a gate that passes a real defect is weak evidence.
  3. If it is promoted: kind.yml carries a paths: filter, which is safe only while nothing in it is required. Making it required means removing the filter and adding a detect job.

Refs #645.


Product context (2026-11-26)

Why this matters for the API product: Indirect, under recover and operate safely. classify::terminal decides the verdict for a resolution run whose pod dies without reporting. Today no gate exercises that path.

Current state:

  • What-to-do items 2 and 3 are settled. kind.yml:7-15 records that the probe is deliberately not required, on cost grounds (about 29 to 40 minutes for an in-job image build, per The kind probe has never passed in CI — land the first green run and re-decide its gate status #655). Its paths: filter (kind.yml:33-38) is therefore safe. Phase 4 — delete the legacy in-process dispatch arm #645 is closed, so its criterion no longer gates anything.
  • Item 1 still stands. The fallback rows still exist: er-k8s/src/classify.rs:184 (finish_landed returns first) and :265 (ApplyRecord). cancel_sweep still settles cancels directly (er-server/src/executor.rs:826-847). None of the probe's five phases (scripts/check_kind.sh:276-422) simulates a pod that writes a terminal record and then dies without reporting.
  • The probe is red right now for an unrelated reason, with no ticket filed. Every nightly since 2026-11-22 has failed (5 of 5). The cause is phase 5's stage list at check_kind.sh:499: it expects 7 tasks, but the run now also produces golden. The failure is AssertionError: ['assemble','finish','golden',...]. The first red is 0379206, right after b784c21 ("run account golden tasks through DuckFleet"). Fix that first, because a red probe can't prove a new phase works.

Definition of done:

  1. A probe phase makes a pod exit without calling finish after writing a terminal record, and asserts the row settles from that record.
  2. Breaking the ApplyRecord row in classify.rs turns that phase red. Verify the deployed image by imageID (see kind probe deploys a stale image: mutable :kind tag + default IfNotPresent #815).

Dependencies / sequencing: The phase-5 golden fix comes first. #815 should land before any local mutation run.

Size: ~0.5 engineer-weeks.

Activity

  1. added
    ci-backlog
    on Nov 7, 2026
  2. changed the title [-]check-kind: the classifier is a fallback layer the probe cannot fail on[/-] [+]kind probe: cover the classifier's fallback rows (ApplyRecord, Canceling) with a phase that reaches them[/+] on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ci-backlog

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions