Repository navigation
fix(selectors): omit target annotation when payload still exceeds ceiling after rect drop - #4344
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
…ling after rect drop Remeasure after dropping rect; docs and changeset updated.
This branch has not been deployed
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.
Fixes #4333
Summary
finalizeOversizedCandidate(packages/selectors/src/target-evidence.ts) dropsrectfrom an over-limit payload but never measured again. The 256-byte field caps apply before JSON escaping and the 4 KiB ceiling applies after it, so escape-heavy values (a control character serializes to 6 bytes) could leave a parent-only payload over the ceiling, and the writer emitted an annotation its own parser rejects.It now measures again after the drop and, if still over, returns
undefined, whichcomputeTargetEvidenceand its callers already allow. No annotation is written, and that action replays without a target check.5 files: the fix, a regression test, a patch changeset, and the two docs that described the old behavior (
packages/ad-script/docs/target-annotation.md,docs/adr/0012-interactive-replay.md). No scope expansion.Testing
Base d4eb753, head 6be4a4f, in a
node:22container running as root.pnpm vitest run --project unit-core packages/selectors/src/target-evidence packages/ad-script: base source 1 failed (the new test), 191 passed; head 192 passed.pnpm check:affected --run --head 6be4a4fe6: format, lint, layering, typecheck, fallow, build and vitest-related passed. Theunitstage failed: 7 of 17,722 tests, in 5 files outside this change's code path. The same 7 fail in those files with the basetarget-evidence.ts, so they do not come from this change.No device run; CI has not run yet. This change was prepared with the assistance of an AI coding agent (Claude).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.