Skip to content

test: cover owner checklist, portal-launch recipients, LAN classify - #79

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-dfd5
Draft

test: cover owner checklist, portal-launch recipients, LAN classify#79
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-dfd5

Conversation

@cursor

@cursor cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Risky behavior now covered

  • Owner checklist updates — patch allowlist / VALIDATION when no valid fields; seed DEFAULT_ITEMS uniqueness (ON CONFLICT category key) and mortgage defaults.
  • Portal launch campaign — co-owner email match (case/trim), owners-list merge gate, tenant prorated-electric cutoff (2026-06-01), owner vs manager/tenant password-skip on send.
  • LAN address classification — skip link-local / hypervisor ifaces; distinguish Tailscale vs RFC1918 LAN vs other (beyond test: cover playbook insights, CORS allowlists, portal origin, impersonation #76 CORS host allowlist).

Test files added/updated

  • scripts/test-owner-checklist.js (npm run test:owner-checklist)
  • scripts/test-portal-launch-recipients.js (npm run test:portal-launch-recipients)
  • scripts/test-lan-dev-classify.js (npm run test:lan-dev-classify)
  • Tiny testability extracts/exports only (no behavior change intended).

Why these tests materially reduce regression risk

These paths were unclaimed vs open coverage PRs #66#78 and sit on money/ops surfaces (owner bill checklist writes, launch credential emails, LAN/Tailscale interface selection). Pure unit tests; no DB/Stripe — safe for cron.

Validation

npm run test:owner-checklist
npm run test:portal-launch-recipients
npm run test:lan-dev-classify

All passed.

Open in Web View Automation 

Add deterministic unit tests for previously unclaimed high-risk helpers:
checklist patch allowlisting, co-owner/prorate/password launch rules,
and LAN/Tailscale interface classification beyond CORS host checks.

Co-authored-by: Jose I. Montero <2eezy77@users.noreply.github.com>
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