Repository navigation
ci: hermetic real-image billing e2e lane (#1843 follow-up, pins the #1857 verification) - #1925
Merged
Merged
Conversation
…1857 verification) tests/e2e/e2e-image-billing.test.ts synthesizes a corpus of structurally real images in pure Node (valid PNG/JPEG/WebP/GIF containers, real dims, 4.7MB 4032x3024 photo, EXIF orientation, truncated + garbage blobs) and drives it through the real billing pipeline against a mock upstream billing the Qwen2-VL formula. Pins the three #1857 failure classes: parser truth, the >=700x bytes-prior poison ratio, and the learned-cost rescue (12.6MB arbitrated forward -> usage teaches per-image cost -> stale-high usage baseline no longer bricks the session -> baseline regresses to real billing) plus the default auto->pixels route riding a malformed blob. Runs ungated (~1s, zero network, zero tokens): npm run test:e2e:image. CI: .github/workflows/ci-image.yml auto-runs on PRs touching image/window -gate surfaces (src/image-*.ts, preflight, server, cache-ledger, kernel pin).
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1921-pr.1925.da8e745This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1925.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
|
先合并 后续清理agents.md |
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A dedicated CI lane for image billing — the hermetic, permanently-runnable twin of the manual real-image verification that cleared PR #1857 for merge.
tests/e2e/e2e-image-billing.test.tssynthesizes a corpus of structurally real images in pure Node (seeded PRNG, no PIL/ImageMagick, no network, zero tokens):Pins the three #1857 failure classes
decodeImageDimsrecovers every written dimension for all 10 well-formed containers; garbage dims stay inside the tile model's [765, 2805] band;resolveImageBilling(auto)→ pixels.imageBilling: "bytes"route: arbitrated forward → usage report teaches the per-image cost (asserted within 1k of the Qwen2-VL truth 15,551) → a stamped stale-high usage baseline no longer bricks the session (forwards clean) → baseline regresses to real billing. Second leg: defaultauto→pixelsroute with 2 photos + garbage blob + stale baseline → clean forward, learned underpixels:0, no crash.CI wiring
npm run test:e2e:image(ungated — needs nothing external, ~1.2s locally).github/workflows/ci-image.yml: ubuntu, node 22, npm ci + typecheck + suite, artifacts (the corpus) on failure; auto-runs on PRs touchingsrc/image-*.ts,src/preflight.ts,src/server.ts,src/cache-ledger.ts, the suite itself, the workflow, or the kernel pin — plusworkflow_dispatchFollow-up to #1843 / #1848 (fixed by #1857). No production code touched.