Skip to content

fix(node-dependency-matrix): recalibrate dedup expectedTestcasesExact 18->19 for agent v3.5.44#100

Merged
slayerjain merged 1 commit into
codex/node-dependency-matrixfrom
chore/dedup-count-19-nodedepmatrix
Jun 10, 2026
Merged

fix(node-dependency-matrix): recalibrate dedup expectedTestcasesExact 18->19 for agent v3.5.44#100
slayerjain merged 1 commit into
codex/node-dependency-matrixfrom
chore/dedup-count-19-nodedepmatrix

Conversation

@slayerjain

Copy link
Copy Markdown
Member

Why

The kube-regression dedup assertion (enterprise-ui kube-flow.spec.ts test 8) reads httpTrafficScript.expectedTestcasesExact as the expected recorded test-case total. It was calibrated against the old keploy-agent (enterprise v3.2.74) that the fixture chart pinned. k8s-proxy #512 now injects v3.5.44 (distroless + shell-free probes), which records 19 → the < 18 assertion fails.

This is correct, not a dedup regression (verified)

Static dedup still collapses every business duplicate exactly as this contract specifies:

  • GET /dedup/catalog: 5 raw (alpha×3 + beta×2) → 1
  • POST /dedup/order: 4 raw → 1
  • all 16 business endpoints recorded once

The recorded 19 = 16 deduped business endpoints + 3 non-business probe/preflight buckets: GET /health (×1) and GET /expectations (×2). /expectations splits into two buckets because its request-header-name set differs between the record_traffic.sh curl preflight and the Playwright readiness probe, and the agent's static-dedup key (enterprise/pkg/service/agent/staticDedup.go ExtractOverallSchema) includes request-header names. v3.2.74 recorded fewer only because it undercaptured that probe traffic (an upstream OSS chunked/no-Content-Length capture bug, since fixed) — not because it deduped better.

Change

expectedTestcasesExact: 18 → 19. Paired with the enterprise-ui spec relaxing toBeLessThantoBeLessThanOrEqual so it asserts the recorded total ≤ the calibrated count.

Pairs with keploy/k8s-proxy#512, keploy/enterprise-ui#1493, and the enterprise-ui spec PR.

🤖 Generated with Claude Code

The kube-regression dedup assertion (enterprise-ui kube-flow.spec.ts test 8)
checks the recorded test-case count against this contract value. It was
calibrated against the old keploy-agent (enterprise v3.2.74) the fixture chart
pinned; k8s-proxy now injects v3.5.44 (distroless + shell-free probes), which
records 19.

Verified this is correct, not a dedup regression: static dedup still collapses
every business duplicate exactly as the contract specifies
(GET /dedup/catalog 5->1, POST /dedup/order 4->1; all 16 business endpoints
recorded once). The recorded 19 = 16 deduped business endpoints + 3 non-business
probe/preflight buckets: GET /health (x1) and GET /expectations (x2 — its
request-header-name set differs between the curl preflight and the Playwright
readiness probe, and the agent's static-dedup key includes request-header
names). v3.2.74 recorded fewer only because it undercaptured that probe traffic
(an upstream OSS chunked/no-Content-Length capture bug since fixed).

