Skip to content

test(dotenv): fix surgical PBT oracle for duplicate keys - #3

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-dotenv-pbt-duplicate-keys-347b
Aug 25, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/fix-dotenv-pbt-duplicate-keys-347b

Conversation

@NDilanka

Copy link
Copy Markdown
Owner

main went red on build (windows-latest, 22) after merging PR #1.

setDotenvValue rewrites the last assignment for a key (dotenv last-wins). The surgical-edit property test exempted only findIndex (the first match). Two identical export W_="value with spaces" lines then failed:

  • seed 599909404
  • first line kept, last line rewritten to export W_=" "
  • oracle treated line 1 as must-be-unchanged

This PR:

  • Exempts every line that assigns the written key from the identity check
  • Pins the Windows counterexample as a unit test

No writer change. pnpm --filter @envseal/core exec vitest run test/dotenv.test.ts — 26/26 pass.

Open in Web Open in Cursor 

setDotenvValue rewrites the last assignment (dotenv last-wins). The
property test exempted only findIndex, so two identical W_ lines failed
Windows Node 22 (seed 599909404). Pin that fixture as a unit test.

Co-authored-by: TheCoderBTW <NDilanka@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 25, 2026 12:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cursor
cursor Bot merged commit e430ce5 into main Aug 25, 2026
10 checks passed
@cursor
cursor Bot deleted the cursor/fix-dotenv-pbt-duplicate-keys-347b branch August 25, 2026 12:53
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.

3 participants