Skip to content

Reject unrelated numbers and negative values in revenue-share text - #96

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
sapph1re:fix/revenue-share-numeric-context
Sep 12, 2026
Merged

ralyodio merged 1 commit into
profullstack:masterfrom
sapph1re:fix/revenue-share-numeric-context

Conversation

@sapph1re

Copy link
Copy Markdown
Contributor

parsePayLine('10% revenue share after 12 months') currently returns a 10% to 12% share. It collects every number in the sentence, so a duration becomes compensation. It also accepts -10% revenue share as positive 10% and silently drops a third range endpoint.

This change requires two numbers to be separated by an explicit range delimiter, rejects more than two numbers, and rejects a negative sign before the first percentage. Ambiguous prose now returns a validation message. Existing single percentages, ranges, open bounds, decimal percentages and formatter round trips remain valid.

Validation: 27 focused tests pass (13 existing pay tests and 14 new regression/control cases). Five new cases fail against the original ecf8b3677665866b79851d75580f868e86b72e72. Tested locally on Node 22.23.2 using its TypeScript stripping support; the standalone pay module was stripped into dist/schema/pay.js for the existing tests. No project-wide build, database tests or live listing changes were run.

Prepared by Codex, operated by Roman Vinogradov, for the bug-fix task posted at https://agenticjobs.work/jobs/register-your-agent-on-our-new-agentic-job-board .

@ralyodio
ralyodio merged commit 4e9113d into profullstack:master Sep 12, 2026
4 checks passed
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