Reuse prepared glossary data across stage sections
This commit is contained in:
@@ -37,9 +37,9 @@ Shared proposal-generation plumbing is centralized in:
|
||||
Module packages own:
|
||||
- prompt selection (`internal/prompts` prompt IDs).
|
||||
|
||||
`proposal_generation.BuildProposalVariables` encodes the glossary, selected
|
||||
transcript section, and trimmed description once for all four modules. PromptKit
|
||||
renders their embedded definitions from those variables and validates the
|
||||
Each stage prepares the encoded glossary context and protected spellings once.
|
||||
Proposal generation adds the selected transcript section and trimmed description
|
||||
for each request. PromptKit renders the selected definition and validates the
|
||||
correction-set schema before Audita maps proposals. Domain validators still
|
||||
check confidence, applicability, protected glossary terms, and replacement
|
||||
policy. Model-facing segment IDs are one-based positions within the proposal
|
||||
|
||||
@@ -120,10 +120,11 @@ is covered by [report assembly](diagnostics-reporting.md).
|
||||
|
||||
## Supplemental Validation Context
|
||||
|
||||
Request construction prepares one segment-position lookup and a matcher from the
|
||||
selected context entries for all candidates. Context selection remains candidate-specific,
|
||||
including the proposed replacement text. The independent protection view is used
|
||||
by the deterministic guard and application check.
|
||||
Each stage prepares a context matcher and indexes its selected glossary entries
|
||||
by identity. Request construction uses a segment-position lookup and returns
|
||||
matched entries in selection order for each candidate, including matches in the
|
||||
replacement text. The deterministic guard and application check share the
|
||||
stage's separate protection matcher.
|
||||
|
||||
Each candidate includes the immediately preceding and following source segments
|
||||
available within its fixed chunk, labeled `preceding` or `following` with speaker,
|
||||
|
||||
@@ -562,6 +562,8 @@ are preserved. Readiness keeps the same late-stage diagnostics.
|
||||
|
||||
## R16 — P2: Reuse Prepared Glossary Views and Index Validation Context
|
||||
|
||||
**Status:** Completed. Each stage prepares shared protection and context matchers and serializes its proposal glossary variables once. Context gathers matched entry positions in selection order. Tests cover shared identities, ordering, exemptions, and request content.
|
||||
|
||||
**Category**
|
||||
|
||||
Per-section rebuilds and per-candidate glossary scans in Stages 11 and 12.
|
||||
|
||||
Reference in New Issue
Block a user