The GitHub Actions job "Fory CI" on fory.git/main has failed.
Run started by GitHub user chaokunyang (triggered by chaokunyang).

Head commit for run:
e823e471ccfb3a7fdcd0da62c5b3b2adc96a2c17 / Ayush Kumar 
<[email protected]>
fix(javascript): reserve writer capacity for write paths (#3994)

## Why?
BinaryWriter starts with a ~100KB buffer and, for speed, its individual
writeXxx methods do no bounds checking. The contract is that callers
call reserve(n) first, which grows the buffer if needed. The generated
collection write path honors this (it reserves elementFixedSize * count
before the loop), but three paths write per-entry data with no reserve
at all: the generated declared-map write, MapAnySerializer.write, and
CollectionAnySerializer.write.

## What does this PR do?
three write paths now reserve writer capacity, matching the existing
generated-collection convention (root reserves fixedSize once;
per-element loops reserve fixedSize × count; strings reserve internally)

## Related issues

## AI Contribution Checklist



- [ ] Substantial AI assistance was used in this PR: `yes` / `no`
- [ ] If `yes`, I included a completed [AI Contribution
Checklist](https://github.com/apache/fory/blob/main/AI_POLICY.md#9-contributor-checklist-for-ai-assisted-prs)
in this PR description and the required `AI Usage Disclosure`.
- [ ] If `yes`, my PR description includes the required `ai_review`
summary and screenshot evidence or equivalent persisted links of the
final clean AI review results from both fresh reviewers described in
`AI_POLICY.md`, the Fory-guided reviewer and the independent general
reviewer, on the current PR diff or current HEAD after the latest code
changes.



## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?

## Benchmark

Report URL: https://github.com/apache/fory/actions/runs/33324280509

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to