Skip to content

Add missing L2 coverage for Content PIN 6-digit validation change - #35

Draft
langu44 with Copilot wants to merge 3 commits into
developfrom
copilot/l2-guardian-generate-missing-tests-one-more-time
Draft

Add missing L2 coverage for Content PIN 6-digit validation change#35
langu44 with Copilot wants to merge 3 commits into
developfrom
copilot/l2-guardian-generate-missing-tests-one-more-time

Conversation

Copilot AI commented May 18, 2026

Copy link
Copy Markdown

This updates L2 coverage for the test-github-mode delta vs develop, where SetContentPin changed validation from 4 digits to 6 digits. Existing L2 success-path tests still encoded 4-digit assumptions, leaving a coverage gap around the new contract.

L2-Guardian-Issue: #

  • Scope aligned to source delta

    • Focused on the only production change: UserSettingsImplementation::SetContentPin regex update (^\d{4}$^\d{6}$).
  • L2 test expectation realignment

    • Updated existing success-path L2 flows to use 6-digit PIN values ("123456") instead of 4-digit values.
    • Applied to JSON-RPC/event-path and COM-RPC set/get-path assertions that previously expected "1234".
  • New focused contract tests

    • Added setContentPinWithFourDigitsReturnsInvalidParameter to lock the rejection path for legacy 4-digit input.
    • Added setContentPinWithSixDigitsReturnsSuccessAndPersists to lock valid acceptance + persisted readback behavior.
paramsContentPin["contentPin"] = "1234";
status = InvokeServiceMethod("org.rdk.UserSettings", "setContentPin", paramsContentPin, result_json);
EXPECT_EQ(status, Core::ERROR_INVALID_PARAMETER);

paramsContentPin["contentPin"] = "654321";
status = InvokeServiceMethod("org.rdk.UserSettings", "setContentPin", paramsContentPin, result_json);
EXPECT_EQ(status, Core::ERROR_NONE);

Copilot AI changed the title [WIP] Generate missing L2 tests for branch test-github-mode Add missing L2 coverage for Content PIN 6-digit validation change May 18, 2026
Copilot AI requested a review from langu44 May 18, 2026 16:44
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.

[L2-Guardian] Generate missing L2 tests for branch test-github-mode

2 participants