Skip to content

feat(ingest): #404 Phase 1 — thread parent_decision_id through natural-format ingest#534

Closed
Knapp-Kevin wants to merge 1 commit into
devfrom
feat/404-phase1-natural-format-parent-id
Closed

feat(ingest): #404 Phase 1 — thread parent_decision_id through natural-format ingest#534
Knapp-Kevin wants to merge 1 commit into
devfrom
feat/404-phase1-natural-format-parent-id

Conversation

@Knapp-Kevin

Copy link
Copy Markdown
Collaborator

Part of #404 (P1) — Phase 1 of 4 (the issue's self-described "smallest enabler").

What

Natural-format ingest now honors a caller-supplied parent_decision_id. Previously only the internal mapping format honored it; the natural format silently dropped it in _normalize_payload. The adapter already reads mapping["parent_decision_id"] (ledger/adapter.py:1460) and persists it — so the fix is to thread it at the single shared normalization point, which both the daemon write.ingest dispatcher and the MCP fallback run.

Also documents the classifier precedence in _classify_decision_level (item #5): explicit decision_level wins → source-type heuristic → (Phase 2) auto-derivation. No logic change there — precedence already worked (#340).

Files

  • contracts.pyIngestDecision.parent_decision_id
  • handlers/ingest.py_normalize_payload threading
  • ledger/adapter.py_classify_decision_level docstring (precedence)
  • tests/test_404_natural_format_parent_id.py — sociable test (real adapter over memory://)
  • docs/META_LEDGER.md — Entry desync optimization V1 — read-path advisory + V2 implementation guide #56 (governance seal)

Acceptance criteria covered

Governance

  • Risk L2 — additive contract field; no ledger/schema.py change → no §4.7 codeowner gate.
  • Independent architect-reviewer audit: PASS — including the load-bearing daemon-serialization check (raw payload is JSON-serialized pre-transport at handlers/ingest.py:845, so the field rides through and is normalized daemon-side).
  • Substantiation: the new test is load-bearing — stashing the threading makes it FAIL (row persists NONE); restoring makes it PASS.
  • META_LEDGER Entry desync optimization V1 — read-path advisory + V2 implementation guide #56 seals this cycle (chain verified via qorlogic verify-ledger).

Deferred (later phases of #404)

  • Phase 2 — Actor L1-parent synthesis + similarity-attach (threshold 0.85), daemon-side.
  • Phase 3 — rejected alternatives as L3 negative-siblings.
  • Phase 4 — backfill migration. ⚠️ carries the §4.7 @jinhongkuan schema-codeowner gate, and the issue's "v23→v24" must be renumbered (v24 is already taken by the input_span-dedup migration).

🤖 Authored via Qor-logic SDLC on Claude Code

…l-format ingest

Natural-format ingest now honors a caller-supplied parent_decision_id (previously
dropped — only the internal mapping format honored it) by threading it in
_normalize_payload; the adapter already reads mapping[parent_decision_id] and
persists it. Documents classifier precedence (explicit decision_level wins) in
_classify_decision_level. Foundational enabler for #404's hierarchical display;
L1 auto-derivation, L3 negative-siblings, and the backfill migration follow in
later phases.

Governed via /qor-auto-dev-1: independent architect-reviewer audit PASS
(daemon-serialization path verified safe), substantiation load-bearing test
proven (fails without the fix). META_LEDGER Entry #56 seals this cycle.

🤖 Authored via [Qor-logic SDLC](https://github.com/MythologIQ-Labs-LLC/qor-logic) on [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 61036959-f347-4715-8689-605f11c443d5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/404-phase1-natural-format-parent-id

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 and usage tips.

@Knapp-Kevin

Copy link
Copy Markdown
Collaborator Author

Merge note (ledger sealing). This PR carries META_LEDGER Entry #56. PRs #535 and #536 deferred their ledger entries to avoid forking the Merkle chain (all three branched off the same dev tip, Entry #55).

Cleanest path: merge #534 first (it lands #56); then merge #535/#536 in any order and the deferred entries get reconciled in one follow-up pass (#57/#58, re-chained off the new tip). #524 has no ledger entry (handled pre-seal). Net: merge in whatever order you like — the chain gets fixed up afterward.

@jinhongkuan

Copy link
Copy Markdown
Contributor

Closing during PR hygiene because this branch is stale/conflicting and this is not a top alpha-readiness item. Hierarchical decision display may still be useful, but it should be re-cut against issue #404 only if it is explicitly in product-line scope for the next release. Prefer a small current-dev PR with clear user-facing value over carrying this stale Phase 1 branch.

@jinhongkuan jinhongkuan closed this Jun 7, 2026
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.

2 participants