Skip to content

[CONS-1089] Harbor misreports tier when a product has an invalid entry before a valid one - #207

Merged
defunctl merged 1 commit into
experiment/software-stackfrom
fix/CONS-1089-tier-rank-valid-entry
Oct 11, 2026
Merged

defunctl merged 1 commit into
experiment/software-stackfrom
fix/CONS-1089-tier-rank-valid-entry

Conversation

@johnhooks

@johnhooks johnhooks commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

🎫 Ticket

CONS-1089

🎥 Artifacts

🗒️ Description

Fixes whether the "bonus" label is applied, by matching features to the customer's valid tier even when an invalid entry for the same product comes first; access is unaffected.

⚠️ Blockers

Based on #205.

Summary by CodeRabbit

  • Bug Fixes
    • License tier resolution now considers all qualifying license entries, so an invalid entry no longer prevents a valid tier from granting access.
  • Tests
    • Added coverage for both entry orders when a product has an invalid and a valid license.

An invalid activated entry listed before a valid one for the same
product made Harbor report no tier, so in_catalog_tier was false for
features the valid tier includes.
@linear

linear Bot commented Oct 11, 2026

Copy link
Copy Markdown

CONS-1089

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 36608ac8-627a-4d0d-9504-8cf7bb33e113

📥 Commits

Reviewing files that changed from the base of the PR and between 219e737 and 0052721.


📒 Files selected for processing (2)
  • src/Harbor/Features/Resolve_Feature_Collection.php
  • tests/wpunit/Features/Resolve_Feature_CollectionTest.php

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.



📝 Walkthrough

Walkthrough

The license tier resolver now checks every entry for a product and returns the highest qualifying tier. A test verifies that an invalid entry does not prevent a valid tier from enabling the feature, regardless of entry order.

Changes

License tier resolution

Layer / File(s) Summary
Resolve the highest effective tier
src/Harbor/Features/Resolve_Feature_Collection.php, tests/wpunit/Features/Resolve_Feature_CollectionTest.php
The resolver checks all locally activated entries, skips entries with known ineffective statuses, and returns the highest recognized tier. The test checks both orders of an invalid and a valid entry.

Priority: ⬇️ Low

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

Change: Bug fix


Merge Risk: ⚪ Minimal · up to 00527

No merge-blocking issue is identified; this change appears ready to merge after normal checks.

Pre-merge checks | Passed 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 identifies the main change: correcting tier reporting when an invalid license entry precedes a valid entry.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files.
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
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@johnhooks johnhooks self-assigned this Oct 11, 2026
@johnhooks
johnhooks requested a review from defunctl October 11, 2026 20:38
@johnhooks
johnhooks marked this pull request as ready for review October 11, 2026 20:38
@defunctl

Copy link
Copy Markdown
Contributor

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@defunctl defunctl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot!

@defunctl
defunctl merged commit 70dbdd9 into experiment/software-stack Oct 11, 2026
24 checks passed
@defunctl
defunctl deleted the fix/CONS-1089-tier-rank-valid-entry branch October 11, 2026 20:46
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.

2 participants