Skip to content

install-local reinstall: a refused installed copy is reported as "Package 'X' cannot be installed", blaming the incoming package #34583

Closed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate ①: class c, from L1-b ACCEPT 6935847976 on PR #34573 (card #34432), passed on by area o2-D. Dedupe: install-local reinstall installed copy refused message, packageUpgradeSideOf installed pre-resolve; no open card.

reach (read from the diff, not run): on an install-local reinstall, step 2c″'s new pre-resolve also folds the installed copy (packageUpgradeSideOf(installed)). When today's resolver refuses the stored copy (for example, it still carries the retired bare indexes[].unique: true), the answer is 422 "Package 'X' cannot be installed". That blames the incoming package for a problem in the stored copy. The installed side has no pin and no ablation. The same case answered 503 before, and 2c′ folds the copy again unguarded, so this is not a new dead end. The message points at the wrong package.

Suggested-grade: p2 · domain:server · pm:blocked, Blocked-by #34432

维护者速读

  • 现象:本地重装一个包时,如果「已经装着的那份」被今天的校验拒收(比如还带着已退役的写法),接口回 422「包 X 无法安装」,看起来像是新包有问题。作者会去改新包,而真正要处理的是已装副本。
  • 为什么要修:报错要指向真正出问题的那份;以前这种情况回 503,现在码对了,但说错了对象。
  • 需要你做的:无。

Change

When the installed side is the one refused, the refusal names the installed copy and says what to do with it (upgrade or remove the stored copy first). Pin the installed-side pre-resolve with a test and an ablation, and pin the incoming-side message too so the two cannot swap.

Done when

Both sides have pins with ablations, and an installed-copy refusal never names the incoming package as the problem.

Blocked-by: #34432

