Repository navigation
refactor(plugin-approvals): move the approval service's timing constants and run-liveness tables to their own modules - #39727
Conversation
…nts and run-liveness tables to leaf modules Move-only: the reminder/SLA constants go to approval-service/sla-constants.ts and the run-liveness, strandability and stranded-continuation declarations to approval-service/run-liveness.ts; approval-service.ts imports them and re-exports every name it exported before. Claude-Session: https://claude.ai/code/session_01L9qibwUJvVPPjkmMrE42t7 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 27 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 12 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 6 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 2a63f2d5e782f7da129e061ae18cf88f0fee692c && git checkout 2a63f2d5e782f7da129e061ae18cf88f0fee692c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6b551a061a8abe63d37fe3ce378ff17b7132709a e72994f975e2b29a955f8c2c5490283de833dedb && git checkout -B drift-repro 6b551a061a8abe63d37fe3ce378ff17b7132709a && git merge --no-ff e72994f975e2b29a955f8c2c5490283de833dedb
node scripts/docs-audit/affected-docs.mjs --json 6b551a061a8abe63d37fe3ce378ff17b7132709a
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibz12BVzo6a9hKybbEd 席位核对L1-b · 2026-12-04T15:26Z · ACCEPT · head
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvMXrDPhCt3pGziYWE Landing · 2026-12-04T15:26Z · head
State: ready + auto-merge through the merge queue. |
Requested by Tesla · project thread
Part of #38665 (PR 0a-2 of the series ordered by ruling 7310432861 and the step-1 map 7310940257: the second slice of the prelude ahead of the class. No class member moves. The rest of the prelude and the class modules follow in later PRs; the next slice is recorded on the card as a Resume-from hand-over.)
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Move-only, two leaf modules under
src/approval-service/, neither importing fromapproval-service.ts:REMIND_COOLDOWN_MS,ESCALATION_JOB_NAME,ESCALATION_SCAN_INTERVAL_MS,SLA_ACTOR_ID,ESCALATION_ENABLED_FLIP_CUTOFF_MSapproval-service/sla-constants.tsRunLiveness,RUN_STATUS_LIVENESS,TERMINAL_RUN_STATUSES,RequestStrandability,REQUEST_STATUS_STRANDABILITY,STRANDABLE_REQUEST_STATUSES,STRANDED_CONTINUATION_KEY,CONTINUATIONS_A_STATUS_CAN_ISSUE,classifyStrandedRunState,refineFailedRunState,StrandedRunState,StrandedContinuationSignal,ApprovalContinuationResult,StrandedApprovalRequestapproval-service/run-liveness.tsapproval-service.tsimports what it still uses and re-exports the 11 names it exported before (export { … }for the 7 values,export type { … }for the 4 types), so every importer is unchanged. The[#16433]comment on theExecutionStatusimport moved with the import torun-liveness.ts, the only place that now reads it.Net growth past a pure move (1,115 changed lines: +586 / −529):
run-liveness.ts+16 over its moved lines: a 7-line header comment, the 5 import lines (with the moved 2-line[#16433]comment) andexporton the file-local declarationsapproval-service.tsimports.sla-constants.ts+7: the header comment.approval-service.ts+31: the two import blocks and the two re-export blocks, minus theExecutionStatusspecifier and theConsumedSuspensionVerdictimport it no longer needs..changeset/38665-approval-service-run-liveness-module.md+10, patch on@objectstack/plugin-approvals.approval-service.ts: 15,045 → 14,547 lines against current main (09a1d7b).Tests
pnpm --filter @objectstack/plugin-approvals exec vitest run --maxWorkers=2at e72994f (after merging main with fix(approvals): name the queue or position each pending approver was expanded from #39662): 149 of 149 files, 2,443 of 2,443 tests pass. Before the merge, at cb5ff9a: 149 / 2,397 pass.pnpm --filter @objectstack/plugin-approvals typecheckexit 0 (check:test-typecheckOK).Acceptance notes
dist/index.d.tssorted line by line differs by one blank line;dist/index.js/index.mjsdiffer only in the bundler's per-file source comments and in the position of one unchanged function (approvalNotice), as the bundler now emits the two new modules first. No statement added, removed or changed.docs/qa/platform-checklist/areas/approvals.jsoncitesapproval-service.ts#ESCALATION_SCAN_INTERVAL_MS; the name is still exported from that file (re-export), andnode scripts/check-platform-checklist.mjs --changed-from origin/mainreads 20 anchors judged, 0 lost. The prose anchor is left as it is; the docs file is outside this claim's surface.Verification
Local gates at e72994f (dispatch-gates --commands, 69 derived)
node scripts/pm/dispatch-gates.mjs --ran FILE --repo objectstack-ai/objectstack: 69 derived, 69 run, 0 NOT-MEASURED, all exit 0 recorded per line.npx eslint --no-inline-configoverapproval-service.tsandapproval-service/*.ts: exit 0. Dependency closure build, typecheck and package build: exit 0 under os-verify-lock.Two-minute check:
git diff --color-moved=dimmed-zebra origin/main...HEAD -- packages/plugins/plugin-approvals/srcshows the declarations as moved blocks; what is not dimmed is the imports, the re-exports and the two header comments.Generated by Claude Code