Skip to content

test(node): add missing owner_did field to fails-closed seed update#229

Merged
kevincodex1 merged 1 commit into
mainfrom
fix/owner-did-test-compile
Jul 22, 2026
Merged

test(node): add missing owner_did field to fails-closed seed update#229
kevincodex1 merged 1 commit into
mainfrom
fix/owner-did-test-compile

Conversation

@xdev00

@xdev00 xdev00 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the owner_did field missing from one ReceivedRefUpdate test initializer, unbreaking compilation of test targets on main (and CI on release PR #182).

Motivation & context

#113 and #145 raced: #145 added owner_did to ReceivedRefUpdate and updated its own call sites, but the seed initializer in list_repo_events_fails_closed_when_repo_lookup_errors (added by #113) predates it. Merged main fails clippy --all-targets, cargo test, and MSRV with E0063; build --release passes, which is why this slipped through. Blocks #182.

Kind of change

  • Tests / CI

What changed

  • gitlawb-node: set owner_did: None in the fails-closed test's seed update — None on purpose, the test exercises the legacy None-branch slug fallback.

How a reviewer can verify

cargo clippy --workspace --all-targets -- -D warnings   # fails on main, clean here
cargo test --workspace                                   # 985 passed locally w/ Postgres

Before you request review

- [x] Scope is one logical change; no unrelated churn
- [x] cargo test --workspace passes locally
- [x] New behavior is covered by tests (required for fixes)
- [x] cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings are clean
- [x] Commit titles use Conventional Commits (feat(...), fix(...), docs(...))
- [x] Docs / .env.example updated if behavior or config changed (or N/A)
- [x] Checked existing PRs so this isn't a duplicate

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Tests**
  * Improved test coverage for repository event handling when repository lookups fail.
  * Clarified test data by explicitly representing missing owner information.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

PRs #113 and #145 raced: #145 added owner_did to ReceivedRefUpdate and
updated its own call sites, but the seed initializer in
list_repo_events_fails_closed_when_repo_lookup_errors (added by #113)
was never updated, so main fails to compile test targets (E0063).
This breaks clippy --all-targets, both test jobs, and MSRV on CI,
including the release PR #182.

owner_did stays None here on purpose: the test exercises the legacy
None-branch slug fallback.
@github-actions github-actions Bot added the needs-tests Source changed without accompanying tests (advisory) label Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution. A couple of things will help us review this faster:

  • This changes Rust source but no tests changed. Tests are required for fixes and strongly encouraged for features.

See CONTRIBUTING.md. Update the PR and these notes will clear automatically.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c90b3a4c-9296-494d-b8d7-2948233628f6

📥 Commits

Reviewing files that changed from the base of the PR and between 98d728c and a2e5392.

📒 Files selected for processing (1)
  • crates/gitlawb-node/src/test_support.rs

📝 Walkthrough

Walkthrough

The repository event failure test now explicitly sets owner_did: None when constructing its ReceivedRefUpdate fixture.

Changes

Ref-update failure test

Layer / File(s) Summary
Explicit owner field in failure test
crates/gitlawb-node/src/test_support.rs
The ReceivedRefUpdate fixture in list_repo_events_fails_closed_when_repo_lookup_errors now sets owner_did to None.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • Gitlawb/node#145: Adds and propagates the optional owner_did field on ref-update data.

Suggested labels: crate:node, kind:bug, subsystem:peers

Suggested reviewers: beardthelion

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main change: adding the missing owner_did field in a test seed update.
Description check ✅ Passed The description covers the required sections and includes context, change details, and verification steps, so it is mostly complete.
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 fix/owner-did-test-compile

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.

@kevincodex1
kevincodex1 merged commit d8375b2 into main Jul 22, 2026
15 checks passed
kevincodex1 added a commit that referenced this pull request Jul 22, 2026
…229)

PRs #113 and #145 raced: #145 added owner_did to ReceivedRefUpdate and
updated its own call sites, but the seed initializer in
list_repo_events_fails_closed_when_repo_lookup_errors (added by #113)
was never updated, so main fails to compile test targets (E0063).
This breaks clippy --all-targets, both test jobs, and MSRV on CI,
including the release PR #182.

owner_did stays None here on purpose: the test exercises the legacy
None-branch slug fallback.

Co-authored-by: Kevin Codex <kevin@gitlawb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-tests Source changed without accompanying tests (advisory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants