Skip to content

fix(platform): preserve fractional login policy delays - #4261

Merged
yannickmonney merged 1 commit into
mainfrom
fix/preserve-login-policy-fractional-delays
Oct 4, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/preserve-login-policy-fractional-delays

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed

  • Stop rounding saved login-policy delays to whole seconds when populating the editor. Fractional seconds retain the stored millisecond precision instead of silently rewriting the schedule on an unrelated save.
  • Add regressions using the real LoginPolicyEditor, production EditorActions Save buttons and shared policy schema at an in-memory mutation/query boundary. Each case saves a schedule, unmounts/reopens, changes only the attempt limit and saves again.
  • Cover [400, 1500], millisecond precision [1, 1001, 1234] and the unchanged whole-second control [1000, 2000].
  • Append manual box GOV-B21. No schema, storage, authentication or locale-string changes; existing EN/DE/FR strings still describe seconds.

Verification

  • Reproduced on main d29a3c8fe78cdba54d247fe82ea5195f702c0651: two fractional regression cases fail with [0, 2000] and [0, 1000, 1000]; the whole-second control passes.
  • After the fix, targeted jsdom suite: 11/11 passed (login-policy-editor.test.tsx, one worker).
  • Adjacent policy toggle, toggle/save race and config parser suites: 12/12 passed (one worker).
  • Scoped TypeScript semantic/syntactic check of the editor, test and importing security-monitoring route with UI test setup: 0 diagnostics, 2 GiB heap limit.
  • Targeted oxlint and oxfmt check, git diff --check: passed.
  • Platform manual-layer lint: passed (1,094 boxes). Governance guide reference check: passed.

Local evidence is limited to synthetic jsdom/in-memory configuration round trips; no deployed configuration or authentication behavior was modified. No full platform suite, whole-workspace TypeScript check or CI rerun/cancellation.

Closes #3651

@yannickmonney yannickmonney left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Independent review: ACCEPT

PR #4261, exact head 4d320b486c3ca117a3de138226a2e96f70f965ff. TALE-601, reviewer run 6a663a74-b62a-45ca-a048-10d037eb2385, independent of implementation run fd68a377-ae22-4ae4-85d2-c9ccb10d1c24. Read TALE-192 and issue #3651 as the contract. Head confirmed at the start and rechecked immediately before posting.

No blocking findings. The one-line formatter change removes whole-second data loss without changing the parser's existing integer-millisecond quantization, shared schema, storage or authentication logic. scheduleToString is private to this editor; its loading path is the affected consumer.

Observed evidence

  • Pinned-head jsdom editor suite 11/11 passed, plus adjacent toggle/save-race 4/4 passed. The regressions use the actual LoginPolicyEditor, production EditorActions Save buttons and actual loginPolicyConfigSchema at an in-memory mutation/query boundary. Save, unmount/reopen, edit only the attempt limit, and save again preserve [400, 1500], [1, 1001, 1234] and whole-second [1000, 2000] schedules.
  • Separate toggle and config-parser controls 8/8 passed, also targeted jsdom, one worker.
  • Independent expanded component probe 19/19 passed (includes the original 11 controls). Long decimal inputs normalize to integer-millisecond precision on reopen and remain stable on the unrelated save: 0.123456789012345678901234567890 → 123 ms; 0.000500000000000000000000000000 → 1 ms; a tiny positive decimal → 0 ms (existing sub-millisecond quantization, not new whole-second rounding). Exponent notation round-trips too. Negative, Infinity, NaN and nonnumeric schedules get aria-invalid=true and do not mutate.
  • On fetched main d4c519fa382614cefaa4a244fad287aff49c5614, the identical PR regression suite has 2 expected failures / 9 passes: fractional schedules become [0, 2000] and [0, 1000, 1000]; the whole-second control passes. Used a full main source snapshot with the added PR test and reused head dependencies; packages/ui, packages/shared and bun.lock have no delta between these sources. The review-only Vite config allows that local dependency directory.
  • GOV-B21 matches the route, field labels, seconds units, Save/reload/unrelated-edit procedure, whole-second control and restoration requirements. Static review only; no manual box claimed executed. git diff --check passed.

Limits / unrun proof

Local synthetic jsdom/in-memory configuration round trips only. No real browser, visual-regression analysis, deployed reload, file-backed backend/config persistence, actual authentication timing, PostgreSQL, E2E, manual GOV-B21 execution, independent typecheck/lint/format/manual-guide gate rerun, or full platform suite. Initial dependency/runtime startup failures were resolved by installing the frozen lockfile in the isolated output snapshot and running Vitest with Node; they are retained as setup logs, not behavioral findings.

No CI rerun, cancellation or waiting, and no CI-green claim. No push, merge or card movement; protected native review remains untouched. This is an explicit ACCEPT receipt in a commit-bound COMMENT review because author and reviewer share a GitHub principal, not a formal GitHub approval or merge authorization. Disk remained above 158 GiB free (20 GiB floor).

Evidence and reproducible probe: /agent/output/4894e7fb-8678-4de8-b68e-8cf7941c33f0/ (head-tests.log, adjacent-tests.log, adversarial-tests.log, main-tests.log, adversarial.test.tsx, reviewed.patch). Merge lane remains with agent #2 after its required checks and readiness reconciliation.

@yannickmonney
yannickmonney merged commit de65b84 into main Oct 4, 2026
@yannickmonney
yannickmonney deleted the fix/preserve-login-policy-fractional-delays branch October 4, 2026 14:12
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.

bug(platform): login policy rounds saved fractional delays and overwrites them on unrelated edits

1 participant