Paired with enterprise-ui spec change (toBeLessThan -> toBeLessThanOrEqual) and
keploy/k8s-proxy#512 / keploy/enterprise-ui#1493.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
@slayerjain slayerjain merged commit 16ca1de into codex/node-dependency-matrix Jun 10, 2026
1 check passed
charankamarapu pushed a commit that referenced this pull request Jul 2, 2026
…ration (0 → 2) (#101)

* Add node dependency matrix sample

* Add compose setup for node matrix sample

* docs: tighten node dependency matrix k8s flow

* Stabilize node dependency matrix recording flows

* Document node dependency matrix staging runbook

* Implement async catalog synchronization and deduplication endpoints in the node dependency matrix. Update documentation to reflect new features, including async workflows and enhanced deduplication for GET and POST requests. Adjust traffic recording scripts and improve error handling in the application logic.

* Update Kubernetes traffic recording instructions and enhance scripts for better usability. Modify README and STAGING_RUNBOOK to clarify port-forwarding steps and add hints for using the hosted UI. Improve error handling in traffic recording scripts to guide users when using NodePorts.

* Refactor Kafka and SQS scenario functions to improve error handling and response structure. Update Kafka scenario to include cluster and topic details, and enhance generic scenario with better socket management and timeout handling.

* Enhance deploy-kind.sh to support custom node images for Kind clusters. Introduced a new KIND_NODE_IMAGE variable to allow users to specify a custom image when creating the cluster, improving flexibility in deployment configurations.

* fix: update expected-values.json to match actual UI dedup behavior

- expectedTestcasesExact: 23 → 18 (post-dedup count, UI shows unique)
- expectedAdditionalTestcasesExact: 2 → 0 (gRPC not counted in UI total)
- Dedup entries: use path-only format without query params to match
  how the Static dedup section groups entries in the UI
- /dedup/catalog duplicateCount: 4 (all alpha+beta grouped)
- /dedup/order duplicateCount: 3 (all orders grouped)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: update requiredKinds to include PostgresV2 and Redis

The enterprise agent (v3.2.47) reliably captures Http, MySQL, PostgresV2,
and Redis mock kinds. Add PostgresV2 and Redis to requiredKinds so the
kube-regression tests assert all currently supported parsers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address Copilot review feedback for node-dependency-matrix

- Route ERROR logs to stderr via console.error for proper log routing
- Cache CA bundle read to avoid blocking the event loop on repeated calls
- Ensure entrypoint.sh always creates the CA bundle file with a warning if no certs found
- Align @types/express version with express v4 runtime dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: reduce requiredKinds to Http only — mock kinds vary between runs

Mock kinds captured by the sidecar are non-deterministic across runs
(depends on pod timing and sidecar readiness). Only Http is guaranteed
in every run. Other kinds are logged as informational via preferredKinds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: sync package-lock.json with package.json

npm ci fails in CI because @types/express and related packages were
updated in package.json without regenerating the lock file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use ECR public mirrors to avoid Docker Hub rate limits

Docker Hub 429 rate limits cause Kind cluster deployment failures in
CI. Switch mysql, postgres, mongo, and redis images to
public.ecr.aws/docker/library/ mirrors which have no rate limits.

This matches the pattern used by api-server and enterprise-ui CI
pipelines (playwright-setup.sh).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use docker pull + kind load instead of crictl pull

crictl pull goes directly to the registry (no cache), hitting rate
limits. docker pull uses the Docker daemon cache (restored from
MinIO by CI). kind load transfers cached images into the Kind
node's containerd without any registry access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: configure Kind with GCR mirror to avoid all registry rate limits

Both Docker Hub and ECR public are rate-limited. Configure Kind's
containerd to use mirror.gcr.io (Google's Docker Hub mirror) which
has no rate limits. Reverted ECR image references back to docker.io
since the GCR mirror handles them transparently inside Kind.

This matches the approach used by k8s-proxy CI (setup-cluster.sh).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use Keploy's local registry mirror (192.168.116.165:5000)

All Keploy CI repos use a local Docker registry mirror at
192.168.116.165:5000 to avoid rate limits. Updated Kind containerd
config to use this mirror (primary) with mirror.gcr.io as fallback.

Matches the pattern in k8s-proxy/scripts/ci/setup-cluster.sh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: load Kind images one at a time to avoid all-or-nothing failure

kind load docker-image with multiple images fails entirely if one
image has issues. Load each image individually so failures are
isolated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(node-dependency-matrix): allow Mongo TLS MITM hostname mismatch

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>

* fix(node-dependency-matrix): pin Mongo TLS to direct endpoint

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>

* fix(node-dependency-matrix): poll Mongo server monitor through proxy

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>

* fix(node-dependency-matrix): recalibrate expectedTestcasesExact 18 -> 19 (#100)

The kube-regression dedup assertion (enterprise-ui kube-flow.spec.ts test 8)
checks the recorded test-case count against this contract value. It was
calibrated against the old keploy-agent (enterprise v3.2.74) the fixture chart
pinned; k8s-proxy now injects v3.5.44 (distroless + shell-free probes), which
records 19.

Verified this is correct, not a dedup regression: static dedup still collapses
every business duplicate exactly as the contract specifies
(GET /dedup/catalog 5->1, POST /dedup/order 4->1; all 16 business endpoints
recorded once). The recorded 19 = 16 deduped business endpoints + 3 non-business
probe/preflight buckets: GET /health (x1) and GET /expectations (x2 — its
request-header-name set differs between the curl preflight and the Playwright
readiness probe, and the agent's static-dedup key includes request-header
names). v3.2.74 recorded fewer only because it undercaptured that probe traffic
(an upstream OSS chunked/no-Content-Length capture bug since fixed).

Paired with enterprise-ui spec change (toBeLessThan -> toBeLessThanOrEqual) and
keploy/k8s-proxy#512 / keploy/enterprise-ui#1493.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>

* fix(node-dependency-matrix): count gRPC test cases in recording calibration

k8s-proxy now records gRPC test cases in the recording session (previously
dropped because processTestCase only counted entries with a non-empty
HTTPReq.URL). The two calls in send_grpc_traffic.sh (Ping,
RunDependencyScenario) each declare expectedAdditionalTestcases: 1, so the
aggregate must reflect them.

Bump grpcTrafficScript.expectedAdditionalTestcasesExact 0 -> 2 so
getExpectedTotalTestcases() settles at 19 (HTTP) + 2 (gRPC) = 21, matching
the recorded total once k8s-proxy counts gRPC cases. The kube-regression
assertion is a <= ceiling, so this stays backward-compatible with released
k8s-proxy (records 19; 19 <= 21).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
Co-authored-by: Asish Kumar <officialasishkumar@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Shubham Jain <shubhamkjain@outlook.com>
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.

1 participant