Skip to content

fix(knowledge-work): close Dev release-readiness audit (#3179) - #3204

Merged
oscharko merged 39 commits into
devfrom
epic/dev-knowledge-work-readiness
Aug 18, 2026
Merged

fix(knowledge-work): close Dev release-readiness audit (#3179)#3204
oscharko merged 39 commits into
devfrom
epic/dev-knowledge-work-readiness

Conversation

@Niko4417

@Niko4417 Niko4417 commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes the consolidated Dev knowledge-work release-readiness audit across intent classification, memory provenance, model readiness, conversation lifecycle, grounding freshness, Health Scan truth, Quality Intelligence terminal truth, boot recovery, and restored-chat routing.

The branch is integrated with Dev baseline 934e8580029f31967ba2a05c3ac6535e993cbc98. All model-backed manual journeys used a deterministic loopback gpt-4o-mini gateway; no real provider credential or credit was consumed.

Refs #3179

Resolves #3180
Resolves #3181
Resolves #3182
Resolves #3183
Resolves #3184
Resolves #3185
Resolves #3186
Resolves #3187
Resolves #3203

Scope

  • In scope:
    • Preserve German decision-support intent when prompts contain words such as Preise.
    • Accept memory candidates only when their provenance is an exact, complete user sentence or line.
    • Bind chat and grounded model egress to current-generation conversation readiness, including async race revalidation.
    • Isolate fresh-chat creation, refresh model and grounding catalogs on reopen, prevent restored-chat routing loops, and raise newly opened tools above persisted window stacks.
    • Clear stale Health Scan success truth on refresh failure and expose accessible boot recovery after retry exhaustion.
    • Project QI degradation consistently across launcher, list, and detail while preserving deterministic fallback cases.
    • Add exact regression, browser, design-system, and accessibility evidence for the affected paths.
  • Out of scope:
    • Release-branch retesting or patching.
    • New knowledge-work features, provider compatibility expansion, or credential changes.
    • Automatic merge into dev; this PR requires green CI and human review.

Reuse And No-Duplication

  • Existing Keiko functionality was inspected before implementation.
  • This PR reuses, extends, generalizes, or consolidates existing functionality where practical.
  • Any new implementation is limited to a documented capability gap in the linked issues.
  • This PR does not introduce a parallel workspace, graph, relationship, policy, evidence, memory, connector, workflow, or UI subsystem where an existing subsystem can be extended.
  • Refactoring or consolidation was considered when existing functionality was close but not shaped for this change.

Delivery Board

  • Linked issues are in the public Keiko Product Delivery project.
  • Linked remediation issues have Parent Epic: #3179 and native sub-issue relationships.
  • The parent epic and linked issues are represented in the epic swimlane.
  • Autonomous repair stayed on the epic branch; no direct dev push, force-push, finding dismissal, or required-gate bypass occurred.
  • This consolidated operator-approved topology replaces child auto-merge with one human-gated Epic PR to dev.
  • Required GitHub checks are green on the current head.
  • Delivery board workflow is Ready for Human Review on the current green head.

Product Impact

  • UI or user workflow
  • UI text uses the i18n API and includes English and German catalog entries.
  • CLI or developer workflow
  • Core generation engine
  • Evidence, audit, or compliance artifact
  • Security or supply chain
  • Packaging, release, or npm publication
  • Documentation or repository hygiene
  • No user-facing behavior change

Update Impact

  • Release-impacting reliability fixes.
  • Release-note category: fixes.
  • Priority: high.
  • User-visible change: knowledge-work workflows now preserve current intent, provenance, readiness, lifecycle, health, evaluation, and recovery truth under the audited edge conditions.
  • Release-note bullet: Fixed nine Dev knowledge-work reliability defects found during the comprehensive edge-case audit.
  • Supported-from versions: next Dev prerelease after 0.3.8.
  • Affected state stores: local chat/workspace state, readiness observations, memory proposals, and QI run projections; no schema migration.
  • User action required and remediation: rerun model readiness after a server restart or gateway replacement; otherwise none.

Verification

Required:

  • npm run gates:sonar reported no local finding. Local execution was attempted on the integrated QI slice but was blocked by the known Docker registry authentication state; the required GitHub Sonar/Coverage check must settle green.
  • Required GitHub checks pass before merge.
  • npm run check:ui-i18n passes.
  • Local verification commands are listed below.
  • Reuse and gap rationale is documented above and in the linked issues.

Local verification:

.keiko-scripts/verify-receipt.sh 3179 --fast
.keiko-scripts/ui-verify-receipt.sh 3179 -- <four hermetic Playwright knowledge-work lanes>
.keiko-scripts/audit-receipt.sh 3179 --findings 0 --user-facing true

Focused post-Dev-integration verification:
- 371 server/gateway/memory focused tests passed.
- 174 workspace-action tests and 167 restored-chat/session UI tests passed.
- 261 window-focus/workspace-action tests passed, including the delayed-focus race after opening Settings.
- Exact UI coverage command passed: 428 files, 7,088 tests, 89.48% statements, 81.72% branches.
- Hermetic Chromium plan passed: chat 1/1, Prompt/Health/QI 5/5, boot recovery 1/1, grounding refresh 1/1.
- Independent review through `1beec9364`: APPROVED, findings=0; 274 additional UI tests passed. Final focused audit of the additive Z-order fix also found no actionable finding.
- UI typecheck, focused ESLint, Prettier, architecture gates, i18n, and diff checks passed.
- Full local Vitest mirror reached 30,662/30,683 passing with one repository-scan timeout; that scanner passes 24/24 in isolation and its real CLI passes. No timeout or CI workflow was changed; required GitHub CI remains authoritative for the complete suite.
- The failed GitHub UI coverage lane was reproduced locally and repaired without a workflow change: readiness fixtures now state `conversationReady` explicitly, status assertions target the send lifecycle region, and fresh chat owners remain isolated.
- The failed GitHub package smoke was reproduced locally and repaired without a workflow change: installable memory smoke now proves the configured model's basic-chat readiness before creating chats, including after restart.
- The first-load bundle returned below the unchanged 344,064-byte ceiling by deferring document extraction until attachments are actually submitted; no budget or CI timeout was raised.
- Exact-head follow-up verification passed: clean production build/static export, editor bundle and release-evidence gates, installable-memory package smoke (create/use/correct/forget/delete, scope isolation, restart persistence, memory-off), 144 focused UI tests, root typecheck, scoped UI/root lint, formatting, diff check, and E2E-suite wiring.
- Linux CI confirmed the lazy split produces 290 static files with the regenerated measured asset values while retaining the canonical `a47f06fb…` fingerprint; the committed evidence now matches that exact combination. No bundle budget, workflow, or timeout changed.
- SonarCloud's two maintainability findings were resolved by replacing `waitFor(getByText)` with idiomatic `findByText`; the focused Health Scan suite remains 9/9 green.

Real Google Chrome Computer Use journeys:

  • Gateway setup and same-page readiness-to-chat eligibility.

  • Streamed chat response, fresh Chat A/Chat B isolation, and model picker reopen.

  • Exact German Prompt Enhancer decision boundary.

  • Health Scan rate-limit error without stale success count.

  • QI unparseable-model fallback shown as Degraded, Quality: Unavailable, with persisted stage evidence.

  • Local Knowledge fails closed without an embedding model.

  • MemoriaViva does not fabricate a memory from unsupported model output.

  • Persisted multi-window chat restoration produces no React maximum-update-depth loop.

  • Opening Settings immediately after focusing a persisted chat keeps its readiness controls topmost and operable.

  • UI behavior manually verified and covered by tests.

  • Core logic covered by unit, integration, fixture, and browser tests.

  • Security-sensitive changes reviewed for trust boundaries, secrets, model egress, and generated artifacts.

  • Supply-chain and package-surface changes verified by repository gates.

  • Documentation and evidence artifacts verified by targeted and repository checks.

  • Release-impacting behavior is described above.

Review And Closure

  • The PR implements only the consolidated Epic and linked remediation scope.
  • Independent review plus final focused audit found no actionable P0-P2 findings on the current local head.
  • Unresolved review threads are resolved before merge.
  • Checks are repeated after the latest pushed fix.
  • Issue acceptance criteria and closure evidence are updated only where evidence exists.
  • Delivery board status is updated to Ready for Human Review after exact-head CI is green.
  • No agent will merge this PR into dev.

Risk Notes

  • Current merge blocker: clean Linux builds of the same production source alternate editor release-evidence values (b2.shipsTotalBytes observed as both 1403398 and 1406597). After three distinct CI repair attempts, autonomous repair stopped per repository policy. Follow-up fix(ci): make editor release evidence deterministic across clean builds #3205 owns deterministic evidence generation; no workflow, timeout, bundle budget, or evidence strictness was weakened.
  • Conversation readiness observations are intentionally generation-bound and process-local; restart or gateway replacement requires a fresh readiness check and fails closed until then.
  • Local Knowledge still requires a configured embedding model; the audited UI reports this limitation without creating an unusable pod.
  • QI deterministic fallback remains available when model output cannot be parsed, but the run is explicitly degraded and quality is unavailable.
  • The consolidated diff is broad by operator decision; issue-specific regression tests and evidence preserve reviewability across the nine bounded remediations.

@Niko4417

Copy link
Copy Markdown
Collaborator Author

Manual test plan — consolidated Dev knowledge-work audit

Use the deterministic loopback gpt-4o-mini fixture only; do not enter a real provider credential.

  1. Configure the loopback gateway in Settings, run readiness, and confirm the already-mounted Chat model picker becomes eligible without reload.
  2. Send one chat turn, confirm the streamed assistant marker renders, reload, and confirm the persisted turn remains.
  3. Restore a persisted chat, open Settings, and confirm Settings is topmost and Run readiness check is clickable.
  4. Create Chat A and Chat B; confirm titles, messages, and fresh-chat results remain isolated.
  5. Open, close, and reopen the model and grounding pickers; confirm both catalogs refresh without replacing gateway configuration.
  6. Run Prompt Enhancer with the audited German knowledge-management decision prompt; confirm decision-support output, never travel planning.
  7. Refresh Health Scan into a rate-limited response; confirm no stale findings count, then activate Retry by keyboard and confirm recovery.
  8. Run QI with unparseable model output; confirm launcher, list, and detail all show Degraded / Quality Unavailable while fallback cases persist.
  9. Attempt Local Knowledge without an embedding model; confirm fail-closed NO_EMBEDDING_MODEL behavior and no unusable pod.
  10. Enable MemoriaViva and send Atlas uses PostgreSQL. against unsupported model output; confirm no fabricated memory proposal.
  11. Exhaust boot recovery and verify the accessible alert plus focused Reload control in dark, light, high-contrast, forced-colors, and 320 px modes.
  12. Restore the persisted multi-window workspace and confirm no React maximum-update-depth loop appears.

Completed local evidence on this SHA: real Google Chrome Computer Use journeys for the product flows above; hermetic Chromium regression lanes 1/1 Chat, 5/5 Prompt/Health/QI, 1/1 boot recovery, and 1/1 grounding refresh.

@Niko4417
Niko4417 marked this pull request as ready for review August 16, 2026 21:49
@Niko4417
Niko4417 requested a review from oscharko as a code owner August 16, 2026 21:49
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4aa44a01-abf4-4813-a011-c02da1ba9fb0


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Niko4417

Copy link
Copy Markdown
Collaborator Author

Maintainer exception recorded: the operator explicitly authorizes additional distinct repair rounds beyond the default three-attempt limit until PR #3204 has zero unresolved actionable review threads and green required CI. Scope is limited to confirmed review/verification/CI defects on this epic head. Accepted process cost: repeated exact-head qualification may continue as new deterministic findings surface. This exception does not waive Definition of Ready, branch isolation, current-dev integration, security, budgets, timeouts, evidence freshness, required checks, human review, or the prohibition on agent merge into dev. New stop conditions remain: scope/architecture ambiguity, secrets/customer data, overlapping ownership, a proposed gate weakening, or a confirmed high/critical security issue requiring maintainer direction.

@oscharko

Copy link
Copy Markdown
Contributor

@Niko4417 Heads-up: we are taking this PR over to land it in the upcoming v0.3.9 release. Plan: #3208 (customer-critical Local Knowledge/gateway fixes) merges first, then we rebase this branch onto current dev, shepherd it through the required checks, and include it in the release cut — provided it goes cleanly green. Thanks for the audit-closure work!

Copy link
Copy Markdown
Collaborator Author

Manual test plan — consolidated Dev knowledge-work audit

Use the deterministic loopback model fixtures only; do not enter a real provider credential.

  1. Configure the loopback gateway in Settings, run readiness, and confirm the already-mounted Chat model picker becomes eligible without reload.
  2. Send one chat turn, confirm the streamed assistant marker renders, reload, and confirm the persisted turn remains.
  3. Focus the restored chat composer, immediately open Settings, and confirm the delayed chat-focus callback cannot cover Settings and Run readiness check remains clickable.
  4. Create Chat A and Chat B; confirm titles, messages, and fresh-chat results remain isolated.
  5. Open, close, and reopen the model and grounding pickers; confirm both catalogs refresh without replacing gateway configuration.
  6. Run Prompt Enhancer with the audited German knowledge-management decision prompt; confirm decision-support output, never travel planning.
  7. Refresh Health Scan into a rate-limited response; confirm no stale findings count, then activate Retry by keyboard and confirm recovery.
  8. Run QI with unparseable model output; confirm launcher, list, and detail all show Degraded / Quality Unavailable while fallback cases persist.
  9. Attempt Local Knowledge without an embedding model; confirm fail-closed NO_EMBEDDING_MODEL behavior and no unusable pod.
  10. Enable MemoriaViva and send Atlas uses PostgreSQL. against unsupported model output; confirm no fabricated memory proposal.
  11. Exhaust boot recovery and verify the accessible alert plus focused Reload control in dark, light, high-contrast, forced-colors, and 320 px modes.
  12. Restore the persisted multi-window workspace and confirm no React maximum-update-depth loop appears.

Exact-head evidence on d3b70a62:

  • full verify receipt: 1,617 test files; 30,799 passed; 20 skipped; 0 failed;
  • UI receipt: 7/7 Chat + Prompt/Health/QI/Boot Chromium journeys and 1/1 Local Knowledge catalog-refresh journey;
  • audit receipt: findings=0, user_facing=true;
  • direct Google Chrome Computer Use: exact-head setup loaded, real form input enabled submission, optional Voice fields did not block, and an unreachable loopback provider returned content-safe GATEWAY_SETUP_FAILED without credential/upstream leakage.

@oscharko
oscharko enabled auto-merge (squash) August 17, 2026 20:20
Regenerated inside the pinned Linux gates container after merging dev
(#3208): b2.shipsTotalBytes moved from 1403398 to 1406597 with the combined
UI changes. The in-container check:editor-release-evidence run passes on the
regenerated document.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43beb7be34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/keiko-server/src/chat-handlers.ts
oscharko and others added 2 commits August 17, 2026 23:05
…ss epic

Takeover hardening for #3204 after merging dev, addressing the Codex review
rounds (12 of 13 findings fixed and red-proven; the 13th — structural chat
creation release keys — is deferred to #3210 with its verified fix sketch):

- chat-stream/chat-handlers: settle the admitted turn when pre-stream memory
  resolution throws (a pending clientTurnId answered every retry with
  CHAT_TURN_IN_PROGRESS forever); probe stream support and provider presence
  for LEGACY requests before admission persists the user message (no-op
  failDesktopChatTurn cannot settle turnless rejections; orphaned user
  messages restored the pre-#3182 invariant).
- gateway-readiness: the chat probe now mirrors the production floor exactly
  (non-empty extracted text, content-part arrays accepted) instead of being
  looser AND stricter than the adapter in different directions; chat-only
  classification keys on EXECUTED probes so a failed feature probe can no
  longer re-stamp stale capability evidence with a fresh checkedAt.
- conversation-readiness-admission: bind the callStream receiver
  (GatewayModelPort prototype method reads this.gateway — the unbound extract
  threw TypeError on the first streamed chunk).
- gateway-setup: applying verified capabilities preserves the probe-only
  conversationReady evidence under the new generation (fields stay
  consume-once; replay still answers 409) so the just-verified model no
  longer vanishes from every chat picker.
- useChatSession: a pending catalog refresh empties the picker without
  falsifying configuredModelsAvailable (AppShell mounted the gateway-setup
  modal over a configured workspace during every catalog read).
- quality-intelligence: runtime judge failures (errored or unparseable
  judgements) now append a redacted judge stage failure so the terminal frame
  and projections report the run as degraded, not unqualified success;
  RunLauncher progress strings moved into the EN/DE i18n catalogs.
- evidence: 3184/3186 fidelity proofs regenerated against the final sources
  (recorded source hashes had drifted across later refactors); the 3185
  recovery assertion is now DERIVED from an observed rate-limited →
  recovery-success transition instead of being hard-coded; 1209 bundle
  evidence refreshed in the pinned Linux container for the dev-merged branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…epic diff

- local-knowledge-grounded-qa: codePointAt over charCodeAt in the FNV-1a scope
  hash (S7758); unit-identical below the astral plane, ids are ephemeral wire
  scope identifiers.
- RunLauncher: hoist the nested findings-plural ternary (S3358).
- installable-memory-smoke: top-level await instead of void main() (S7785).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e02a480766

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/keiko-server/src/local-knowledge-grounded-qa.ts Outdated
Comment thread packages/keiko-server/src/gateway-setup.ts
Comment thread packages/keiko-ui/src/app/components/desktop/ChatWindow.tsx
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed24f18924

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/design-system/evidence/3186/qi-terminal-fidelity-proof.json Outdated
…on apply; refresh QI evidence

Review round on the takeover pushes:

- local-knowledge-grounded-qa: FNV scope hash iterates by code point (for...of),
  so an astral character contributes exactly once — codePointAt over unit
  indices consumed the pair at the high surrogate and hashed the low surrogate
  again (ids are ephemeral wire scope identifiers).
- gateway-setup: applying verified capabilities snapshots EVERY configured
  model's conversationReady observation before set() wipes the map and
  re-records each under the new generation — previously only the applied model
  survived and every other ready model fell out of the chat pickers.
- evidence 3184/3186: fidelity proofs regenerated LAST, after all source
  changes (the RunLauncher hash had drifted again through the Sonar ternary
  fix); recorded hashes re-verified byte-exact against the committed sources.
- ChatWindow first-open behavior stays as designed and pinned (reopen-refresh
  is the staleness bound; failure recovery on the next reopen) — the finding
  is answered in-thread with the design evidence.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74c322c7bc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/keiko-ui/src/app/components/desktop/hooks/useChatSession.ts Outdated
Resolving the selection against the emptied pending list reset a non-default
choice every time the picker was opened; the success path already re-validates
the kept id against the refreshed catalog. Red-proven in the pending-presence
regression.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af7fca1e3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/keiko-ui/src/app/components/desktop/ChatWindow.tsx
Comment thread packages/keiko-workflows/src/qualityIntelligence/modelRoutedTestDesign.ts Outdated
Comment thread packages/keiko-server/src/chat-handlers.ts
…ult model, judge budget degradation

- The pending catalog clear keeps the pinned synchronous invalidation but remembers
  the user's choice as restorableModelId; the success path restores it when the
  refreshed catalog still contains it, instead of falling back to the first ready
  model on every picker open. Chat switches rebind the memo to the opened chat.
- createDesktopChat with an omitted modelId prefers a conversation-ready chat model;
  readiness only reorders the preference so the precise unready 400 remains when
  nothing is ready.
- Oversized judge prompts now count toward the persisted judge stage failure
  (QI-DEG-01): a run whose every judge prompt exceeds the model budget is no longer
  presented as an unqualified success.

All three red-proven; UI suppressions register untouched via selectionForChatSwitch
extraction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 065de523e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/keiko-server/src/chat-stream-handlers.ts
Comment thread packages/keiko-model-gateway/src/promptEnhancer/generator.ts
@sonarqubecloud

Copy link
Copy Markdown

@oscharko
oscharko merged commit ae45037 into dev Aug 18, 2026
27 checks passed
@oscharko
oscharko deleted the epic/dev-knowledge-work-readiness branch August 18, 2026 05:51
@oscharko

oscharko commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Merged with admin override by owner decision to unblock the v0.3.9 release train: all 27 required checks are green on 065de52; the three review threads opened after the final push (legacy post-admission orphan, delayed-focus invalidation, standalone German travel wording) are confirmed valid and are being fixed in an immediate follow-up PR against dev — each thread will be answered with its fix reference there before being resolved.

🤖 Addressed by Claude Code

Approved-for-publish: @oscharko-dev/keiko@0.3.9

oscharko added a commit that referenced this pull request Aug 18, 2026
…ollow-up

- Restore the pre-provider cancellation settle after buffered memory resolution
  (my prior extraction dropped it): resolveBufferedMemory now checks and settles
  cancellation before assembly/model.call, discarding a legacy row. Red-proven by
  the aborting-vault pin (499, provider never called, row gone).
- Discarding a rejected legacy row now also restores chats.updated_at (MAX of the
  pre-admission value and surviving message activity, only when the delete hit),
  so a rejected request cannot promote its chat in recency-ordered history or
  become the session-resume candidate. Three store pins, red-proven.
- The relocated route pin now asserts persist-BEFORE-retrieval inside the failing
  vault callback itself (user row visible at retrieval time) plus the discard
  afterwards — strengthened, not relaxed.
- WindowFrame: raiseWindowForInteraction centralizes the interaction token with
  the raise; resize-handle grabs and the maximize traffic button route through
  it (full api.focus call-site audit in the PR thread). Red-proven resize pin.
- Prompt enhancer: the travel cue requires planning intent — possessive
  (meine/unsere Reise) or a planning verb within a 40-char window on either side
  of standalone reise, Unicode lookarounds throughout. Non-planning mentions
  (definition/translation) stay unframed; Preise/Abreise/Reisepass excluded.
  Input-space pins: empty, control-only, combining-diacritics, ZWSP smuggling,
  punctuation boundaries, compounds.

Refs #3204

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
oscharko added a commit that referenced this pull request Aug 18, 2026
- Recency rollback is now OWNED: the legacy admission captures the exact
  updated_at its createMessage touch wrote (synchronous SQLite, no interleave)
  and the store restore compare-and-sets on it — a rename that lands while
  retrieval is in flight keeps its newer recency. Red-proven store pin.
- WindowFrame maximize: the interaction token advances on the primary
  pointerdown (press time), maximize stays on click with no second bump — a
  press-and-hold across the 180 ms delay can no longer let the stale timer
  re-raise the armed window. Red-proven hold pin (90/90).
- Travel cue: the possessive-only needle is removed — every pinned positive
  already rides the planning-verb window needles, and possession alone proved
  quotable non-intent (Übersetze „meine Reise" ins Englische). Red-proven
  negative pin (52/52).

Refs #3204

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
oscharko added a commit that referenced this pull request Aug 18, 2026
…w findings (#3212)

* fix(server,ui,model-gateway): repair the three post-merge #3204 review findings

- Legacy post-admission orphan (server): a turn rejected after admission but
  before any provider output now settles through settleRejectedDesktopChatTurn —
  ledger turns settle via the turn record, legacy turns (no clientTurnId) get
  their just-admitted user row discarded through the narrow, fail-closed
  discardLegacyTurnUserMessage store operation. Covers the streamed readiness
  re-resolution, the pre-stream cancel, and the buffered memory/boundary arm.
  The #2977-era route pin is relocated to the new terminal state; its
  persist-before-retrieval ordering assertion is unchanged.
- WindowFrame delayed focus (ui): a module-scope interaction token invalidates
  the 180ms delayed raise when a later interaction already raised another
  window, closing the preventDefault gap in the DOM-focus predicate.
- Prompt enhancer (model-gateway): standalone German "Reise" matches the travel
  rule again via Unicode word-boundary lookarounds; "Preise" stays excluded.

All three red-proven; local env failures (java probe, DNS posture, QA matrix)
reproduced identically on the clean tree.

Refs #3204

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(server,ui,model-gateway): close the five review clusters on the follow-up

- Restore the pre-provider cancellation settle after buffered memory resolution
  (my prior extraction dropped it): resolveBufferedMemory now checks and settles
  cancellation before assembly/model.call, discarding a legacy row. Red-proven by
  the aborting-vault pin (499, provider never called, row gone).
- Discarding a rejected legacy row now also restores chats.updated_at (MAX of the
  pre-admission value and surviving message activity, only when the delete hit),
  so a rejected request cannot promote its chat in recency-ordered history or
  become the session-resume candidate. Three store pins, red-proven.
- The relocated route pin now asserts persist-BEFORE-retrieval inside the failing
  vault callback itself (user row visible at retrieval time) plus the discard
  afterwards — strengthened, not relaxed.
- WindowFrame: raiseWindowForInteraction centralizes the interaction token with
  the raise; resize-handle grabs and the maximize traffic button route through
  it (full api.focus call-site audit in the PR thread). Red-proven resize pin.
- Prompt enhancer: the travel cue requires planning intent — possessive
  (meine/unsere Reise) or a planning verb within a 40-char window on either side
  of standalone reise, Unicode lookarounds throughout. Non-planning mentions
  (definition/translation) stay unframed; Preise/Abreise/Reisepass excluded.
  Input-space pins: empty, control-only, combining-diacritics, ZWSP smuggling,
  punctuation boundaries, compounds.

Refs #3204

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(server,ui,model-gateway): harden the three refinement findings

- Recency rollback is now OWNED: the legacy admission captures the exact
  updated_at its createMessage touch wrote (synchronous SQLite, no interleave)
  and the store restore compare-and-sets on it — a rename that lands while
  retrieval is in flight keeps its newer recency. Red-proven store pin.
- WindowFrame maximize: the interaction token advances on the primary
  pointerdown (press time), maximize stays on click with no second bump — a
  press-and-hold across the 180 ms delay can no longer let the stale timer
  re-raise the armed window. Red-proven hold pin (90/90).
- Travel cue: the possessive-only needle is removed — every pinned positive
  already rides the planning-verb window needles, and possession alone proved
  quotable non-intent (Übersetze „meine Reise" ins Englische). Red-proven
  negative pin (52/52).

Refs #3204

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
oscharko added a commit that referenced this pull request Aug 18, 2026
* release: prepare 0.3.9 customer hardening

Bump every workspace package, the exported KEIKO_*_VERSION constants, and the
lockfile to 0.3.9; add the release-impact catalog entry for the customer-
hardening release (LiteLLM first-run indexing remediation #3208, Dev knowledge-
work readiness stack #3204, post-merge review-finding repair wave #3212).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(ci): bound a branch-creating push's quality range at the head parent

A push that creates a branch delivers the zero SHA as its before-pointer; the
resolver fell back to the repository root and swept the entire history into the
secret scan (918 commits on release/0.3.9), failing the gate on long-accepted
historical fixtures. The head's parent is the honest bound for the pushed work;
the pull_request run still covers the full PR range from its non-zero base.
Red-proven in resolve-quality-range.test.mjs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(ci): bound branch-creating pushes at the merge-base with dev

head^ only covered the final commit of a multi-commit branch creation — a
secret introduced and deleted again before the head escaped the promised
history inspection. Both quality-range consumers (secret scan, semantic
duplication) now fetch dev and pass QUALITY_FALLBACK_BASE_REF; the resolver
takes the merge-base with that ref and fails closed without it. The five
zizmor cache-poisoning anchors shift +12 for the inserted workflow lines.
Red-proven in resolve-quality-range.test.mjs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(ci): validate the fallback base ref shape and pin hostile inputs

A leading dash would reach git merge-base as an OPTION (--fork-point) instead
of a ref; whitespace and control characters have no place in a workflow-
provided ref. The resolver now rejects anything but a plain ref name before
any git invocation, red-proven across option-like, whitespace, control-
character, and dash-terminated values plus the empty-string boundary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment