Skip to content

Implement authoritative mecatui session reload (#2071) - #2078

Closed
jbeda wants to merge 19 commits into
mainfrom
impl/mecatui-authoritative-session-reload
Closed

jbeda wants to merge 19 commits into
mainfrom
impl/mecatui-authoritative-session-reload

Conversation

@jbeda

@jbeda jbeda commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implement the approved authoritative mecatui session reload plan from baseline 972d782b6544fd60ca38ac97cc492f6acf2609b1. Reconnect, startup resume, and interactive adoption install server session facts without resetting the operator's draft, focus, modal, or conversation position. Session-correlated snapshots and a replacement live-feed barrier order title, usage, and occupancy against live events; initial failed fetches retry with bounded backoff, including configurations without a live feed.

The plan's AC2.3 was directly amended at the operator's request in a separate commit (f704360cf): retry of a failed post-settlement counter refetch after the feed barrier is released is deferred to #2076. The refetch itself remains in this implementation. #2076 is assigned to Joe and is next after this PR merges. The known risk is that a transient failure of that particular refetch can leave usage/occupancy stale until another successful refresh.

Verification

  • Focused offline tests cover authoritative presence/fallback, no-live initial retry, buffered turn/result ordering and settlement, and preservation of actual scroll anchor/offset, modal, focus, draft, and pending recovery. A planted scroll-reset mutation made the preservation test fail.
  • task docs, task test, task lint, task test:race, task site:build, task ac-trace-strict, and go run ./cmd/mecademo passed on the rebased branch. The offline demo exercised tool call, permission ask/approval, and result. Initial full-gate attempts hit a timeout and unrelated timing-sensitive test failures; complete reruns passed.
  • Panel axes were run against the approved baseline. Spec/test/order findings were addressed or revalidated; a false-positive mode/model race was retracted. The post-settlement failure retry is the explicit deferred exception. A narrow rejected-live-title epoch interleaving remains for evaluation after Retry failed post-settlement mecatui session reconciliation #2076; no title change was attempted in this PR.

Interface and handoff

No new RPC, protobuf, engine exported API, tool schema, CLI setting, persisted field, or event. The existing GetSession response now carries presence and usage through mecatui client/UI projections as specified by the plan. Only a human merges this PR. #2072 remains blocked until #2071 completes.

Closes #2071

@jbeda
jbeda force-pushed the impl/mecatui-authoritative-session-reload branch from b0256bb to f1fbc27 Compare October 5, 2026 03:11
jbeda and others added 19 commits October 4, 2026 20:12
Preserve legacy unknown usage on adoption and defer unordered counters until run settlement.

Co-authored-by: Mecatl <[email protected]>
@jbeda
jbeda force-pushed the impl/mecatui-authoritative-session-reload branch from f1fbc27 to def04f9 Compare October 5, 2026 03:13
@jbeda
jbeda marked this pull request as draft October 5, 2026 22:33
@jbeda

jbeda commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

This PR is being kept as a tested reference but is unlikely to merge. We are designing a deeper session-persistence and client-reload architecture in connection with #2114: one authoritative committed history, a consistent snapshot-to-subscription boundary, and explicit provisional versus durable updates. That direction supersedes the assumptions behind this PR's reconciliation of the current snapshot and live-feed paths.

Marking this PR draft while the new design is reviewed. Please do not treat it as the implementation baseline for the redesign; no replacement contract or implementation has been approved yet.

@jbeda

jbeda commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing this implementation effort at Joe’s request. The session-history redesign has moved beyond it and continues independently in draft PR #2179. No implementation from this PR is being merged.

@jbeda jbeda closed this Oct 8, 2026
@jbeda
jbeda deleted the impl/mecatui-authoritative-session-reload branch October 8, 2026 22:33
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.

Make mecatui session reload authoritative

1 participant