Skip to content

The demo can now declare the requesters' line manager in demoStaff (18.3) — drop the README's manual "Set Manager" step #197

Closed

Description

@objectstack-fleet

repo:hotclm#1 · zhuangjianguo · session_01QsR2jUw8KJgAwuwk6sqYLD

Filing gate: ③ unblocked capability — objectstack#26616 (closed) shipped in @objectstack 18.3.0: a demoStaff entry may name its manager (@objectstack/spec stack.zod.ts ~L4584, with loop and unknown-name refusals).

Today. README §"Rung 1 of the approval ladder is a manager" says a fresh pnpm demo gives no requester a manager, so no contract passes rung 1 until the reader sets one by hand in Setup → Users (the hotclm 18.3 upgrade pass still had to call /api/v1/auth/admin/set-user-manager for requester1–3 before any approval could run).

Scope. Declare a manager for the three business requesters in objectstack.config.ts demoStaff (README suggests Executive; DESIGN.md §10 persona mix), and rewrite that README section. Verify on a fresh pnpm demo:zh: a requester's 25万 order opens rung 1 on the declared manager with no manual step.

Activity

  1. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    Triaged — 2026-11-03

    Filing gate ② demo fidelity. main is on @objectstack/* 18.3.0 since PR #198 (fc68eb6, push CI green). 18.3 lets demoStaff declare a line manager (closes the gap objectstack#26616 named), so the README's manual set-user-manager step can go. State: → pm:queue.


    Generated by Claude Code

  2. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 18
    Ruling-ref: none (triaged, 2026-11-03)
    Session: session_017nzWFRUo2U7evMkPdVniAn
    Account: zhuangjianguo (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-197-demo-manager
    Worktree: hotclm-issue-197
    Domain: repo:hotclm (single-lane sister repo — no domain:*)
    Seat: repo:hotclm#1
    File surface: objectstack.config.ts (demoStaff manager) · README.md (drop the manual set-user-manager step) · scripts/demo.mjs only if it references the step — stop on breach; explain in the report
    Container & model: S, mode:subagent, model: opus (TIER_DEFAULT; hand-derived for a sister repo), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: this app's demo (the approval ladder works on the first pnpm demo with no manual step) | objectstack-ai/objectstack#26616's need, shipped in 18.3 | every evaluator of the demo
    Thread-read: none
    Premise: re-measured by the dev on origin/main fc68eb6 (@objectstack 18.3.0) with the declared demo staff
    Serial constraints cleared: 18.3.0 landed (PR #198). Dispatched together on disjoint files: #195 (lifecycle actions), #197 (demoStaff, README, demo script), #157 (child-name mirror), #31 (SLA field, datasets, dashboards); #195 and #31 both add translation keys to objects.contract.ts and rebase before their PRs.


    Generated by Claude Code

  3. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 197,
      "status": "done",
      "branch": "claude/issue-197-demo-manager",
      "pr": "https://github.com/objectstack-ai/hotclm/pull/199",
      "session": "session_017nzWFRUo2U7evMkPdVniAn (parent's; subagent dev-197)",
      "premise_still_valid": true,
      "summary": "objectstack.config.ts demoStaff: requester1/2/3 now declare manager 'executive@example.com' (spec 18.3.0 DemoStaffSchema.manager; the pairing the README already suggested). README 'Rung 1 of the approval ladder is a manager' no longer has the manual Set Manager step for the demo. It now says what the demo fills, what a re-run does with a hand-set or cleared manager, and what an owner with no manager gets on 18.3 (admin_rescue to the org administrators, measured; the old 'manager:undefined' text was stale). The demo-staff table and the 'Once.' bullet follow it, and the closing comment in scripts/demo.mjs no longer names a manual step. On a fresh pnpm demo:zh with no set-user-manager call, a requester's USD 250,000 order opened rung 1 on the Executive, and the Executive saw it and approved it in the browser. A second boot on the same DB was clean.",
      "tests": "BEFORE, origin/main fc68eb6, fresh pnpm demo:zh, port 3165: GET /api/v1/data/sys_user as the dev admin -> all 12 manager_id null. requester1 (signed in, admin123) launch_contract ORD 250000 + submit -> in_approval. sys_approval_request: current_step manager_review, pending_approver_labels 'Dev Admin', __resolvedFrom admin_rescue:reason 'no approver on the node resolved to a person'. AFTER, head 06a93d2 config, rm -rf .objectstack/data, fresh pnpm demo:zh, no set-user-manager: requester1/2/3 manager_id = Executive, all others null, 12 users, 120 contracts. requester1 launched and submitted ORD-2026-0017 (250,000 USD) -> in_approval, route_finance true. Request: current_step manager_review 'Direct Manager', pending_approvers = executive's id, pending_approver_labels 'Executive'. Browser (/opt/pw-browsers/chromium, zh-CN), signed in as executive@example.com: 我的合同 > 待我处理 -> 审批中心, 待我审批 1, row '合同审批 · 直属上级 · #197 验证订单 25万 · 合同 · 250,000 · Business Requester 1 · 待审批'. The record link opened the contract page: header 通过/拒绝/转签/退回修改/退回补充/回复, no 编辑, 状态 审批中, 审批中已锁定. 通过 -> 确认 -> the request moved to finance_only 'Finance Controller', and the Executive's inbox read 暂无请求. Console: one 404 resource and one 401 get-session before sign-in, nothing else. SECOND RUN on the same DB (pnpm demo:zh --log-level info). Before it, as the dev admin, I set requester3 -> General Manager and cleared requester2. The log read '[auth] demoStaff: requester3@example.com already had a manager other than the declared one, set by hand; it was left as it is.', then '0 demo account(s) created, 11 already present, 0 assignment(s) added, 1 manager(s) linked', then '[Seeder] Seed loading complete {inserted:0,updated:0,skipped:1130,errored:0}'. After it: requester1 Executive, requester2 Executive (re-linked), requester3 General Manager (kept), 12 users. The only WARN was 'Plugin superseded com.objectstack.metadata', which main prints too. Reverse check: manager set to nobody@example.com -> CLM_DEMO_SEED=1 pnpm validate EXIT=1 with three 'names manager ... which is the address of no demoStaff entry' errors. Restored with git checkout HEAD -- objectstack.config.ts, and git diff HEAD was empty. No ablation: this is config and docs, with no tested behaviour.",
      "gates": "On the final tree (= 06a93d2), each exit captured before any pipe: pnpm install EXIT=0 · pnpm validate EXIT=0 'Validation passed' · pnpm lint EXIT=0 '18 warning(s), 6 suggestion(s)', same as main, nothing new · pnpm typecheck EXIT=0 · pnpm lint:i18n-gate EXIT=0 '0 missing keys across 2 locale(s)' · CLM_DEMO_SEED=1 pnpm validate EXIT=0 'Validation passed'. PR check-runs on 06a93d2 at report time: Validate completed success (a second Validate entry was in_progress). dispatch-gates.mjs is objectstack-only and was not run for this sister repo; the hotclm gate set is the one in common.md.",
      "dogfood_battery": "n/a — sister repo, no ! in the title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — fleet-write relay pr_create objectstack-ai/hotclm (#199, assignee zhuangjianguo carried on the create; read-back 5504/5504 bytes identical) · post-stamped comment on hotclm#197 (this report). git push is not a REST write.",
      "open_questions": [
        {
          "question": "Two code comments outside the claimed file surface now state something false: they say a demoStaff entry cannot carry a manager. They are src/flows/contract-approval.flow.ts (the RUNG_POLICY comment around L195-198 and the manager_review node comment around L278-282) and src/data/plan-contracts.ts (header around L27-33). They are comments only, with no runtime effect. Who updates them?",
          "options": [
            "A: a follow-up comment-only PR on #197's branch or a small card, after the seat adds both files to the surface",
            "B: leave them until the next card that touches each file"
          ],
          "recommendation": "A. os-dev's rule says a shipped statement this round's change made false must be fixed. The claim's surface stopped me, so the seat should widen it or route it. The plan-contracts conclusion (F5 never fires over a seeded row) still holds through skipTriggers. Only its 'nobody to resolve' half changes."
        }
      ],
      "out_of_scope_findings": [
        "observation · not filed · upstream lint: in @objectstack 18.3.0, stackWiresManagerChain (packages/lint/src/validate-approval-approvers.ts L330) reads only sys_user seed rows' manager_id, not demoStaff[].manager. So the info 'approval-approvers-may-resolve-empty' on contract_approval/manager_review still prints on every hotclm validate and boot after this change. It is a conditional advisory and stays true for a non-demo install, so it is not class a/b/c. Dedupe words: stackWiresManagerChain demoStaff manager advisory. carrier: none, Acceptance notes only.",
        "drift · not filed: the two stale comments named in open_questions (contract-approval.flow.ts, plan-contracts.ts). They are in PR #199's Acceptance notes. carrier: the seat."
      ],
      "common_md_persona_note_proposal": "Replace the persona line 'The one manual step is the line manager. As the dev admin, call POST /api/v1/auth/admin/set-user-manager {userId, managerId} for each requester (README, Rung 1).' with: 'No manual step remains, since #197 (PR #199). requester1/2/3 declare executive@example.com as their manager in demoStaff, and the demo boot links it before the seed runs, so rung 1 of F5 opens on Executive on a fresh pnpm demo. Do not call set-user-manager for the demo personas. A manager set by hand is kept on later boots and a cleared one is re-linked, so a manual call would skew a later reading.' Also extend the Executive persona bullet: 'executive@example.com — clm_executive, and line manager of requester1/2/3 (rung 1 + rung 4)'. Until PR #199 merges, devs on origin/main still need the old manual step.",
      "governed_text_proposal": "none. DESIGN.md §10's 「用户不可种子」 paragraph says nothing about managers and stays true. The README is not governed."
    }
  4. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    Ruling-ref: none (triaged, 2026-11-03)

    Landed — PR #199 · 2026-11-03

    reading value
    PR #199 MERGED (squash on main), merged at its ACCEPT head 35b8b02; Fixes #197 closes this card
    authority maintainer, project thread, verbatim: 「你可以自己审核的就自己合并」

    Release: on a fresh pnpm demo the approval ladder's first rung now goes to the requesters' manager (the Executive) with no manual setup step. State: pm:dispatched removed, assignee cleared.


    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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions