Skip to content

chore(quest): plan keeping a pushed Vec's capacity as it shrinks - #531

Merged
kixelated merged 3 commits into
mainfrom
quest-plan/ts-vec-clear-capacity
Nov 3, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest-plan/ts-vec-clear-capacity

Conversation

@kixelated

@kixelated kixelated commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

TS loses a Vec's capacity when the length drops, if that capacity came only from pushes. Six pushes of 1280-byte elements, then clear: native Rust reports 8, TS reports 0. std documents that clear and truncate leave the capacity unchanged, and a Vec never shrinks on its own. So the guarantee-only capacity model decided on 2026-11-01 must keep it.

Approach

Impact

  • Public API: none, quests only.

Alternatives

  • Fold it into ts-vec-exact-capacity.md: that quest is about std's exact capacity, which the maintainer chose to leave open. This one is a guarantee.

Follow-ups

Review

Skipped: a quest-only change of planning prose. just check passed on head 5693d2aa36cc1cf3f186c6aff014f5216436897d.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18e008a2-78dd-49f4-9b9e-d904c1e8a5ee
Commits

Reviewing files that changed from the base of the PR and between e996ee1 and 5693d2a.

Files selected for processing: 3
  • quest/m3/README.md
  • quest/m3/ts-vec-clear-capacity.md
  • quest/m3/ts-vec-exact-capacity.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@kixelated
kixelated enabled auto-merge November 3, 2026 14:55
@kixelated
kixelated disabled auto-merge November 3, 2026 14:55
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated enabled auto-merge November 3, 2026 14:57
@kixelated
kixelated added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 404992c Nov 3, 2026
5 checks passed
@kixelated
kixelated deleted the quest-plan/ts-vec-clear-capacity branch November 3, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant