Skip to content

feat: operate lifecycle automation from admin consoles - #1563

Merged
kang-heewon merged 4 commits into
trunkfrom
issue-1547-lifecycle-operations
Jul 26, 2026
Merged

feat: operate lifecycle automation from admin consoles#1563
kang-heewon merged 4 commits into
trunkfrom
issue-1547-lifecycle-operations

Conversation

@kang-heewon

@kang-heewon kang-heewon commented Jul 26, 2026

Copy link
Copy Markdown
Member

Outcome

@croco/admin-react now exposes React-independent lifecycle operation contracts and accessible console primitives for exact rule/version inspection, semantic descriptor comparison, audited activation and pause/resume/supersede transitions, redacted dry runs, run diagnosis, and safe recovery links.

Rule operations require permission, actor, reason, idempotency, optimistic revision, and descriptor fingerprint evidence. Stale descriptors fail explicitly, idempotent replay remains valid, partial providers preserve stable Problems, browser-visible evidence excludes raw errors and idempotency keys, and retry controls appear only for recovery contracts declared safe.

The generated SaaS admin console now demonstrates activate, redacted dry-run, production match, cooldown suppression, pause, paused evaluation, and resume through a browser-safe in-memory adapter without browser-authored lifecycle code.

Fixes #1547

Verification

  • pnpm check — repository profile passed; 22/23 gates passed and one was not applicable
  • Pre-push workspace tests — 226/226 tasks passed
  • Pre-push workspace typecheck — 225/225 tasks passed
  • pnpm build — 114/114 tasks passed
  • pnpm --filter @croco/admin-react test — 50/50 tests passed
  • create-croco-app focused tests — 14/14 passed
  • generated admin-console smoke — lint, test, typecheck, production build, contract/codegen verification, RPC client, and DI graph checks passed
  • pnpm docs:api:check — 112/112 tasks; 3,847 pages; generated docs matched
  • public API, Problem registry, package manifests, dependency boundaries, changeset-required, release docs, and CI executable policy checks passed

Review gates

  • Correctness and regression: PASS — coverage includes all lifecycle outcomes, descriptor invalidation and TOCTOU conflicts, idempotent replay, filter-before-limit, dry-run no-side-effects and invocation failure, partial fixture/link failures, and retryable action evidence.
  • API, security, compatibility, and release: PASS — explicit AdminAction fields, stable Problems, redacted browser contracts, inert unavailable controls, public snapshots, generated API docs, Problem registry artifacts, lockfile, README, and minor changesets are synchronized.
  • Maintainability and minimality: PASS — state/source contracts remain React-independent, lifecycle execution stays behind existing lifecycle/admin-ops boundaries, and the generated browser demo uses a local adapter rather than importing Node-only runtime code.
  • Independent adversarial review: APPROVE after resolving stale-intent mapping, filter ordering, dry-run failure state, partial provider failures, evidence redaction, disabled controls, and generated browser sequence findings.

Residual risk

The generated admin console intentionally uses an in-memory demonstration adapter. Production applications must provide their own authorized source adapter and durable lifecycle/admin-ops backends; the browser surface never accepts authored predicates or executable action code.

Summary by CodeRabbit

  • 새로운 기능
    • 라이프사이클 자동화 콘솔을 추가해 규칙 조회·변경 비교, 드라이런 결과/증거, 실행 이력, 복구 작업을 한곳에서 확인할 수 있습니다.
    • 로딩/권한 부족/빈 상태/문제(부분 실패 포함)를 명확히 안내하며, 민감한 원문 노출은 제한합니다.
    • 생성되는 관리자 콘솔에 라이프사이클 자동화 데모가 포함됩니다.
  • 문서
    • 콘솔 관련 API 문서와 라이프사이클 문제 코드/복구 가이드를 확장했습니다.
  • 테스트
    • 콘솔 렌더링/상태 분기 및 민감 정보 노출 방지 시나리오를 보강했습니다.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kang-heewon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 11c40dbf-4b84-4bf2-be8e-766ecee4f9c3

📥 Commits

Reviewing files that changed from the base of the PR and between 47f561a and 0798a54.

⛔ Files ignored due to path filters (2)
  • packages/problems-core/src/generated/problem-code-registry.ts is excluded by !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (54)
  • .changeset/lifecycle-automation-console.md
  • docs/problem-code-registry.json
  • packages/admin-react/README.md
  • packages/admin-react/package.json
  • packages/admin-react/src/index.ts
  • packages/admin-react/src/libs/LifecycleAutomationConsole.ts
  • packages/admin-react/src/libs/lifecycleAutomation.ts
  • packages/admin-react/src/tests/LifecycleAutomationConsole.spec.ts
  • packages/admin-react/tsconfig.json
  • packages/admin-react/vitest.config.ts
  • packages/create-croco-app/src/helpers/croco-ranges.ts
  • packages/create-croco-app/src/tests/e2e-generation.spec.ts
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/admin-console/README.md.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/package.json.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/src/App.tsx.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/src/LifecycleAutomationDemo.tsx
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleAutomationConsole.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleDryRunPanel.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleRuleOperations.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleRunHistory.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/classifyLifecycleRun.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/createLifecycleAutomationLoadingState.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/createLifecycleAutomationSource.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/diffLifecycleRuleDescriptors.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/loadLifecycleAutomationConsole.md
  • packages/docs/src/content/docs/api/admin-react/src/interfaces/LifecycleAutomationSource.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationConsoleProps.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationConsoleState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationEmptyState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationLoadingState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationPermissionDeniedState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationReadyState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationSourceOptions.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDescriptorDiff.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunFixture.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunFixtureDescriptor.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunRequest.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunResponse.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleOperationsProblem.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleActionInput.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleActionResult.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleAdminAction.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleOperation.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunActionEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunFilters.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunOperation.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunOutcome.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LoadLifecycleAutomationOptions.md
  • packages/docs/src/content/docs/api/problems-core/src/variables/CROCO_PROBLEM_CODE_REGISTRY.md
  • packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md
  • public-api-surface.snapshot.json
📝 Walkthrough

Walkthrough

Lifecycle automation을 위한 Admin React 상태 모델, source, 규칙·run·dry-run 콘솔, 생성형 admin console 데모, 테스트, API 문서, Problem 레지스트리와 공개 export가 추가되었습니다.

Changes

Lifecycle automation console

Layer / File(s) Summary
Lifecycle contracts and source orchestration
packages/admin-react/src/libs/lifecycleAutomation.ts, packages/admin-react/src/index.ts, packages/admin-react/package.json, packages/admin-react/tsconfig.json, packages/admin-react/vitest.config.ts, public-api-surface.snapshot.json
Lifecycle 상태·요청·응답 타입, source 메서드, descriptor diff, run 분류, 필터링, 권한·revision·idempotency 검증, dry-run 처리와 병렬 state 로딩을 추가했습니다.
Console UI and behavior validation
packages/admin-react/src/libs/LifecycleAutomationConsole.ts, packages/admin-react/src/tests/LifecycleAutomationConsole.spec.ts, packages/admin-react/README.md
규칙 작업, dry-run evidence, run history, recovery 표시와 상태별 렌더링을 추가하고 실패·redaction·cooldown·replay·필터 동작을 검증했습니다.
Generated admin console demo
packages/create-croco-app/templates/admin-console/..., packages/create-croco-app/src/helpers/croco-ranges.ts, packages/create-croco-app/src/tests/*
생성 템플릿에 in-memory lifecycle source와 activate·pause·resume·dry-run·cooldown·실패 run·audit evidence 데모를 추가하고 생성 검증을 확장했습니다.
Problem registry, documentation, and release metadata
docs/problem-code-registry.json, packages/docs/src/content/docs/api/admin-react/src/**/*, packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md, .changeset/lifecycle-automation-console.md
Lifecycle API 문서, ADMIN_LIFECYCLE_DEMO_INVARIANT Problem 정의, README 설명과 package version bump metadata를 추가했습니다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant LifecycleAutomationConsole
  participant LifecycleAutomationSource
  participant Registry
  participant RunStore
  participant Evaluator
  Operator->>LifecycleAutomationConsole: inspect rules and select operation
  LifecycleAutomationConsole->>LifecycleAutomationSource: load console state
  LifecycleAutomationSource->>Registry: inspect or execute rule action
  LifecycleAutomationSource->>RunStore: list filtered runs
  LifecycleAutomationSource->>Evaluator: evaluate dry-run fixture
  LifecycleAutomationSource-->>LifecycleAutomationConsole: rules, evidence, runs, and Problems
  LifecycleAutomationConsole-->>Operator: render diagnostics and audited controls
Loading

Possibly related issues

  • croco-dev/framework#1537 — lifecycle automation console, dry-run, rule operations와 run inspection의 상위 범위와 연결됩니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 관리자 콘솔에서 라이프사이클 자동화를 운영하는 핵심 변경을 간결하게 요약합니다.
Linked Issues check ✅ Passed 규칙/런 조회, 드라이런, 권한·상태 처리, 안전한 복구, 테스트·문서·스냅샷까지 요구 범위를 전반적으로 충족합니다.
Out of Scope Changes check ✅ Passed 변경은 새 라이프사이클 콘솔과 연관된 문서, 템플릿, 테스트, 스냅샷 보강에 한정되어 보입니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-1547-lifecycle-operations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 9.6μs 30.0ms 8.2μs +17.1% -
CrocoApp lambdaHandler (10 controllers) 323.7μs 50.0ms 258.4μs +25.3% -
Lambda cold-start simulation 483.2μs 80.0ms 418.1μs +15.6% -
Lambda cold-start with headers 375.1μs 80.0ms 369.7μs +1.5% -
Lambda cold-start with binary body 353.2μs 80.0ms 339.1μs +4.1% -
Lambda cold-start with query params 293.6μs 80.0ms 301.3μs -2.6% -
Lambda cold-start with authorizer context 292.3μs 80.0ms 299.8μs -2.5% -
Lambda cold-start realistic scenario 290.0μs 80.0ms 299.2μs -3.1% -
EventBusConfig.start (10 handlers) 1.7μs 10.0ms 1.4μs +18.1% -
EventPublisher.publishNow single event 1.9μs 2.0ms 1.7μs +14.9% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs +0.0% -
Container.get singleton (cold) 61.4μs 5.0ms 70.3μs -12.6% -
Container.register × 50 components 3.2ms 10.0ms 3.2ms -2.4% -
Container.validate (50 components) 3.6ms 20.0ms 3.4ms +5.9% -
Container.get singleton (warm) 1.6μs 500.0μs 1.6μs -1.9% -
TelemetryRuntime.init (lambda preset) 2.4μs 200.0ms 1.1ms -99.8% -
lambdaPreset config creation 1.5μs 2.0ms 1.4μs +2.1% -

Updated: 2026-07-26T12:27:26.282Z · Commit: 06b113b

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/create-croco-app/templates/admin-console/README.md.hbs (1)

31-36: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Recovery States 섹션에 lifecycle 복구 상태가 누락되었습니다.

Primary Workflow(25줄)와 Structure(58줄)에는 lifecycle automation이 추가되었지만, Recovery States는 여전히 API unavailable / Missing user / Contract drift / DI graph drift만 다룹니다. 이 PR이 다루는 stale descriptor(admin-react/lifecycle-action-intent-stale), permission-denied, cooldown suppression, dry-run 실패, retryable failure 상태가 생성 앱 문서에 설명되지 않아 사용자가 콘솔에서 본 Problem code의 복구 경로를 찾을 수 없습니다.

📝 제안 추가
 - DI graph drift: 의도적으로 갱신할 때 `pnpm di:graph`를 실행합니다. `pnpm di:verify`는 기존 `.croco/build/di-graph.manifest.json`과 Project Map 산출물을 변경하지 않은 채 검사하고 `croco doctor --json`을 실행합니다.
+- Lifecycle stale descriptor: descriptor fingerprint나 revision이 바뀌면 `admin-react/lifecycle-action-intent-stale`이 반환됩니다. 콘솔을 새로고침해 현재 version을 검토한 뒤 다시 실행합니다.
+- Lifecycle permission denied: `lifecycle:read` / `lifecycle:write` / `lifecycle:dry-run` 권한이 없으면 각 Problem code와 함께 필요한 권한이 표시되며 액션 컨트롤은 노출되지 않습니다.
+- Lifecycle cooldown suppression: cooldown 구간의 signal은 `suppressed-cooldown` outcome으로 run history에 남고 action은 dispatch되지 않습니다.
+- Lifecycle retryable failure: recovery 계약이 replay/retry를 허용하는 run에만 재시도 컨트롤이 표시되고, admin-ops recovery evidence로 연결됩니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/create-croco-app/templates/admin-console/README.md.hbs` around lines
31 - 36, Update the Recovery States section in the README template to document
lifecycle automation recovery paths alongside the existing states. Cover stale
descriptor (`admin-react/lifecycle-action-intent-stale`), permission-denied,
cooldown suppression, dry-run failure, and retryable failure, including the
corresponding user-visible Problem codes and recovery actions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/admin-react/README.md`:
- Around line 55-59: Update the dry-run documentation in the README to replace
the non-exported LifecycleDryRunResult type with the exported
LifecycleDryRunEvidence type, including references describing the evidence
returned by the dry-run method. Keep LifecycleDryRunResponse for the enclosing
response type where applicable.

In `@packages/admin-react/src/libs/lifecycleAutomation.ts`:
- Around line 420-436: Combine findRecovery and findRecoveryItem so the
items.find lookup for run.id occurs only once per run. Reuse the resulting
recoveryItem in buildRunOperation to derive the allowed retry/replay recovery
action, preserving the existing undefined behavior when no matching item or
action exists.
- Around line 519-526: Update listRuns to pass filters.limit through the
options.runStore.list call alongside tenantId and ruleId, then remove the
redundant in-memory slice while preserving matchesRunFilters processing and the
readonly LifecycleRun[] return behavior.
- Around line 646-667: Separate the parsePastedContext call in the dry-run flow
from the evaluator.dryRun catch-all so parsing failures return an invalid
response with a dedicated problem code. Register that new problem code in the
problem-code registry, while preserving safeFailure("dry-run") for evaluator or
other dry-run failures.

In `@packages/admin-react/src/libs/LifecycleAutomationConsole.ts`:
- Around line 223-231: Update the Cooldown column rendering in the operation run
display so the operation.run.status === "skipped" fallback uses a clear,
user-facing label describing that it was skipped for a reason other than
cooldown, replacing "not the suppression reason". Preserve the existing
"suppressed" label for cooldown_active and "passed" label for other outcomes.

In `@packages/admin-react/vitest.config.ts`:
- Around line 8-12: Update the resolve.alias configuration in vitest.config.ts
to add `@croco/lifecycle-core` mapped to the package’s source entry point,
alongside the existing `@croco/problems-core` alias. Ensure
LifecycleAutomationConsole.spec.ts resolves runtime imports from source without
relying on workspace dist builds.

In `@packages/create-croco-app/src/tests/templates-build.spec.ts`:
- Around line 406-410: Strengthen the LifecycleAutomationDemo.tsx assertion in
the templates build test by replacing the generic /DryRunFixture/ check with a
demo-specific fixture identifier such as “at-risk-tenant” or “paused-signal”.
Keep the validation focused on confirming that the dry-run fixture is actually
defined and consumed.

In
`@packages/create-croco-app/templates/admin-console/apps/console-web/src/App.tsx.hbs`:
- Around line 319-320: Update LifecycleAutomationDemo and its usage in App so it
receives the selected tenantId and uses that prop instead of the hardcoded
tenant_acme value for lifecycle data and display. Pass selectedTenantId from the
top-level tenant selector, preserving the existing TenantWorkspaceDemo scoping
behavior.

In
`@packages/create-croco-app/templates/admin-console/apps/console-web/src/LifecycleAutomationDemo.tsx`:
- Around line 541-546: Update audit evidence entries in the setAuditEvidence
flow to include a stable unique identifier alongside the display text, avoiding
duplicate React keys for repeated failure results without relying on array
indexes. Apply the same entry shape to the auditEvidence initial value created
by createDemoRuntime, and update consumers to use the identifier as the React
key while preserving the existing success and failure text.
- Line 315: Update the source construction around Object.assign so its inferred
return type is used directly. Remove the narrow LifecycleAutomationSource
declaration and the subsequent as GeneratedLifecycleSource cast, while
preserving the attached methods and resulting behavior.
- Around line 514-527: Handle rejected promises from createDemoRuntime/loadState
in the useEffect and from the runAction/runDryRun void calls by capturing
failures in the component’s failure state instead of leaving loading unresolved.
Surface failure in the render tree with role="alert", while preserving
successful state updates and cleanup behavior.
- Around line 155-186: Align the demo recovery item’s retryability with its
replay action in the items construction: if the demo intends to show replay as
permitted, change the failed item’s retryable state to true; otherwise set the
replay action’s allowed state to false. Ensure LifecycleAutomationDemo
consistently demonstrates that retry controls appear only when recovery is
allowed.

---

Outside diff comments:
In `@packages/create-croco-app/templates/admin-console/README.md.hbs`:
- Around line 31-36: Update the Recovery States section in the README template
to document lifecycle automation recovery paths alongside the existing states.
Cover stale descriptor (`admin-react/lifecycle-action-intent-stale`),
permission-denied, cooldown suppression, dry-run failure, and retryable failure,
including the corresponding user-visible Problem codes and recovery actions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4f5ff386-8739-4f7c-8625-116b88a9269f

📥 Commits

Reviewing files that changed from the base of the PR and between a7df589 and 8d930b4.

⛔ Files ignored due to path filters (2)
  • packages/problems-core/src/generated/problem-code-registry.ts is excluded by !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (53)
  • .changeset/lifecycle-automation-console.md
  • docs/problem-code-registry.json
  • packages/admin-react/README.md
  • packages/admin-react/package.json
  • packages/admin-react/src/index.ts
  • packages/admin-react/src/libs/LifecycleAutomationConsole.ts
  • packages/admin-react/src/libs/lifecycleAutomation.ts
  • packages/admin-react/src/tests/LifecycleAutomationConsole.spec.ts
  • packages/admin-react/tsconfig.json
  • packages/admin-react/vitest.config.ts
  • packages/create-croco-app/src/helpers/croco-ranges.ts
  • packages/create-croco-app/src/tests/e2e-generation.spec.ts
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/admin-console/README.md.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/package.json.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/src/App.tsx.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/src/LifecycleAutomationDemo.tsx
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleAutomationConsole.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleDryRunPanel.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleRuleOperations.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleRunHistory.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/classifyLifecycleRun.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/createLifecycleAutomationLoadingState.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/createLifecycleAutomationSource.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/diffLifecycleRuleDescriptors.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/loadLifecycleAutomationConsole.md
  • packages/docs/src/content/docs/api/admin-react/src/interfaces/LifecycleAutomationSource.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationConsoleProps.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationConsoleState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationEmptyState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationLoadingState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationPermissionDeniedState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationReadyState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationSourceOptions.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDescriptorDiff.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunFixture.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunFixtureDescriptor.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunRequest.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunResponse.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleOperationsProblem.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleActionInput.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleActionResult.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleAdminAction.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleOperation.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunActionEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunFilters.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunOperation.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunOutcome.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LoadLifecycleAutomationOptions.md
  • packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md
  • public-api-surface.snapshot.json

