Your CI check at rule library v2.3 blocks a manifest that a developer's pinned v1.9 pre-commit hook passed. How do you respond?
answer
- same manifest, two verdicts
- reproduce before arguing about the rule
- read the changelog between the pins
- who is behind, and does it matter
- the enforcing gate is never the laggard
basics
~20 sConfirm it is version drift rather than a false positive by running both versions on the same manifest and reading the changelog between them. Then unblock by fixing the manifest, and close the window by moving the lagging hooks forward. The gate stays current.
solid answer
~50 sTriage in order. First reproduce: evaluate the same manifest under v1.9 and v2.3. If the verdicts differ, read the per-rule changelog for the releases in between — here v2.0 extended the container-resources rule from requiring `requests` to requiring requests and limits. Second, decide whether v2.3 is right. If it is, the developer adds `limits` and ships; the block was correct, just later than it should have been. Third, fix the process that produced the surprise: the local hooks were allowed to sit years behind, so every library upgrade lands as a shock at CI. I would bump the hook's pinned version automatically through a raised pull request and have the hook warn when its pin is more than a few releases behind the gate. What I would not do is downgrade CI to match a laptop — the authoritative gate must never be the laggard.
code
yaml · 12 linesspec:
template:
spec:
containers:
- name: api
image: registry.example.com/api@sha256:...
resources:
requests:
cpu: "250m"
memory: "256Mi"
# no limits block
...go deeper
Know that the CI check and a local hook are separate installations that can hold different rule versions, and that comparing those two versions is the first diagnostic step, not suspecting the tooling.
Explain how to confirm drift rather than a false positive: run both versions against the same manifest, then read the per-rule changelog for the releases between the pins to name what changed.
Show the triage and the process fix together — unblock correctly, refuse to downgrade the gate, and put a mechanism in place that stops local copies falling arbitrarily far behind.
Own the asymmetry: an advisory copy that lags costs developer time; an enforcing gate that lags costs control coverage. Set the permitted lag for each, and make keeping it somebody's named job.
## What has actually happened Nothing is broken. Two correct evaluators ran two different versions of the same rule and, as written, disagreed. The manifest declares CPU and memory `requests` and no `limits`. Under v1.9 the container-resources rule asked only for requests, so the hook passed it. Somewhere between v1.9 and v2.3 the rule was tightened to require limits as well, so the gate rejects it. The developer experiences this as "the tools contradict each other"; you should experience it as **the divergence window doing exactly what a divergence window does**. ## Step one: reproduce and locate the change Before arguing about policy, establish the fact. Run both versions against the identical manifest. If both reject it, this is not drift and you have a genuine complaint about the rule. If they differ, walk the per-rule changelog for the releases between the two pins and name the release that changed the verdict. Two minutes of this converts an argument into a fact, and it is the step candidates most often skip — jumping straight to "the new rule must be a false positive" is the single most common weak answer. ## Step two: is the gate right? If the tightened rule is the rule you meant to ship, the correct outcome is that the change is blocked. The developer adds limits and moves on. The cost here was not the block — it was that they found out at CI instead of at commit time, which is the whole reason the hook exists. If instead the tightened rule is wrong, that is a rule defect: fix it forward in a new version and move the gate to the fix. Neither branch ends with weakening the gate for one person's afternoon. ## Step three: the thing that actually needs fixing The interesting failure is not this manifest, it is that a copy of the ruleset sat several major versions behind and nobody knew. Concrete measures: - **Pin the hook, but bump the pin automatically.** Keep the hook's version in a checked-in configuration file so it is explicit and reproducible, and let a bot raise the bump as a routine pull request. Upgrades that arrive weekly are boring; upgrades that arrive yearly are projects. - **Make staleness self-announcing.** Have the hook print the library version it is running and warn when that version is more than an agreed number of releases behind what the gate uses. A copy that knows it is stale is far better than one that silently passes things. - **Announce major bumps to developers, not just to pipelines.** A major bump means new denials. If the only channel is a pipeline turning red, every major bump costs the same surprise again. - **Measure the spread.** Have every decision point emit the version it evaluated with, and report the distribution. "How far behind is the worst local copy" is a number that should exist. ## The asymmetry that decides who may lag Not all copies are equal, and this is the judgment the question is really testing: | Copy | If it lags behind the current library | Verdict | | --- | --- | --- | | Advisory local hook | Developers find out later, at CI | Tolerable; bound it | | Advisory local hook running *ahead* | Blocks work the gate would allow | Mildly annoying; never unsafe | | The enforcing gate | Admits changes the current rules reject | Not acceptable | So the policy is asymmetric on purpose: advisory copies may lag within a stated bound; the enforcing gate is kept most current. That is also the answer to the request that inevitably follows — "just pin CI back to v1.9 until the release goes out". Downgrading the gate does not scope down to this manifest; it accepts, for everything that passes through that pipeline, every change the current ruleset would reject. It converts a one-person inconvenience into an estate-wide gap. ## Should the gate float instead? Tempting, because a floating gate can never be stale. The cost is reproducibility: the same commit evaluated twice can give different verdicts, so "this change passed the gate on Tuesday" stops meaning anything specific, and a single publish can turn every pipeline in the estate red simultaneously with no rollback that does not involve editing every repository. The workable middle is a **pinned gate with an automated, prompt bump**: the version is explicit and recorded with every decision, and the lag is measured in days by mechanism rather than in years by neglect. ## How you leave the developer Say plainly what happened — the rule changed in v2.0, your hook predates it, the gate is right — fix their manifest with them, and tell them what you are changing so it does not happen again. A platform team that answers this with "tools disagree, use the newer one" gets the same ticket every week.
- The developer asks you to pin CI back to v1.9 for today's release. What do you say?No. Downgrading the gate does not scope down to this manifest — for everything in that pipeline it accepts every change the current ruleset rejects, turning one person's delay into an estate-wide gap. The real levers are adding the limits, or, if the rule is genuinely wrong, fixing it forward and moving the gate to the fix.
- How do you stop a local hook silently falling years behind?Pin it in a checked-in config that a bot bumps as a routine pull request, so upgrades are weekly and boring. Have the hook print its version and warn when the pin is more than an agreed number of releases behind the gate. Some teams make a hopelessly stale hook refuse to run at all.
- Is a local hook running ahead of the gate a problem?Only a mild one. It blocks work the gate would have allowed, which wastes developer time but never lets anything through. Given a choice of directions, prefer the local copy ahead of the gate rather than behind it — the failure mode is a complaint rather than a gap.
saying these in an interview costs you the question
- Downgrades the CI gate to match the developer's local copy
- Declares the new version a false positive without reading the changelog
- Treats the pre-commit hook as the authoritative verdict
- Insists every copy must sit at the exact same version