Skip to content

Align Content PIN validation with 6-digit requirement and close L2 coverage gaps - #29

Draft
langu44 with Copilot wants to merge 7 commits into
developfrom
copilot/l2-guardian-generate-missing-tests-again
Draft

Align Content PIN validation with 6-digit requirement and close L2 coverage gaps#29
langu44 with Copilot wants to merge 7 commits into
developfrom
copilot/l2-guardian-generate-missing-tests-again

Conversation

Copilot AI commented May 18, 2026

Copy link
Copy Markdown

Compared test-github-mode against develop and found a production behavior change (SetContentPin now expects 6 digits) without matching L2 updates. This PR brings L2 coverage in sync with that change and validates boundary behavior through COM-RPC paths.

  • Production behavior alignment

    • Updated UserSettingsImplementation::SetContentPin to enforce a 6-digit numeric PIN format.
  • L2 test updates for existing happy paths

    • Updated existing L2 scenarios that previously used 1234 to use 123456 where success is expected.
  • New L2 coverage for input validation semantics

    • Added setContentPinValidatesInputFormatComRpc to verify:
      • valid 6-digit PIN is accepted
      • invalid PINs (1234, 12345, 1234567, 12ab56) are rejected with Core::ERROR_INVALID_PARAMETER
      • invalid writes do not overwrite the last valid stored PIN
      • empty string remains accepted/persisted as supported behavior
status = m_usersettingsplugin->SetContentPin("123456");
EXPECT_EQ(status, Core::ERROR_NONE);

status = m_usersettingsplugin->SetContentPin("1234");
EXPECT_EQ(status, Core::ERROR_INVALID_PARAMETER);

status = m_usersettingsplugin->GetContentPin(contentPin);
EXPECT_EQ(contentPin, "123456");

L2-Guardian-Issue: #

Copilot AI and others added 6 commits May 18, 2026 15:51
Copilot AI changed the title [WIP] Generate missing L2 tests for branch test-github-mode Align Content PIN validation with 6-digit requirement and close L2 coverage gaps May 18, 2026
Copilot AI requested a review from langu44 May 18, 2026 15:57
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