Files
jobtrackingapp/docs/ui-modernisation/AI_CONTEXT_VALIDATION.md
T

2.5 KiB

A3-IM08 bounded stale-proposal repair

3 November2026. IM08 is authorised and remains IN PROGRESS. This subpackage fixes a reproduced section-assistant defect without changing any model/provider/API/schema or acceptance writer.

The shared assistant sends source text, targetId, document/output language, context and sectionName when generating a proposal. Its existing invalidation effect omitted the last two inputs. CvBuilderEditor entry callers include edited entry title/subtitle in context, so a user could change facts while a request was pending, then see and apply the previous suggestion; a displayed review also survived those changes. Four controlled regressions reproduced both pending/visible cases for context and section name before the fix.

Added context and sectionName to the same invalidation effect. Existing requestId guards reject late success/failure/finally work and clear the old proposal. Generation remains explicit, Apply still requires server token acceptance, and parent source flush/revision/epoch guards remain unchanged. No silent content write or automatic regeneration. A translated section label may conservatively discard a prompt-bound proposal; it never changes document/output language to match UI language.

Checks PASSED:23 section-assistant cases plus59 parent studio cases,82 disjoint cases/2 suites; typecheck, scoped zero-warning lint and production build. Independent static review found no actionable issue and did not repeat tests. Initial58-case Settings/AI baseline overlaps the section cases and is not added. Parent suite emitted existing direct-focus act warnings at cv-builder-deep-link.test.tsx475/782; all59 cases passed, but this is not a warning-free test run. Fixture-only callbacks/tokens, no live model or semantic AI-quality claim.

NOT RUN for this one-line dependency repair:backend rerun, new browser sweep, physical PDF, native device, live models/providers, final integrated security/release. Existing rendered document layouts are unchanged; controlled React regressions exercise the affected async behavior directly. Other IM08 Settings/automation presentation and final scope qualification remain open; no Gate F acceptance is requested for this subpackage alone.

Native baseline/red/green/parent reports and source manifest are in evidence/ai-context. Red run:4 failed,4 passed,15 intentionally excluded by test-name filter. Final complete section suite23 passed,zero failed/pending; parent59 passed. Rollback reverts the effect-dependency change; no database/data rollback.