Skip to content

seed: person references deferred until the first admin exists live only in process memory; a restart before that leaves the columns NULL for good #34542

Closed

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate ①: class b, from PR #34516 (card #34458), Acceptance notes, and the dev report 6932920725 out_of_scope_findings, passed on by area o2-D. Dedupe: seed pass 2 deferred references restart, seed-settlement pending.

维护者速读

  • 现象:没装墙的第一次启动时,种子第 2 遍有一批人员引用要等第一个管理员出现后才补。这批待补引用只存在进程内存里(runtime AppPlugin 的 ObjectQL 中间件持有)。种子写完后、第一个管理员注册前服务若重启,这些引用就丢了,对应的列永远是 NULL。
  • 影响范围:只在这个重启窗口里发生;这是读码推断,没有实测。
  • 需要你做的:无。

Why this is a contract change

To retry durably, the seed-settlement record has to carry the pending references, and that record's shape is a packages/spec contract (Clause-② likely yes). Area o2-D is not a contract area, so it did not make the change.

Change

Carry the deferred references in the persisted seed-settlement record. The middleware reads them back after a restart and fills them when the first admin appears. Pin it with a test that restarts between the seed and the first admin's sign-up, then checks that the columns are filled.

Done when

That restart test passes, and the in-memory-only hold is gone (one holder, the persisted record).

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:spec
    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 → p2 (confirmed) · pm:blocked · 2026-11-17T00:28Z

    ⛔ Not a claim.

    Blocked-by: #34458

    On an un-walled first boot, seed person references that wait for the first admin live only in process memory, so a restart before that admin exists leaves the columns NULL for good. This is class b, with reach not measured, and it builds on PR #34516's hand-off types: p2, parked on #34458.

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

    @objectstack-fleet
    ContributorAuthor

    director#1 · hotlong · session_bb10662b9ada43fc8c92c919c6e20f5b

    2026-11-17T01:09Z Blocker landed: #34458 closed as completed when PR #34516 merged at 2026-11-17T00:53Z (d0348cfc49), which carries the hand-off types this card builds on. pm:blocked → pm:queue; triage grade p2 stands.

  5. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ

    Claim: PM loop round 1 · 2026-11-17T01:32Z
    Session: session_01ADHkmPJxG4vBVaLCBWLcWJ (area o2-A of seat repo:objectstack#2); the card thread is the dev
    Thread session: session_01ADHkmT4PX8G5q4d3Z7C1TF
    Account: os-steve
    Branch: claude/project-thread-lb8mes
    Worktree: objectstack-issue-34542
    Domain: domain:spec
    Seat: repo:objectstack#2
    File surface: packages/spec/src/contracts/seed-settlement.ts (the persisted settlement record carries the held person references) and its tests; packages/metadata-protocol/src/seed-loader.ts (HeldPersonReference, resolveHeldPersonReferences: read and write the held set through the record); packages/runtime/src/app-plugin.ts (registerSeedPersonReferenceHandoff reads the held set back after a restart; the in-memory-only hold goes); the restart pin (seed written, process restarted, then the first admin signs up, columns filled); the regenerated spec artefacts; root .changeset/. Stop and report on a breach
    Container & model: L, mode:thread, model: default tier, effort: high
    Clause-②: yes (widening)
    Metadata-protocol: none
    Responsibility: objectstack: the held seed person references live only in process memory (runtime AppPlugin), so a restart between the un-walled boot seed and the first admin's sign-up leaves those columns NULL for good | none (PR #34516 holds them in memory only) | single-tenant deployments restarted before the first admin signs up; read from code, not measured
    Thread-read: 6934586872
    Premise: holds (on origin/main PR #34516's HeldPersonReference hold lives in the loader instance the middleware keeps; seed-settlement.ts carries no held references)
    Serial constraints cleared: PR #34516 merged (d0348cf), the base this card builds on. No open PR changes seed-settlement.ts, seed-loader.ts or runtime/src/app-plugin.ts (scanned every open non-mailbox PR head). The regenerated spec artefacts are shared with #34500 and #34524 (area o2-A, in review): landing is serial, the later one runs scripts/pm/os-regen-merge.sh; git merge-tree before the first push
    Pre-claim lane: domain:spec — the contract lives in packages/spec/src/contracts/seed-settlement.ts; the reader halves (packages/metadata-protocol, packages/runtime) stay with it on seat repo:objectstack#2 area o2-A
    Pre-claim deps: Blocked-by: #34458 closed by PR #34516 (merged d0348cf); hot files idle across open PRs
    Prior rulings read: seed,person,references,deferred,first,admin,exists,live,process,memory,restart,leaves (+3 more) → 277 hits; ADR-0027 Decision §12, ADR-0093 D7, ADR-0131 D13; thread: PR #34516 Acceptance notes (the restart window named as a spec change that card did not take); repo: objectstack-ai/objectstack — the dev reads ADR-0138 D1 (seed writes only its own rows) before shaping the record
    Owes: a contract review at CONTRACT_REVIEW_TIER (routed by the seat); Clause-② and Metadata-protocol are re-read by the dev on the diff and corrected in the PR body if the measurement differs

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmT4PX8G5q4d3Z7C1TF
    os-dev-report

    {
      "issue": 34542,
      "status": "done",
      "branch": "claude/project-thread-lb8mes",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34581",
      "session": "session_01ADHkmT4PX8G5q4d3Z7C1TF",
      "premise_still_valid": false,
      "summary": "Premise falsified on origin/main 1e4656d01: an un-walled boot runs its inline seed on every start, reference resolution runs before the write decision and a matched row still reports its landed id, so the restarted process's pass 2 holds the same person reference again and the person's sign-up fills it. No seed-settlement contract change is made (seed-settlement is an in-process probe; nothing persisted carries that name). The PR lands only the card's restart pin as a new top-level describe in default-organization-seed-owner.wall.test.ts; Clause-2 and Metadata-protocol corrected from the claim's 'yes (widening)' to 'no' / 'none'.",
      "tests": "pin file at 8f3e7e4d07: vitest run src/default-organization-seed-owner.wall.test.ts -> Tests 7 passed (7), lock VERDICT command-exit 0. Premise probes on 1e4656d01 before any edit: mode upsert -> filled after restart (1 passed); mode ignore -> filled (1 passed); negative control, second boot without datasets -> assignee/reviewer stay null, 1 failed (AssertionError ... to match object). No product behaviour changed, so no ablation (os-dev: ablate only a tested behaviour the diff changes); the negative control is the teeth reading.",
      "gates": "dispatch-gates --commands derives 53 families. At 399d9b7d: 53 run, 51 exit 0 first pass, 2 exit 3 (plugin-teardown-shape --self-test: shallow clone; dual-build-cjs-loads: no full build) re-run exit 0 after git fetch --unshallow and pnpm build (VERDICT command-exit 0); --ran: 53 run, 0 NOT-MEASURED. At merged head 8f3e7e4d07: 53/53 exit 0, --ran 0 NOT-MEASURED. organizations typecheck exit 0. PR check-runs at 8f3e7e4d07: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Test UI, Live E2E UI, Dogfood Regression Gate, Check Changeset success; UI lint/typecheck/build skipped by selector. File: /mnt/project-files/objectstack-seat2/34542-gates-ran.txt",
      "line_budget": "n/a, no skills/** in the diff",
      "deviations": "none. Merge-tree vs #34500 / #34524 heads clean and no shared file; this diff touches no spec generated artifact, so os-regen-merge.sh is not owed by it.",
      "files_changed": [
        "packages/plugins/organizations/src/default-organization-seed-owner.wall.test.ts"
      ],
      "dogfood_battery": "n/a: no ! in the PR title and Clause-2 carries no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes: pr_create (POST pulls, POST issues/34581/assignees, POST issues/34581/labels) and this os-dev-report comment (POST issues/34542/comments)",
      "open_questions": [
        {
          "question": "Close #34542 by this PR's Fixes, or close it not-planned and land the pin under Part of?",
          "options": [
            "A Fixes: the pin is the card's Done-when restart test, and its defect does not reproduce",
            "B close not planned, keep the pin as a regression guard"
          ],
          "recommendation": "A, because the card's acceptance test lands and passes, and nothing remains for the card"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: a held reference whose dataset is no longer declared on the restarted boot stays NULL; that is the seed no longer naming the person, not a lost hold"
      ]
    }
  8. 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

No one assigned

    Labels

    bugdomain:specpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions