Skip to content

fix(protocol): remove unnecessary guard#675

Merged
james-d-elliott merged 1 commit intomasterfrom
fix-protocol-skip-compound
May 3, 2026
Merged

fix(protocol): remove unnecessary guard#675
james-d-elliott merged 1 commit intomasterfrom
fix-protocol-skip-compound

Conversation

@james-d-elliott
Copy link
Copy Markdown
Member

This fixes an issue where the compound format appeared to not be validated but actually was. The check is not necessary.

This fixes an issue where the compound format appeared to not be validated but actually was. The check is not necessary.
@james-d-elliott james-d-elliott requested a review from a team as a code owner May 3, 2026 06:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1b964d65-8f8d-4228-a05b-32a5009f5404

📥 Commits

Reviewing files that changed from the base of the PR and between d7551b8 and 7b432fc.

📒 Files selected for processing (1)
  • protocol/attestation.go

Walkthrough

AttestationObject.VerifyAttestation removes an early return for compound attestation format, ensuring the attestation type is always assigned and metadata validation always runs. The metadata validation call is updated to reference the newly-set a.Type field.

Changes

Attestation Verification Flow

Layer / File(s) Summary
Early Return Removal
protocol/attestation.go (lines 235–237)
Compound attestation (AttestationFormatCompound) early return is removed; a.Type = attestationType is now always executed before AAGUID parsing and metadata validation.
Metadata Validation Update
protocol/attestation.go (lines 248–250)
ValidateMetadata call now passes a.Type (freshly assigned from attestationType) instead of the local variable, maintaining consistent type reference throughout the validation flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 The early exit door swings closed today,
Compound attestations now must find their way—
Type and metadata, hand in hand,
Validation flows as planned! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: removing an unnecessary guard from the attestation validation logic.
Description check ✅ Passed The description is related to the changeset, explaining why the guard is being removed and clarifying the behavior of compound format validation.
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.

✏️ 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 fix-protocol-skip-compound

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.17%. Comparing base (d7551b8) to head (7b432fc).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
protocol/attestation.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #675      +/-   ##
==========================================
- Coverage   86.18%   86.17%   -0.01%     
==========================================
  Files          48       48              
  Lines        4183     4181       -2     
==========================================
- Hits         3605     3603       -2     
  Misses        373      373              
  Partials      205      205              
Files with missing lines Coverage Δ
protocol/attestation.go 79.68% <0.00%> (-0.62%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@james-d-elliott james-d-elliott merged commit 1e07db1 into master May 3, 2026
9 of 11 checks passed
@james-d-elliott james-d-elliott deleted the fix-protocol-skip-compound branch May 3, 2026 07:09
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