Skip to content

Improve code coverage - #1594

Merged
sergey-shandar merged 8 commits into
mainfrom
no-need
Aug 16, 2026
Merged

Improve code coverage#1594
sergey-shandar merged 8 commits into
mainfrom
no-need

Conversation

@sergey-shandar

Copy link
Copy Markdown
Contributor

No description provided.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
functionalscript fd6464a Commit Preview URL

Branch Preview URL
Aug 16 2026, 01:57 AM

@sergey-shandar
sergey-shandar marked this pull request as ready for review August 15, 2026 23:27
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@o2alexanderfedin o2alexanderfedin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since the description is empty, for the record this deletes two throw 'unreachable' guards in nodeSet's i===2 and i===3 arms — the only uncovered lines in the file — replacing the i===3 one with assert(xL === 2 || xL === 5) so TSGO still narrows. package.json drops the hardcoded test path from cov; deno.json adds a cov-html task. No version bump, no coverage exclusions, no check weakened.

The assert is provably safe: First<T> (fjs/types/btree/find/types.ts:11-19) permits i===3 only from _FirstLeaf2 (len 2) or _FirstBranch5 (len 5), and find/module.f.mjs:37-49 agrees — done(3) is reachable only at node.length 2 or 5. No reachable input throws.

Behavior verified by differential harness against origin/main: 51,657 tree comparisons (empty and 1..12 ascending+descending, 300 random 1–300-op mixes over a 60-key space with heavy duplicate-insert/replace, 1000-key monotone both directions, triple re-insert, string keys) — 0 mismatches. Coverage of fjs/types/btree/set/module.f.mjs: main 93.97 line / 94.87 branch → head 100/100/100. Old vs new cov command: identical 2793 tests and totals. npx tsc clean; suite 2857/2857.

One convention item: AGENTS.md §5 requires changelog/unreleased/1594.md for a code change and it's absent — every peer coverage PR (#1596, #1597, #1587, #1583, #1576) has one. The empty description also omits the Changelog: section, and ok/xL aren't really commit subjects.

Minor: deno.json:6 anchors module\.f\.mjs$ while cov on line 5 doesn't — harmless, but they now differ.

@sergey-shandar

Copy link
Copy Markdown
Contributor Author

One convention item: AGENTS.md §5 requires changelog/unreleased/1594.md for a code change and it's absent — every peer coverage PR (#1596, #1597, #1587, #1583, #1576) has one. The empty description also omits the Changelog: section, and ok/xL aren't really commit subjects.

The behavior is the same!!! Changelog is not required!

@sergey-shandar
sergey-shandar merged commit 5593ad6 into main Aug 16, 2026
17 checks passed
@sergey-shandar
sergey-shandar deleted the no-need branch August 16, 2026 01:57
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