Accept span deletions in structured responses
This commit is contained in:
@@ -43,6 +43,10 @@ renders their embedded definitions from those variables and validates the
|
||||
correction-set schema before Audita maps proposals. Domain validators still
|
||||
check confidence, applicability, protected glossary terms, and replacement
|
||||
policy. Shared context encoding lives in `internal/framework/promptcontext`.
|
||||
An empty `corrected_text` deletes the identified span when the resulting segment
|
||||
remains nonblank. Whitespace-only original spans can express spacing corrections;
|
||||
matching stays literal under each module's replacement policy. No automatic
|
||||
whitespace cleanup follows application.
|
||||
|
||||
## Validator Chain Ownership
|
||||
|
||||
|
||||
@@ -22,6 +22,11 @@ Validator prompts receive the correction payload and description block.
|
||||
The prompt assets retain the prior task instructions and output-schema
|
||||
association. The role-bound runtime will supply the complete JSON Schema output contract
|
||||
and repair count; the definition does not own an operator-facing repair default.
|
||||
The correction-set schema requires a string replacement and accepts an empty
|
||||
string. Proposal guidance uses it for eligible span deletion and permits literal
|
||||
spacing edits; validator guidance evaluates the full before/after segment under
|
||||
each validator's existing remit. A blank resulting segment remains a domain
|
||||
rejection, not a structural schema error.
|
||||
|
||||
`internal/framework/responseschema` remains the only embedded source for
|
||||
`correction_set.v1.json` and `validator_decision_set.v1.json`. It exposes that
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
**Last updated:** 2026-09-25
|
||||
|
||||
**Status:** In progress; Stage 1 complete.
|
||||
**Status:** In progress; Stages 1–2 complete.
|
||||
**Source baseline:** `a83a518` (feature roadmap); application baseline `0b6cd98`.
|
||||
**Audience:** gpt-5.6-terra coding agent.
|
||||
|
||||
@@ -239,6 +239,11 @@ but schema-valid proposals still reach ordinary filtering without an outer retry
|
||||
**End state:** A literal empty replacement can cross the real library/schema
|
||||
boundary, and the model instructions and validator inputs describe its meaning.
|
||||
|
||||
**Completed 2026-09-25.** Relaxed only the replacement length constraint,
|
||||
clarified the relevant proposal and active validation prompts, and verified
|
||||
rendering, real-adapter acceptance/rejection, repair counts, and serialized
|
||||
before/after validator payloads. The specified focused package tests passed.
|
||||
|
||||
## Stage 3 — Preserve Empty Replacements in Debug Evidence
|
||||
|
||||
**Work**
|
||||
|
||||
Reference in New Issue
Block a user