Repository navigation
ci: stop cancelling main runs, and cover hybrid prompt-cache checkpoint resume - #213
Merged
Merged
Conversation
Rapid successive merges to main cancelled the older run mid-flight. GitHub reports a run whose jobs were cancelled as `failure`, so main collected red conclusions with no test having failed, and Release — which fires on `workflow_run: completed` and only publishes when CI concluded `success` — skipped the commits entirely. Cancel superseded runs on pull requests only. main is the release baseline: each merged commit should finish its CI.
A hybrid prompt that diverges from a cached one resumes from a recurrent-state checkpoint instead of re-prefilling from zero. The unit suite exercises that bookkeeping against synthetic caches; nothing covered the claim that matters on a real model — that a checkpoint resume computes the same thing as a full prefill. tests/test-server.sh Test 26 only checks identical-prefix reuse, which never enters the checkpoint branch. tests/test-hybrid-cache.sh decodes the same diverged prompt twice: once on a server warmed with the unedited prompt (checkpoint resume), once on a freshly started server (full prefill), and requires byte-identical greedy output. It also asserts the checkpoint branch was actually taken and supplied a worthwhile span, so a silent fallback to a full prefill fails the test rather than passing it. Both assertions were checked by mutation: blanking the log lookup fails the run. Registered as an `integration_matrix` entry on Qwen3.5-0.8B-MLX-4bit, a hybrid (GatedDeltaNet + attention) checkpoint already used by the speculative-decoding job. The conversation is three ~1500-token turns: with `minGap` 2048, a shorter one leaves only the anchor right before the divergence, where the restore skips 48 of ~3100 tokens. Verified locally against debug and release builds: 6/6 pass, 3141/4708 tokens reused from a checkpoint, and the resumed and full-prefill outputs agree.
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.
Two CI follow-ups coming out of #212, kept in separate commits.
1.
fix(ci): stop cancelling in-flight CI runs on maincancel-in-progress: trueapplies to every ref, so rapid successive merges to main killed the older run mid-flight. GitHub reports a run whose jobs were cancelled asfailure, so main collected red conclusions with no test having failed — and Release, which fires onworkflow_run: completedand only publishes when CI concludedsuccess, skipped those commits entirely.Concretely, on 2026-10-05:
0669d38dwas cancelled with 13 jobs cancelled,b1e8ad1dwas cancelled 9 seconds after starting, and8469a174endedfailurewith 11 jobs green and 3integration_matrixjobs cancelled. The threeReleaseruns for those shas are allskipped.Cancel superseded runs on pull requests only. main is the release baseline — each merged commit should be allowed to finish.
A bare
falsewould not work here: it is a truthy string. The expression is what evaluates to a boolean, which is why the comment in the file spells that out.2.
test(ci): cover hybrid prompt-cache checkpoint resume end to end#212 lets a hybrid prompt that diverges from a cached one resume from a recurrent-state checkpoint instead of re-prefilling from zero. The unit suite (
HybridCacheCheckpointTests) exercises that bookkeeping against synthetic caches. Nothing covered the claim that actually matters on a real model — that a checkpoint resume computes the same thing as a full prefill — which is the failure that would go unnoticed.tests/test-server.shTest 26 only checks identical-prefix reuse, which never enters the checkpoint branch.tests/test-hybrid-cache.shdecodes the same diverged prompt twice: once on a server warmed with the unedited prompt (checkpoint resume), once on a freshly started server (full prefill), and requires byte-identical greedy output. It also asserts the checkpoint branch was taken and supplied a worthwhile span, so a silent fallback to a full prefill fails the test rather than passing it.Registered as an
integration_matrixentry onmlx-community/Qwen3.5-0.8B-MLX-4bit— a hybrid (GatedDeltaNet + attention) checkpoint already in use by the speculative-decoding job, so the download is one the CI cache knows about.Why the prompt is three turns
The first version of this script used two ~1500-token turns and failed as written, reusing 48 of 3148 tokens: with
minGap2048 the only checkpoint that survives is the anchor immediately before the divergence. Three turns put a checkpoint far enough ahead of the edit to skip a real span. That is worth knowing for anyone reading the log line, since the reuse ratio is a function of turn spacing rather than a constant.Verification
Run locally against both build configurations, using the same invocation as CI (
tests/test-<modality>.sh .build/release/SwiftLM 15413):HIT (hybrid): 3141/4708 tokens reused (checkpoint of 4689)OK3)The mutation check matters: it is what shows the test goes red when the feature does, instead of passing vacuously.
ci.ymlparses, the matrix resolves to 10 entries,bash -nis clean and the script keeps its executable bit.No production code is touched by either commit.