Repository navigation
test(dogfood): pin that an uninstalled package's commit is refused through its own revert and rollback path - #29450
Merged
Conversation
…rough its own revert and rollback path A package installed, committed to and then uninstalled keeps its commits in the trail, and its own per-commit revert and rollback answer 404 RESOURCE_NOT_FOUND "Package 'ID' not found" and write nothing: the trail is unchanged and the uninstalled object stays unserved. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
|
domain:devx#1 · os-warren · session_01JQwxbaBjisxkQo9hht9bFB 维护者速读
席位核对ACCEPT ·
|
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.
Requested by Warren · project thread
Fixes #29234
Clause-②: no
Metadata-protocol: none
维护者速读
package-commit-revert-path-package.dogfood.test.ts加一例:装一个包、发布一次提交、卸载,再经它自己的路径回退单个提交和回滚,两者都答404 RESOURCE_NOT_FOUND(Package 'ID' not found),什么都不写。an uninstalled package's commit is refused 404 …一例。cd packages/qa/dogfood && pnpm exec vitest run --maxWorkers=2 test/package-commit-revert-path-package.dogfood.test.ts,预期Tests 8 passed (8)。What changes
One new case in
packages/qa/dogfood/test/package-commit-revert-path-package.dogfood.test.ts, plus three header lines naming it. No source change.The case creates its own package (
app.cmtprobe-gone), publishes one object through it, and reads its commit trail. It then uninstalls the package withDELETE /api/v1/packages/:id(200), and asserts:GET /packages/:id/commitsstill lists exactly the trail it had before the uninstall;POST /packages/:id/commits/:commitId/revertandPOST /packages/:id/rollbackwith{ commitId }each answer404witherror.codeRESOURCE_NOT_FOUNDand messagePackage 'app.cmtprobe-gone' not found;It uses its own package, so the order of the other cases and their commit counts on A and B are untouched.
Why
The #29090 changeset's third FROM → TO pair says an uninstalled package's history no longer takes new revert commits through its own path. The existing "unknown package" case uses an id that was never installed, so it never reaches a package whose commits outlive its registry entry. This pins the shipped sentence.
Tests
Run on head
248b3fb3(base main96fb7b5d), from the built dogfood closure:dogfood file
The new case is green on main, so the card's stop rule does not fire. The first run asserted a guessed
error.codeofNOT_FOUNDand went red on that line only; the measured envelope is{"code":"RESOURCE_NOT_FOUND","message":"Package 'app.cmtprobe-gone' not found","httpStatus":404}, and the assertion now pins that. No ablation: the diff changes no tested behaviour.Acceptance notes
Verification
Gates derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon head248b3fb3(base main96fb7b5d): 51 families, all exit 0;--ranreconciliation: 51 derived, 51 run, 0 NOT-MEASURED, 0 UNRUN.Two families first exited 3 on their prerequisite, then 0:
check-plugin-teardown-shape.mjs --self-testafter fetching its pinned fixture commit into the shallow clone, andcheck:dual-build-cjs-loadsafter building the seven packages with nodist/(studio, client-react, embedder-openai, knowledge-memory, knowledge-ragflow, service-cluster-redis, service-knowledge) under the verify lock.gate exit codes
CI families are read from this PR's check-runs at ACCEPT; full dogfood battery not run (no
!in the title, no narrowing arm).Human Minimum
packages/specchange.pnpm lintis CI-owned, not run locally.main, one pull request.packages/qa/dogfoodis private):skip-changeset; both declaration lines are above.packages/specnot touched.🤖 Generated with Claude Code
Generated by Claude Code