Skip to content

test(dogfood): pin that an uninstalled package's commit is refused through its own revert and rollback path - #29450

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-6g8j42
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-6g8j42

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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),什么都不写。
  • 为什么改:fix(runtime)!: package commit revert and rollback act only on a commit of the package their path names #29090 的 changeset 对外写了「已卸载包的提交,经它自己的路径回退也答 404」,此前只是读代码得出,没有测试钉住;以后改卸载或回退门的判断顺序时,这句发布出去的话可能悄悄变假。
  • 风险与回滚:只加测试,不动源码、不发布;回滚即 revert 本 PR。
  • 先看:该 dogfood 文件新增的 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 with DELETE /api/v1/packages/:id (200), and asserts:

  • the object is no longer served, and GET /packages/:id/commits still lists exactly the trail it had before the uninstall;
  • POST /packages/:id/commits/:commitId/revert and POST /packages/:id/rollback with { commitId } each answer 404 with error.code RESOURCE_NOT_FOUND and message Package 'app.cmtprobe-gone' not found;
  • after both refusals the trail is unchanged (no revert commit written) and the object is still not served.

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 main 96fb7b5d), from the built dogfood closure:

dogfood file
cd packages/qa/dogfood && pnpm exec vitest run --maxWorkers=2 test/package-commit-revert-path-package.dogfood.test.ts
 Test Files  1 passed (1)
      Tests  8 passed (8)
NODE_OPTIONS=--max-old-space-size=6144 pnpm typecheck  -> exit 0

The new case is green on main, so the card's stop rule does not fire. The first run asserted a guessed error.code of NOT_FOUND and 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

  • None.

Verification

Gates derived by node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on head 248b3fb3 (base main 96fb7b5d): 51 families, all exit 0; --ran reconciliation: 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-test after fetching its pinned fixture commit into the shallow clone, and check:dual-build-cjs-loads after building the seven packages with no dist/ (studio, client-react, embedder-openai, knowledge-memory, knowledge-ragflow, service-cluster-redis, service-knowledge) under the verify lock.

gate exit codes
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-adoption.mjs :: exit 0
node scripts/check-comment-mask-adoption.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-issue-citations.mjs :: exit 0
node scripts/check-plugin-teardown-shape.mjs :: exit 0
node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/docs-audit/check-affected-docs.mjs :: exit 0
node scripts/docs-audit/check-drift-comment.mjs :: exit 0
pnpm --filter @objectstack/spec run check:empty-state :: exit 0
pnpm --filter @objectstack/spec run check:liveness :: exit 0
pnpm --filter @objectstack/spec run check:strictness-ledger :: exit 0
pnpm --filter @objectstack/spec run check:variant-docs :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:issue-citations :: exit 0
pnpm check:keyed-text-bounds :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:logger-receiver-detach :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:objectql-double-limit :: exit 0
pnpm check:org-identifier :: exit 0
pnpm check:page-declaration-shape :: exit 0
pnpm check:platform-object-tenancy-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:registry-log-declared :: exit 0
pnpm check:rest-log-spy-declared :: exit 0
pnpm check:slot-lookup :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:system-context-census :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0

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

  • 1. No packages/spec change.
  • 2. No new names beyond test-local constants.
  • 3. pnpm lint is CI-owned, not run locally.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. Nothing publishes (packages/qa/dogfood is private): skip-changeset; both declaration lines are above.
  • 6. packages/spec not touched.
  • 7. No hand edits to generated docs, changelogs or release notes.
  • 8. English, apart from the required maintainer summary.

🤖 Generated with Claude Code


Generated by Claude Code

…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>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json 7b1ae3383e6396a4553b0c117df235349031807d → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#1 · os-warren · session_01JQwxbaBjisxkQo9hht9bFB

维护者速读

  • 改了什么:package-commit-revert-path-package.dogfood.test.ts 加一例:装包、提交、卸载,再经它自己的路径回退单个提交和回滚,两者都答 404 RESOURCE_NOT_FOUND,提交记录不变、对象仍不再提供。
  • 为什么改:fix(runtime)!: package commit revert and rollback act only on a commit of the package their path names #29090 的 changeset 对外说「已卸载包的提交经自己的路径回退答 404」,此前没有测试钉住。
  • 风险与回滚:只加测试(+34 / -0),不动源码、不发包;回滚即 revert。
  • 先看:新增的 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)。
  • 需要你做的:无,CI 全绿后席位落地。
  • 席位意见:断言钉的是实测信封(code + message + status),且用独立的包,不改其余用例的提交计数;在 main 上即绿,卡的停止规则未触发。

席位核对

ACCEPT · domain:devx#1 · head 248b3fb3c651806c932c568a00f397d6829898b5 · 2026-11-02T15:22Z

  1. Shape: one file, packages/qa/dogfood/test/package-commit-revert-path-package.dogfood.test.ts (+34 / -0): four header lines, one constant GONE, one case. Inside the order's file surface; the expected landing held, no producer moved.
  2. Premise, measured: on origin/main 7b1ae338 the seat read packages/runtime/src/domains/packages.ts: GET /:id/commits serves a trail that outlived its registry entry (:2404–2409), and the commits/:commitId/revert door (:2431) answers the sibling doors' Package '<id>' not found 404 for an unknown :id. Neither that file nor the test file changed between the PR base 96fb7b5d and 7b1ae338. The dev measured the case green on main, 8/8 (report 6580870588), so the card's stop rule (a red on main = a fix(runtime)!: package commit revert and rollback act only on a commit of the package their path names #29090 defect) did not fire.
  3. Gates: local 51 derived / 51 run / all exit 0, 0 NOT-MEASURED (two families exited 3 on prerequisites first, then 0; report). The seat arms only when every check-run on this head is green or an expected skip.
  4. Accepted deviations: Fixes / Clause-② / Metadata-protocol sit above ## 维护者速读 (os-dev order). The first run's guessed NOT_FOUND was replaced by the measured RESOURCE_NOT_FOUND; the PR body says so.
  5. Out of scope: none found by the dev or the seat. Skills-docs: n/a (Metadata-protocol: none).
  6. Landing: not governed (packages/qa/dogfood/**, test only), under 3000 changed lines, Clause-②: no, no contract review owed (adds a pin, narrows nothing), skip-changeset. Seat lands it: pr_ready + automerge_enable once every check on this head is green or an expected skip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(dogfood): pin that an uninstalled package's commit is refused through its own revert / rollback path

1 participant