Skip to content

chore: remove unused CORROBORATION_SOURCE_HOOK_INGEST - #335

Merged
robotrocketscience merged 1 commit into
mainfrom
chore/remove-hook-ingest-source
May 2, 2026
Merged

chore: remove unused CORROBORATION_SOURCE_HOOK_INGEST#335
robotrocketscience merged 1 commit into
mainfrom
chore/remove-hook-ingest-source

Conversation

@robotrocketscience

@robotrocketscience robotrocketscience commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

CORROBORATION_SOURCE_HOOK_INGEST (models.py:84, value "hook_ingest") has no production caller. Git-history hooks route through commit_ingest; filesystem and transcript hooks use their own constants. The value was vestigial since v1.5.0.

Audited four production stores (~/projects/aelfrice/.git/aelfrice/memory.db, ~/projects/aelfrice-lab/.git/aelfrice/memory.db, ~/projects/work-stuff/.git/aelfrice/memory.db, ~/.aelfrice/memory.db) — zero rows with source_type='hook_ingest'. Removing the constant is contract-clean.

Drops the constant + frozenset entry; updates tests/test_corroborations.py (one assertion uses three source types instead of four; enum-coverage test reflects the new set).

Context

Surfaced while resolving #190 (closed). Pre-existing audit at last session's handoff.

Test plan

  • tests/test_corroborations.py 18/18 passing
  • tests/test_insert_or_corroborate.py 8/8 passing
  • Full suite: 1979 passed, 20 skipped (one env-specific deselect for test_serve_raises_clear_error_when_fastmcp_missing — passes in main repo without fastmcp installed; failure is env shape, not code)
  • Production-store audit: zero hook_ingest rows

Summary by Sourcery

Remove an unused corroboration source type and update tests accordingly.

Enhancements:

  • Remove the deprecated CORROBORATION_SOURCE_HOOK_INGEST constant and its inclusion in the corroboration source set.

Tests:

  • Adjust corroboration source tests to reflect the reduced set of valid source types.

Summary by CodeRabbit

  • Refactor

    • Updated corroboration source types: removed hook ingest and added commit ingest, transcript ingest, and mcp remember to the supported set.
  • Tests

    • Updated test cases to align with changes in corroboration source type configuration.

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4e3e333c-2c9f-47ae-80a0-df7f59bb0a5d

📥 Commits

Reviewing files that changed from the base of the PR and between ee02ffc and ee0f51d.

📒 Files selected for processing (2)
  • src/aelfrice/models.py
  • tests/test_corroborations.py
💤 Files with no reviewable changes (1)
  • src/aelfrice/models.py

📝 Walkthrough

Walkthrough

Corroboration source-type constants in the models module were updated: CORROBORATION_SOURCE_HOOK_INGEST was removed and replaced with three new constants (CORROBORATION_SOURCE_COMMIT_INGEST, CORROBORATION_SOURCE_TRANSCRIPT_INGEST, CORROBORATION_SOURCE_MCP_REMEMBER). The CORROBORATION_SOURCE_TYPES set was updated accordingly. Tests were synchronized to reflect the new constant set.

Changes

Corroboration Source Type Update

Layer / File(s) Summary
Constant Definitions
src/aelfrice/models.py
Removed CORROBORATION_SOURCE_HOOK_INGEST and added CORROBORATION_SOURCE_COMMIT_INGEST, CORROBORATION_SOURCE_TRANSCRIPT_INGEST, CORROBORATION_SOURCE_MCP_REMEMBER. Updated CORROBORATION_SOURCE_TYPES set membership accordingly.
Test Synchronization
tests/test_corroborations.py
Removed CORROBORATION_SOURCE_HOOK_INGEST import and updated test assertions in test_different_source_types_record_distinctly and test_source_type_enum_covers_all_variants to expect the new constant set.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing the unused CORROBORATION_SOURCE_HOOK_INGEST constant.
Description check ✅ Passed The description follows the template structure with Summary, Linked issues, Type of change (chore), Verification, and Test plan sections all completed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ 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 chore/remove-hook-ingest-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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@sourcery-ai

sourcery-ai Bot commented May 1, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes the unused corroboration source constant "hook_ingest" from the models layer and updates corroboration tests to reflect the reduced set of valid source types.

Class diagram for corroboration source constants after hook_ingest removal

classDiagram
    class Models {
        <<module>>
        +CORROBORATION_SOURCE_COMMIT_INGEST : str
        +CORROBORATION_SOURCE_TRANSCRIPT_INGEST : str
        +CORROBORATION_SOURCE_MCP_REMEMBER : str
        +CORROBORATION_SOURCE_FILESYSTEM_INGEST : str
        +CORROBORATION_SOURCE_CLI_REMEMBER : str
        +CORROBORATION_SOURCE_CONSOLIDATION_MIGRATION : str
        +CORROBORATION_SOURCE_CONSOLIDATION_QUERY : str
        +CORROBORATION_SOURCE_SET : frozenset[str]
    }

    class TestsTestCorroborations {
        <<test_module>>
        +test_valid_corroboration_sources_match_constants()
        +test_insert_or_corroborate_uses_known_sources()
    }

    Models <.. TestsTestCorroborations : verifies_sources
Loading

File-Level Changes

Change Details Files
Remove the unused CORROBORATION_SOURCE_HOOK_INGEST constant and its inclusion in the set of corroboration sources.
  • Delete the CORROBORATION_SOURCE_HOOK_INGEST constant definition from the models module.
  • Remove CORROBORATION_SOURCE_HOOK_INGEST from the CORROBORATION_SOURCE_TYPES frozenset of valid source_type values.
src/aelfrice/models.py
Update corroboration tests to reflect that hook_ingest is no longer a valid/used source_type.
  • Adjust the distinct-source-types test to only record and assert over three source types instead of four, removing any usage of the hook_ingest source type.
  • Update the source-type enum coverage test’s expected set of string values to omit "hook_ingest" so it matches the new model constants.
tests/test_corroborations.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@robotrocketscience robotrocketscience added the author-Setr PR coordination mutex label May 1, 2026

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
github-actions Bot force-pushed the chore/remove-hook-ingest-source branch 3 times, most recently from 0963e8d to 3f5600c Compare May 1, 2026 16:08
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Kulili:2026-05-01T16:09:42Z]

@robotrocketscience

Copy link
Copy Markdown
Owner Author

Cannot merge: head commit 3f5600c is unsigned (N per git log --format='%h %G?'). Branch was force-updated by the auto-rebase workflow, which re-writes commits as github-actions[bot] without signatures. The main ruleset requires signed commits.

Same situation as PR #337#339. Recommend either:

  1. Locally rebase on github/main, re-sign, force-push: git rebase github/main && git commit --amend --no-edit -S && git push --force-with-lease
  2. Open a fresh PR with the same diff (one signed commit), close this one as superseded.

Diff itself is clean — 2 additions / 8 deletions, no remaining hook_ingest references in src/ or tests/, discretion grep clean. Just needs a signed HEAD.

@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Kulili:2026-05-01T16:10:27Z]

@robotrocketscience
robotrocketscience force-pushed the chore/remove-hook-ingest-source branch from 3f5600c to a96010f Compare May 1, 2026 16:28
@robotrocketscience robotrocketscience added attn:review Needs review (PR open, awaiting reviewer) and removed attn:review Needs review (PR open, awaiting reviewer) labels May 1, 2026
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

This PR is now behind main. Rebase locally so your commit signatures stay intact:

git fetch origin && git checkout 'chore/remove-hook-ingest-source' && git rebase origin/main
# resolve conflicts if any, then
git push --force-with-lease

Auto-rebase was removed because the bot has no signing key; rebasing as the bot strips author signatures and the required_signatures rule on main then blocks the merge. See #341.

The hook_ingest source-type constant has no production caller. Hook-
triggered ingest paths route through the commit-ingest path
(triple_extractor.py:266 -> commit_ingest) for git-history events;
filesystem and transcript hooks use their respective constants. The
hook_ingest value was vestigial since v1.5.0.

Audited the four production stores under ~/projects/*/.git/aelfrice/
and ~/.aelfrice/memory.db: zero rows with source_type='hook_ingest'.
Removal is contract-clean.

Drops the constant from CORROBORATION_SOURCE_TYPES and updates the
test that asserted enum coverage.

Refs #190.
@github-actions github-actions Bot added the attn:merge-conflict PR branch needs rebase label May 2, 2026
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

This PR is now behind main. Rebase locally so your commit signatures stay intact:

git fetch origin && git checkout 'chore/remove-hook-ingest-source' && git rebase origin/main
# resolve conflicts if any, then
git push --force-with-lease

Auto-rebase was removed because the bot has no signing key; rebasing as the bot strips author signatures and the required_signatures rule on main then blocks the merge. See #341.

@robotrocketscience
robotrocketscience force-pushed the chore/remove-hook-ingest-source branch from a96010f to ee0f51d Compare May 2, 2026 08:25
@robotrocketscience
robotrocketscience merged commit ee0f51d into main May 2, 2026
20 of 21 checks passed
@robotrocketscience
robotrocketscience deleted the chore/remove-hook-ingest-source branch May 2, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

attn:merge-conflict PR branch needs rebase attn:review Needs review (PR open, awaiting reviewer) author-Setr PR coordination mutex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant