Repository navigation
fix: make shell hotfix startup atomic and fail closed - #103
Merged
Merged
Conversation
redcatH
pushed a commit
to redcatH/DeepSeek-v4-Flash-DSpark-2x-DGX-Spark
that referenced
this pull request
Aug 31, 2026
…d-hotfixes fix: make shell hotfix startup atomic and fail closed
1890peachypeachy
pushed a commit
to 1890peachypeachy/DeepSeek-v4-Flash-DSpark-2x-DGX-Spark
that referenced
this pull request
Sep 6, 2026
…d-hotfixes fix: make shell hotfix startup atomic and fail closed
SethHanford
pushed a commit
to SethHanford/DeepSeek-v4-Flash-DSpark-2x-DGX-Spark
that referenced
this pull request
Oct 7, 2026
…d-hotfixes fix: make shell hotfix startup atomic and fail closed
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.
Problem
The enabled shell hotfix train could fail open in two ways:
|| true, allowingvllm serveto start after an incomplete hotfix train.Design
This change makes startup integrity transactional and fail-closed without changing model execution behavior:
vllm serve; a missing or failing script aborts startup;DSPARK_SKIP_ISSUE22_HOTFIX,DSPARK_SKIP_SPIN_WAIT_HOTFIX, andDSPARK_SKIP_HOTFIXswitches retain their existing scopes;--statusgate remains separate from the optional seven-script loop and remains fail-closed.Changed files
docker-compose.dspark.ymlpatches/hotfix-dsv4-mtp-buffer-50312.shpatches/hotfix-dsv4-adaptive-topk-50004.shpatches/hotfix-dsv4-skip-topk-49486.shpatches/hotfix-dsv4-dense-prefill-indexer-48407.shpatches/hotfix-dsv4-skip-empty-c128-48957.shpatches/hotfix-dsv4-flashmla-workspace-50298.shpatches/hotfix-dsv4-grammar-advance.shscripts/test-hotfix-atomic-transaction.pyscripts/ci-validate.shCHANGELOG.mdExplicit non-goals
.env/credentials/model-data changes;Pinned image
ghcr.io/anemll/dspark-vllm-gx10:0.1.1sha256:3430d6614a8e2925f34d059af6caf05aff42387326db4d05639a60f10f2654d8sha256:a83948492cf13df455170fb42885f5ef4db54fefe0feff0f841ecbff464ac9d8Moving-main integration
Current
mainadvanced through PR #89 before publication. The feature branch was rebased ontoc1d7b75d3cadd5b39f4786e70475713038176115.Conflicts were resolved additively:
docker-compose.dspark.yml: retained PR feat(auth): multi-key API auth via DSPARK_API_KEYS (default off) #89's independent fail-closed API-key redaction gate and added fail-closed missing/nonzero handling for issue22, spin-wait, and the seven transactional scripts;scripts/ci-validate.sh: retained auth/redaction suites and added the complete atomic-transaction suite;CHANGELOG.md: retained both feature entries under separateAdded/Changedsections.CPU/static validation
Exact candidate head:
b73346bef4e991e2af425b5754f453d9763ca17cbash scripts/ci-validate.sh git diff --check origin/main...HEAD python3 -m py_compile scripts/test-hotfix-atomic-transaction.py python3 scripts/test-hotfix-atomic-transaction.py -v # Each of the seven modified hotfix scripts was independently checked with bash -n.Results:
Disposable pinned-image validation
A disposable container was created from the exact pinned digest with the candidate
patches/mounted read-only.First ordered train:
Result: all nine scripts exited 0, every verification reported applied, all seven transactional scripts committed their complete staged hunk sets, no anchor mismatch/rollback/partial warning appeared, and no transaction temporary file remained.
Second run in the same container: all nine scripts exited 0 and reported already-applied/idempotent state; no writes or transaction leftovers. The disposable container was removed.
Real local TP=2 startup validation
The exact candidate runtime files were hash-matched into an isolated local-cluster staging directory. The owner-held profile was referenced in place and never edited or copied into git.
Command shape (owner-local profile path redacted from this public description):
First cold/recreated start:
vllm servestarted and application startup completed;GET /health: HTTP 200;GET /v1/models: HTTP 200 and expected served modeldeepseek-v4-flash-abliterated;temperature=0,max_tokens=4): HTTP 200 with a valid chat-completion object and no server error.Restart validation used the documented stop/start procedure. Containers were recreated from the pinned image, so all nine scripts applied cleanly again rather than observing a preserved writable layer. The second start exited 0; ordered hotfix, health, model-listing, and minimal inference gates all passed again.
The local stack was restored to its exact initial operational state afterward: original worker payload hashes and owner profile hash restored, original model serving on both ranks, GPU utilization 0%, and no established API connections.
Scans and scope gate
.env, model data, logs, benchmark output, archive, image, or unrelated file is present;Independent reviews
/tmp/fable-hf13-final-rebased.md, SHA-2567dfcfefc8355e2dccfb5cffdcbbbb06af54145e3c6a443d9c0b63f988ccc7550/tmp/daybreak-hf13-correctness-final.md, SHA-256fbf7127f43ba10080be55dc4361013bfa4c59c23aae28541a0f219fdbe61b3f0/tmp/daybreak-hf13-maintainability-final.md, SHA-256ae7b2bff02d3968b52b1e8bacc89011978ba04f8eeebb675d8f86081183685aaAll three final reviews are bound to exact candidate head
b73346bef4e991e2af425b5754f453d9763ca17cand basec1d7b75d3cadd5b39f4786e70475713038176115.Why no GPU performance/quality A/B
This change modifies startup publication and failure handling, not model execution behavior. The appropriate GPU gate is real boot, ordered hotfix execution, health, model listing, minimal inference, restart, and restoration. Throughput, quality, acceptance-rate, memory, and long-context A/B benchmarks were intentionally not run.