Repository navigation
Document threads.v8Flags - #724
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request documents the new threads.v8Flags configuration option introduced in Harper v5.4.0, detailing how V8 flags are applied process-wide, validation rules, and the requirement of a full process restart rather than a restart_service for changes to take effect. The review feedback suggests replacing the <VersionBadge> component with plain text when used mid-sentence in prose to maintain consistency.
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-724 This preview will update automatically when you push new commits. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ Dispatch-Task: harper-threads-v8flags
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ Dispatch-Task: harper-threads-v8flags
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ Dispatch-Task: harper-threads-v8flags
…uration pages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ Dispatch-Task: harper-threads-v8flags
…gs change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ Dispatch-Task: harper-threads-v8flags
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ Dispatch-Task: harper-threads-v8flags
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ Dispatch-Task: harper-threads-v8flags
kriszyp
force-pushed
the
kris/threads-v8flags
branch
from
October 13, 2026 20:45
1960cf4 to
89acc61
Compare
Ethan-Arrowood
approved these changes
Oct 13, 2026
🧹 Preview CleanupThe preview deployment for this PR has been removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⊙ Problem
HarperFast/harper#3138 — Add threads.v8Flags to apply V8 flags such as --optimize-for-size to every worker thread adds a configuration setting that applies V8 flags to the whole process before the first worker thread starts. It is meant for constrained deployments that want
--optimize-for-size, which Node refuses inNODE_OPTIONS. It has sharp edges a reader must know before using it: implied flags are not applied, it is read once per process, andrestart_servicedoes not apply a change.💡 Solution
reference/configuration/options.md: av8Flagsentry in thethreadslist, and an "Applying V8 flags" section covering:what it is for, and an example that lists the flag
--optimize-for-sizeimplies;validation (the
--prefix, trimming,set_configurationrefusal, startup failure);that runtime application skips implied flags (verified: a worker's heap limit is 536 MB with runtime
--optimize-for-size, 515 MB with it from the CLI or with--max-semi-space-size=1added);that the main thread's isolate is not changed by creation-time flags;
when it takes effect (the
restartoperation on each node, notrestart_service), and how to roll it back, including that aTHREADS_V8FLAGSvalue persists inharper-config.yaml.reference/configuration/operations.md(restart sentence, after the replicated recipe) andreference/operations-api/operations.md: theset_configurationsections now sayrestart_servicedoes not apply athreads.v8Flagschange.release-notes/v5-lincoln/5.4.md: a "Configuration" entry.✅ Verification
restartoperation relaunched the process (new PID) and a worker reported the changed--stack-trace-limit;restart_serviceleft the old value;harper restartagainst a runningharper runinstance printed "Harper is already running" and restarted nothing, so these pages name only therestartoperation;Error: unrecognized flagand is skipped;set_configurationrefusesoptimize-for-sizeand leaves the file unchanged.npm run buildsucceeds with no broken links or anchors.prettier --checkis clean on the changed files.harper restartas restarting or replicating.🤖 Generated by Claude Code (Claude Opus 5.5); posted via @kriszyp.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VKZAtTiprHW8Sp1Ff4hGAZ
Related PRs: #709 overlaps (both add an exception to the set_configuration restart sentence in reference/configuration/operations.md; whichever lands second merges the two)
Complexity: easy
Review-Coverage: authored=claude; ran=gemini,muse,codex; adjudicated=domain; declined=cursor-grok,cursor-composer,cursor-kimi,cursor-muse; rounds=6; full=2 @ 89acc61
Review-Attention: skim ~2m (decisions: per-node-restart-guidance, expose-isolate-caveat, rollback-single-restart) @ 89acc61