Comment thread packages/admin-react/README.md
Comment thread packages/admin-react/src/libs/lifecycleAutomation.ts Outdated
Comment thread packages/admin-react/src/libs/lifecycleAutomation.ts
Comment thread packages/admin-react/src/libs/lifecycleAutomation.ts
Comment thread packages/admin-react/src/libs/LifecycleAutomationConsole.ts
@kang-heewon
kang-heewon force-pushed the issue-1547-lifecycle-operations branch 2 times, most recently from 8f1c7c6 to a875c41 Compare July 26, 2026 09:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/admin-react/src/libs/LifecycleAutomationConsole.ts`:
- Around line 350-396: Extend the empty-state model used by
LifecycleAutomationConsole to carry dryRun results, then render the same
LifecycleDryRunPanel or alert output for empty states as for ready states.
Update the dry-run result conditional around state.kind === "ready" so
empty-state executions remain visible, while preserving existing fixture and
run-history behavior.
- Around line 180-193: Update the first cell rendered in the runs.map row within
LifecycleAutomationConsole to use a th element with scope="row" instead of td,
while preserving the existing Run ID link and fallback content.

In `@packages/admin-react/src/tests/LifecycleAutomationConsole.spec.ts`:
- Around line 423-470: Extend the lifecycle automation console tests around the
existing recovery-action fixture to cover an item with allowed: false or no
recoveryActions. Assert that the recovery/replay control is not rendered and
that the “Not declared safe” fallback text appears, while preserving the
existing allowed: true assertions.
- Around line 367-393: Extend the test “distinguishes invalid pasted context
from evaluator availability failures” to also stub the evaluator used by dryRun
to throw, then invoke dryRun with valid pasted context and assert the separate
evaluator-failure result: kind "problem" with the safeFailure("dry-run") output.
Keep the existing invalid pasted-context assertions and privacy checks
unchanged.

In `@packages/create-croco-app/templates/admin-console/README.md.hbs`:
- Line 40: Update the lifecycle dry-run failure documentation in the README
template to remove the unsupported pasted-context error, or explicitly identify
it as a framework-level contract rather than a generated-demo scenario. Keep the
documented fixture-not-found behavior and the statement that dry runs do not
consume production actions or cooldowns.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 088e8797-02fe-4f95-9f49-9e7183bdf43e

📥 Commits

Reviewing files that changed from the base of the PR and between 8d930b4 and a875c41.

⛔ Files ignored due to path filters (2)
  • packages/problems-core/src/generated/problem-code-registry.ts is excluded by !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (53)
  • .changeset/lifecycle-automation-console.md
  • docs/problem-code-registry.json
  • packages/admin-react/README.md
  • packages/admin-react/package.json
  • packages/admin-react/src/index.ts
  • packages/admin-react/src/libs/LifecycleAutomationConsole.ts
  • packages/admin-react/src/libs/lifecycleAutomation.ts
  • packages/admin-react/src/tests/LifecycleAutomationConsole.spec.ts
  • packages/admin-react/tsconfig.json
  • packages/admin-react/vitest.config.ts
  • packages/create-croco-app/src/helpers/croco-ranges.ts
  • packages/create-croco-app/src/tests/e2e-generation.spec.ts
  • packages/create-croco-app/src/tests/templates-build.spec.ts
  • packages/create-croco-app/templates/admin-console/README.md.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/package.json.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/src/App.tsx.hbs
  • packages/create-croco-app/templates/admin-console/apps/console-web/src/LifecycleAutomationDemo.tsx
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleAutomationConsole.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleDryRunPanel.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleRuleOperations.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/LifecycleRunHistory.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/classifyLifecycleRun.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/createLifecycleAutomationLoadingState.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/createLifecycleAutomationSource.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/diffLifecycleRuleDescriptors.md
  • packages/docs/src/content/docs/api/admin-react/src/functions/loadLifecycleAutomationConsole.md
  • packages/docs/src/content/docs/api/admin-react/src/interfaces/LifecycleAutomationSource.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationConsoleProps.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationConsoleState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationEmptyState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationLoadingState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationPermissionDeniedState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationReadyState.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleAutomationSourceOptions.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDescriptorDiff.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunFixture.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunFixtureDescriptor.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunRequest.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleDryRunResponse.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleOperationsProblem.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleActionInput.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleActionResult.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleAdminAction.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRuleOperation.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunActionEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunEvidence.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunFilters.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunOperation.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LifecycleRunOutcome.md
  • packages/docs/src/content/docs/api/admin-react/src/type-aliases/LoadLifecycleAutomationOptions.md
  • packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md
  • public-api-surface.snapshot.json

Comment thread packages/admin-react/src/libs/LifecycleAutomationConsole.ts
Comment thread packages/admin-react/src/libs/LifecycleAutomationConsole.ts
Comment thread packages/admin-react/src/tests/LifecycleAutomationConsole.spec.ts
Comment thread packages/admin-react/src/tests/LifecycleAutomationConsole.spec.ts
Comment thread packages/create-croco-app/templates/admin-console/README.md.hbs Outdated
@kang-heewon
kang-heewon force-pushed the issue-1547-lifecycle-operations branch from 47f561a to 0798a54 Compare July 26, 2026 12:18
@kang-heewon
kang-heewon merged commit 3d9e585 into trunk Jul 26, 2026
15 of 16 checks passed
@kang-heewon
kang-heewon deleted the issue-1547-lifecycle-operations branch July 26, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[admin-react] Add lifecycle automation operations and dry-run console

1 participant