Stop at once as ui_contract_mismatch on ChatGPT's new page layout #78

Merged
xicv merged 8 commits from fix/new-layout-fail-fast into main 2026-09-25 01:28:51 +00:00
xicv commented 2026-09-25 01:28:48 +00:00 (Migrated from github.com)

Summary

First step for #77. ChatGPT now serves a new page layout on every fresh load. This browser contract cannot operate it yet, and until now it retried page_state_unresolved for the whole 90-minute pre-Send budget: 139 and 160 attempts in the reported cases. This change makes it stop at once with a named reason. The port to the new layout follows separately.

What the new layout looks like (live, read-only, 2026-09-25, build e74a52d7…):

  • Composer: no #prompt-textarea and no fallback textarea. The composer is a ProseMirror div[contenteditable="true"][role="textbox"] labelled "Ask ChatGPT", with no id, inside [data-composer-layout].
  • Messages: no data-message-author-role or data-message-id. Turns are [data-turn-key].
  • Test ids and banners: almost no data-testid is left, and there is no #thread-bottom.

Change:

  • Page inspection recognizes the new layout. All three must hold: no #prompt-textarea, a visible role="textbox" editor, and a [data-composer-layout] element.
  • The readiness wait stops after two agreeing reads, and assertReady raises the human-only ui_contract_mismatch in every mode, before anything is composed.
  • ego_preflight reports blockedReason: "ui_contract_mismatch" with an unsafe browser contract.
  • The broker never retries the code. It is a proven pre-Send stop, so reconcile can close the exchange as delivery absent. The existing loops that run every proven stop code through reconcile cover it.
  • Browser contract 35, runtime generation 2026-09-25.1.

Verification

  • Tests written first and seen failing, with page_state_unresolved where ui_contract_mismatch was expected:
    • preflight names the layout;
    • bind (existing and create_once) stops after at most three inspections;
    • an exchange stops with nothing composed, no policy click and no Send;
    • the broker does not retry the code.
  • The composer fixture gained layout: "shell", built from the live markup.
  • npm test: 1428 tests, 1427 pass, 1 skipped. npm run test:ego-monitor 148/148. ESLint clean on changed files. A3K fixture regenerated.
  • Codex review (read-only): one finding. A create-once bind, reconcile and re-anchor's final check stopped on a single inspection. Fixed: every readiness stop now needs a second agreeing read, with a test for a transient first read. Codex review of the fix: no actionable defect.

Not released alone: this ships in the same release as the new-layout port (#77).

## Summary First step for #77. ChatGPT now serves a new page layout on every fresh load. This browser contract cannot operate it yet, and until now it retried `page_state_unresolved` for the whole 90-minute pre-Send budget: 139 and 160 attempts in the reported cases. This change makes it stop at once with a named reason. The port to the new layout follows separately. **What the new layout looks like** (live, read-only, 2026-09-25, build `e74a52d7…`): - **Composer:** no `#prompt-textarea` and no fallback textarea. The composer is a ProseMirror `div[contenteditable="true"][role="textbox"]` labelled "Ask ChatGPT", with no id, inside `[data-composer-layout]`. - **Messages:** no `data-message-author-role` or `data-message-id`. Turns are `[data-turn-key]`. - **Test ids and banners:** almost no `data-testid` is left, and there is no `#thread-bottom`. **Change:** - Page inspection recognizes the new layout. All three must hold: no `#prompt-textarea`, a visible `role="textbox"` editor, and a `[data-composer-layout]` element. - The readiness wait stops after two agreeing reads, and `assertReady` raises the human-only `ui_contract_mismatch` in every mode, before anything is composed. - `ego_preflight` reports `blockedReason: "ui_contract_mismatch"` with an unsafe browser contract. - The broker never retries the code. It is a proven pre-Send stop, so reconcile can close the exchange as delivery absent. The existing loops that run every proven stop code through reconcile cover it. - Browser contract 35, runtime generation 2026-09-25.1. ## Verification - Tests written first and seen failing, with `page_state_unresolved` where `ui_contract_mismatch` was expected: - preflight names the layout; - bind (existing and create_once) stops after at most three inspections; - an exchange stops with nothing composed, no policy click and no Send; - the broker does not retry the code. - The composer fixture gained `layout: "shell"`, built from the live markup. - `npm test`: 1428 tests, 1427 pass, 1 skipped. `npm run test:ego-monitor` 148/148. ESLint clean on changed files. A3K fixture regenerated. - Codex review (read-only): one finding. A create-once bind, reconcile and re-anchor's final check stopped on a single inspection. Fixed: every readiness stop now needs a second agreeing read, with a test for a transient first read. Codex review of the fix: no actionable defect. Not released alone: this ships in the same release as the new-layout port (#77).
Sign in to join this conversation.
No description provided.