Skip to content

fix(e2e): require observed latency and consolidate assertion reports - #939

Closed
Gajesh2007 wants to merge 3 commits into
masterfrom
refactor/e2e-assertion-policy
Closed

Gajesh2007 wants to merge 3 commits into
masterfrom
refactor/e2e-assertion-policy

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

A configured latency segment could pass without any observations when its stats existed with Count == 0, and nil stats panicked. Require a positive sample count before evaluating bounds; real zero-duration observations remain valid. An ordered threshold table replaces four repeated branches while preserving inclusive limits, labels, messages and order.

Consolidate PostgreSQL assertion scan/report handling into ordered checks. All six SQL strings and their execution order remain byte-identical, and query failures remain sticky. The two existing fee-count/net-charge observations still report numbers rather than enforce equality; the other four checks still require zero violations. No production billing or query policy changes.

Before:

flowchart LR
  S[Latency stats] --> P[Map entry present]
  P --> Z[Empty sample can pass; nil panics]
  P --> T[Four repeated threshold branches]
  T --> R[Assertion report]
  DB[Six SQL methods] --> D[Repeated scan and append handling]
  D --> R
Loading

After:

flowchart LR
  S[Latency stats] --> P[Present, nonnil, positive count]
  P -->|missing evidence| F[Failed presence result]
  P -->|observed| T[Ordered threshold checks]
  T --> R[Same labels, bounds and order]
  F --> R
  DB[Six unchanged ordered queries] --> D[Shared scan and result handling]
  D -->|scan or invariant failure| E[Sticky failed report]
  D -->|success| R
Loading

Validation: go test -race ./e2e/testbed/assert -count=1 passes 9 functions / 18 including subtests in 1.485s. The nil/zero/negative-count cases failed on the original source before the fix. Boundary, order and report strings are pinned; stub rows cover every SQL result policy, scan errors, and later success after failure. A static comparison verified exact SQL bytes/order. Docs lint passes all 278 documents; signed commits and git diff --check pass.

These are CPU tests with synthetic samples and stub query rows. They do not execute PostgreSQL, a provider, Swift, or a model, and do not qualify model speed or live ledger integrity.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 12, 2026 12:28am UTC
d-inference-console-ui-dev Ready Ready Preview Sep 12, 2026 12:28am UTC
d-inference-landing Ready Ready Preview Sep 12, 2026 12:28am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T00:31:10.847275Z e33fcb9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a1fab6170

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/developer/build.md Resolved
Comment thread docs/developer/test.md Resolved
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: e33fcb9796

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1096, the combined tooling, benchmark and E2E refactor PR. Your latest head e33fcb97969ce2dfda971335023f8b8aabeaab7d is preserved in aggregate 9d2160bb370e8a0dbf3810e61a5e48fe66345651, along with the relevant review fixes. Continue review and merge at #1096 (after provider #1094 and web #1095). Closing this duplicate merge path; the source branch and review history are retained.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch is waiting to be deployed

3 active and 1 waiting deployments
Preview – d-inference — e33fcb97 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — e33fcb97 Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-landing — e33fcb97 Deployed Sep 12, 2026 by vercel[bot]
benchmarks — e33fcb97 Waiting Sep 12, 2026 by Gajesh2007 via E2E Benchmarks #1018
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