Skip to content

feat(OMN-12795): guidance section parser + provenance fields on ModelContextPackArtifact - #1098

Merged
jonahgabriel merged 2 commits into
devfrom
jonah/omn-12795-p2-chunk-parser
Jun 7, 2026
Merged

jonahgabriel merged 2 commits into
devfrom
jonah/omn-12795-p2-chunk-parser

Conversation

@jonahgabriel

@jonahgabriel jonahgabriel commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Extends `ModelContextPackArtifact` with four optional provenance fields: `source_file`, `heading_path`, `char_count`, `reason_selected`. All existing callers remain valid — new fields default to `None`.
  • Adds `GuidanceSectionParser` (`parsers/parser_guidance_section.py`) — a pure COMPUTE-eligible parser that splits guidance file text at ATX heading boundaries into typed `ParsedSection` objects, each convertible to a `ModelContextPackArtifact` via `to_artifact()`. Zero filesystem I/O: callers (EFFECTs) supply the raw string.
  • 16 new unit tests cover heading parsing, nesting, provenance field storage, `to_artifact()` round-trip, and hash stability.
  • OCC contract at `docs/work-tracking/contracts/OMN-12795.yaml`.

Evidence

  • Tests: 16 new pass, full suite 6330 passed 0 failed (`-m "not kafka"`)
  • mypy --strict on changed module: 0 issues (12 source files)
  • ruff: all checks passed
  • pre-commit: all hooks pass
  • No filesystem I/O in parser: import-level grep confirmed (hashlib, re, dataclasses only)
  • No deploy required: additive only — new optional model fields + pure COMPUTE parser, no node wiring, no bus topics, no container rebuild

Evidence-Source: OCC#2311
Evidence-Ticket: OMN-12795

Deployment

Additive only — no deploy, no shared-pin bump, no main promotion. Per plan §P2 parallelisation rules: feature→dev, no lane deploy until coordinated deploy.

Test plan

  • `uv run pytest tests/nodes/node_context_pack_builder_compute/test_guidance_section_parser.py -v`
  • `uv run pytest tests/ --tb=short -m "not kafka" -q`
  • `uv run mypy src/omnimarket/nodes/node_context_pack_builder_compute/ --strict`
  • `pre-commit run --all-files`
  • Verify `gh pr checks` green

…odelContextPackArtifact

Extends ModelContextPackArtifact with four optional provenance fields
(source_file, heading_path, char_count, reason_selected) that section-parsed
guidance artifacts populate; all existing callers remain valid (fields default
to None).

Adds omnimarket.nodes.node_context_pack_builder_compute.parsers.parser_guidance_section
— a pure COMPUTE-eligible GuidanceSectionParser that splits guidance file text at
ATX heading boundaries into typed ParsedSection objects, each convertible to a
ModelContextPackArtifact via to_artifact(). Zero filesystem I/O: the caller
(EFFECT side) supplies raw text; the parser returns deterministic output.

16 new unit tests cover heading parsing, nesting, provenance field storage,
to_artifact() round-trip, and hash stability. Full suite: 6330 passed, 0 failed.
mypy --strict: 0 issues. All pre-commit hooks pass.
@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@jonahgabriel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 50 minutes and 28 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dcd5d3d3-afe4-4a33-92e2-a1aa736aef61

📥 Commits

Reviewing files that changed from the base of the PR and between 7704a68 and 07b0681.

📒 Files selected for processing (9)
  • docs/evidence/dep-health-sweep/proof-of-life-001/findings.json
  • docs/evidence/dep-health-sweep/proof-of-life-001/projection_rows.json
  • docs/evidence/dep-health-sweep/proof-of-life-001/proof_summary.md
  • docs/evidence/dep-health-sweep/proof-of-life-001/run_manifest.json
  • docs/work-tracking/contracts/OMN-12795.yaml
  • src/omnimarket/nodes/node_context_pack_builder_compute/models/model_context_pack_artifact.py
  • src/omnimarket/nodes/node_context_pack_builder_compute/parsers/__init__.py
  • src/omnimarket/nodes/node_context_pack_builder_compute/parsers/parser_guidance_section.py
  • tests/nodes/node_context_pack_builder_compute/test_guidance_section_parser.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jonah/omn-12795-p2-chunk-parser

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

@jonahgabriel
jonahgabriel enabled auto-merge June 7, 2026 18:25
@github-actions

github-actions Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

✅ Architectural Review — PASSED

Errors: 0
Warnings: 0

What this checks

Rule Description
ARCH-TOPIC-001 No hardcoded Kafka topic strings in handler code
ARCH-DI-001 No event_bus=None bypass
ARCH-DI-002 No direct Handler instantiation outside workflow_runner/adapters
ARCH-DI-003 No reinvented DI containers
ARCH-TOPIC-002 contract.yaml topics follow `onex.{cmd

No architectural violations found.

Powered by node_pr_review_bot

@github-actions

github-actions Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

✅ PR Review Bot — CLEAN

Findings: 0
Run ID: ``

Note: Reviewer models are running as stubs (OMN-7969–OMN-7972 pending). Architectural findings from Phase 1 (arch-lint) are the authoritative signal until model handlers land.


Verdict semantics

Verdict Meaning
clean No blocking findings
risks_noted Findings noted; threads passed verification
blocking_issue MAJOR/CRITICAL findings not resolved — do not merge

Powered by node_pr_review_bot — FSM pipeline with multi-model review fan-out

@github-actions

github-actions Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

⚠️ Hostile Reviewer — DEGRADED (informational)

Blocking findings (critical/error): 0
Total findings: 0
Models succeeded: none

Note: All reviewer models failed or were unavailable. Degraded results are informational during the pilot phase (OMN-8524) and do not block merge. Error: cli_review exited non-zero (all models failed or binary error)


Gate semantics (pilot phase)

Verdict Meaning Blocks merge?
passed No critical/error findings No
blocked CRITICAL or ERROR findings found Yes
degraded All models unavailable (infra) No (pilot)

Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524)

@jonahgabriel
jonahgabriel added this pull request to the merge queue Jun 7, 2026
Merged via the queue into dev with commit 5b42a3e Jun 7, 2026
51 of 57 checks passed
@jonahgabriel
jonahgabriel deleted the jonah/omn-12795-p2-chunk-parser branch June 7, 2026 20:03
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