Skip to content

fix(pipeline): wire embed stage dispatch, add webhook status check, fix upsert data loss (#546) - #558

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/546-pipeline-correctness
Apr 28, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/546-pipeline-correctness

Conversation

@Sinity

@Sinity Sinity commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

Seven pipeline fixes from the post-hoc audit: embed stage dispatch, webhook status checking, content_blocks upsert data loss, write ordering, stage sequences, set rebuild optimization, and stale docstrings.

Problem

  • execute_embed_stage was imported but never called — stage="embed" raised ValueError
  • Webhook responses were never checked — non-2xx silently treated as success
  • _write_conversation upserted content_blocks without deleting old ones
  • write_run_json could fail after record_run committed, leaving inconsistent state
  • Reprocess sequence omitted the site stage

Solution

Each fix is minimal and targeted at the specific call site.

Closes #546

🤖 Generated with Claude Code

…ix upsert data loss

- Wire execute_embed_stage into run_execution dispatch (was dead code)
- Check webhook response status in _post_webhook, warn on non-2xx
- Delete old content_blocks before upsert in _write_conversation
- Move write_run_json before record_run to avoid inconsistent state
- Add site stage to reprocess sequence
- Hoist raw_records_ids set outside loop in validation_flow
- Fix stale docstring claiming parse/write overlap

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 28, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 54 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5c7779b4-b927-45af-87d7-0b0dd61f08ea

📥 Commits

Reviewing files that changed from the base of the PR and between dd2fa45 and 5aebdd6.

📒 Files selected for processing (8)
  • polylogue/pipeline/observers.py
  • polylogue/pipeline/run_execution.py
  • polylogue/pipeline/run_finalization.py
  • polylogue/pipeline/run_support.py
  • polylogue/pipeline/services/ingest_batch.py
  • polylogue/pipeline/services/validation_flow.py
  • tests/unit/pipeline/test_run_sources.py
  • tests/unit/pipeline/test_stage_contract.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/546-pipeline-correctness

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
Review rate limit: 0/1 reviews remaining, refill in 59 minutes and 54 seconds.

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

@Sinity
Sinity merged commit c0c9e27 into master Apr 28, 2026
4 of 11 checks passed
@Sinity
Sinity deleted the feature/fix/546-pipeline-correctness branch April 28, 2026 08:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5aebdd625e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread polylogue/pipeline/run_execution.py Resolved
Sinity added a commit that referenced this pull request Apr 28, 2026
## Summary
Add NotebookEdit tool dispatch to `extract_file_changes` in
semantic_capture.py.

## Problem
The function handled Read, Write, and Edit tool invocations but silently
dropped NotebookEdit operations from Claude Code sessions.

## Solution
Added NotebookEdit branch that extracts `new_source` content and records
it as an edit operation.

Note: the other two items from #552 (FTS suspend outside try block,
missing embed stage dispatch) were already fixed in #554 and #558.

Closes #552

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 <[email protected]>
@Sinity
Sinity requested a review from Copilot May 1, 2026 00:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

Sinity added a commit that referenced this pull request May 7, 2026
…ix upsert data loss (#558)

## Summary
Seven pipeline fixes from the post-hoc audit: embed stage dispatch,
webhook status checking, content_blocks upsert data loss, write
ordering, stage sequences, set rebuild optimization, and stale
docstrings.

## Problem
- `execute_embed_stage` was imported but never called — `stage="embed"`
raised ValueError
- Webhook responses were never checked — non-2xx silently treated as
success
- `_write_conversation` upserted content_blocks without deleting old
ones
- `write_run_json` could fail after `record_run` committed, leaving
inconsistent state
- Reprocess sequence omitted the site stage

## Solution
Each fix is minimal and targeted at the specific call site.

Closes #546

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 <[email protected]>
Sinity added a commit that referenced this pull request May 7, 2026
## Summary
Add NotebookEdit tool dispatch to `extract_file_changes` in
semantic_capture.py.

## Problem
The function handled Read, Write, and Edit tool invocations but silently
dropped NotebookEdit operations from Claude Code sessions.

## Solution
Added NotebookEdit branch that extracts `new_source` content and records
it as an edit operation.

Note: the other two items from #552 (FTS suspend outside try block,
missing embed stage dispatch) were already fixed in #554 and #558.

Closes #552

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 <[email protected]>
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

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.

fix(pipeline): missing embed stage, silent webhook failures, ingest data loss

2 participants