Skip to content

fix(fe): surface state contract failures - #342

Merged
mergify[bot] merged 12 commits into
mainfrom
codex/state-7-error-contract
Oct 4, 2026
Merged

mergify[bot] merged 12 commits into
mainfrom
codex/state-7-error-contract

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Die Konfliktlösung ist abgeschlossen und der Branch enthält den aktuellen Stand von main.
Die generierten HQ-Snapshots wurden nach dem Merge aktualisiert und mitgepusht.
Die vollständige Linux-Prepush-Prüfung ist grün; die Windows-Prüfung bleibt Aufgabe der Merge-Queue.

Report

What changed

  • Merged origin/main into codex/state-7-error-contract to resolve PR fix(fe): surface state contract failures #342's conflict.
  • The merge used Git's ort strategy and produced no textual conflict hunks; the merge commit is d2dcb45.
  • Refreshed the generated HQ snapshots in b8713fd after the merge.
  • Recorded the final handover in d915945.
  • No conflict-resolution hunk changed runtime logic; the merged runtime files are the already-reviewed content from origin/main.

Architecture drift

node scripts/ci/architecture-drift.mjs check exited 0 with no new findings. No allowlist entry was added.

Evidence

  • npm run dev:start-check — exit 0 before the final gate; 11.2 GB RAM free and one Cargo build running.
  • git merge origin/main — exit 0; merge commit d2dcb45.
  • bash scripts/ci/secret-scan.sh — exit 0; no leaks found.
  • bash scripts/ci/gates.sh lane prepush — exit 0 on final HEAD; frontend 480/480, HQ 516/516, Rust 1757/1757 passed, with 7 Rust tests skipped.
  • git push -u origin codex/state-7-error-contract — exit 0; the final push hook also ran prepush successfully.
  • git ls-remote origin refs/heads/codex/state-7-error-contract — exit 0; verified final SHA d915945b656898f9cd9686d2f1646b8ca11187fa.

NICHT ABGEDECKT

  • Linux does not compile or run the #[cfg(windows)] tests or Windows clippy arms; the Windows lane runs in the merge queue.
  • Browser smoke, frontend build, workflow gates, and external updater/provider services were not exercised by prepush.

Review disposition

Review: ausstehend (Stufe B).

Open points

  • Independent tier-B review and Windows merge-queue coverage remain required.

Test-First: src/lib/ipc.test.ts::strips both Rust routing prefixes before a message reaches the UI
Test-First: src/components/StatisticsView.test.tsx::formats statistics failures through describeError
Test-First: src/components/SettingsView.updates.test.tsx::shows a failed updater state write instead of swallowing it
Test-First: src/lib/useSharpening.test.ts::reports a failed abandoned-question write after cancellation
Co-Authored-By: Codex GPT-5 <47299143+Cuarroc@users.noreply.github.com>
Regression-For: c3d988e
Co-Authored-By: Codex GPT-5 <47299143+Cuarroc@users.noreply.github.com>
No-Test: activity journal only
Co-Authored-By: Codex GPT-5 <47299143+Cuarroc@users.noreply.github.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 4, 2026 17:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T17:59:06.152770Z c80f5b6 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: c80f5b65d8

