Repository navigation
handlers: reject blank names with InvalidArgument (fixture P4) - #3
subganapathy wants to merge 2 commits into
Conversation
Trim the name and refuse an empty one instead of greeting nobody. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
impact: 🟡 WARNINGNo blocking issue: hello has no real production caller today (service.yaml says so; frontend's Home handler is Unimplemented and never builds a HelloRequest), so the behavior change from 'hello '→InvalidArgument for blank names breaks nobody deployed. Two warnings stand: the canary's AnalysisTemplate excludes InvalidArgument from its error-ratio query, so a bad regression here would promote undetected; and there's no alert on the new error code plus thin test coverage (literal "" untested, e2e blind to the status code). Worst case: Every What this service runs on (discovered)
[info] reversible — hello has no production caller to break: service.yaml's own header states "Nobody may call it yet", and smallStepGiantLeap/frontend's only handler (Home) is Unimplemented with zero references to hellov1/HelloRequest anywhere in its repo. (confidence 0.85)
[warning] progressively delivered — The canary's only automated judgment, the server-error-ratio AnalysisTemplate, excludes code 3 (InvalidArgument), so this behavior change is not gated by the staged rollout the platform provides. (confidence 0.90)
[warning] observable — No alert watches vikrant_rpcs_handled_total{code="InvalidArgument"}, so a caller-visible spike in rejections (e.g. a buggy upstream sending blank names) would page nobody. (confidence 0.80)
[warning] proven — The new table-test drops the literal empty string "" entirely (it tests " " for rejection and " Ada " for trimming), and no end-to-end test observes the business behaviour: the e2e probe's
❓ Question q1Does the dev traffic generator (workload 'traffic', running under spiffe://cluster.local/ns/frontend/sa/frontend) ever send an empty or whitespace-only name to Hello? Blocks: reversible. Reply yes or no on this thread; I will write the file and the review restarts on the push. if yes → .paved-agent/discover.yamlanswers:
- {question: traffic_generator_sends_blank_names, answer: "yes", detail: "the dev traffic generator (workload traffic, ns frontend) sends blank/whitespace names and will now see InvalidArgument instead of 200 for those calls"}if no → .paved-agent/discover.yamlanswers:
- {question: traffic_generator_sends_blank_names, answer: "no", detail: "the dev traffic generator always sends a non-empty name; this change cannot affect its traffic"}
instantiate sesn_011LC3XR62mnixp6TgDMz9fR: 10 input (79368 cached), 6247 output tokens, 86s active · execute sesn_01Ug9fQwRzgVcDAcfKqTEd6w: 50 input (710498 cached), 17090 output tokens, 194s active |
No |
|
impact: recorded @subganapathy's answer to q1 in |
impact: 🔴 BLOCKINGVerdict: blocking, on correctness. The change is well-tested and load/security/availability-neutral, but the one caller it could break — the dev traffic generator — has no discoverable source in the org, so the self-added discover.yaml claim that it 'never sends blank names' is an unverified assumption authored by this same PR. Separately (warning): the canary analysis ignores InvalidArgument so a total-rejection regression would auto-promote, and the e2e suite's own simulated caller sends an empty name yet both its reach and no-errors checks would still pass green, meaning no automated gate in this pipeline would catch this change being wrong about its one real caller. Worst case: hello.v1.HelloService/Hello is the service's only method. After this change every request whose What this service runs on (discovered)
[blocking] correct — The dev traffic generator (source_workload=traffic, sa frontend, 1.7-3.1 rps in e1-dev) is not found in any of the org's 7 repositories, and the real smallStepGiantLeap/frontend service's own code does not call Hello at all (its only handler, Home, is Unimplemented) — so the identity of the one caller whose input could become InvalidArgument is unverified. (confidence 0.60)
[warning] correct — The old-input test case
[warning] progressively delivered — Argo Rollouts AnalysisTemplate
[warning] observable — The stack has no alerting rules (measured ALERTS query empty; discover.yaml stack.metrics states 'no alerting rules') and the change adds no flag, so a rejection storm would be visible only to someone manually querying vikrant_rpcs_handled_total{code="InvalidArgument"}, and reverting needs a full rebuild, new digest and Argo CD sync. (confidence 0.80)
[warning] proven — e2e's own simulated frontend caller is
❓ Question q1Has anyone inspected the dev traffic generator's own manifest or source (not this PR's self-added answer) and confirmed it never sends an empty or whitespace-only name to hello.v1.HelloService/Hello? Blocks: correct. Reply yes or no on this thread; I will write the file and the review restarts on the push. if yes → .paved-agent/discover.yaml - {question: traffic_generator_sends_blank_names, answer: "yes", detail: "confirmed by reading <repo>/<path> at <ref>: the generator always sends <hardcoded/generated value>, never blank"}if no → .paved-agent/discover.yaml - {question: traffic_generator_sends_blank_names, answer: "no", detail: "the generator can send an empty or whitespace-only name under <condition>; this change would turn those calls into InvalidArgument in production"}
instantiate sesn_01BWizpxRPGTFuWsA5L7KYp2: 14 input (149778 cached), 8693 output tokens, 123s active · execute sesn_01UsX4PZSmSN4aLPUGqvxgAs: 48 input (699285 cached), 15474 output tokens, 195s active |
impact: 🟡 WARNINGNo blocking issue: no deployed caller (frontend has no call site to hello at all) can hit the new InvalidArgument path, retries/mesh don't amplify it, and the e2e/CI gates will pass. Two warnings drive the verdict: the canary's AnalysisTemplate ignores InvalidArgument so a real regression would silently promote to 100%, and the same blind spot means e2e no longer exercises a single successful Hello call, with no alert on the new error class either. Worst case: hello.v1.HelloService/Hello now returns InvalidArgument (gRPC code 3) for any request whose name is empty or whitespace-only, where it previously returned OK with the message "hello ". If a deployed caller ever sends such a request, that call path breaks — the caller sees a non-retryable error instead of a 200. Blast radius is bounded: the fleet has exactly one cluster, e1-dev (fleet: {"id":"e1-dev","env":"dev"}); there is no staging and no prod cluster (recorded answer staging_exists="no"; deploy/envs/prod exists but no prod cluster is in the fleet); hello is ClusterIP only with no external exposure (measure exposure: two ClusterIP services, hello and hello-canary); the only measured caller is source_workload=traffic under spiffe://cluster.local/ns/frontend/sa/frontend at 2.19 rps over 1h, 3.22 rps at response_code=200, with one ready pod and an HPA ceiling of 2. Second, smaller worst case: the change breaks CI's own gates (make test / e2e/run.sh), so it never ships at all. Third: a real rise in InvalidArgument is invisible to the canary analysis, which counts only Unknown|Internal|DataLoss|DeadlineExceeded (deploy/base/rollout.yaml AnalysisTemplate server-errors), and to alerting, which does not exist (discover.yaml stack.metrics: "no alerting rules"; ALERTS query returned no data). (reduced proof) What this service runs on (discovered)
[info] correct — frontend, the only authorizedCaller (service.yaml authorizedCallers: smallStepGiantLeap/frontend), has no call site to hello.v1.HelloService/Hello in its code at all — its Home handler returns Unimplemented and never dials hello — so no production code path can send a blank name. (confidence 0.90)
[warning] correct — The description says 'trim the name' but the diff also changes the success path for any caller that sends padded whitespace: ' Ada ' now yields 'hello Ada' instead of the previous literal 'hello Ada '. (confidence 0.80)
[info] correct — The PR edits internal/handlers/ (team-owned per README) and .paved-agent/discover.yaml, neither of which appears in .platform/sha256sums, so CI's check-stamp will not reject this PR. (confidence 0.95)
[warning] progressively delivered — AnalysisTemplate server-errors' prometheus query filters code=~"Unknown|Internal|DataLoss|DeadlineExceeded", which excludes InvalidArgument, so a surge of rejected Hello calls would pass analysis at every canary step (10%, 50%) and reach 100%. (confidence 0.90)
[warning] proven — e2e's reachability check ('CODE InvalidArgument' matches expectation 'reach' since only PermissionDenied|Unavailable|DeadlineExceeded are excluded) and drain_under_load's no-errors tally (InvalidArgument is absent from the probe's failure=[Unavailable,DeadlineExceeded,Internal,Unknown,Canceled] list) both still PASS, so the in-cluster e2e no longer actually proves a successful Hello call exists after this change. (confidence 0.85)
[warning] observable — The rejection is countable via vikrant_rpcs_handled_total{code="InvalidArgument"} but no alert rule exists (stack.metrics.is: 'no alerting rules'; measured ALERTS{alertstate="firing",namespace="hello"} returned no data) and there is no flag to disable the new check without a deploy. (confidence 0.85)
instantiate sesn_01YND6LGCqvZqqxhrzUafq2Y: 12 input (139902 cached), 10734 output tokens, 140s active · execute sesn_01FNbT34p19ndaQjk7Gd6WVB: 42 input (619748 cached), 9535 output tokens, 112s active |
Trim the name and refuse an empty one with
InvalidArgumentinstead of returninghello.Review fixture P4 from the evaluation plan: a business-logic change that can error on existing input.