Activity

  1. added
    bug
    finding
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · pm:blocked · theme: install/upgrade · 2026-11-17T02:19Z

    ⛔ Not a claim.

    Blocked-by: #34432

    On an install-local reinstall, the pre-resolve also folds in the installed copy. When the stored copy is the one refused, the 422 says "Package 'X' cannot be installed" and names the incoming package, so an author fixing the new artifact chases the wrong thing. This is a misleading refusal on the install path, the same family as #34432: p2, parked on #34432.

  3. added
    domain:server
    pm:blocked
    priority:p2
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: unlock → pm:queue · 2026-11-17T03:47Z

    ⛔ Not a claim.

    Blocker #34432 closed today at 03:02Z. Back to the queue at its grade (p2). Re-read the landed change before claiming.

  5. added
    pm:queue
    and removed
    pm:blocked
    on Nov 17, 2026
  6. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    Claim: PM loop round 1
    Session: session_012MmDsS4GoHCgYwA2uv3n3C
    Account: os-lizheng
    Branch: claude/issue-34583-installed-copy-refusal
    Worktree: objectstack-issue-34583
    Domain: domain:server
    Seat: repo:objectstack#4
    File surface: packages/cloud-connection/src/marketplace-install-local-plugin.ts, packages/cloud-connection/src/marketplace-install-rename-planner.ts, new test file under packages/cloud-connection/src/, .changeset/34583-*.md (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default tier (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the install-local step 2c″ pre-resolve in packages/cloud-connection (objectstack) folds the installed copy and answers its refusal under the incoming package id | none: declaredRefusalAnswer names only the incoming manifest | any author reinstalling a package whose stored copy today's resolver refuses (e.g. retired bare indexes[].unique)
    Thread-read: 6937638391
    Premise: holds — read at 2026-11-17T12:34Z on origin/main c513d62: both sides pre-resolve in one try (marketplace-install-local-plugin.ts ~4678-4679); the catch answers declaredRefusalAnswer (~494-515) with Package '${manifestId}' cannot be installed, manifestId = incoming id. Installed-side pin: zero hits for packageUpgradeSideOf in package tests (control: the same grep hits plugin.ts:4678); unproven, the dev confirms.
    Serial constraints cleared: PR #34573 (#34432) and #34708 merged; no open pm:dispatched claim names packages/cloud-connection install-local at 2026-11-17T12:34Z.
    Pre-claim lane: packages/cloud-connection/src/** → domain:server, repo:objectstack lane.
    Pre-claim deps: Blocked-by #34432 closed 2026-11-17T03:02Z.
    Prior rulings read: install-local,reinstall,refused,installed,copy,reported,package,blaming,incoming → 155 hits; ADR-0146 D11, ADR-0045 Decision §7, ADR-0070 D2, ADR-0076 D10, ADR-0093 D8 (term hits, none rules on refusal wording); thread: none

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C
    os-dev-report

    {
      "issue": 34583,
      "status": "done",
      "branch": "claude/issue-34583-installed-copy-refusal",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34844",
      "session": "session_012MmDsS4GoHCgYwA2uv3n3C",
      "premise_still_valid": true,
      "summary": "Premise confirmed at origin/main c513d62a: step 2c″ (evaluateDeclaredRenames) folded both bodies in one try, and declaredRefusalAnswer answered an installed-copy refusal as \"Package 'X' cannot be installed\". Fix: each side now has its own try, the incoming body first. declaredRefusalAnswer gains side 'incoming'|'installed' (default 'incoming', so other steps are unchanged). The installed side keeps the resolver's status, code and details, and its sentence names the stored copy, says the incoming version was not judged, and gives the remedy (uninstall, then install). No new code and no wire-shape change. 2c′: not the same defect. It runs only after 2c″ over the same installedPackageSide(previousLookup) body, so it cannot meet the refusal; a one-line comment now says so. Pins were added as a top-level describe in the existing marketplace-install-local-resolver-refusal-34432.test.ts (ruling record 6583487846): installed refused, remedy works (DELETE then install = 200), incoming refused, both refused (incoming wins), and a CONTROL. In-place fixture fix in the same file: composed() now carries an empty top-level datasources map, because step 2a resolved the packages first and the existing #34432 incoming pins never reached 2c″. Measured: removing 2c″'s incoming fold left them 10/10 green; after the fix, 5 fail.",
      "tests": "At head 32bda83ef0. `pnpm --filter @objectstack/cloud-connection exec vitest run --maxWorkers=2 src/marketplace-install-local-resolver-refusal-34432.test.ts` → Tests 10 passed (10), lock VERDICT command-exit 0. `pnpm --filter @objectstack/cloud-connection typecheck && build && exec vitest run --maxWorkers=2` → Test Files 90 passed (90), Tests 1313 passed (1313), VERDICT command-exit 0. tsconfig.test.json --listFiles includes the test file. Ablations were run with scripts/ablation-replace.mjs: each mutation proven on disk and each restore proven blob == HEAD 1bbbe6c18a68 with an empty git diff HEAD. The subject resolves to src by relative import, so there is no dist leg. A, installed pre-resolve removed: 2 failed (503 SERVICE_UNAVAILABLE in place of 422). B, incoming labelled installed: 2 failed. C, installed labelled incoming (the original defect): 1 failed ('Package ... cannot be installed:'). D, incoming 2c″ fold removed: 5 failed, where it was 10/10 green before the fixture fix. A real-engine probe (throwaway, not committed): a booted ObjectQLPlugin's convertPackageBodyForward leaves a stored entry's bare indexes[].unique: true unchanged, and resolveStackCollection refuses it with INVALID_ARTIFACT_PACKAGE_ENTRY 422.",
      "gates": "Local: `node scripts/pm/dispatch-gates.mjs --commands` at 32bda83ef0 → 71 commands. 70 exit 0. `pnpm check:dual-build-cjs-loads` exit 3, PREREQUISITE NOT MET (needs a whole-workspace build) → NOT MEASURED, CI-owned. `dispatch-gates --ran` with `cmd :: exit N` → ✓ 71 accounted, 70 run, 1 NOT-MEASURED, exit 0. `node scripts/check-nul-bytes.mjs` exit 0. `node scripts/pm/overlap-check.mjs` → VERDICT clean exit 0 (origin/main and #34791, which shares both files, merge cleanly). No exported symbol renamed or removed, so no platform-checklist run is owed. CI at report time (PR check-runs on 32bda83e): Check Changeset, Check PR Size, Governed Surface Queue Guard, Lint · (CI release & engine, ESLint, PM dispatch-gates, docs & code guards, repo & tooling, scoped ×3), PR-body guards, Type Check · (consumer, debt ledger, source, workspace) are all in_progress; opt-in, queue-verdict and schedule-gate jobs are skipped. Test Core, Build Core and the UI lanes were not yet listed.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes (POST /repos/objectstack-ai/objectstack/dispatches via fleet-write/dispatch.mjs and post-stamped.mjs). Executed as objectstack-fleet[bot]: POST /repos/objectstack-ai/objectstack/pulls (draft #34844), POST /repos/objectstack-ai/objectstack/issues/34844/assignees (os-lizheng), POST /repos/objectstack-ai/objectstack/issues/34583/comments (this report). Plus git push of the branch (not REST).",
      "files_changed": [
        ".changeset/34583-installed-copy-refusal.md",
        "packages/cloud-connection/src/marketplace-install-local-plugin.ts",
        "packages/cloud-connection/src/marketplace-install-local-resolver-refusal-34432.test.ts"
      ],
      "line_budget": "+172 / -10 (182 changed lines, 3 files) vs 3000 human-merge threshold: under",
      "deviations": [
        "Test landing: the pins went into the existing marketplace-install-local-resolver-refusal-34432.test.ts as a top-level describe, not into the new file the dispatch suggested, per AGENTS.md ruling record 6583487846 (that file is this step's harness). It stays inside the claim's file surface ('new test file under packages/cloud-connection/src/' widened to an existing one in the same directory).",
        "In-place fixture fix (bounded exemption: same file and step, mechanical, same gate family): composed() gains `datasources: {}` so the #34432 incoming pins reach 2c″ again. Before the fix, ablation D showed them vacuous for that step.",
        "Remedy wording: the card says 'upgrade or remove the stored copy first'. The message names only removal (uninstall, then install), because an upgrade through this door is the refused act itself. The remedy is pinned by a test.",
        "Attribution: commits carry the model-free pair (Claude-Session + Co-authored-by: Claude) per AGENTS.md, not the harness's model-named Co-Authored-By. The PR body uses AGENTS.md's session-URL footer form, not the harness's emoji form.",
        "No marketplace-install-rename-planner.ts edit was needed (packageUpgradeSideOf is unchanged)."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: POST /api/v1/marketplace/install-local with dryRun: true on a re-install whose stored ledger copy the resolver refuses. answerUpgradeDryRun (marketplace-install-local-plugin.ts, private answerUpgradeDryRun) calls manifest.planUpgrade(installed, incoming) unguarded. With a booted ObjectQLPlugin's planUpgrade (objectql planPackageUpgrade → sideOf → resolveStackCollection), the handler THREW code=INVALID_ARTIFACT_PACKAGE_ENTRY status=422 instead of answering (measured at the handler by a throwaway probe at 32bda83ef0). That the transport renders it as 500 is the codebase's own recorded reading (#34574 real-runtime test header) and was not re-measured here. Not fixed in place: it is a different defect shape (an unanswered throw, not a misnamed answer), and the file is also touched by open PR #34791. Fix shape: pre-resolve each side as 2c″ now does and answer with declaredRefusalAnswer(…, side). · dedupe words: `install-local dry run planUpgrade installed copy refused`, `answerUpgradeDryRun resolver refusal throw`, `dryRun reinstall stored ledger copy 500`"
      ]
    }
  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    ACCEPT → PR #34844 comment (seat record, head 32bda83). Out of scope: filed #34846 (the dryRun re-install throws on a refused stored copy).

  10. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C

    MERGED: PR #34844 closed this card (2026-11-17T14:19Z). On origin/main the installed-copy sentence is in marketplace-install-local-plugin.ts (git grep "The installed copy of package": 1 hit). pm:dispatched and lease:o4-A are off. #34846 (the dryRun re-install throws on a refused stored copy) named this card as its Blocked-by and is free to first-touch now.

  11. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdomain:serverfindingpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions