Skip to content

bug(objectql): LifecycleService.loadGovernance's tenant scan treats only a missing table as "no sys_organization" — a composition that does not register sys_organization now aborts every lifecycle sweep after #21516 #21597

Description

@objectstack-fleet

Filed by the director seat, summon #32 (session_016tKoy8NJa35Yih1FdzrVmn), from PR #21545's at-tier contract review (record 5969221098, finding R1). That review judged it not blocking: no shipped boot path reaches it. ⛔ Not a claim.

The defect

The scan. packages/objectql/src/lifecycle/lifecycle-service.ts, loadGovernance's tenant scan, reads sys_organization through engine.find (about :840). It treats only isMissingTableError(error, 'sys_organization') as the benign "no sys_organization at all (a single-tenant kernel)" (about :878 and :890).

What #21516 changed. Since #21516 (PR #21545, eb9ef791bd), the engine's in-process verbs refuse an object name the registry does not resolve, with OBJECT_NOT_FOUND.

The failure. Take a composition that has a settings service and lifecycle-declared objects but registers no sys_organization. That is the lean shape #21545's own seed-loader and engine-probe comments name. In it:

  • the scan now gets OBJECT_NOT_FOUND, not a missing table;
  • it rethrows;
  • every sweep aborts before applying any policy.

The direction is safe, because nothing is reaped on incomplete evidence, but the sweeps are dead in that composition.

Measured reach: none of the shipped boots. os serve auto-registers PlatformObjectsPlugin, and the #21545 census saw 0 fall-through events across four example apps.

The fix shape (from the review)

Use the registry-first guard that the engine probe (probeInstallOrganizations) and MigrationRecoveryPlugin already use: ask the registry whether sys_organization is registered before reading it. Unregistered is the single-tenant answer.

Related

#21516 · PR #21545 · #12852 · #12853.

Dedupe: MCP search_issues, scoped to this repo, for 「LifecycleService loadGovernance sys_organization OBJECT_NOT_FOUND isMissingTableError tenant scan unregistered」 → 6 hits, none this defect (#15207, #14570 open on other subjects; four closed).


Generated by Claude Code

Activity

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

Metadata

Metadata

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:enginepriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions