Share edit location and check protected names in full segments

This commit is contained in:
2026-11-16 04:09:25 +00:00
parent 43ce620122
commit 475557e4de
23 changed files with 488 additions and 269 deletions

View File

@@ -46,7 +46,7 @@ for each request. PromptKit renders the selected definition and validates the
correction-set schema before Audita maps proposals. Domain validators still
check applicability, protected glossary terms, and replacement
policy. Model-facing segment IDs are one-based positions within the proposal
request. Generation maps returned references back to the current chunk's actual
request. Generation and repair map those references back to the current chunk's actual
segment IDs, preserving response order and multiple proposals per segment.
Unknown references become invalid-target candidates for the existing domain
checks; they are never interpreted as actual transcript IDs. Debug request

View File

@@ -155,7 +155,19 @@ counts for fitting and batching. Context is supplemental, not a promise that eve
relevant definition or neighboring utterance always fits. This uses the existing
payload estimator, not a new guarantee about the provider's full context window.
## Protected-Name Repetition
## Protected Names
Protection compares the source segment with the full replacement preview.
Missing and ambiguous spans have no protection verdict. An empty preview can
produce a protection finding alongside the blank-result rule. Application
rechecks the preview against the current segment after earlier edits.
The glossary matcher selects the longest spelling at a match position.
Punctuation-edged spellings use literal edge checks with Go's ASCII regexp
boundary semantics. Active glossary exemptions take part in match selection.
Validation context uses the same scan to select identities in glossary order.
### Protected-Name Repetition
Spoken-word cleanup may reduce repeated protected-name occurrences when every
original protected identity still appears in the resulting segment and surviving
@@ -164,4 +176,4 @@ both a replacement of the repeated phrase and deletion of a redundant span. This
exception only relaxes the deterministic count guard; editorial and meaning-reversal
validation still decide whether the repetition was accidental and the edit preserves
meaning. Intentional emphasis and substantive references remain protected by those
reviews. Other modules retain their existing protection rules.
reviews.