ℹ️ 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 on lines +481 to +484
.catch((cause: unknown) => {
if (generation === latestUpdaterViewGeneration) {
setUpdateState({ phase: "error", message: describeError(cause) });
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Verwirf Fehler überholter Updater-Lesevorgänge

Wenn getUpdaterState() erst fehlschlägt, nachdem der Nutzer bereits „Check for updates“ gestartet hat, überschreibt dieser Catch den neueren Zustand mit phase: "error". Der Erfolgszweig schützt genau davor mit !updaterTransitioned.current, der neue Fehlerzweig jedoch nicht; dadurch kann etwa ein bereits gefundener Update samt Installationsschaltfläche wieder verschwinden. Prüfe hier ebenfalls, ob seit Beginn des Lesevorgangs eine Transition stattgefunden hat.

Useful? React with 👍 / 👎.

Comment on lines +466 to +469
.catch((cause: unknown) => {
if (generation === latestUpdaterViewGeneration) {
setUpdateState({ phase: "error", message: describeError(cause) });
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ordne Schreibfehler der zugehörigen Updater-Transition zu

Wenn ein älterer setUpdaterState-Aufruf verzögert fehlschlägt, setzt dieser Catch den sichtbaren Zustand auch dann auf Fehler, wenn publishUpdateState inzwischen bereits eine neuere Transition angezeigt hat. Beispielsweise kann das Speichern von installing scheitern, danach ready erfolgreich gespeichert werden und der verspätete Catch dennoch die Neustart-Schaltfläche dauerhaft durch den alten Fehler ersetzen, weil erfolgreiche Persistenz den UI-Zustand nicht erneut setzt. Der Fehlerhandler braucht daher zusätzlich eine Transition-ID beziehungsweise einen Vergleich mit dem aktuell veröffentlichten Zustand.

Useful? React with 👍 / 👎.

Comment thread src/lib/useSharpening.ts
Comment on lines +32 to 35
function closeAbandoned(abandoned: Question[], reportError: (cause: unknown) => void): void {
for (const question of abandoned) {
void answerQuestion(question.id, CANCEL_ANSWER).catch(() => undefined);
void answerQuestion(question.id, CANCEL_ANSWER).catch(reportError);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Begrenze Abbruchfehler auf die zugehörige Schärfungsrunde

Der neue unawaited Catch ruft reportError ohne Prüfung der Rundennummer auf. Wechselt der Nutzer nach einem Abbruch sofort das Projekt oder startet eine neue Schärfung, kann ein später Fehler beim Schließen der alten Frage setError in der inzwischen aktuellen Oberfläche auslösen und dort fälschlich als Fehler der neuen Runde erscheinen. Erfasse beim Schließen die aktuelle round und veröffentliche den Fehler nur, solange diese Runde beziehungsweise Oberfläche noch aktuell ist.

Useful? React with 👍 / 👎.

@mergify

mergify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

Cuarroc and others added 3 commits October 4, 2026 20:04
Test-First: src/lib/ipc.test.ts::strips only the refused routing prefix and keeps unknown-entity errors readable
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Regression-For: 06fe4c3
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No-Test: test-only change, keeps a red-first trailer name green at head
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Cuarroc

Cuarroc commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify mergify Bot added the queued label Oct 4, 2026
@mergify

mergify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-04 18:18 UTC · Rule: default · triggered by @Cuarroc with the @mergifyio queue command
  • 🚫 Left the queue — 2026-10-04 18:18 UTC · at 869edd3079c773619f4322b102e1ba83b21f72de

This pull request spent 4 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

Hint

You should update or rebase your pull request.

If you want to requeue this pull request, you can post a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added dequeued and removed queued labels Oct 4, 2026
@mergify mergify Bot removed the dequeued label Oct 4, 2026
@Cuarroc

Cuarroc commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

No-Test: activity handoff note only
@mergify mergify Bot added the queued label Oct 4, 2026
@mergify

mergify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-04 18:41 UTC · Rule: default · triggered by @Cuarroc with the @mergifyio queue command
  • 🚫 Left the queue — 2026-10-04 19:04 UTC · at b4aca662c0e77661718e652811645adb5ef7e7ff

This pull request spent 23 minutes 22 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

The pull request was held in the queue, conflicting with 1 pull request ahead of it. The conflict became a base branch one after #340 merged.

Hint

You should update or rebase your pull request.

If you want to requeue this pull request, you can post a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added dequeued and removed queued labels Oct 4, 2026
@Cuarroc

Cuarroc commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify mergify Bot removed the dequeued label Oct 4, 2026
No-Test: activity handoff only
@mergify mergify Bot added the queued label Oct 4, 2026
@mergify

mergify Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 39 minutes 36 seconds in the queue, including 23 minutes 21 seconds running CI.

Required conditions to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant