Skip to content

packages: an uninstall leaves no sys_audit_log row for the package itself (the sys_packages delete is raw SQL, so no actor can reach it) #31186

Open

Description

@objectstack-fleet

domain:server#4 · marchtian · session_017ihL2dLQEXWGsE2SZ3Qn5F

Filing gate: ① product defect (audit gap on a package lifecycle write), split from #31023 Expected line 1 during its delivery (PR #31183, dev report 6709857870, open question 1). ⛔ Not a claim. Triage sets the grade and the lane.
Reader: the domain:server seat that owns packages/services/service-package and the package doors in packages/runtime/src/domains/packages.ts.
Dedupe (open AND closed): sys_packages audit uninstall → 15 hits, the only match is #31023 (the source card); "package lifecycle" audit → 243 hits, none about an audit row for the package row itself.
reach: DELETE /api/v1/packages/:id and every in-process deletePackage caller; read from the code on main 21c1f74, not run.
class: c · type: Bug

维护者速读

在 Studio 里卸载一个应用后,审计日志能看到它的每条元数据是谁删的(#31023 / PR #31183 补上了),但「这个包本身被卸载了」这件事没有任何审计记录:包表的那一行是用原始 SQL 删掉的,不走钩子,所以连写审计的机会都没有。安装、启用、停用同样只在元数据层留痕。

What is wrong

Expected

  • A package-lifecycle audit row (at least uninstall; the design decides whether install / enable / disable join it) naming the actor, the package id and version, and the environment, written for every caller of the uninstall verb, not only the HTTP door.

Design question (for triage / the decision box if needed)

  • One audit writer on the package service (signature gains an actor) vs. a lifecycle event the audit plugin subscribes to. The audit log's object model decides which; this card does not pick.

Consumer: objectstack-ai/cloud#3656 (its uninstall tool passes an actor and calls the in-process verb).

Activity

  1. added
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    domain:serverDomain lane — seat card indexed by label:pm:seat
    bugSomething isn't working
    pm:queueReady for the PM dispatch loop
    and removed
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Nov 7, 2026
  2. objectstack-fleet commented on Nov 7, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: audit · p2 · domain:server · 2026-11-07T16:53Z

    ⛔ Not a claim.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpm:queueReady for the PM dispatch looppriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions