Skip to content

fix(weave): allow nested extraction sources without root knops - #31

Merged
djradon merged 1 commit into
mainfrom
lane/extractor-nested-source
Aug 1, 2026
Merged

fix(weave): allow nested extraction sources without root knops#31
djradon merged 1 commit into
mainfrom
lane/extractor-nested-source

Conversation

@djradon

@djradon djradon commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Bite 1 of the extract→weave scale work in wa.task.2026.2026-07-21_1603-extractor-defect-pair (Kim brief in that note; carved and fired from planning-loop wakes 2–3).

What

assertCurrentMeshInventoryShapeForFirstExtractedKnopWeave demanded a Knop, working inventory locator, and ResourcePage for the source payload's derived first path segment — so a targeted firstExtractedKnopWeave from a nested source like alice/data refused whenever the namespace-like alice had no alice/_knop. The corpus diagnosis isolated this as the immediate blocker at Stagecraft's ~1,700-term nested-source scale (adding only fictional root-Knop facts made validation pass). A grouping path is not automatically a managed Semantic Flow identifier: the derived-root requirements are removed, the actual source payload/Knop and target-Knop assertions are unchanged, and the dead toRootDesignatorPath helper is deleted.

Evidence

  • Fail-on-old recorded: WeaveInputError: The current local weave slice only supports the settled extracted-knop pre-weave mesh inventory shape for bob.
  • New regression (current-only support policies, matching the SRD failure arm): bob weaves, identifier and Knop page claims render, nested source facts survive byte-for-byte, and no alice/_knop facts, files, or pages are synthesized.
  • Full deno task ci green; deno task build:npm-lib green (dnt).

Not in this bite (stays boarded on the task note)

Versioned nested-source behavior, untargeted/multi-target agreement, MeshInventory history-index rendering (the fixed _s0001_s0004 list), heavy-mesh generator nested-source mode, the ~1,700-term regression workload, and any claim of full extract→weave→generate viability — the Stagecraft workaround does not retire yet.

Implemented by Codex (codex exec) as Kim under the standing loop-wake grant; reviewed, validated, and landed by the planning seat.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LHrFYeUefDr227gLuWWuq1

Summary by CodeRabbit

  • Bug Fixes

    • Improved extraction validation for nested source terms by relying on the source Knop path.
    • Nested terms can now be extracted and woven successfully when no root Knop is present.
    • Prevented unnecessary recreation of missing root Knop metadata and resource artifacts.
  • Tests

    • Added regression coverage for nested-term extraction and weaving without a root Knop.

- assertCurrentMeshInventoryShapeForFirstExtractedKnopWeave no longer
  demands a Knop, working inventory locator, and page for the source
  payload's derived first path segment — a grouping path is not
  automatically a managed Semantic Flow identifier; the actual source
  payload/Knop and target-Knop assertions are unchanged
- remove the now-unused private toRootDesignatorPath helper
- regression: extracted-term weave from a nested source (alice/data)
  with no alice/_knop facts, current-only support policies matching the
  SRD failure arm; fail-on-old recorded ("settled extracted-knop
  pre-weave mesh inventory shape"); asserts bob weaves, page claims
  render, nested source facts survive, and no alice/_knop facts, files,
  or pages are synthesized
- bite 1 of the extract→weave scale work in
  wa.task.2026.2026-07-21_1603-extractor-defect-pair (Kim brief there);
  full ci + build:npm-lib green

Implemented-By: Codex (codex exec) as Kim
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHrFYeUefDr227gLuWWuq1
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f517135d-59ab-46ca-8c6c-fd055b02443e

📥 Commits

Reviewing files that changed from the base of the PR and between 0722742 and ecccb0e.

📒 Files selected for processing (2)
  • src/core/weave/shape_assertions.ts
  • src/core/weave/weave_test.ts
💤 Files with no reviewable changes (1)
  • src/core/weave/shape_assertions.ts

📝 Walkthrough

Walkthrough

Extracted-Knop shape validation now uses the source payload’s Knop path directly. It requires source Knop artifacts unconditionally. A regression test covers nested weaving without root Knop artifacts.

Changes

Nested source Knop handling

Layer / File(s) Summary
Source Knop shape validation
src/core/weave/shape_assertions.ts
Validation now checks the source Knop type, inventory file, and resource page. The unused root-path helper was removed.
Nested-source regression coverage
src/core/weave/weave_test.ts
A test verifies nested extraction and weaving without root Knop metadata, inventory, or resource-page artifacts.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: allowing nested extraction sources without root Knop artifacts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 lane/extractor-nested-source

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.

djradon added a commit that referenced this pull request Aug 1, 2026
…sure rename, PR #31 boarded

- flip the wd.todo requirements-collection checkbox (collection folded;
  note stays open only for the evidence-gated topology decision)
- rename refs: wa.task.2026.2026-07-05-multi-target-payload-advancement
  -> wa.completed.* in wd.decision-log
- read-in arc: PR #31 landed (merge GO with Dave), requirements folded,
  binary-payload task note still to cut
- maintenance log: wake 2/3 harvests, closure rename, cd/absolute-path
  lesson

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHrFYeUefDr227gLuWWuq1
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

djradon added a commit that referenced this pull request Aug 1, 2026
- wd.todo: binary item points at wa.task.2026.2026-08-01_1411 (queue-
  blocked on the court's five spec adjudications)
- maintenance log: harvest lines (binary note minted with the adjacent
  later-renderer RdfDocument typing defect; bite-2 fire; PR #31 all
  green incl. codecov/patch, CodeRabbit clean)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHrFYeUefDr227gLuWWuq1
djradon added a commit that referenced this pull request Aug 1, 2026
@djradon
djradon merged commit 1c4eef4 into main Aug 1, 2026
7 checks passed
@djradon
djradon deleted the lane/extractor-nested-source branch August 1, 2026 23:14
@djradon djradon mentioned this pull request Aug 2, 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.

1 participant