Skip to content

sys_secret: build the cross-producer reference union — the primitive any safe orphan sweep needs (unblocks #8103's deletion half) #12663

Description

@os-zhuang

Provenance: maintainer ruling 2026-08-27 (PM chat, decision-inbox batch 1, adjudication session session_01DKWDdUJ2XNRESVVWUvcpnh), verbatim: 「同意,并继续」 — adopting B′ on #8103: the ruled operator command (2026-08-26, Option B) is sequenced BEHIND this missing precondition. Option C (a sweep keyed on one producer's partial view) stays ruled out. Report-only (A) remains the honest fallback if this card is later judged not worth building — that re-decision belongs to the maintainer.

What this is

A runtime-enumerable union of every reference to a sys_secret handle, spanning all three producer/holder families measured on #8103:

  1. sys_setting.value_enc handles (SettingsService);
  2. every secret-typed field on every REGISTERED object — instance-specific, enumerated from the metadata registry at runtime (includes tenant-authored objects; cannot be precomputed);
  3. every datasource artefact's external.credentialsRef.

Only "unreferenced by the COMPLETE union" is a sound deletion predicate. Measured 2026-08-26 on #8103: attribution by (namespace, key) is a name match, not ownership — a live engine-owned credential classifies orphaned under the shipped settings-scoped classifier, and the audit trail (digests, not handles) cannot name an erroneous delete afterwards.

Measured placement constraints (re-verify on the day, do not cite)

  • A bounded scan of all 73 workspace package.json files found exactly two packages with runtime visibility of all three producers: @objectstack/cli (operator command surface, bin objectstack/os) and @objectstack/verify (a boot-and-verify harness, no bin). service-settings cannot see the other two, and its independence from objectql is a declared architectural property.
  • Routing is triage's call; if the home is packages/cli, that is the domain:cli lane and cross-lane coordination applies.

Named reader

The seat that later builds #8103's deletion command ("attributable AND unreferenced by the COMPLETE union"; dry-run default; pre-delete export mandatory; the unattributable class is never deleted). #8103 is pm:blocked on this card.

Refs: #8103 (ruling + measurements), #8259 (closed vehicle ruling), PR #8261 (shipped report-only classifier).

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions