Skip to content

fix(chat): verify complete delegation originals - #7692

Open
loopx-agent wants to merge 1 commit into
mainfrom
codex/delegation-original-reader-20261030
Open

loopx-agent wants to merge 1 commit into
mainfrom
codex/delegation-original-reader-20261030

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

Opening Delegations → Original conversation used the lenient, unpaged Session read. A damaged journal could omit a saved message while the detail still appeared readable. Ordinary unpaged snapshots already contain the full transcript; the defect is accepting an unverifiable original, not an ordinary page-size truncation.

The detail now reuses fetchChatSessionHistory: read every bounded page from one source and frozen prefix, then show the complete target Turn. A failed/conflicting page shows the existing unavailable state; closing cancels the read. Existing discovered-summary callers retain their identity checks and legacy full-snapshot compatibility.

  • Basis: independently reproduced defect in the existing original-request readback journey; intended base main. Related perf(collaboration): batch guarded inventory observations #7630, without closing its broader latency/adoption work.
  • Written by: OpenAI GPT-6 / Codex model agent.
  • Specification: existing history cursor/source contract in loopx/capabilities/manager_context/chat_history.py and task-first delivery rules at base c38b3a1a62e844d1d59f68701d3b4684136e50c3; the scoped request in this PR is the user-facing basis.
Criterion Disposition Owner / decisive evidence
Complete original Turn across message pages implemented Shared TS history reader; real question/answer across the 200-message boundary and full long body
Reject partial or mixed originals; recover and cancel implemented Damaged journal, later-page failure, changed scope/digest/offset, duplicate IDs, lost page contract, close/reopen
Preserve normal history and original media implemented Ordinary/bound history parity, legacy first snapshot, images/quotes, bilingual and narrow packaged journeys

Scope And Continuation

Complete within this reader fix. No second paginator, cache, schema or state owner. The companion fixture removes a duplicate user append already owned by create_turn, isolates its process namespace before owner imports, and reuses authenticated child cleanup before temporary state disappears. Both browser runners check fixture exit, so an early PASS line cannot hide failed teardown.

The same existing disclosure, text and layout remain. Source proposal and synthetic packaged qualification do not prove adoption by an installed App, a live provider thread, or end-to-end latency improvement. Broader delegation readback/adoption and performance work remains separate.

Validation

Check kind Result Evidence / limitation
regression_parity passed Immutable pre-change packaged reader fails the damaged-journal oracle; current reader refuses it and recovers after source restoration
real_entrypoint / real_backend passed smoke/delegation-search-browser-smoke.mjs with real File and SQLite authority plus Chat HTTP: complete target Turn, long body, later-page hold/failure, reopen/cancel, 390px/keyboard, search/paging and source failure/recovery
integration passed npm run smoke:conversation-history and npm run smoke:bound-conversation: three real HTTP pages, source/prefix conflicts, ordinary and bound history, cancellation and old-service compatibility
real_entrypoint passed smoke/delegation-media-browser-smoke.mjs: images/quotes, same-Turn isolation, refresh/native return, English/narrow, executor-offline zero-POST read and successful teardown
unit / integration passed 120 tests across Chat input validation, conversation bindings and request inventory suites
static passed Dashboard/Chat build, strict history-smoke typecheck, changed-fixture Ruff, diff and bilingual-RFC checks; six-file public-boundary scan
static / integration passed Standard risk-selected premerge: 5 direct checks and 8 selected canary/boundary checks; exact-scope change-quality receipt valid, no blockers
manual passed Inspected populated default list, damaged-source error and expanded long-body end at 1440×1000 and 390×844
installed / external CI not_run Installed App adoption and remote exact-head CI/review are separate; no merge or installation claimed

The original-reader segment adds zero POSTs and leaves Chat/receipt state and the original 13 Turns unchanged. Workspace startup with the synthetic available executor separately attempts one Session admission, rejected by the read-only fixture; this PR does not claim whole-workspace startup made zero network POSTs. The media journey separately qualifies reading with the executor offline. No backend authority or PostgreSQL implementation changes.

Frontend / Visual Evidence

Synthetic packaged Chat at the tested revision, not an installed or live-data capture. The default grouped list, primary text size, persistent count/paging and existing original-conversation entry stay in place. Failure remains visible within that entry; optional requirements/provenance stay folded until requested. The stress body is synthetic user content, not added interface explanation.

Before: damaged source still looks readable After: original is explicitly unavailable
Before damaged original After damaged original refusal

Default populated desktop view (unchanged arrangement):

Default grouped delegation list
Narrow default view Recovered original: full body end and later-page answer
Narrow grouped delegation list Complete narrow original with its answer

The long original remains scrollable at narrow width and its later-page answer appears once at the end. This is a completeness/failure review, not a claim of a visual redesign or independent audience comprehension. Generated captures stay outside Git under the repository visual-evidence retention contract.

Boundary Checklist

  • Scoped bug fix and focused regression/fixture update; no new capability or decision authority.
  • Public-safe synthetic inputs and inspected screenshots; no private state, credentials, raw traces, internal links or local paths.
  • Existing English/Chinese RFC pairs unchanged; bilingual diff check passed.
  • DCO sign-off on the author commit.
  • Same-domain simplification applied by reusing the history owner and removing duplicate fixture append; no unrelated refactor.
  • No merge, installation, release or external message execution.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@mergify

mergify Bot commented Oct 30, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Oct 30, 2026

This branch has not been deployed

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

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant