Skip to content

feat(OMN-13407): carry delegation context pack hash - #1299

Merged
jonahgabriel merged 2 commits into
devfrom
jonah/omn-13407-context-pack-hash-core
Jun 22, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
jonah/omn-13407-context-pack-hash-core

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds context_pack and context_pack_hash to the canonical delegation request DTO.
  • Carries context_pack_hash on the canonical task-delegated event.
  • Adds focused DTO tests for OFF/default and ON/hash cases.

Evidence

  • dod_evidence: uv run pytest tests/unit/models/delegation/wire/test_delegation_wire_models.py -q -> 82 passed.
  • dod_evidence: pre-commit run --files src/omnibase_core/models/delegation/wire/model_delegation_wire_request.py src/omnibase_core/models/delegation/wire/model_task_delegated_event.py tests/unit/models/delegation/wire/test_delegation_wire_models.py -> passed.

Known gate state

  • pre-commit run --all-files is currently red on pre-existing repository-wide validator debt outside this PR's changed files: string-id/version, manual YAML parsing, fallback patterns, hardcoded env constants, local path fixtures, exception-handling comments, and hardcoded harness topics.
  • This PR should not be considered fully merge-ready until that prerequisite gate debt is resolved or represented by the owning core gate-fix workstream.

Closeout linkage

  • Supports OMN-13407 Phase C finding from docs/evidence/2026-06-21-sea-dogfood/02-cycles/results.md: context_pack_hash absent from delegation request/projection, first failing layer context-assembly.

Summary by CodeRabbit

  • New Features
    • Model delegation requests now support context pack injection with stable hash tracking for improved context identification.
    • Task delegation events now include context pack hash identifiers to enable comprehensive tracking of injected context throughout the delegation lifecycle.

Evidence-Source: OCC#2897
Evidence-Ticket: OMN-13407

@coderabbitai

coderabbitai Bot commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Two delegation wire model classes gain new optional context_pack and/or context_pack_hash string fields (all defaulting to ""). ModelDelegationRequest receives both fields; ModelTaskDelegatedEvent receives context_pack_hash only. Unit tests cover the empty-string defaults and explicit value preservation for both models.

Changes

Context pack fields on delegation wire models

Layer / File(s) Summary
context_pack fields on ModelDelegationRequest and ModelTaskDelegatedEvent
src/omnibase_core/models/delegation/wire/model_delegation_wire_request.py, src/omnibase_core/models/delegation/wire/model_task_delegated_event.py
ModelDelegationRequest gains context_pack: str and context_pack_hash: str (both default ""). ModelTaskDelegatedEvent gains context_pack_hash: str (default ""), with docs indicating empty string means no context pack injected.
Unit tests for defaults and round-trip
tests/unit/models/delegation/wire/test_delegation_wire_models.py
TestModelDelegationRequest asserts context_pack_hash defaults to "" and that an explicit context_pack/context_pack_hash pair survives construction. TestModelTaskDelegatedEvent asserts the default "" and that a supplied sha256:ctx hash is preserved on the event DTO.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Two little fields hopped into the wire,
A pack and its hash, neat strings to admire.
Empty by default — no context? That's fine!
Set them with sha256: and they'll shine,
The tests all agree, every assertion in line. 🌿

🚥 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
Title check ✅ Passed The title clearly and specifically describes the main change: adding support for carrying delegation context pack hash through the workflow.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-13407-context-pack-hash-core

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

@jonahgabriel
jonahgabriel enabled auto-merge June 22, 2026 05:16
@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 22, 2026
Merged via the queue into dev with commit 1c41220 Jun 22, 2026
104 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-13407-context-pack-hash-core branch June 22, 2026 05:43
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.

1 participant