Skip to content

fix(dispatch): reconcile durable Hub task admission outcomes - #2351

Merged
DeliciousBuding merged 5 commits into
masterfrom
fix/durable-admission
Sep 6, 2026
Merged

fix(dispatch): reconcile durable Hub task admission outcomes#2351
DeliciousBuding merged 5 commits into
masterfrom
fix/durable-admission

Conversation

@DeliciousBuding

@DeliciousBuding DeliciousBuding commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #2349.

  • Persist Hub task identity and pending admission together before executor startup, using the existing File snapshot / SQLite durable-row machinery. Final accepted/rejected outcomes are immutable and retried synchronously after persistence errors.
  • Reconcile retained Hub-task runs instead of treating every record as success. In-flight owners return busy; accepted work replays without another start; only proven pre-execution capacity/write rejection may create a new attempt; orphan/legacy ambiguity stays explicit and cannot auto-restart.
  • Apply the same original-run capability policy to cached and cold replays. Retain pending evidence during terminal cleanup and expose admission state/error through the Run read model.
  • Desktop preserves unconfirmed outcomes without ACK/FAIL, adds capacity/persistence retry classification, keeps uncertain errors for review, surfaces them through the existing warning UI without duplicate notices, and clears the stored error on first confirmed acceptance. Existing task progress is not downgraded.

Validation

  • Reproduced both original bugs through real HTTP regressions on the previous master: cold-cache scope authorization was bypassed, and a rejected executor admission replayed as false 202. Both now pass.
  • Full Windows Edge short suite passed; Linux race passed for runcontrol/API/store/lifecycle. Focused vet/staticcheck and existing Hub OpenAPI duplicate-key/schema regression passed.
  • File/SQLite tests directly read durable content immediately after admission writes, before Close/Flush/reopen; both pending and final outcomes are present. Reopen, failed-write retry, final-state immutability, concurrent Hub-task replay, safe capacity retry, legacy uncertainty and pending retention are covered.
  • Desktop: 54 files / 484 unit tests; app/test typechecks, changed-file ESLint and renderer production build passed.
  • Chromium: 6/6 behavior tests, including real Desktop bridge wired to HTTP/WS fixtures in light/dark. Busy → capacity → persist failure → uncertain → confirmed/replayed → terminal behavior is asserted.
  • Existing doc SSOT, OpenAPI/router, conventions and Edge status verifiers passed. Visual QA passed for four shell captures/geometry contracts (light/dark, 1440×810 and 800×900), with the actual uncertain-admission notice also asserted and visually reviewed in both themes. Final head a66dc2e2e2f3b22fcdd351699b4be8b805bb14f1 passed all seven required checks in run 34062978527, including native Windows and the backend PostgreSQL/Redis/fixture matrix. Existing unrelated report-only frontend lint findings were not presented as a clean full-lint result.

Scope and evidence boundaries

No new SQL migration, credential path, standalone recovery database or verifier. Source and fixture evidence only: no live deployment, actual model/login request or packaged Desktop claim. Admission evidence does not prove process liveness; orphan/pending results still need external reconciliation and are never blindly restarted. Explicit deletion/retention of identity limits long-term dedup guarantees. Cross-transport execution intent and callback route ownership are the separately tracked #2350.

DeliciousBuding and others added 3 commits September 7, 2026 05:44
Make pending Hub identity durable before executor admission, retain immutable accepted/rejected outcomes, authorize stored replay scopes and distinguish live contention from uncertain recovery. Retry only proven pre-execution rejections and preserve accepted work without another start.

Refs #2349.

Co-authored-by: Codex <codex@vectorcontrol.tech>
Treat explicit capacity/persistence failures as recheckable, preserve uncertain outcomes without ACK/FAIL and clear their note only after first acceptance. Extend real-renderer fixtures and keep typed error clearing without a cast.

Refs #2349.

Co-authored-by: Codex <codex@vectorcontrol.tech>
Describe persistent admission evidence, cached and cold replay authorization, retryable pre-execution rejection and explicit uncertain outcomes. Expose admission metadata without claiming process recovery.

Refs #2349.

Co-authored-by: Codex <codex@vectorcontrol.tech>
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 86025e3c-14e7-4d56-87c2-34fd603a2c8a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

DeliciousBuding and others added 2 commits September 7, 2026 05:57
…writes

Keep replay/target decisions distinct from the pending identity write so the state machine remains within the existing complexity gate. Serialize persistence failure injection with the background writer.

Co-authored-by: Codex <codex@vectorcontrol.tech>
Do not leave the manual-review reason in a hidden bridge store. Show it through the existing warning UI and deduplicate unchanged reasons across transport trace IDs; keep acceptance and execution unchanged.

Co-authored-by: Codex <codex@vectorcontrol.tech>
@DeliciousBuding
DeliciousBuding marked this pull request as ready for review September 6, 2026 22:13
@DeliciousBuding
DeliciousBuding merged commit dfef5e2 into master Sep 6, 2026
47 checks passed
@DeliciousBuding
DeliciousBuding deleted the fix/durable-admission branch September 6, 2026 22:13
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.

fix(dispatch): reconcile Hub task replay with durable admission evidence

1 participant