Files
openclaw/qa/scenarios/runtime/hook-lifecycle-contracts.yaml
2026-08-04 03:22:42 +08:00

35 lines
1.4 KiB
YAML

title: Internal hook lifecycle contracts
scenario:
id: hook-lifecycle-contracts
surface: automation
category: automation.automation-hooks
coverage:
primary:
- automation.hook-md-authoring
- automation.hook-discovery
- automation.hook-cli-management
- automation.hook-packs
- automation.lifecycle-event-dispatch
objective: Verify an authored internal hook pack crosses archive installation, discovery, CLI management, and lifecycle dispatch boundaries.
successCriteria:
- A local hook-pack archive containing a real HOOK.md installs into isolated managed state.
- Production discovery reads the authored metadata and resolves the managed hook.
- The real hooks CLI disables and enables the discovered hook in isolated config.
- A disabled hook does not register or receive the Gateway startup lifecycle event.
- The enabled discovered hook receives the Gateway startup event and records its marker.
docsRefs:
- docs/automation/hooks.md
- docs/cli/hooks.md
codeRefs:
- src/hooks/install.ts
- src/hooks/workspace.ts
- src/cli/hooks-cli.ts
- src/hooks/loader.ts
- src/hooks/internal-hooks.ts
- src/hooks/hooks-lifecycle.e2e.test.ts
execution:
kind: vitest
path: src/hooks/hooks-lifecycle.e2e.test.ts
summary: Run the isolated archive-to-discovery-to-CLI-to-Gateway-startup internal hook lifecycle.