Skip to content

T182's sentinel could appear in a random id, so it asserts by value - #146

Merged
arpanghoshal merged 1 commit into
mainfrom
fix/t182-sentinel
Sep 11, 2026
Merged

T182's sentinel could appear in a random id, so it asserts by value#146
arpanghoshal merged 1 commit into
mainfrom
fix/t182-sentinel

Conversation

@arpanghoshal

Copy link
Copy Markdown
Member

test_T182_the_pending_listing_withholds_claim_values greps the whole rendered listing for 4471, the employee number in its fixture. Those are four decimal digits, and every decimal digit is a hex digit, so the string turns up by chance in a request id or a hash.

It failed CI on check (3.12) of PR #145 while 3.11, 3.13 and 3.14 passed the same code, which is the signature of a coincidence rather than a defect. Nothing in that PR touches this file or the operator server.

The test's intent is right and is kept: a claim that leaked through any field must fail it, not just through the principal key. So the check now walks the document and compares values and keys, instead of substring-matching a number that hex can spell. The three distinctive strings (CASE-9, employee_no, issuer.example) keep their substring checks, because hex cannot spell them.

Checked the check: putting claims back into the listing entry (gateway/operator.py:708) still fails the test, at the new assertion. That was the mutation the test was originally written for.

Test-only, and it unblocks #145 and #144.

The employee number 4471 is four decimal digits, all of them hex digits
too, so it appears by chance in a request id or a hash. CI failed the
listing on one interpreter of four while the other three passed the same
code. The check now walks the document and compares values, which is what
it was for: putting claims back into the entry still fails it.
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3d430a1f-01e0-4a52-9c98-2ba055b90a35

📥 Commits

Reviewing files that changed from the base of the PR and between 9b80d2a and 680c476.

📒 Files selected for processing (1)
  • tests/test_mcp_operator.py

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.

@arpanghoshal
arpanghoshal merged commit 4b0c72c into main Sep 11, 2026
13 of 14 checks passed
@arpanghoshal
arpanghoshal deleted the fix/t182-sentinel branch September 11, 2026 20:25
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