# Validation and Release Process

## What the automated tests establish

The test suite establishes that:

- Monetary values use the same two-decimal rounding approach as the legacy pages.
- Daily and hourly rates use the same divisors.
- Each earnings component uses the original multiplier.
- SSS thresholds reproduce the original bracket table.
- PhilHealth and Pag-IBIG reproduce the original H1 implementation.
- H1 totals reconcile internally.
- H2 withholding tax reproduces the original bracket implementation.
- H2 and full-month totals reconcile internally.

The tests are regression tests against the approved implementation. They are not an independent legal opinion.

## Recommended release review

Before publishing a version for a new payroll year:

1. Review all values in `payroll-rates.js`.
2. Compare each threshold with the approved payroll reference.
3. Run tests below, at, and above every boundary.
4. Compare at least five synthetic payslips against the approved payroll workbook or system.
5. Have Finance or Payroll sign off on the results.
6. Update the effective-period label and changelog.
7. Create a tagged release.

## Suggested synthetic scenarios

- Minimum supported salary with no premiums.
- Salary exactly at an SSS boundary.
- Salary immediately above an SSS boundary.
- Salary below, within, and above the PhilHealth range.
- No H1 premiums and multiple H2 premiums.
- All available premiums populated.
- Large optional deductions.
- H2 taxable total at each withholding-tax boundary.
- Fractional half-hour inputs.
- Manual H1 taxable-basis override.

## Manual user-interface checks

- Keyboard navigation reaches every input and button.
- Invalid or negative values show an understandable message.
- H2 cannot accidentally use a stale H1 value.
- The monthly summary updates after recalculation.
- The layout remains readable on a narrow mobile screen.
- Printing retains the essential calculation results.
