fix(serenity): finish LLMO-6190 headroom wiring (unbreak type-check + build)#2883
Closed
byteclimber wants to merge 1 commit into
Closed
fix(serenity): finish LLMO-6190 headroom wiring (unbreak type-check + build)#2883byteclimber wants to merge 1 commit into
byteclimber wants to merge 1 commit into
Conversation
The feature branch left the dynamic-allocation headroom guard half-wired,
breaking type-check + build and a metering test:
- markets-subworkspace.js generateAndAttachPrompts: the caller threaded a
headroom guard as a 6th arg and the JSDoc documented it as required, but the
function never declared or used it (TS8024 + TS2554). Add the param and front
headroom.ensure({ prompts: texts.size }, { includeDrafted: true }) before the
metered createPromptsByIds write loop.
- prompts-subworkspace.js handleCreatePromptsSubworkspace: removed the redundant
pre-publish ensure that re-created a second headroom guard (no-shadow) and
issued a second getWorkspaceResources read. LLMO-6190 meters ONCE before the
write (the create is the metered write, not publish); the pre-write ensure
already reserves the whole batch, so the pre-publish read was a leftover.
- prompts-subworkspace.test.js: the dynamic-allocation test passed its options
object in the env positional slot instead of the 8th, so the guard was never
enabled; corrected to match the controller/signature.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Consolidated into #2875. These two fixes are a mutual dependency (each PR's CI ran the full suite and was red on the other's unfixed domain), so two separate green PRs was technically impossible. The headroom/LLMO-6190 commit is now cherry-picked onto #2875; that branch is green (type-check + lint clean, 223 serenity handler tests passing). Closing this one. |
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.
Summary
The
feat/serenity-intent-classificationbranch shipped the LLMO-6190 dynamic-allocation headroom guard half-wired, which is why the branch's own CI (PR #2785) and the stacked edit-path PR #2875 are both red. This fixes the base breakage. Base isfeat/serenity-intent-classification, notmain.What was broken (reproduced on the pristine base)
type-check:markets-subworkspace.js—generateAndAttachPrompts's JSDoc documents a requiredheadroomparam and the caller passes it, but the function never declared/used it (TS8024 + TS2554: 6 args to a 5-param fn).ci / build(eslint):prompts-subworkspace.js:251— a secondheadroomguard shadowed the one at line 171 (no-shadow).handleCreatePromptsSubworkspacedynamic-allocation test failed — its options object was passed in theenvpositional slot instead of the 8th, so the guard was never enabled.Fixes
markets-subworkspace.js— addheadroomas the 6th param togenerateAndAttachPromptsand frontheadroom.ensure({ prompts: texts.size }, { includeDrafted: true })before the meteredcreatePromptsByIdswrite loop (the metered write is the create, not publish). Matches the JSDoc + theprompts-subworkspace.jstwin. No-op when the flag is OFF.prompts-subworkspace.js—ensure(which re-created a second guard → theno-shadow, and issued a secondgetWorkspaceResourcesread). The LLMO-6190 design meters once before the write (test title: "front headroom before the write, not just before publish"; assertion:getWorkspaceResourcescalled once, beforecreatePromptsByIds). The pre-writeensureat line 176 already reserves the whole batch, so the pre-publish read was a pre-LLMO-6190 leftover. If a second pre-publish top-up is intentional, this is the line to push back on.prompts-subworkspace.test.js— fixed the stale positional call (options → 8th slot) to match the controller + signature.Verification
Type-check clean, lint clean. Combined with PR #2875, the three serenity handler test suites are 223 passing / 0 failing.
This PR and #2875 are complementary — the feature branch is broken in two places and each PR fixes one, so neither is green alone; both must merge for
feat/serenity-intent-classification(and PR #2785) to go green. Verified locally that edit-path + headroom together are fully green.🤖 Generated with Claude Code