fix(ai): discard proposals when section context changes
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# 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.
|
||||
@@ -0,0 +1,14 @@
|
||||
# A3-IM08 Contextual AI and Settings automation
|
||||
|
||||
3 November2026. Owner explicitly approved **"Approve calendar/documents/mail and A3-IM08"**. Isolated codex/a3-ui-08 starts at accepted UI07 fba80ef346bc021e675024638dacf9ccef7243db. Acceptance receipt e5a979386d6377138e7ea7fd44958adb22838886 is published and independently remotely verified. No live model activation; application automation controls are distinct from the paused, untouched backlog orchestrator.
|
||||
|
||||
- [x] Inspect SettingsView, rules/notification owners, AI privacy/usage and contextual section-assistant callers.
|
||||
- [x] Initial selected baseline:58 cases/5 suites passed, not blanket AI quality or full roadmap acceptance.
|
||||
- [ ] Contextual assistance: preserve manual editing, source/document-language separation, explicit review/apply, stale-input discard, quota/consent/failure/retry/close. Investigate context and section-name changes while a proposal is pending or under review.
|
||||
- [ ] Settings automation: expose current supported controls and explain effects/timing/disable behavior under Settings; preserve existing rules drafts and notification/AI preference writers. Inspect actual worker/data contracts before promising independent per-rule switches not represented in current six numeric thresholds. No fake controls, worker activation or policy/infrastructure change.
|
||||
- [ ] Scoped EN/NB, responsive/focus/accessibility presentation; types/lint/build, controlled browser and applicable local backend tests; independent review.
|
||||
- [ ] Publish validated checkpoints and exact evidence; update durable handoff. Next Gate F before IM09 account/session/connections/admin/processing views.
|
||||
|
||||
Current source findings:rules expose only six integer day thresholds1–365, not independent enable flags; email-follow-up notifications and AI/privacy preferences have actual existing boolean controls. Do not represent thresholds as disable switches or imply a general worker-control API. Contextual assistant invalidation currently covers source text, target ID, language and entitlement; generation also consumes context and sectionName, which need compatibility review.
|
||||
|
||||
No schema/dependency/migration planned for presentation and bounded stale-proposal fix. Existing canonical Career Profile, CV/letter history/settings, RD21, per-owner data, quota/consent and server review/apply stay authoritative. Rollback reverts this UI increment; no database rollback. Full integrated AI/security/native/provider/release qualifications remain separate.
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"frontendPassed": 82,
|
||||
"suites": 2,
|
||||
"failed": 0,
|
||||
"pending": 0,
|
||||
"typecheckExit": 0,
|
||||
"scopedLintExit": 0,
|
||||
"buildExit": 0,
|
||||
"independentReview": "No actionable static findings; tests not repeated",
|
||||
"warnings": [
|
||||
"Parent direct-focus tests emit act warnings;59 passed"
|
||||
],
|
||||
"notRun": [
|
||||
"backend rerun",
|
||||
"new browser matrix",
|
||||
"physical PDF",
|
||||
"live models/providers",
|
||||
"final integrated security/release"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"base": "e5a979386d6377138e7ea7fd44958adb22838886",
|
||||
"recordedAtUtc": "2026-11-03T14:24:45.724564+00:00",
|
||||
"policy": "LF-normalised text SHA256",
|
||||
"sources": {
|
||||
"job-tracker-ui/src/components/cv/AiSectionAssistant.tsx": "40475ae87da5a1966bdd52a5107b4c54e34a28a4be31687dc5471217105c4d7a",
|
||||
"job-tracker-ui/src/ai-section-assistant.test.tsx": "bcf642a670c5b2741ba8dd46fbf1b1f231c4801b4f1c8bebec6eab6dabd31396",
|
||||
"job-tracker-ui/src/views/CvBuilderEditor.tsx": "49537d71b577df7c564609c2cfcd239afe066fe4b4c550677544886a205e0e0b",
|
||||
"job-tracker-ui/src/cv-builder-deep-link.test.tsx": "8d5ae8d6a07991856dd2b21bde332ad91762c46f7534c2154719cf8a41d81dd2",
|
||||
"job-tracker-ui/src/cvBuilder.ts": "c021bafeabbc8ad3526d1b10b90ad8f7f0958ded8ed26eac8c1d28b53098b64d",
|
||||
"job-tracker-ui/package.json": "3745394e406cefa40d30a87e840bccb359be147bac6ffba736e2ae90898a8626",
|
||||
"job-tracker-ui/package-lock.json": "bf31e90d7af03e8af059db2aaf893925b9e8881a30a1688034ed88ef45d4fcab",
|
||||
"docs/ui-modernisation/UI-08.md": "a9077d5bdce58e8f23d818564cbdb6853392444b29ff19063562f621732c2361",
|
||||
"docs/ui-modernisation/AI_CONTEXT_VALIDATION.md": "f934cdf1f43b3c50026ce692e1fce8e0a754ba6373ca5039b9414308998f5adf"
|
||||
},
|
||||
"evidence": {
|
||||
"a3-ai-context-green.json": "0a587c3a3cd5235b4e36b805805fc9d5eb6be89ef87ff40516c3ad818939cfc4",
|
||||
"a3-ai-context-parent-tests.json": "c6ca2b8ffd4f2150a19fa3ce94c4c35cd72ea08833cf28b671218930a2c2e3d8",
|
||||
"a3-ai-context-red.json": "8536fc3228bb8fa7cb7735f7e470998ca8bfaa003ed6c91a9d0b54f7e27c0e71",
|
||||
"a3-ai-settings-baseline.json": "47ad0bc2aaff394e233fd7a69a33fe17b13443318635af8c806a09d69854f3a4",
|
||||
"CHECKS.json": "76564d88813d9fc8b798916db2391038d57b4d9d87b5f802d82fb068202c7279"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user