Repository navigation
feat(pricing): consume the producer cache-validity core for cached-input pricing / 缓存输入计价接入 producer 缓存有效性 core - #1377
Conversation
…put pricing Encode the AgentX cache-validity core in ETL and route every cached-input pricing path (calculator, trends, chart and series revenue) through one selector with three policies. The default stays `legacy`, so pricing is unchanged until maintainers choose a policy. - tiers rows need GPU and external, CPU within external and an overall that agrees within the producer's 5-decimal rounding; combined rows need a worker-counter or frontend source and no tier rates. - Rows with any validity data are judged by the contract even without a schema; #3964 ATOM detail rows without the core stay out of actual pricing under an enforced policy. - A frontier mixing a verified point with a point lacking a rate is unavailable instead of zero-hit. - Independent of the policy, trace-replay linking no longer rewrites hit rates on rows carrying validity data, and backfills refuse to rewrite their rates, overall source or validity fields. - Update the API route catalog digests of four shared sources after reviewing the docs; no documented response changes under `legacy`. 中文:缓存输入计价接入 producer 的缓存有效性 core。ETL 将有效性 core 编码为数值指标,计算器、趋势、图表和 series 的收入统一经由同一个选择函数取得命中率,提供三种策略;默认仍为 legacy,维护者选定策略前计价不变。tiers 需同时具备 GPU 与 external、CPU 不大于 external、overall 在 producer 5 位小数舍入误差内一致;combined 需有 worker_counters 或 frontend 来源且不带分层。带任何有效性数据的行即使缺 schema 也按合同判定;只有 #3964 ATOM 明细、没有 core 的行在启用的策略下不计入实测。合格新点与缺命中率旧点混合的前沿判为不可用,不再按零命中计价。与策略无关,trace replay 不再改写带有效性数据的行的命中率,backfill 拒绝改写这类行的命中率、overall 来源和有效性字段。审阅 API 文档后更新了四个共享源文件在 API 目录中的摘要,legacy 下已公开的响应不变。 Refs: SemiAnalysisAI/InferenceX#3964, SemiAnalysisAI/InferenceX#4163, SemiAnalysisAI/InferenceX#4164
|
@chunfangamd is attempting to deploy a commit to the SemiAnalysisAI Team on Vercel. A member of the Team first needs to authorize it. |
functionstackx
left a comment
There was a problem hiding this comment.
from quick look, i am not sure what why 2.5k LoC is needed nor if this is even tested with an comparable db or github actions? maybe test the ETL & setup an local neon db in ur fork to test it?
Preserve recorded prompt and generation totals so prefill/decode rows keep their structural token mix after projection. Add raw/compact parity coverage and synchronize the public API contract notes. 中文:在计算器精简数据中保留 agentic token 总量,使 prefill/decode 数据投影后仍可确定输入输出占比。补充原始与精简数据一致性的测试,并同步公开 API 契约说明。
Use the current PreparedTraceReplay requestTimelineGz field and a real gzip payload so the existing closeout test passes type checking. 中文:将 cache closeout 测试数据改为当前 PreparedTraceReplay 的 requestTimelineGz 字段,并使用真实 gzip 内容,修复既有类型检查错误。
同步当前 master,保留趋势来源、TPU 来源说明与上游 API 扩展;延续有效性 core、ETL 写入保护、P/D token 总量和默认 legacy 策略,清理本 PR 冗余说明并重建文档校验信息。
Bugbot is paused — your team has an unpaid invoiceBugbot is paused because your team has an unpaid invoice. Pay it from the billing page in the Cursor dashboard and Bugbot resumes automatically. (requestId: ddd70647-f03e-4c78-a40e-291e09be9059) |
|
Following up on the ETL/DB testing question: the updated revision now exercises the actual ETL, the repository SQL migrations in disposable PGlite, persisted queries, calculator projection and in-process view handlers. This is PostgreSQL-compatible local integration evidence, not a Neon deployment. At the current DSv4 default P90=170, controlled P/D inputs exercise theoretical and measured modes in both GPU-hour and GW-year units, with an independent Decimal calculation. Unknown evidence stays unavailable under enforcement; a measured zero remains usable. The default policy stays legacy. The retained scope is the shared selector, lossless validity/provenance propagation, writer guards and the calculator token mix, with their regressions. Conflicts with master are resolved and the PR is ready for review. Hosted checks have been created but need maintainer authorization for the fork; unit CI has not executed. Vercel also needs team authorization. Browser and live serving acceptance are still unverified. 中文针对 ETL/数据库验证的问题,更新版已执行真实 ETL、仓库 SQL migrations、隔离 PGlite、入库查询、计算器投影和进程内 view handler;这是本地 PostgreSQL 兼容集成证据,不是 Neon 部署。当前 DSv4 默认 P90=170 下,以受控 P/D 输入覆盖 theoretical/measured、GPU-hour/GW-year,并独立 Decimal 复算。校验下未知仍不可用,有效零命中保留,默认仍为 legacy。 保留范围是共享选择器、资格/来源无损传播、writer guard、计算器 token 比例及对应回归。master 冲突已解决,PR 已 Ready。远端检查已创建但需维护者批准 fork workflow,尚未执行;Vercel 也需团队授权。浏览器及真实 serving 验收仍未完成。 |
Missing cache evidence, invalid rates and a measured zero need different pricing behavior. This PR carries the producer validity core through ETL and shares cache-basis selection across the calculator, revenue and trend consumers. The compact calculator projection retains recorded prompt/generation totals so P/D input mix agrees with the full-row path.
legacyremains the default.enforce-when-presentvalidates rows carrying a core;strictalso rejects older agentic rows without one. Choosing measured mode does not activate enforcement. Unknown/invalid measurements stay unavailable under enforcement, while a real zero stays usable. Writer guards preserve rate/provenance/validity together during trace linking and backfill under every policy.The merged revision was checked through actual ETL, disposable PGlite, queries, compact projection, P90 interpolation, estimator and in-process handlers. At the current DSv4 default P90 target 170, controlled P/D knots at140/200 exercise both theoretical and measured modes in GPU-hour and GW-year units. Holding throughput/token mix/theory fixed, a measured-rate-only change affects measured pricing and leaves theoretical pricing unchanged. Independent Decimal calculations agree. These are controlled software inputs, not new GPU observations or an AMD/NVIDIA ranking. Earlier P90=35 and historical69 results belong to their recorded revisions.
Producer order: #4397 → #4405 → #4163 → #4164. This app PR is a separate deployment dependency. Merging does not enable enforcement; existing override values are unchanged, but touching
run-overrides.tscan trigger the existing override workflow. No production DB/backfill/policy switch was performed. Hosted Actions are waiting for a maintainer to authorize this fork; no current-head hosted CI success is claimed. Vercel preview also needs team authorization. Browser and real modern P/D/nonzero-offload acceptance remain unverified.中文
缺失、无效与真实零命中必须区分。本 PR 经 ETL 传递 producer validity core,让计算器、收入和趋势路径共用缓存选择;compact 投影保留已有 prompt/generation 总量,保持 P/D 输入比例与完整行一致。
默认仍为 legacy。enforce-when-present 检查已有 core,strict 也拒绝没有 core 的旧 agentic 行;选择 measured 不会启用校验。校验下未知/无效保持不可用,有效零可用。trace linking/backfill 的 writer guard 在所有策略下保护数值、来源与资格一起保留。
合并版通过实际 ETL、隔离 PGlite、查询、compact 投影、P90 插值、计价和进程内 handler 验证。当前 DSv4 默认 P90=170,以140/200的受控 P/D 点同时检验 theoretical/measured、GPU-hour/GW-year;固定吞吐/token 比例/theory 后,仅改实测命中率只影响 measured,独立 Decimal 复算一致。这是软件夹具,不是新 GPU 观测或 AMD/NVIDIA 排名;旧 P90=35 与69份历史重放证据保留原版本范围。
producer 依赖顺序为 #4397→#4405→#4163→#4164;app 是独立部署依赖。合并不启用策略;override 登记值不变,但 run-overrides.ts 会触发现有 workflow。本轮不操作生产数据库、回填或策略。远端 Actions 等待维护者批准 fork workflow,尚不能宣称当前 head 远端 CI 通过;Vercel 预览也需团队授权。浏览器及真实现代 P/D/非零 offload 验收仍未完成。
AI model disclosure
GPT-6 (Codex), including delegated implementation and independent review agents, prepared and checked these revisions. A finer runtime model identifier is not exposed. Earlier producer/app work was prepared by an agent reporting Claude Opus 5.5; that historical runtime identifier could not be independently verified.