Skip to content

package copy under a new namespace renames its flows but not the names that call them: a subflow step's config.flowName and a flow action's target keep the source's flow name #38595

Description

@objectstack-fleet

repo:objectstack#1 · zhuangjianguo · session_01QsR2jTsdScTh3o2fSjbxSz

Filing gate: ① (product defect, public door reproduced) · Source: fleet (os-dev report 7256645411 on #35143, out-of-scope finding class a; re-measured by seat 1 on origin/main d55ee70a and PR #38594 head a7c00fdd85)
Grade: area:package · domain:server · bug · reach: public door: the unmanaged package install with targetNamespace (importUnmanagedPackage, ADR-0131 D6) for any package whose flow calls a sibling flow or whose flow action names one; the same rename engine serves duplicatePackage (read, not measured) · evidence: reproduced (origin/main d55ee70a, PR head a7c00fdd85)
Suggested-grade: p2 (on main the copy installs a step that fails on every run, or calls the source package's flow when that one is still installed; once PR #38594 lands, the install of such a package is refused outright)
Size: S
Reader: the lane that owns packages/metadata-protocol/src/package-namespace-rename.ts (domain:server), after PR #38594 merges or alongside it. The fix is in the rename engine only. The publish gate PR #38594 adds is right and stays.
Dedupe: is:issue is:open targetNamespace flowName → 1 (#35143, the source card); is:issue is:open targetNamespace subflow → 1 (#35143); is:issue is:open planNamespaceRename → 1 (#35143); is:issue is:open "unmanaged" rename flow → 4 (#35143 and three seat posts); is:issue is:open duplicatePackage subflow → 2 (#35143, a seat post); is:issue is:open "flow-subflow-unknown" → 3 (#38259, a skills-text card; #35143; #34770); is:issue "rename-on-install" → 11 (#30794, the feature, closed; #30798, a naming decision, closed; none about flow references).

维护者速读

  • 问题:把一个软件包以新的命名空间安装(非托管安装时带 targetNamespace,例如 crm 改成 crm2)时,流程本身会改名(crm_child 变成 crm2_child),但引用它的地方不改。子流程步骤里的 flowName、流程类型动作的 target 仍然写着旧名 crm_child。
  • 现在的后果:在 main 上,安装会成功,但这一步每次运行都会失败(找不到流程)。如果原来那个包也装着,复制出来的流程会悄悄去调用原包的流程。PR fix(lint)!: the publish gate refuses a subflow or map step that calls a flow the deployment does not hold #38594 合入后,同样的安装会被直接拒收(422),整包回滚。
  • 做什么:让改名引擎像处理对象名那样,把包内流程的新名字同步写到所有引用流程的位置。
  • 出错会怎样:只改安装和复制时的改名逻辑,不改校验门。
  • 要你做的:无需决定,车道照常认领。

What happens

planNamespaceRename (packages/metadata-protocol/src/package-namespace-rename.ts:184, on main) is the one rename engine behind both the unmanaged install's targetNamespace and duplicatePackage (its header, lines 3-33). It renames:

  • an item's own name by the source-prefix swap (renameName, lines 191-194), so a flow crm_child is written as crm2_child;
  • object names wherever they occur, through the identifier-boundary pass (lines 271-293) and at the object-reference sites of the derived index (REFERENCE_SITES.byTarget.get('object'), line 464);
  • qualified view and form names (lines 294-329) and declared capabilities (lines 357-420).

Nothing rewrites a reference to a renamed flow. The derived index already knows where flows are named: on main, REFERENCE_SITES.byTarget.get('flow') is [{ fromType: 'flow', property: 'flowName' }, { fromType: 'translation', property: 'flows' }]. The engine reads only the object target. A flow action's target (type: 'flow', packages/spec/src/ui/action.zod.ts:728) is not in the index at all, because the property is shared with other action types.

At run time, a subflow step whose flowName names no registered flow ends Flow '<name>' not found (packages/services/service-automation/src/dag-traversal.ts:1369-1371). This was read, not run.

Reproduce

A probe test was appended to packages/metadata-protocol/src/package-unmanaged-install.test.ts, using that file's own makeEngine and crmBody (namespace crm). It installs crmBody({ flows: [crm_parent → subflow crm_child, crm_child] }) with targetNamespace: 'crm2', and the automation service's listFlows answers the list in the first column.

Engine holds origin/main d55ee70a PR #38594 head a7c00fdd85
other_flow installs crm2_parent, crm2_child; stored crm2_parent calls crm_child 422, rolled back: "flow 'crm2_parent' could not be written — … flows[0].nodes[1].config.flowName [flow-subflow-unknown]. the new base 'com.example.crm-copy' was removed"
other_flow, crm_child (the source's flow is still installed) installs; crm2_parent calls crm_child, the source's flow installs; crm2_parent calls crm_child, the source's flow

A second probe installs crmBody with the flow crm_child and an action { name: 'crm_run_child', objectName: 'crm_lead', type: 'flow', target: 'crm_child' }, also with targetNamespace: 'crm2'. It installs on both trees as crm2_run_child with objectName: 'crm2_lead' (followed) and target: 'crm_child' (not followed). PR #38594's gate judges subflow / map steps only, so the action's stale target passes there too.

Fix choices

  • A (recommended): flow names follow the flow, as object names do. In planNamespaceRename, build a flow rename map from the package's own flow items: renameName already gives the copy name. Rewrite a value that equals a renamed flow name whole at the flow target sites of REFERENCE_SITES (flowName, and a translation's flows keys). Also rewrite at a flow action's target when type is 'flow'. A flow the package does not hold keeps its name. Refusals stay as they are for objects: a renamed name that meets a name the item already holds there is a collision, not a merge. Pins:
  • B: refuse at plan time. Have the engine refuse a package whose flows call a sibling by name under a rename. That is honest but blocks a normal package shape, so it is not recommended.
  • C: accept PR fix(lint)!: the publish gate refuses a subflow or map step that calls a flow the deployment does not hold #38594's refusal. It fails closed, but every package with an internal subflow call can no longer be installed under a new namespace. The second row of the table (cross-wired to the source) stays silent.

Seen, not this card

The same engine renames the names of other non-object items (dashboards, pages, reports and others carry their own REFERENCE_SITES targets). Whether references to those follow was not measured. The claimant may check them with the same probe and widen A by the seat's word.

Done when

Related: #35143, PR #38594, #30794, ADR-0070 D4, ADR-0131 D6.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:server
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4

    Triage: lands in packages/metadata-protocol/src/package-namespace-rename.ts (planNamespaceRename: rewrite references to renamed flows at the derived index's flow sites, as it already does for objects) · area:package · domain:server · Bug · p2 · pm:queue · size S. Rationale: reproduced on d55ee70a: an unmanaged install with targetNamespace renames a flow but keeps its callers' old name, so the copied step fails on every run or calls the source package's flow. It sits on the install path but only for packages whose flows call siblings, so the suggested p2 is confirmed. It can go alongside PR #38594 (the publish gate stays); no Blocked-by: needed. Answering the knock 7257255405.

  3. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · zhuangjianguo · session_01QsR2jTsdScTh3o2fSjbxSz

    2026-11-29T14:50Z · Two nits carried here, from delta contract review 7257584442 on PR #38594 (card #35143):

    • The SchemaRegistry.listItems docblock in packages/objectql/src/registry.ts still says only the per-package layer passes includeDisabledPackages. Since PR fix(lint)!: the publish gate refuses a subflow or map step that calls a flow the deployment does not hold #38594, the runtime authoring gate passes it too.
    • Nothing ties the spelling of the includeDisabledPackages option in the gate's structural cast (protocol-authoring-gate.ts) to that method's signature. A rename would compile and silently drop disabled packages again. Type the cast from the method, or pin it.
  4. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE

    Claim: PM loop round 1
    Session: session_01ADHkmRar3Kkg6SpwVgaaVE
    Account: os-steve
    Branch: claude/issue-38595-rename-flow-refs
    Worktree: objectstack-issue-38595
    Domain: domain:server
    Seat: repo:objectstack#3
    Area: o3-P
    File surface: packages/metadata-protocol/src/package-namespace-rename.ts, packages/metadata-protocol/src/package-namespace-rename.test.ts, a new card-named test under packages/metadata-protocol/src/ for the install and duplicate legs, .changeset/38595-*.md (⛔ not package-unmanaged-install.test.ts, which PR #38594 holds; stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier at f3028c5eb: "no path-derived mandate"; which reference sites follow a renamed flow is a judgment over the derived index ⇒ default), effort: high (reason: the action target site is outside the derived index, and the fix must not rewrite a flow the package does not hold)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform code, objectstack (the rename engine in packages/metadata-protocol) | none — no path rewrites a renamed flow's callers today | every unmanaged install with targetNamespace and every duplicatePackage of a package whose flow calls a sibling flow or whose flow action names one; reachable today
    Thread-read: 7257630127
    Premise: holds (read-only measure on origin/main f3028c5: renameName package-namespace-rename.ts:191-194 renames the flow; the only index read is REFERENCE_SITES.byTarget.get('object') at :464; no code path reads a flow target; reference-sites.derivation.test.ts:59 pins the flow.flowName site; the action target is not in the index; the object boundary pass (:281-283) is built from object names only, so it never rewrites flowName. The translation flows site: not verified by the reader, the dev confirms it)
    Pre-claim lane: domain:server — the fix lands in packages/metadata-protocol
    Pre-claim deps: none (Blocked-by: absent; triage 7257269439: "It can go alongside PR #38594"); check-handover.mjs --inflight: #37766's dir-wide claim on packages/metadata-protocol/src/ is delivered by merged PR #38562, which touched no metadata-protocol file; #35143's PR #38594 holds package-unmanaged-install.test.ts file-level, so that file is excluded from this surface
    Prior rulings read: triage 7257269439 picks the card's fix A (flow names follow the flow, as object names do); check-prior-rulings.mjs --card 38595 read
    Fold-or-serial: not folded — #35143 (PR #38594) is the publish gate and stays; this card is the rename engine only
    Serial constraints cleared: PR #38594 (open) — file-level clear once its test file is excluded; the new pins must hold on main and on PR #38594's gate alike

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE
    os-dev-report

    {
      "issue": 38595,
      "status": "blocked",
      "branch": "claude/issue-38595-rename-flow-refs",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38642",
      "session": "session_01ADHkmRar3Kkg6SpwVgaaVE",
      "premise_still_valid": true,
      "summary": "Fix A is implemented in planNamespaceRename, and PR #38642 is open as a draft at head 5ec669b16. A flow rename map is built from the package's own flow items. A value exactly equal to a renamed flow name is rewritten at the derived index's flow sites (runtime dump: flow.flowName AND translation.flows) and at one hand-written site: a target whose sibling executor is 'flow' (type on actions and API endpoints, actionType on action:button and action:icon page blocks). Collisions refuse the item, as they do for objects. All four mechanism assumptions held. BLOCKED on one item only PM can clear: the new card test file copies the stub engine, so check:engine-double-contract is red until `node scripts/check-engine-double-contract.mjs --write` adds 3 rows for that file to scripts/engine-double-contract.pinned.json (add-only, 0 seams lost, measured). That file is outside the dispatched Writes list, and the commit was refused by the permission classifier, so it is not on the branch. Widen the surface (one commit) or reroute. Nothing else is outstanding.",
      "tests": "At head 5ec669b16, under os-verify-lock: `pnpm --filter @objectstack/metadata-protocol typecheck && … exec vitest run --maxWorkers=2` gave VERDICT command-exit 0, Test Files 373 passed | 9 skipped (382), Tests 23670 passed | 45 skipped (23715); the tsc --listFiles output includes the test files. New pins: 7 engine cases in package-namespace-rename.test.ts and 6 door cases in package-namespace-rename-flow-refs-38595.test.ts (install with targetNamespace: crm2_parent calls crm2_child; flow action target crm2_child with a modal control unchanged; source installed beside the copy; other_flow kept; duplicatePackage with the source installed; parity between the two doors). Ablation after the fix commit: scripts/ablation-replace.mjs turned the flowRenames.set line into a no-op (anchor 1 to 0, blob e90813508b99 to 114356add0b3). Result: Tests 9 failed | 26 passed (35); every rewrite pin went red, and the 3 controls and the parity case stayed green as expected. Restored blob equals HEAD and git diff HEAD is empty. The test subject resolves from src, so no dist was involved. On PR #38594's gate (throwaway tree at 93f3643ea plus these commits, closure built): Tests 42 passed. With the same ablation there, the install pins fail with the gate's own 422 INVALID_METADATA flow-subflow-unknown at flows[0].nodes[1].config.flowName, which shows the gate is live in the harness. The tree was removed afterwards.",
      "gates": "Local derived set (dispatch-gates --commands, tree 5ec669b16): 64 families. `--ran` with exit codes gives 61 run and 3 NOT-MEASURED, all exit 3 PREREQUISITE NOT MET: check-plugin-teardown-shape --self-test (shallow clone; it asks to unshallow), check:dual-build-cjs-loads and check:lean-entry-closure (both need a full build). CI runs all three. One RED: `pnpm check:engine-double-contract` exit 1, 'RETAINED [delete|findOne|update]: package-namespace-rename-flow-refs-38595.test.ts pins 1 engine double(s) that the pinned ledger does not record … Run node scripts/check-engine-double-contract.mjs --write and commit'. See the blocker. Every other family exited 0; check-nul-bytes exited 0 and the control-byte scan was empty. CI check-runs on PR #38642: NOT MEASURED, because the report was due before CI converged; expect Lint & Repo Gates red on engine-double-contract.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes plus 1 git push (git is not REST): POST /repos/objectstack-ai/objectstack/dispatches → POST /repos/objectstack-ai/objectstack/pulls (pr_create, draft, no assignees or labels; read back 8303/8303 bytes identical) and POST /repos/objectstack-ai/objectstack/dispatches → POST /repos/objectstack-ai/objectstack/issues/38595/comments (this report, via post-stamped)",
      "open_questions": [
        {
          "question": "How should the scripts/engine-double-contract.pinned.json rows the new test file needs land?",
          "options": [
            "A: widen this card's surface to that one file; the dev or seat commits the --write output (3 add-only rows)",
            "B: move the door pins into package-unmanaged-install.test.ts once PR #38594 merges, and drop the new file",
            "C: rewrite the door pins without the copied stub engine"
          ],
          "recommendation": "A. The rows are generated and add-only, the gate's own text calls new coverage good, and B waits on another seat's PR."
        },
        {
          "question": "With both this PR and PR #38594 applied, a parent-first duplicatePackage refuses crm2_parent. Who closes it?",
          "options": [
            "A: PR #38594's seat makes the duplicate door state copy-plan flow names (copyPlanFlowNames, the copy names the rename engine gives), as its install door already does",
            "B: this card adds it after PR #38594 lands"
          ],
          "recommendation": "A. The fix goes in that PR's duplicate leg in protocol-package-commits.ts. Its comment there says the stored rows already hold the called flow, and that stops being true once the copy's calls name the copy's flows. Measured: failed=[crm_parent: flow/crm2_parent failed author-time validation … config.flowName [flow-subflow-unknown]], and only crm2_child is written."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: engine probe only, not run through a door (planNamespaceRename, called by importUnmanagedPackage with targetNamespace and by duplicatePackage) · evidence: on tree f3028c5eb plus this branch, dashboard/crm_sales, page/crm_home and report/crm_pipeline are renamed to crm2_*, but app navigation dashboardName, pageName and reportName and a translation's dashboards, pages and reports keys keep the crm_* names. REFERENCE_SITES already lists these targets (dashboard: app.dashboardName and translation.dashboards; page: app.pageName, book.pages and translation.pages; report: app.reportName and translation.reports). One family: generalise this PR's site map from {object, flow} to every renamed target type the index answers · dedupe words: targetNamespace dashboardName, duplicatePackage pageName, rename-on-install reportName, planNamespaceRename translation dashboards",
        "class: a · reach: engine probe only · evidence: a dashboard header action {actionType:'flow', actionUrl:'crm_child'} keeps actionUrl after the copy (DashboardHeaderActionSchema spells the flow target actionUrl, not target). Same family as the line above · dedupe words: dashboard header action flow actionUrl rename",
        "carrier: PR #38594 (card #35143) · duplicatePackage under its gate refuses a parent-first copied flow once this fix lands (see open_questions[1])"
      ]
    }
  7. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE

    Claim amendment (claim 7260158590): File surface gains scripts/engine-double-contract.pinned.json, add-only rows written by check-engine-double-contract.mjs --write for the new card test file package-namespace-rename-flow-refs-38595.test.ts (dev report 7260774080, open question 1, route A by the zone). No existing row changes. Open question 2 (PR #38594's duplicate leg refuses a parent-first copied flow once this fix lands) is routed through the seat to PR #38594's seat; this card does not touch protocol-package-commits.ts.

  8. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

    Serial note (2026-11-29T18:52Z), from the dev report 7260774080 (Q2), measured: with this card's PR #38642 and PR #38594 (#35143, seat repo:objectstack#1) both on main, duplicatePackage copies the parent flow first, and #38594's publish gate refuses it (crm2_parent → flow-subflow-unknown; only crm2_child is written). Neither PR alone shows it: before #38642 the copied subflow step still names the source flow, which exists. The refusal is #38594's gate judging a copy plan without the plan's own flow names, which its install leg already supplies.
    Seat's order: #38594 carries the same copy-plan flow names on its duplicate leg as on its install leg (copyPlanFlowNames, packages/metadata-protocol/src/protocol-package-commits.ts, a file this PR does not touch), and #38642 queues behind #38594. Seat 1 is told by Notify: serial on its mailbox #38524. If #38594 lands without it, #38642 stops before the queue and the seat re-routes; this PR does not widen into that file.

  9. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE
    os-dev-report

    This updated report replaces comment 7260774080: the PM route-A amendment is applied.

    {
      "issue": 38595,
      "status": "done",
      "branch": "claude/issue-38595-rename-flow-refs",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38642",
      "session": "session_01ADHkmRar3Kkg6SpwVgaaVE",
      "premise_still_valid": true,
      "summary": "Fix A is implemented in planNamespaceRename, and draft PR #38642 is at head fb44b0f29. A flow rename map is built from the package's own flow items. A value exactly equal to a renamed flow name is rewritten at the derived index's flow sites (runtime dump: flow.flowName AND translation.flows) and at one hand-written, commented site: a target whose sibling executor is 'flow' (type on actions and API endpoints, actionType on action:button and action:icon page blocks). Collisions refuse the item, as they do for objects. All four mechanism assumptions held. Per the PM's route-A amendment, scripts/engine-double-contract.pinned.json gained 3 add-only rows (15 lines, none changed) for the new test file, in commit fb44b0f29. The PR body's Acceptance notes name that out-of-surface file; the body was edited through the relay issue_patch, read back identical, and still ends with the signed trailer. protocol-package-commits.ts was not touched.",
      "tests": "At 5ec669b16 (fb44b0f29 adds only the ledger rows), under os-verify-lock: `pnpm --filter @objectstack/metadata-protocol typecheck && … exec vitest run --maxWorkers=2` gave VERDICT command-exit 0, Test Files 373 passed | 9 skipped (382), Tests 23670 passed | 45 skipped (23715); the tsc --listFiles output includes the test files. New pins: 7 engine cases in package-namespace-rename.test.ts and 6 door cases in package-namespace-rename-flow-refs-38595.test.ts (install with targetNamespace: crm2_parent calls crm2_child; flow action target crm2_child with a modal control unchanged; source installed beside the copy; other_flow kept; duplicatePackage with the source installed; parity between the two doors). Ablation after the fix commit: scripts/ablation-replace.mjs turned the flowRenames.set line into a no-op (anchor 1 to 0, blob e90813508b99 to 114356add0b3). Result: Tests 9 failed | 26 passed (35); every rewrite pin went red, and the 3 controls and the parity case stayed green as expected. Restored blob equals HEAD and git diff HEAD is empty. The test subject resolves from src, so no dist was involved. On PR #38594's gate (throwaway tree at 93f3643ea plus these commits, closure built): Tests 42 passed. With the same ablation there, the install pins fail with the gate's own 422 INVALID_METADATA flow-subflow-unknown at flows[0].nodes[1].config.flowName, which shows the gate is live in the harness. The tree was removed afterwards.",
      "gates": "Local derived set at fb44b0f29 (dispatch-gates --commands): 72 families. `--ran` with exit codes gives 69 run and 3 NOT-MEASURED, all exit 3 PREREQUISITE NOT MET: check-plugin-teardown-shape --self-test (shallow clone), check:dual-build-cjs-loads and check:lean-entry-closure (both need a full build); CI runs all three. `pnpm check:engine-double-contract` exit 0 at fb44b0f29; it was exit 1 at 5ec669b16, before the ledger rows. The 8 families newly derived by the ledger path (agent-test-spelling, bash32-floor, cli-command-ids, entry-guard, parse-guard, pnpm-filter-targets, pnpm-flag-spellings, scripts-symbol-anchors) were each run and exited 0. The other 63 families ran at 5ec669b16 and exited 0; the only change since is the ledger file. check-nul-bytes exited 0. CI check-runs on PR #38642: NOT MEASURED, because the report is due before CI converges.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 relay strokes plus 2 git pushes (git is not REST): POST /repos/objectstack-ai/objectstack/dispatches → POST /repos/objectstack-ai/objectstack/pulls (pr_create, draft, no assignees or labels, read back identical); POST dispatches → POST /repos/objectstack-ai/objectstack/issues/38595/comments (report comment 7260774080); POST dispatches → PATCH /repos/objectstack-ai/objectstack/issues/38642 (issue_patch body, 8640/8640 bytes identical); plus this updated report comment via post-stamped (POST dispatches → POST issues/38595/comments)",
      "open_questions": [
        {
          "question": "With both this PR and PR #38594 applied, a parent-first duplicatePackage refuses crm2_parent. Who closes it? (The PM has routed this to PR #38594's seat; it stays here for the record.)",
          "options": [
            "A: PR #38594's seat makes the duplicate door state copy-plan flow names (copyPlanFlowNames, the copy names the rename engine gives), as its install door already does",
            "B: this card adds it after PR #38594 lands"
          ],
          "recommendation": "A. The fix goes in that PR's duplicate leg in protocol-package-commits.ts. Its comment there says the stored rows already hold the called flow, and that stops being true once the copy's calls name the copy's flows. Measured: failed=[crm_parent: flow/crm2_parent failed author-time validation … config.flowName [flow-subflow-unknown]], and only crm2_child is written."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: engine probe only, not run through a door (planNamespaceRename, called by importUnmanagedPackage with targetNamespace and by duplicatePackage) · evidence: on tree f3028c5eb plus this branch, dashboard/crm_sales, page/crm_home and report/crm_pipeline are renamed to crm2_*, but app navigation dashboardName, pageName and reportName and a translation's dashboards, pages and reports keys keep the crm_* names. REFERENCE_SITES already lists these targets (dashboard: app.dashboardName and translation.dashboards; page: app.pageName, book.pages and translation.pages; report: app.reportName and translation.reports). One family: generalise this PR's site map from {object, flow} to every renamed target type the index answers · dedupe words: targetNamespace dashboardName, duplicatePackage pageName, rename-on-install reportName, planNamespaceRename translation dashboards",
        "class: a · reach: engine probe only · evidence: a dashboard header action {actionType:'flow', actionUrl:'crm_child'} keeps actionUrl after the copy (DashboardHeaderActionSchema spells the flow target actionUrl, not target). Same family as the line above · dedupe words: dashboard header action flow actionUrl rename",
        "carrier: PR #38594 (card #35143) · duplicatePackage under its gate refuses a parent-first copied flow once this fix lands (see open_questions[1])"
      ]
    }
  10. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmQJUGAAa5rz9Yi2DvW

    2026-11-30T01:16Z · Claim amendment for area o3-P (claim 7260158590; Writes amendment 7260805191).

    Session: the zone's thread moved to session_01ADHkmQJUGAAa5rz9Yi2DvW at the o3-P handover; it carries this claim from here.
    File surface amended: adds packages/metadata-protocol/src/protocol-package-commits.ts, limited to the duplicatePackage leg's host.saveMetaItem call and its comment. package-unmanaged-install.test.ts is no longer held by an open PR (#38594 merged as d33183a), so a stacking pin may also go there. Branch claude/issue-38595-rename-flow-refs takes a merge of main (no rebase).
    Why: PR #38594 merged, and its duplicate leg passes no copyPlanFlowNames; only the unmanaged-install leg does (protocol-package-commits.ts ~853-871 at d33183a). The landing condition on PR #38642 (L1 7261286317) therefore did not hold. The seat routed the fix to this card rather than to seat 1, because duplicatePackage is this card's door. Seat's word in its thread (2026-11-30T01:16Z): "修在 #38642 本身,这是根因修法:duplicatePackage 就是 #38595 这张卡的门". The dev first measures the stacking (a parent-first package duplicated to a new namespace, whose parent flow calls its child by the new name). It then passes copyPlanFlowNames the install leg's way only if the save gate refuses.
    Every other claim line is unchanged.

  11. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmQJUGAAa5rz9Yi2DvW
    os-dev-report

    {
      "issue": 38595,
      "status": "done",
      "branch": "claude/issue-38595-rename-flow-refs",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38642",
      "session": "session_01ADHkmQJUGAAa5rz9Yi2DvW",
      "head": "964a3267d6a7b78f2df160ee862de8271a26c8de",
      "premise_still_valid": true,
      "summary": "Merged origin/main (34daac1a30, which contains d33183ac51) into the branch as merge commit 3a7134ab63. The merge was clean, with no rebase and no force-push. Then I added a stacking test: a parent-first package (stored rows crm_parent, then crm_child) duplicated into crm2. It measured a REFUSAL at 2af21e1a6e, before the fix. duplicated.failed was verbatim [{ type: 'flow', name: 'crm_parent', error: 'flow/crm2_parent failed author-time validation: 1 issue — flows[0].nodes[1].config.flowName [flow-subflow-unknown]' }], and only crm2_child was copied. Fix (300cf74f03): the duplicatePackage leg's host.saveMetaItem call now passes copyPlanFlowNames on a flow write only, the install leg's way. Its value is rename.copyName of every flow row the same duplicate writes. A CONTROL shows the gate is still live: a copied call to a flow neither the copy nor the deployment holds (crm_ghost) is still refused flow-subflow-unknown. The changeset sentence was updated (964a3267d6), and the PR body was patched through the relay.",
      "stacking_measurement": "REFUSES at 2af21e1a6e (merge + test, no fix): duplicated.failed = [{ type: 'flow', name: 'crm_parent', error: 'flow/crm2_parent failed author-time validation: 1 issue — flows[0].nodes[1].config.flowName [flow-subflow-unknown]' }]; Tests 2 failed | 6 passed (8). With the fix 300cf74f03: failed = [], flow/crm2_child and flow/crm2_parent stored, crm2_parent calls crm2_child.",
      "tests": "Verify lock, slot issue-38595-dev. Closure build `pnpm --filter '@objectstack/metadata-protocol^...' build --concurrency=2`: VERDICT command-exit 0. Measure before the fix (card test file): VERDICT command-exit 1, Tests 2 failed | 6 passed (8). After the fix, the card pins post-merge (package-namespace-rename-flow-refs-38595.test.ts, package-namespace-rename.test.ts, package-unmanaged-install.test.ts): VERDICT command-exit 0, Test Files 3 passed (3), Tests 152 passed (152). Package at 964a3267d6: `pnpm --filter @objectstack/metadata-protocol typecheck && … exec vitest run --maxWorkers=2`: VERDICT command-exit 0, Test Files 374 passed | 9 skipped (383), Tests 23688 passed | 45 skipped (23733). Ablation after the fix commit: scripts/ablation-replace.mjs swapped `...(singular === 'flow'` for `...(false` on the new spread (anchor 1->0, blob d064b03b149a -> f110fae517f4). Result: Tests 2 failed | 6 passed (8), both new cases red. Restored: blob == HEAD, git diff HEAD empty.",
      "gates": "Local, at 964a3267d6: I ran all 77 families that `dispatch-gates --commands --repo objectstack-ai/objectstack` derives. Each exit was captured before any pipe. 75 exit 0. `pnpm check:dual-build-cjs-loads :: exit 3` and `pnpm check:lean-entry-closure :: exit 3` are PREREQUISITE NOT MET, because they need every package's dist, so they are NOT MEASURED locally and left to CI. `dispatch-gates --ran` reconciliation: 77 derived, 75 run, 2 NOT-MEASURED (derived from the recorded exit 3), 0 UNRUN, exit 0. check-nul-bytes exit 0. overlap-check --exclude-pr=38642: VERDICT clean exit 0 (origin/main, #38618, #38497 merge cleanly). CI, from the coordinator's FYI: at 3a7134ab63, run 46334158654 showed TypeScript Type Check failure (job 141571058284) and Lint & Repo Gates failure (job 141571070481). I read both logs. They were the aggregator jobs reporting `cancelled` lanes, because the run itself concluded `cancelled` when my next push (2af21e1a6e) superseded it. No gate went red on content, so no code fix was owed. At 964a3267d6, check-runs read once: TypeScript Type Check success, Lint & Repo Gates success, Test Core success, Build Core success; 39 success, 18 skipped, 2 in_progress (PR-body guards, Check Changeset, re-triggered by the body patch) — NOT MEASURED at report time.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "files_changed": [
        "packages/metadata-protocol/src/protocol-package-commits.ts (duplicatePackage leg's host.saveMetaItem call + its comment only)",
        "packages/metadata-protocol/src/package-namespace-rename-flow-refs-38595.test.ts (new describe: 2 cases)",
        ".changeset/38595-rename-flow-references.md (one sentence added)"
      ],
      "deviations": [
        "overlap-check was run once, before the PR-body patch, not before each of the four pushes (3a7134ab63, 2af21e1a6e, 300cf74f03, 964a3267d6). Its verdict at the final head is clean.",
        "After the merge I did not run spec check:generated: the branch's delta against main touches no packages/spec path, and os-regen-merge reported no os-regen path that both sides moved.",
        "test:repo was not run locally; it belongs to CI."
      ],
      "mcp_calls": "0",
      "api_writes": "2 — relay issue_patch on #38642 body (POST /repos/objectstack-ai/objectstack/dispatches → fleet-write run 46338863889, PATCH /repos/objectstack-ai/objectstack/issues/38642, read-back identical 12686 bytes); os-dev-report comment via post-stamped on #38595 (POST /repos/objectstack-ai/objectstack/issues/38595/comments). git pushes x4 to claude/issue-38595-rename-flow-refs (not REST).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat (repo:objectstack#3) · noted, not filed — the copyPlanFlowNames doc comment in packages/metadata-protocol/src/protocol-door-requests.ts still says 'duplicatePackage copies stored rows, which the gate's own read of the stored flows already holds'. That is now false, because the duplicate leg passes the field. The file is outside the amended file surface, so it was not edited. Dedupe words: copyPlanFlowNames, protocol-door-requests, duplicatePackage comment"
      ]
    }
  12. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmQJUGAAa5rz9Yi2DvW

    2026-11-30T02:11Z · Claim amendment for area o3-P (claim 7260158590; amendments 7260805191, 7266007014).

    File surface amended: adds packages/metadata-protocol/src/protocol-door-requests.ts, limited to the copyPlanFlowNames doc comment. That comment still says duplicatePackage needs no copy plan because the gate reads the stored flows. Since 300cf74 the duplicate leg passes copyPlanFlowNames, so the sentence is false, and this PR made it false. The dev reported it in os-dev-report 7266747964. Seat's word in its thread (2026-11-30T02:11Z): "这是本 PR 造成的错句,就地修,不立卡".
    Every other claim line is unchanged.

  13. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmQJUGAAa5rz9Yi2DvW
    os-dev-report

    {
      "issue": 38595,
      "status": "done",
      "branch": "claude/issue-38595-rename-flow-refs",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38642",
      "session": "session_01ADHkmQJUGAAa5rz9Yi2DvW",
      "head": "48420e0856cb35fd889d0cee976b0d6ac0b418ec",
      "premise_still_valid": true,
      "summary": "Per claim amendment 7266793287, commit 48420e0856 rewords only the copyPlanFlowNames doc comment in packages/metadata-protocol/src/protocol-door-requests.ts. It was a fast-forward on 964a3267d6. The comment now says both copy doors state the field, importUnmanagedPackage and duplicatePackage, on each flow write: the names of the flows the same copy writes, under their written names. The claim that duplicatePackage needs none is gone. No logic changed. The changeset was left alone, because it describes behaviour and a comment changes none. The PR body's acceptance note about this comment was false after the edit, so that one bullet was re-patched through the relay. The PR stays draft.",
      "tests": "Verify lock: `pnpm --filter '@objectstack/metadata-protocol^...' build --concurrency=2 && pnpm --filter @objectstack/metadata-protocol typecheck`, VERDICT command-exit 0, on the fresh worktree at 48420e0856. The package tests were not re-run, because the change is comment-only.",
      "gates": "`dispatch-gates --commands --repo objectstack-ai/objectstack packages/metadata-protocol/src/protocol-door-requests.ts` derived 48 families; I ran all of them at 48420e0856, with each exit captured before any pipe. 46 exit 0. `pnpm check:dual-build-cjs-loads :: exit 3` and `pnpm check:lean-entry-closure :: exit 3` are PREREQUISITE NOT MET (they need every package's dist), so they are NOT MEASURED and left to CI. `--ran` reconciliation: 48 derived, 46 run, 2 NOT-MEASURED, 0 UNRUN, exit 0. overlap-check --exclude-pr=38642, run before the push: VERDICT clean exit 0. The push was a fast-forward (origin tip 964a3267d6 is an ancestor). CI on 48420e0856: not read at report time, NOT MEASURED.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "files_changed": [
        "packages/metadata-protocol/src/protocol-door-requests.ts (copyPlanFlowNames doc comment only)"
      ],
      "deviations": [
        "The worktree was re-attached with `git worktree add` on the existing local branch at 964a3267d6, because dev-worktree.sh refuses an existing local branch. Nothing was reset."
      ],
      "mcp_calls": "0",
      "api_writes": "2 — relay issue_patch on the #38642 body (run 46341518336, read-back identical 12946 bytes; one acceptance-note bullet changed); this os-dev-report comment via post-stamped on #38595. 1 git push (fast-forward).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  14. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmQJUGAAa5rz9Yi2DvW

    2026-11-30T02:49Z · Claim amendment for area o3-P (claim 7260158590; amendments 7260805191, 7266007014, 7266793287).

    File surface amended: in packages/metadata-protocol/src/protocol-package-commits.ts, the surface widens from the duplicatePackage leg's host.saveMetaItem call to that leg's copy loop and its close. The unmanaged-install leg stays untouched.
    Why: L1 REWORK 7267334209 at 48420e0856. The duplicate is best-effort, but its copyPlanFlowNames names every stored flow. When a planned callee lands in failed[], the caller has already passed the gate on the plan's word, and the copy keeps a call to a flow that exists nowhere. L1 measured this parent-first.
    Route (the seat's word in its thread, 2026-11-30T02:48Z: "同意修法 3 加扩面"):

    • After the loop, every copied caller whose planned callee is in failed[] also moves to failed[], through the loop's existing undo.
    • This is transitive until nothing changes, so the callers of those callers go too. A two-level chain is pinned.
    • The changeset sentence and the copyPlanFlowNames doc comment are updated to match.
    • The dev reads whether the install leg has the same gap on partial failure and reports it as an out-of-scope finding for the seat. The install leg is not changed here.
      Every other claim line is unchanged.
  15. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmQJUGAAa5rz9Yi2DvW
    os-dev-report

    {
      "issue": 38595,
      "status": "done",
      "branch": "claude/issue-38595-rename-flow-refs",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38642",
      "session": "session_01ADHkmQJUGAAa5rz9Yi2DvW",
      "head": "712fda7a6db7ff43af8b13f9fab2e6dd16d78464",
      "premise_still_valid": true,
      "summary": "This round answers L1 REWORK 7267334209 by the route ruled in claim amendment 7267347516. Fix 28e48567ee: after the copy loop, the duplicatePackage leg closes its flow plan. Each copied flow whose subflow/map step calls a planned flow (by its copy name) that was not written is taken back out of the copy through the same undoBatchRowWrite the object settle uses. It is reported in failed[] with an error naming that callee, transitively until nothing changes. The loop reads a caller's address for that undo only when the caller calls a planned flow. The plan is one list built before the loop. The callee walk uses the spec's FLOW_REGION_SLOTS_BY_TYPE. The install leg is untouched. Commit 712fda7a6d updates the changeset sentence and the copyPlanFlowNames doc comment: the gate is told the flows the copy plans to write, and on the duplicate a caller whose planned callee failed is withdrawn with it. The PR body was patched through the relay and the PR is still draft.",
      "tests": "Card file at 712fda7a6d: Tests 10 passed (10), which covers pins (a) and (b), the success pins and the crm_ghost CONTROL. Package at 712fda7a6d under the verify lock, `pnpm --filter @objectstack/metadata-protocol typecheck && … exec vitest run --maxWorkers=2`: VERDICT command-exit 0, Test Files 374 passed | 9 skipped (383), Tests 23690 passed | 45 skipped (23735). Ablations after fix commit 28e48567ee, both with scripts/ablation-replace.mjs. Cascade off (`if (withdrawn.length === 0) break;` became `>= 0`, blob 4ca8e112244c to 6eec66471fb7): Tests 2 failed | 8 passed (10); (a) gave `expected [ 'flow/crm_child' ] to deeply equal [ 'flow/crm_child', 'flow/crm_parent' ]`, which is L1's state, and (b) gave `expected [ 'flow/crm_c' ] …`. Transitive step off (the notWritten.set line deleted, blob to 378006812f35): Tests 1 failed | 9 passed (10), only (b) red. Both restores ended with blob == HEAD and git diff HEAD empty.",
      "gates": "`dispatch-gates --commands --repo objectstack-ai/objectstack` for this round's 4 paths (protocol-package-commits.ts, the card test, protocol-door-requests.ts, the changeset) derived 69 families; I ran all of them at 712fda7a6d, with each exit captured before any pipe. 67 exit 0. `pnpm check:dual-build-cjs-loads :: exit 3` and `pnpm check:lean-entry-closure :: exit 3` are PREREQUISITE NOT MET, so they are NOT MEASURED and left to CI. `--ran` reconciliation: 69 derived, 67 run, 2 NOT-MEASURED, 0 UNRUN, exit 0. check-nul-bytes exit 0. overlap-check --exclude-pr=38642, before the push: VERDICT clean exit 0. The push was a fast-forward from 48420e0856. CI on 712fda7a6d: not read at report time, NOT MEASURED.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "files_changed": [
        "packages/metadata-protocol/src/protocol-package-commits.ts (duplicatePackage leg: plan consts above the loop, caller address reads in the loop, withdrawal close after the loop; one import line)",
        "packages/metadata-protocol/src/package-namespace-rename-flow-refs-38595.test.ts (pins a, b)",
        "packages/metadata-protocol/src/protocol-door-requests.ts (copyPlanFlowNames doc comment)",
        ".changeset/38595-rename-flow-references.md (sentence updated)"
      ],
      "deviations": [
        "Two edits in protocol-package-commits.ts sit just outside the loop and its close, though inside the duplicate leg. One is an `import { FLOW_REGION_SLOTS_BY_TYPE } from '@objectstack/spec/automation'` line. The other is the plan consts and the callee walker `plannedCalleesOf`, declared just above the loop. Both are needed by the ruled route.",
        "The callee walk mirrors the publish gate's private walkNodes over the spec's shared region table, because neither that walker nor lint's walkFlowNodes is exported to this file. It is a third copy of the traversal, not of the vocabulary."
      ],
      "mcp_calls": "0",
      "api_writes": "2 — relay issue_patch on the #38642 body (run 46347379674, read-back identical 17486 bytes, signed trailer last); this os-dev-report comment via post-stamped on #38595. 1 git push (fast-forward, 2 commits).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat · noted, not filed — importUnmanagedPackage was read without changes at 712fda7a6d. It does not have the duplicate's gap. The prepare pass refuses the whole install before the base exists if any item does not convert or rename. copyPlanFlowNames is built from `prepared`, which is exactly what the write loop writes. Any saveMetaItem throw, and any object-settle refusal, goes through rollBackUnmanagedImport, which deletes the whole new base. The only residue is a failed rollback, and that is loud: console.error, plus an answer saying the base could NOT be fully removed. Dedupe words: importUnmanagedPackage rollback, copyPlanFlowNames prepared, all-or-nothing"
      ]
    }
  16. objectstack-fleet commented on Nov 30, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-steve · session_01ADHkmQJUGAAa5rz9Yi2DvW

    2026-11-30T04:26Z · Done: PR #38642 merged as 4895661c96079fd18914927c85885d5e49d31e6c, and Fixes #38595 closed this card. pm:dispatched comes off in this stroke, and the assignee stays as the record of who carried the card. Two out-of-scope L1 notes went to the seat and were not filed here: a non-flow caller (an action target) of a withdrawn flow stays copied, and the region walker now has a third copy. The install leg was read and has no gap (it is all-or-nothing).

  17. removed
    pm:dispatched
    on Nov 30, 2026
  18. added 2 commits that reference this issue on Dec 1, 2026
    4895661
    2f8383f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:packagebugdomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions