Repository navigation
feat(OMN-9743): add HookActivationResolver — package-driven hook bitmask - #1536
Conversation
Implements HookActivationResolver in omnibase_infra/hooks/ that accepts a list[ModelHookActivation] and computes a composite bitmask from all enabled_by_default activations. Lenient rollout-safety policy: unresolvable activations log a warning and are skipped rather than crashing runtime. Track 1 Task 4 of omniclaude restructure plan (parent OMN-9737).
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Evidence
Evidence-Source: OCC#818
Evidence-Ticket: OMN-9743
Summary
Implements
HookActivationResolverinomnibase_infra/hooks/— Track 1 Task 4 of the omniclaude restructure plan (parent epic OMN-9737).src/omnibase_infra/hooks/hook_activation_resolver.py— resolves alist[ModelHookActivation]from omnibase_core into a composite bitmask, setting bits only forenabled_by_default=TrueactivationsContext
Depends on
ModelHookActivation(omnibase_core, already present) andModelPackageHookActivations(omnibase_core PR: feat(OMN-9743): add ModelPackageHookActivations). This resolver is the compositing engine that turns per-packagehook_activations.yamldeclarations into theONEX_HOOKS_MASKbitmask used byEnumHookBit.hook_enabled().The broad
Exceptioncatch uses# noqa: BLE001per plan spec: lenient rollout-safety policy means partial mask (skipping bad entries) is safer than crashing runtime on malformed activation declarations.Test plan
uv run pytest tests/unit/hooks/test_hook_activation_resolver.py -v— 4 passeduv run mypy src/omnibase_infra/hooks/hook_activation_resolver.py --strict— no issuespre-commit run --all-files— all hooks passedHookActivationResolver([ModelHookActivation(hook_bit=CI_REMINDER, enabled_by_default=True)]).compute_mask()returns mask withCI_REMINDERbit setenabled_by_default=Falseactivations do NOT set bits0