Repository navigation
Description
repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu
Filed on the maintainer's word: split card 4 of the large-file plan.
Filing gate: ③ maintainer-directed. Source: maintainer (Warren, os-warren), os-warren's fleet project thread, 2026-11-30T01:18:13Z 「同意,立卡」 and 2026-11-30T01:18:26Z 「按照 fable的方案」, approving the large-file plan of an isolated fable analysis (measured on origin/main f5da514; prior rulings 6624258595 on #29465 and 6897467376 on #33949: a split file carries a facade ceiling, an unsplit file none, "at most a warning"; #33949 closed 11-22 with "a future split that pays for itself can be filed on its own measurement").
Grading: area:automation · Task (no behaviour change) · Suggested-grade: p2 · reach: every automation-engine card · evidence: packages/services/service-automation/src/engine.ts 12,298 lines at f5da514, 55 commits in 30 days, open PRs #38618 and #38652 on it; third in the order ruling 6897467376 set.
Blocked-by: #38618, #38652
维护者速读
- 问题:自动化引擎一个文件 1.2 万行,手上有两个 PR 同时改它。
- 做什么:等这两个 PR 合并后,按职责拆成模块,只搬不改,单独一个 PR。
- 要你做什么:拆分 PR 超过 3,000 行时需您批准。
Ask
- First the ~3,000 lines of top-level helpers ahead of the class (signals, resume, run trigger) to leaf modules.
- Then the class bodies by facet: run, resume, registration (the dev proposes the cut and names). The engine class keeps its public surface and delegates. Move-only.
plugin.ts(6,576 lines) is in scope only for helpers that move with the engine's; otherwise a later card. - Register the facade in
scripts/facade-delegation-registry.json(facades+ceilingsrows,CEILING_MARGIN100;exceptionsrows for state-owning members with reasons). - One PR (or one per step if over 3,000 lines changed). Start from main after the blockers merge.
Acceptance
- The PR body maps each moved member or helper to its new file; net growth past a pure move is itemised per file.
- Every service-automation test and the automation pins elsewhere pass unchanged; the package's public declaration is unchanged.
scripts/check-facade-delegation-only.mjsis green with the new rows;engine.tsfalls well below 2,000 lines.
Activity
objectstack-fleet commentedon Nov 30, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
Triage: lands in
packages/services/service-automation/src/engine.tsand new concern modules, move-only · area:automation · domain:services · Task · p2 · pm:blocked · size L.Rationale: split card 4 of the large-file plan, maintainer-directed (「同意,立卡」「按照 fable的方案」, 2026-11-30T01:18Z, quoted in the body); every automation-engine card queues on this file, so it takes p2. It waits on the body's
Blocked-by:line (PRs #38618 and #38652). Routed to the area:automation lane. Answers knock 7266133804.objectstack-fleet commentedon Nov 30, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
Triage: 2026-11-30T03:04Z · area corrected:
area:automation→area:workflow.area:automationis not one of the North Star's eight areas, and the automation engine (flows and approvals) isarea:workflow(North Star "Product areas"). Grade, type and state are unchanged.objectstack-fleet commentedon Nov 30, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
Triage: unlock (daily backstop) ·
pm:blocked→pm:queue· grade unchanged.Every
Blocked-by:target is done: PR #38618 and PR #38652 merged (08:09Z, 01:42Z). No assignee, no hold, same-repo targets only.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
Serialized behind an in-flight PR on the same file, 2026-12-01T03:05Z. PR #38825 (#37218, seat repo:objectstack@os-justin) edits
packages/services/service-automation/src/engine.ts(newgetRunFlowChecksum/getFlowBodyChecksum, the run checksum stamp), and this card moves that file apart. A move-only split started now would conflict with it and rebase over a moving target. Not claimed; grade unchanged.Blocked-by: #38825
Known for the split when it restarts: #38825 adds
run-flow-checksum.tsbeside the engine and two public engine members; they move with the run facet.4 remaining items
objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-justin · os-justin · session_01QSeKYka8mG8XtvFU8AvP9X
os-dev-report
{ "issue": 38667, "status": "needs_decision", "branch": "claude/issue-38667-split-automation-engine", "pr": "https://github.com/objectstack-ai/objectstack/pull/38846", "session": "session_01QSeKYka8mG8XtvFU8AvP9X", "premise_still_valid": true, "summary": "Step 1 is draft PR #38846 (Part of #38667, Tier H by size, 3,167+/2,832-): the 99 top-level declarations ahead of AutomationEngine move whole into eight leaf modules (engine-node-contract, engine-extension-contracts, engine-run-log, engine-run-trigger, engine-signals, engine-resume, engine-dispatch-store, engine-registration); engine.ts 12,445 -> 9,813 lines, every former export re-exported by name, 96 declarations byte-identical and 4 identical but for an added export. Steps 2+3 are done and pushed as the no-PR backup branch claude/issue-38667-split-automation-engine-wip (head 512d326d, built on #38846 because a stacked PR is not a supported form): the bodies of 145 members move byte for byte into static methods of eight facet classes (engine-dispatch-facet, engine-extensions-facet, engine-flow-slots-facet, engine-registration-facet, engine-connector-doors-facet, engine-enablement-facet, engine-run-facet with getFlowBodyChecksum, engine-resume-facet) behind one-call stubs and one per-engine host (engine-facet-hosts.ts, installed by a static block); AutomationEngine is registered as a facade with a ceiling (7,735 base, 7,835 max) and seven exceptions; engine.ts is 7,735 lines. needs_decision: the card's 'engine.ts falls well below 2,000 lines' cannot hold together with 'the package's public declaration is unchanged' (see open_questions); everything else in the acceptance holds on both branches. Card assignee not touched (it is os-justin, set by the dispatch).", "tests": "No test file changed on either branch. Step 1, merged head e352b160: os-verify-lock.sh -c \"pnpm --filter '@objectstack/service-automation^...' build --concurrency=2 && pnpm --filter @objectstack/service-automation typecheck && pnpm --filter @objectstack/service-automation exec vitest run --maxWorkers=2\" -> Test Files 301 passed (301), Tests 4468 passed (4468), VERDICT command-exit 0 (same counts at the first commit a431392f). Step 2, a48c377f (package source unchanged since, through wip head 512d326d): tsc --noEmit clean; vitest run -> Test Files 301 passed (301), Tests 4468 passed (4468), VERDICT command-exit 0. Move verifiers (throwaway, not committed): step 1 '100 declarations: 96 byte-identical, 4 identical but for an added export, 0 problem(s)' (99 moved + the class), negative controls in engine-signals.ts and in the class red; step 2 '145 facet methods: 145 identical to the base member (body, parameters, return type, type parameters, async; a private member's docblock), 0 problem(s)', negative control in engine-run-facet.ts reds getFlowBodyChecksum. Published declaration (dist/index.d.ts built at 6f82fd055d, at the step-1 source and at the step-2 source): 156 declarations each time, export list equal (130 names), import specifiers equal per module; 152 byte-identical including AutomationEngine (also at step 2); SysAutomationRun/SysSyncRun/SysFlowDispatch/SysFlowCredential differ only in the order the printer lists string-literal union members. Positive controls: renaming one AutomationEngine member, or one union literal, in a copy of the after-build reds the comparison. No ablation: no tested behaviour changed.", "gates": "Step 1 PR #38846 head 855804fb CI: 57 check-runs, 39 success, 18 skipped, 0 failing; required contexts Lint & Repo Gates success, TypeScript Type Check success, Test Core (1-12/12) success, Build Core success, Governed Surface Queue Guard success, Test UI success, Live E2E UI success, Dogfood Regression Gate success, Lint UI/Type Check UI/Build & E2E UI/Temporal Conformance skipped (path-scheduled); Check Changeset success, Check PR Size success. Local, step 1 (e352b160, changeset families again on 855804fb): dispatch-gates --commands derived 71; --ran '71 derived famil(ies) accounted for — 69 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'; NOT MEASURED pnpm check:dual-build-cjs-loads and pnpm check:published-readme-exports, reason: they read every workspace package's dist and only this package's closure was built; check:dispatcher-error-vocabulary red on the move, green after the row edit; check-platform-checklist --changed-from origin/main exit 0 (15 anchors judged, 0 lost) and full exit 0; spec check:liveness exit 0; overlap-check VERDICT clean exit 0. Local, wip head 512d326d: derived 101; --ran '101 derived famil(ies) accounted for — 99 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)' (the same two); check-facade-delegation-only exit 0 ('8 facade class(es) in 6 file(s) hold delegations only, 28 named exception(s)'; AutomationEngine '351 members — 273 delegations, 71 fields, 7 named exception(s)'; engine.ts 7735 lines, ceiling 7835) and --self-test exit 0 (44 cases); check-tenant-audit-census and --self-test exit 0 after the ledger rows; spec check:liveness exit 1 before the citation edit, 0 after; pnpm check:pm-dispatch-gates exit 124 under a 400 s per-gate timeout, then exit 0 run alone (446 s); overlap-check against #38846 merges cleanly. No CI exists for the wip branch (no PR).", "mcp_calls": "0", "api_writes": "2 relay strokes (objectstack-fleet[bot]): pr_create #38846 (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/38846/assignees os-justin; body read back 12471 bytes identical), and this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/38667/comments). git push is not a REST write.", "classifier_refusals": [ { "command": "rm -rf of the scratchpad gate-log directory inside a while-loop launched in the background", "reason": "built-in safety check: a shell -c script that runs rm could not be checked for dangerous removals", "mode": "cloud", "human_turn_before": "no", "resend": "passed — re-sent without the rm, into a new log directory" } ], "open_questions": [ { "question": "The card's acceptance 'engine.ts falls well below 2,000 lines' conflicts with 'the package's public declaration is unchanged' under the facade form every earlier split used (public members keep signature and docblock on the class). Measured at 6f82fd055d: public docblocks 1,774 lines, the 74 fields with docblocks 667, and the signatures of the 276 methods with one-line stubs about 1,396, i.e. about 3,840 before any wiring. Today the wip head is 7,735: besides the 145 moved members, 127 members were already delegations at the base (the #25222 per-call host-literal stubs, 83 of them, which keep their private docblocks and multi-line host literals) and the facade gate accepts them as they are. Which target holds?", "options": [ "A — Keep the facade form; drop the 2,000 target for this card; land step 2+3 as on the wip branch (7,735 lines, ceiling 7,835). Cost: none beyond review. Work: zero.", "B — A follow-up card converts the 83 per-call host-literal stubs to the built-once hosts and moves their private docblocks into their body modules (dag-traversal.ts, plugin-extension-api.ts, flow-definitions.ts and the others); estimated engine.ts about 4,000-4,500. Cost: edits existing modules outside this claim's file surface, and changes per-call field snapshots to getters (behaviour-equal only while those fields are never reassigned, which the existing host docblocks assert). Work: about one codemod day plus verification.", "C — Also move the public docblocks off the class to reach about 2,000. Cost: the published AutomationEngine declaration loses its member docs (IDE hover), contradicting 'public declaration unchanged'. Work: small, but a contract change." ], "recommendation": "A, then B as its own card if the maintainer still wants the file smaller: A delivers the move the card asked for with the public declaration provably unchanged, and B is a separate, reviewable change with its own (small) behaviour argument; C trades away the published docs for a line count." }, { "question": "Steps 2+3 cannot be opened as a PR now: they build on #38846, and a stacked series is not a supported form. After #38846 lands, the seat (or a re-dispatch) merges origin/main into claude/issue-38667-split-automation-engine-wip, or cherry-picks its five step-2 commits (a48c377f, 53a8992e, a05321e5, 7643fabd, 512d326d) onto a fresh branch from main, and opens it with 'Fixes #38667' (or 'Part of' if B is chosen). Its CI has not run.", "options": ["A — reopen the card after #38846 merges and re-dispatch the step-2 PR from the wip branch", "B — fold steps 2+3 into #38846 now (one PR, about 13,000 changed lines)"], "recommendation": "A: each PR stays reviewable and #38846 is green now." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: claude/issue-38667-split-automation-engine-wip step-2 PR body · noted, not filed: the tenant-audit census now counts two in-memory Map deletes reached through a facet host (`this.flowRefusals.delete(name)`, `this.sharedSlotTriggerWarned.delete(name)` in engine-registration-facet.ts) as engine writes placed by its `name: string` parameter rule, because it cannot read the receiver's type through `AutomationEngine['x']`; the regenerated service-automation shard shows them as 'PROVABLY NONE'. A census precision limit, not a defect in the code; class none of a/b/c.", "carrier: claim file surface · declared: step 1 edits packages/runtime/src/dispatcher-error-vocabulary.ts (one row's file path; the file ships nothing). The wip branch edits scripts/check-facade-delegation-only.mjs (DECLARED_WATCH_HINTS, which the gate's self-test holds equal to the registry), scripts/tenant-audit-census.mjs (14 UNTYPED_RECEIVERS rows, engine:false), docs/audits/2026-08-tenant-audit-write-call-sites.counts/services/service-automation.md (regenerated by --write), and packages/spec/liveness/flow.json + connector.json (10 citations re-pointed, no verdict change; spec gets a patch changeset). Each is a gate's own citation of the moved code; the precedent split declared the same kinds." ] }objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
Maintainer ruling · 2026-12-01T08:13Z · on the dev report's first open question (os-dev-report 7303542784).
Question, as put to the maintainer in seat repo:objectstack@os-justin's session: the card's acceptance "
engine.tsfalls well below 2,000 lines" cannot hold together with "the package's public declaration is unchanged" under the facade form (public docblocks and signatures alone are about 3,840 lines; 83 older per-call delegation stubs keep their private docs). Which target holds?The maintainer chose, verbatim: 「A: keep the facade (Recommended)」 — keep the facade form; drop the 2,000-line target for this card; steps 2+3 land as built (
engine.ts7,735 lines, ceiling 7,835), with the published declaration proven unchanged. Options B (a follow-up card converting the 83 per-call stubs) and C (moving public docblocks off the class) were not chosen.Seat decision on the second open question (task order, not a product question): steps 2+3 open as their own PR after PR #38846 merges, from
claude/issue-38667-split-automation-engine-wip(head512d326d) brought up to main;Fixes #38667goes on that PR. #38846 staysPart of #38667. Folding both into one ~13,000-line PR is not taken.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
Step 1 landed 2026-12-01T08:52Z: PR #38846 merged through the maintainer's queue (
Part of, so this card stays open). Steps 2+3 re-dispatched to the same cloud sessionsession_01QSeKYka8mG8XtvFU8AvP9Xby message: cherry-pick the five step-2 commits ontoclaude/issue-38667-split-automation-engine-step2from main, re-verify, and open one draft PR withFixes #38667(Tier H by size; the maintainer approves). Ruling 7305055957 (facade form, no 2,000-line target) governs.objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-justin · os-justin · session_01QSeKYka8mG8XtvFU8AvP9X
os-dev-report
{ "issue": 38667, "status": "done", "branch": "claude/issue-38667-split-automation-engine-step2", "pr": "https://github.com/objectstack-ai/objectstack/pull/38889", "session": "session_01QSeKYka8mG8XtvFU8AvP9X", "premise_still_valid": true, "summary": "Steps 2+3 are draft PR #38889 (Fixes #38667; Tier H by size, 5,369+/2,567-), built per the seat's order on a fresh branch from origin/main f3f3265d (step 1, #38846, merged) by cherry-picking the five wip commits cleanly; the step-2 files are byte-identical to the wip head 512d326d. AutomationEngine is a delegating facade: the bodies of 145 members move unedited into static methods of eight facet classes (engine-dispatch-facet, engine-extensions-facet, engine-flow-slots-facet, engine-registration-facet, engine-connector-doors-facet, engine-enablement-facet, engine-run-facet, engine-resume-facet) behind one-call stubs and a once-per-engine host (engine-facet-hosts.ts); engine.ts 9,813 -> 7,735 lines; registry facades + ceilings (7,735 at 53e745f98a, max 7,835) + 7 exceptions rows, and the DECLARED_WATCH_HINTS string. The 2,000-line target is dropped per maintainer ruling 7305055957 (A: keep the facade). One added commit on the new branch: the ceiling row's baseCommit re-pointed from the wip sha to the cherry-picked facade commit 53e745f98a (amended once under --force-with-lease after a mistyped sha; the branch had no PR and only this session's commits). Card assignee not touched.", "tests": "No test file changed. At 91b6bff6 (package source equal to head 8b19bf8b): dependency closure built (os-verify-lock VERDICT command-exit 0); pnpm --filter @objectstack/service-automation typecheck VERDICT command-exit 0; vitest run -> Test Files 301 passed (301), Tests 4468 passed (4468), VERDICT command-exit 0. Move verifier against engine.ts at main f3f3265d: '145 facet methods: 145 identical to the base member (body, parameters, return type, type parameters, async; a private member's docblock), 0 problem(s)'; negative control reds getFlowBodyChecksum. Published declaration, dist/index.d.ts built at main f3f3265d and at head (d.ts == d.cts in both): 156 declarations, export list equal (130), import specifiers equal per module, 152 byte-identical including AutomationEngine; SysAutomationRun/SysSyncRun/SysFlowDispatch/SysFlowCredential equal once string-literal union print order is set aside. Positive controls: an AutomationEngine member renamed, and getFlowBodyChecksum(flow: unknown) changed to (flow: string), in copies of the head build each red AutomationEngine. No ablation: no tested behaviour changed.", "gates": "Local at 8b19bf8b: dispatch-gates --commands derived 100; --ran '100 derived famil(ies) accounted for — 98 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'; NOT MEASURED pnpm check:dual-build-cjs-loads and pnpm check:published-readme-exports, reason: they read every workspace package's dist and only this package's closure was built. Ledgers re-checked at that head: check:facade-delegation-only exit 0 ('AutomationEngine: 351 members — 273 delegations, 71 fields, 7 named exception(s)'; engine.ts 7735 lines, ceiling 7835) and --self-test exit 0 (44 cases); check-tenant-audit-census exit 0 and --self-test exit 0; spec check:liveness exit 0; check:platform-checklist exit 0 and --changed-from origin/main exit 0 (15 anchors, 0 lost); check:pm-dispatch-gates exit 0. overlap-check: VERDICT clean exit 0 against origin/main 3c617a28ea. CI on PR #38889: not yet concluded at report time; the seat reads it (os-dev: no waiting on CI).", "mcp_calls": "0", "api_writes": "4 relay strokes in this card's run (objectstack-fleet[bot]): pr_create #38846 and its assignee leg; the first os-dev-report comment 7303542784; pr_create #38889 (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/38889/assignees os-justin; body read back 17779 bytes identical); this os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/38667/comments). git push is not a REST write.", "classifier_refusals": [], "open_questions": [ { "question": "origin/main moved 4 commits past this branch's base (spec form/view conversions, CLI) while the gates ran; none touches this PR's 17 files and overlap-check merges cleanly, so the branch was not re-merged before pr_create. Re-merge now, or let the queue's merged-tree run carry it?", "options": ["A — leave it; merge main only on a GitHub conflict, a main-caused CI red or a queue removal (multi-agent discipline §10)", "B — merge main now and re-run the package suite and derived gates"], "recommendation": "A: the overlap with this diff is zero files and the queue tests the merged tree." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: PR #38889 body · noted, not filed: through the facet host the tenant-audit census counts two in-memory map deletes (`this.flowRefusals.delete(name)`, `this.sharedSlotTriggerWarned.delete(name)` in engine-registration-facet.ts) as engine writes by its `name: string` parameter rule; the regenerated shard shows 42 write sites where it showed 40. A census precision limit through `AutomationEngine['x']`, not a code defect; class none of a/b/c.", "carrier: claim file surface · declared in PR #38889: scripts/check-facade-delegation-only.mjs (one DECLARED_WATCH_HINTS string), scripts/tenant-audit-census.mjs (14 UNTYPED_RECEIVERS rows, engine:false), docs/audits/2026-08-tenant-audit-write-call-sites.counts/services/service-automation.md (regenerated by --write), packages/spec/liveness/flow.json + connector.json (10 citations re-pointed, no verdict change; spec patch changeset). Each is a gate's own citation of the moved code.", "carrier: seat · pending deletion: the backup branch claude/issue-38667-split-automation-engine-wip (head 512d326d) is superseded by #38889 and is to be deleted once #38889 lands; the merged step-1 branch claude/issue-38667-split-automation-engine can go too." ] }objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
Maintainer ruling · 2026-12-01T11:28Z · supersedes the declaration clause of the ruling at 7305055957 (A: keep the facade).
Context, as put to the maintainer in seat repo:objectstack@os-justin's session: #38889 grows the package source by 2,642 lines past a pure move; most of it (signatures and docblocks on both sides, the 266-line host block) is the cost of keeping
AutomationEngine's published.d.tsbyte-identical. Asked what that identity is worth, the seat measured who reads the class: no customer surface does. Customers author metadata; the customer docs say "You almost never callengine.registerFlow()directly" (content/docs/automation/flows.mdx); other plugins reach the engine throughctx.getService('automation')typed as the spec's narrowIAutomationServiceorConnectorRegistrySurface(runtime, service-cluster, cloud-connection, connector-mcp, connector-rest), never as the class; the 102 import sites of@objectstack/service-automationare in this monorepo and compile with it.The maintainer, verbatim: 「我们是元数据运行引擎,客户不会调用我们的库吧?」 and then 「为什么不直接处理」.
Ruling:
AutomationEngine's published declaration is not a contract. Byte-identity ofdist/index.d.tsis no longer required of work on this package; private members and docblock placement may change. The guards are the workspace type check (every in-repo caller compiles against the change) and the spec's contracts (IAutomationService, the flow schemas), which keep their own gates.Blocked-by: #38667.Seat's note: the question that produced ruling A put "the package's public declaration is unchanged" as a fixed requirement; the seat conflated the byte-identity check (a move verifier) with a customer contract and did not measure the consumers first. That is the seat's error, recorded here.
objectstack-fleet commentedon Dec 1, 2026
repo:objectstack@os-justin · os-justin · session_01QSeKYnrQ7UMtHofKQVjcH2
Landed 2026-12-01T12:55Z: PR #38889 merged (merge commit
8338d07029), after step 1 PR #38846; this card closed by itsFixes. Delivered:AutomationEngineis a delegating facade over eight facet modules;engine.tson main is now 7735 lines (registered ceiling 7,835), behaviour unchanged (move verifier 145/145, published declaration equal). Per the maintainer's ruling 7309703845 this is the intermediate state; the target (state moved into its modules, host block and doubled signatures/docblocks retired) is #38905, unlocked in this pass together with #38875 and #38876. Superseded branchclaude/issue-38667-split-automation-engine-wip(head512d326d, no open PR) is still on origin: the seat's delete was refused by its session's command classifier; left for the maintainer or a later sweep.pm:dispatchedremoved in this stroke.refactor(service-automation): move the automation engine's top-level …
refactor(service-automation): AutomationEngine becomes a delegating f…
docs(pm-dispatch): acceptance lines checked to hold together; split c…
docs(pm-dispatch): a split card targets the state-owning form; a surf…