Repository navigation
close AC gaps on yyvg.6.1/ptx + add popup attention surface (yyvg.7) - #3098
Conversation
… restart
Adjudicates polylogue-yyvg.6.1 AC1 ("including receiver failure/restart")
against merged PRs #2977/#2979/#2981/#2983/#2986: existing fixtures proved
terminal-state non-recapture and unpaired-freshness holds separately, but
none combined a receiver outage with a simulated service-worker restart
(chrome.storage persists, in-memory reconciliation state does not) against
a terminal ChatGPT conversation. Adds that fixture; it passes against
current master unchanged, closing the literal AC1 gap called out by the
It.17 warroom sweep note.
Ref polylogue-yyvg.6.1.
Verification:
- npx vitest run tests/background.test.js -> 83 passed
- npm run lint -> clean
- npm run validate -> manifest ok
Co-Authored-By: Claude <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe pull request adds browser-extension regression coverage for terminal conversation behavior across receiver outages and service-worker restarts, plus a repository-wide test preventing retired campaign vocabulary in browser-action conduit sources. ChangesTerminal capture restart regression
Conduit vocabulary guard
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
… vocabulary Ref polylogue-ptx AC6: "static/contract tests reject campaign vocabulary or a second submit ledger in extension/receiver code." Verified by inspection that BrowserPostCommand/BrowserLaunchJob are fully retired and there is exactly one submit ledger (BrowserActionIntent spool via list_actions/create_action on the receiver; the extension mirrors only an executor id, no parallel queue) — but no automated guard existed to keep it that way. Adds a static scan over polylogue/browser_capture/, polylogue/daemon/browser_capture.py, and browser-extension/src/ that rejects the retired class names and campaign identity fields (mission_id, deliverable_id, package_revision, cadence_strategy, campaign_id, handoff_id), following the existing tests/unit/architecture/test_surface_storage_boundary.py pattern. The extension's "mission control" status-surface naming (ambient/popup) is a UI metaphor for cross-conversation archive intelligence per yyvg.7, unrelated to campaign MissionId identity, and is deliberately excluded (word-boundary match on "mission_id"/"MissionId", not bare "mission"). Ref polylogue-ptx Verification: - devtools test tests/unit/architecture/test_browser_action_conduit_vocabulary.py -> 1 passed Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@browser-extension/tests/background.test.js`:
- Around line 1718-1720: Replace the fixed 20ms timeout after
installedListener() in the outage test with a deterministic wait that observes
the receiver pairing state in storage until it becomes "offline". Only proceed
to the no-capture-side-effects assertions after that state transition is
confirmed, preserving the existing test setup and assertions.
In `@tests/unit/architecture/test_browser_action_conduit_vocabulary.py`:
- Around line 54-62: Update _iter_source_files to validate every path in
RECEIVER_ROOTS and EXTENSION_ROOT before scanning, raising an explicit error
when any configured root does not exist. Preserve the existing directory/file
filtering and sorting behavior for valid paths.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7f7b2a54-06d4-4fc9-8d4b-afa066ca4feb
📒 Files selected for processing (2)
browser-extension/tests/background.test.jstests/unit/architecture/test_browser_action_conduit_vocabulary.py
Ref polylogue-ptx AC7: "typed rate/auth/drift failures" must be covered by packaged fixtures on both receiver and extension sides. The extension side already had full coverage (classifyBrowserActionFailure unit test for all six outcomes; background.test.js integration tests driving rate_limited and provider_drift end to end through the worker). The receiver side (polylogue/browser_capture/actions.py:update_action) had zero direct coverage of provider_warning/rate_limited/safety_locked/auth_challenge/ capability_mismatch/provider_drift, despite the state machine handling all six identically (transition to "blocked", typed failure_kind, lease released, retry_after_seconds preserved). Adds a parametrized receiver-side test over all six outcomes proving: the blocked transition and typed failure_kind; the lease is released (so a different owner cannot silently hijack it, but also isn't left orphaned); an idempotent resubmit of the identical outcome/detail returns the same terminal record without raising (the client's own POST retrying after a network blip must be safe); and a conflicting outcome/detail on the same terminal action is rejected rather than silently overwritten (the ledger-side analogue of polylogue-yyvg.6.1 AC2's "a terminal job cannot revive it"). Combined with existing tests (create/reply/attachment hashing, capability fail-closed, optional project targeting, lease replacement across a worker death, no-foreground-activation on the extension side), this closes AC7's packaged-fixture matrix; only the live reply/project-targeting proof (the operator-run final smoke) remains open. Ref polylogue-ptx Verification: - devtools test tests/unit/browser_capture/test_actions.py -> 18 passed - devtools verify --quick -> exit 0 Co-Authored-By: Claude <[email protected]>
Ref polylogue-yyvg.7: the popup exposed every diagnostic (work queue, full backfill controls, receiver pairing/reset, debug log, receiver settings) as always-visible machinery, with no single place answering "does this need me right now?" — the opposite of the bead's "healthy automatic capture is summarized, not controlled; operator interaction only for genuine ambiguity, authorization, or irrecoverable failure" design. Adds computeAttention() and pendingBrowserActionCount() to operator_status.js (the existing shared status/vocabulary module used by ambient, message-layer, and popup — kept as the single presentation model, not a fourth copy). computeAttention() is a strict typed priority list matching AC3's exact categories backed by real state: auth/pairing mismatch, an unconfirmed browser-action outcome (never auto-retried — the ledger-side "outcome_unknown" from the ptx conduit), a typed provider-capability mismatch on queued work, then a hard archive failure. Anything else returns null and the popup shows nothing — silence is the correct default, not an omission. popup.html gains a compact "Pending browser actions" count and an "Attention" section (hidden by default) right under the header, and wraps the previously always-visible receiver pairing/reset, work queue, backfill panel, recent capture log, debug log, and receiver settings into one collapsed `<details id="diagnostics">` — AC1's "leases/retries/request-ids/raw phases/dev overrides go behind progressive-disclosure diagnostics". The ambient toggles (including the yyvg.6.1 circuit breaker) and the per- conversation timeline stay visible, since AC4 requires the breaker stay easily reachable and the timeline is the "recent outcomes" this AC asks for. Clicking the attention item's action (when one exists, e.g. "Reset pairing") opens diagnostics and drives the underlying control directly, so there is no second copy of that authority (AC4/AC5). This is a real, scoped slice of yyvg.7, not the full epic: the pixel-level mockup convergence (docs/design/browser-capture-redesign/mockup.dc.html), message-layer/ambient/popup visual unification beyond the shared status model, and the "explicit submit/destructive approval" and "destructive conflict" attention categories (no backing data model yet) remain open. Recorded in the bead notes. Ref polylogue-yyvg.7 Verification: - npx vitest run (browser-extension/) -> 335 passed, 1 pre-existing unrelated failure (packaged service-worker backfill fixture, tests/build.test.js; reproduced unchanged on a clean tree with this change stashed out) - npm run lint / npm run validate -> clean / manifest ok - devtools verify --quick -> exit 0 Co-Authored-By: Claude <[email protected]>
Two legitimate findings on the earlier commits in this PR: - background.test.js's receiver-outage/restart fixture used a fixed 20ms sleep to let the second reconciliation attempt settle before asserting no capture side effects occurred. Replaced with a deterministic vi.waitFor(() => stored.polylogueState?.online === false), which the receiver-failure catch branch sets once the reconciliation attempt actually completes — removes a source of test flakiness under load. - test_browser_action_conduit_vocabulary.py's _iter_source_files() silently scanned zero files if any configured root (RECEIVER_ROOTS/EXTENSION_ROOT) didn't exist, which would make the guard vacuously pass forever after a directory rename instead of catching the drift. Now raises FileNotFoundError naming the missing root before scanning. Verification: - npx vitest run tests/background.test.js -t "never fetches a terminal ChatGPT conversation" -> 1 passed - devtools test tests/unit/architecture/test_browser_action_conduit_vocabulary.py -> 1 passed - devtools verify --quick -> exit 0 Co-Authored-By: Claude <[email protected]>
|
Both CodeRabbit findings addressed in e8abe28: the fixed-timeout wait in the restart fixture is now a deterministic |
Operator live-smoke runbook (pending — not run by this agent)Per the lane prompt, this is a scripted, operator-run final smoke — none of the claims above depend on it, and `polylogue-ptx` should stay open until it passes. It closes the one remaining gap on `polylogue-ptx` AC7 (a live reply + project-targeting proof) and gives a live check of this PR's popup Attention/diagnostics surface. 1. Scratch environment (never point this at your real archive)```bash Get the receiver's pairing token in a second shell: 2. Load the unpacked extension and pair it
3. Create a conversation via the generic intent (not through the extension UI — ptx is a receiver-mediated API for external clients)```bash Watch, don't just poll:
Poll for the receipt: 4. Reply into the same conversation (closes the ptx AC7 "live reply" gap)```bash 5. (Optional) Project targeting — closes AC7's "optional project targeting" live gapRepeat step 3/4 with `"target": {"conversation_id": "new", "project_ref": ""}` and confirm the receipt's `observed_project_ref` matches. 6. Verify canonical capture independently acquired both turns```bash 7. Cleanup
If this passes end-to-end, `polylogue-ptx` can close (Ref polylogue-ptx). This PR (#3098) itself does not depend on this smoke — it's test-only plus a UI-only popup slice, already verified above. |
Update: attempted the live smoke myself (operator authorized)Ran this rather than leaving it purely to the operator. Real findings:
Full detail in the `polylogue-ptx` bead notes. The remaining runbook below is still accurate for whoever has (or later gets) an account with the required model access. |
…3106) ## Summary Removes a static test added in #3098 that was a fossilized-diff check — flagged directly by the operator as violating CLAUDE.md's Verification section. ## Problem `tests/unit/architecture/test_browser_action_conduit_vocabulary.py` scanned the receiver and extension source for retired identifiers (`BrowserPostCommand`, `BrowserLaunchJob`, `mission_id`, `deliverable_id`, ...). That's a textual deny-list memorializing one refactoring's deleted spellings, not an independently valuable behavior/architecture check — exactly what CLAUDE.md prohibits: "Do not add tests, static scans, policy gates, allowlists, or deny lists that merely memorialize a refactoring diff [...] If such fossilized-diff checks already exist in the touched surface, remove them instead of updating them." A genuinely new campaign concept under a different name would sail straight through it; any incidental future use of a banned substring (a comment, a fixture, an unrelated field) would fail it for no functional reason. ## Solution Deleted the file. `polylogue-ptx` AC6's "no campaign vocabulary/second submit ledger" claim now rests on what it should have from the start: the actual absence of `BrowserPostCommand`/`BrowserLaunchJob` and a single verified submit ledger (`polylogue/browser_capture/actions.py`), confirmed by inspection and by the substantive receiver/extension behavior tests already covering that ledger — not by a grep gate. ## Verification - `devtools verify --quick` -> exit 0 Ref polylogue-ptx Co-authored-by: Claude <[email protected]>
…onduit (#3124) ## Summary Closes `polylogue-ptx`'s remaining AC7 gap (live reply proof + a working live create). The conduit's only supported presentation was a paid-tier model_slug=gpt-5-6-pro/"GPT-5.6 Sol"/"Pro" combo — real live testing this session found that most accounts, including the one available for testing, are on a tier that exposes neither that model/effort UI nor even a Chat/Work mode toggle at all. The conduit as built could not complete a single live action for the majority of realistic accounts. ## Problem Live smoke on PR #3098 found `conversation.create` failing closed with `network_error`/`surface_controls_timeout` on a free-tier account. Investigating live (read-only DOM inspection, no private content read) found two separate gaps stacked on top of each other: 1. The paid-tier composer-pill + model/effort submenu doesn't exist on free tier — there's a flat top-level `[data-testid="model-switcher-dropdown-button"]` with one always-checked radio item and no effort dimension. 2. Free tier also has no Chat/Work mode toggle at all (a separate paid/team feature) — the extension's `surface_controls` wait requires both buttons to exist and was timing out for that reason too, independent of (1). Both fail closed correctly (no silent model/mode substitution) rather than corrupting anything — but neither could actually complete. ## Solution - `polylogue/browser_capture/actions.py`: added a second `chatgpt` capability entry (`model_slug=chatgpt-auto`, `model_label="ChatGPT"`, `effort_label="Standard"`), additive to the existing Pro entry. - `browser-extension/src/actions/chatgpt.js`: `executeChatGptBrowserActionInPage` now dispatches on which UI control actually exists (`hasComposerPill()` vs `flatSwitcherButton()`) at both the initial selection and pre-submit re-verification points. The paid-tier path is untouched byte-for-byte. `selectedMode()`/the initial surface-controls wait now treat "no Chat/Work toggle found at all" as an implicit already-selected single chat surface instead of waiting forever for controls that will never appear. An account with neither the pill nor the flat switcher still fails closed with `protocol_model_selector_missing`. ## Live verification (real account, this session) Loaded this branch's extension into a live, authenticated Chrome profile against an isolated scratch receiver (verified isolated — never touched the real archive or made real embedding-API calls). Fired real actions via the receiver's HTTP API: - `conversation.create` → exact receipt: real `provider_conversation_id`, `provider_conversation_url`, `provider_turn_id`, `observed_model="ChatGPT"`, `observed_effort="Standard"`. - `conversation.reply` targeting that same `conversation_id` → a second receipt bound to the **identical** conversation with a **new** `provider_turn_id` — this is the live reply proof. - Ordinary canonical capture independently spooled the create turn with no action-ledger correlation (`chatgpt/<conversation_id>-*.json` in the spool, containing the exact user/assistant text). - No foreground tab activation observed throughout. - Test conversation deleted from the account afterward; extension disabled, scratch receiver stopped, scratch archive removed. Project targeting was not proven live this session (no `g-p-...` project link was surfaced on the read-only pages checked without digging further into the account's private sidebar) — that piece of AC7 remains open. ## Verification - `npx vitest run tests/browser_action.test.js` → 12 passed (paid-tier tests unchanged; new: free-tier stage-only draft, free-tier reply+submit with final re-verification, fail-closed with no selector at all) - `npx vitest run` (full extension suite) → 338 passed, 1 pre-existing unrelated failure (packaged service-worker backfill fixture, reproduced unchanged on master) - `npm run lint` / `npm run validate` → clean / manifest ok - `devtools test tests/unit/browser_capture/test_actions.py` → 19 passed - `devtools verify --quick` → exit 0 (both pushes) - Live: real `conversation.create` + `conversation.reply` against an authenticated account, both receipts verified exact (see commit messages for full detail) Ref polylogue-ptx --------- Co-authored-by: Claude <[email protected]>
…pairing (polylogue-yyvg.7 + 3v1 + gnie) (#3260) ## Summary Delivers the browser-capture receiver+extension pairing-bootstrap and capture-health-telemetry slice of the extension trust-surface cluster (Ref polylogue-yyvg.7, Ref polylogue-3v1, Ref polylogue-gnie). Two commits: receiver/CLI infrastructure (Python), then the extension-side pairing UI that consumes it (JS). ## Problem - **polylogue-gnie**: a fresh extension install had no way to adopt the receiver's auto-minted bearer token except the operator running `polylogued browser-capture token show` and pasting the 43-character secret into the popup. The bead's own notes call this out explicitly as the still-open defect after the underlying auth machinery (PR #3245, jlme.5) shipped: "the prior close treated CLI copy/paste as equivalent to automatic token adoption. It is not." - **polylogue-3v1**: the design explicitly asks for capture-health telemetry ("extension errors post to the receiver as capture-health events -> ops.db -> daemon /metrics + status ... the extension becomes an observable component") so that capture gaps/errors are queryable archive history rather than only visible transiently in the popup. This did not exist. - **polylogue-yyvg.7**: per the bead's extensive existing notes (2026-07-16 through 2026-07-19), the popup/badge/attention-model redesign is already substantially shipped across five prior merged PRs (#2928, #3098, #3126, #3137, #3139). What remains open per the bead's own AC-by-AC record is either blocked on a data model that does not exist yet (explicit- approval/destructive-conflict attention categories) or requires live installed-browser proof the bead's notes say was already attempted and partially completed by a prior session. ## Solution **polylogue-gnie — one-time pairing code (compatibility fallback per the bead's own design text)**: the bead's recommended primary design is an installer-managed native-messaging host; this repo cannot install an OS-level native-messaging manifest or exercise a real, stable `chrome-extension://` identity headlessly, so that path is genuinely out of scope for an unattended session. The design text names an explicit fallback instead — "a user-presence one-time pairing approval/code that transfers the secret without copy/paste" — and that is what this PR implements: - `polylogue/browser_capture/pairing.py` (new): mints an 8-character, 40-bit-entropy, single-use, 180s-default-TTL code; only its SHA-256 hash is ever persisted (`browser-capture-pairing` file under the archive root, same 0600-atomic-write pattern as the bearer token). 5 wrong guesses burn the pending code even before its TTL expires. - `POST /v1/pairing/redeem` (new route, `polylogue/browser_capture/server.py`): deliberately unauthenticated — bootstrapping the token *is* its job — but still origin-checked (`_reject_origin`), so an arbitrary webpage cannot forge the extension's `chrome-extension://` origin to redeem a code it somehow observed. - `polylogued browser-capture pairing start [--ttl-seconds]` CLI prints the code; the extension's new popup "Pairing code" field (inside the existing collapsed diagnostics section, next to the manual bearer-token field it complements rather than replaces) exchanges it automatically via `background.js`'s new `pairWithCode`/`redeemPairingCode`. - **Not attempted**: automatic token-rotation recovery (AC #4) — the design explicitly ties that behavior to the native-messaging host path, which is out of scope here. Manual re-pairing (paste the token, or run `pairing start` again) remains the break-glass/recovery route. **polylogue-3v1 — capture-health telemetry, producer side deferred**: - `POST /v1/capture-health` (bearer-gated like every other route) and `GET /v1/capture-health` (new routes): events are stored in the existing ops.db `daemon_events` ledger under `kind="browser_capture_health"`, reusing `polylogue.daemon.events.emit_daemon_event`/`query_daemon_events` rather than adding a new table (`ops.db` is a freeform-additive disposable tier — see `fts_drift_samples` precedent). - `polylogued browser-capture capture-health [--limit]` CLI lists recent events without an HTTP round trip. - **Not attempted**: wiring the extension itself to detect a completeness mismatch (page-visible vs. archived message count) and call this new endpoint automatically. The receiver-side ledger, query surface, and CLI are real and tested; the producer that would make gaps self-report is a distinct, still-open chunk of work (the extension has no existing visible-vs-captured comparison to hook — a genuine follow-up, not a trivial wire-up). Gemini bridge coverage (`gemini.google.com` host permission + content-script bridge) is likewise not attempted — a full new provider bridge is out of scope for this slice. **polylogue-yyvg.7 — no additional code in this PR.** Verified the bead's own AC-by-AC record against current `main` (popup.js/operator_status.js/ popup.html) and confirmed the prior sessions' claims hold: compact always-visible surface, single-attention-item model, shared status module, DOM/action budget test, and the F1/F6 visual convergence are all present in the current tree. What the bead's notes list as still open — explicit- approval/destructive-conflict attention categories (blocked on a data model ptx does not yet expose) and literal live-installed offline-recovery proof — are unchanged by this PR; both require capability or environment this session does not have (a real backing data model for the former, a disposable second receiver + real browser for the latter). ## Verification - Python: `devtools test tests/unit/browser_capture/` — 146 passed (18 new: `tests/unit/browser_capture/test_pairing.py`, real HTTP against the threaded `BrowserCaptureHTTPServer`, plus CLI round-trips via `CliRunner`). `mypy` clean on touched files. `devtools verify --quick` exit 0 (`.cache/verify/runs/20260721T234119Z-quick-765869-deca05d8`). `devtools render all --check` exit 0 (new `pairing.py` module required a topology-projection regen, included). - JS: `npx vitest run` — 347 passed / 1 failed. The 1 failure (`build.test.js` service-worker-fixture timing) is **pre-existing and unrelated** — reproduced identically with this branch's diff stashed out (`git stash && npx vitest run tests/build.test.js` fails the same way). `npm run lint` and `npm run validate` (manifest) both clean. - **Anti-vacuity**: `test_pairing_redeem_route_pairs_without_a_preexisting_token` exercises the real `write_capture_envelope`-adjacent HTTP stack end to end — mutating `redeem_pairing_code` to skip the origin check, or removing the `_reject_origin()` call ahead of the pairing route in `server.py`, makes `test_pairing_redeem_route_rejects_disallowed_origin` fail; mutating the single-use clear-on-success behavior makes `test_pairing_redeem_route_is_single_use_over_http` fail. On the JS side, deleting the `polylogue.pairWithCode` handler or the `Content-Type` header in `redeemPairingCode` fails `background.test.js`'s "exchanges a valid pairing code" test (asserts no `Authorization` header is sent and the body round-trips exactly). ## What only manual/live browser testing can prove - The popup's new "Pairing code" field actually rendering and being reachable/styled correctly in a real installed Chrome/Firefox profile (jsdom-based `popup.test.js` proves the click → message → storage wiring, not visual layout). - End-to-end pairing against a real `polylogued` daemon + real `chrome-extension://<id>` origin (the test fixtures use a synthetic `chrome-extension://polylogue-test` origin, which is the same pattern every other receiver-route test in this repo already uses). - Token-rotation recovery UX and the native-messaging path — both explicitly out of scope for this PR (see Solution above). ## Per-bead AC matrix **polylogue-gnie** ("Automate secure browser-to-receiver pairing"): 1. Fresh install pairs without viewing/copying/pasting a bearer secret — **partially satisfied**: the one-time-code fallback delivers this; the design's *primary* recommendation (native messaging) is not attempted. 2. Receiver stays deny-by-default; hostile origin/process can't retrieve the token via pairing — **satisfied** for the origin axis (tested); the short-lived/single-use/rate-limited code is the stated defense against a same-host process without native-messaging-grade isolation. 3. Pairing binds real extension+receiver identities, fails visibly on mismatch, logs no secret — **satisfied**: the response includes `receiver_id`; rejections log only the exception type, never the code or token (verified by reading the log call sites). 4. Token rotation invalidates old token, extension recovers automatically — **deferred**: this AC clause is explicitly tied to the native-messaging path in the bead's design text; manual re-pairing remains the recovery route with this fallback. 5. Real browser-extension-to-loopback fixture proving first pairing, authenticated reads, rotation recovery, profile reseed, hostile-origin rejection, receiver-offline recovery — **partially satisfied**: first pairing and hostile-origin rejection are proven over real HTTP; rotation recovery, profile reseed, and receiver-offline recovery are not (need a live browser or are explicitly deferred per AC #4). **polylogue-3v1** ("Capture extension reliability + status UX"): - Badge shows current/spooled/error per tab — **unchanged by this PR** (already substantially shipped per the bead's prior-session notes; independently verified present in the current tree). - Receiver-down spooling drains with no loss/dup — **unchanged by this PR** (prior sessions' notes claim this is already implemented; not re-verified here — out of this slice's scope). - `gemini.google.com` capture end-to-end — **not attempted** (full new provider bridge, out of scope for this slice; named as residual above). - Capture-gap events queryable in the archive — **satisfied for the receiver/CLI side** (`GET /v1/capture-health`, `polylogued browser-capture capture-health`); **not satisfied for the producer side** — the extension does not yet detect and report gaps automatically (residual, needs a follow-up bead for the visible-vs- captured comparison + wiring). - Bridge DOM fixtures in CI — **unchanged by this PR**. **polylogue-yyvg.7** ("Make extension UX automatic and exception-driven"): - AC1-AC7 — **no change from the bead's existing 2026-07-19 record**, independently spot-checked against current `main` and found consistent. Still-open items per that record (explicit-approval/destructive-conflict attention categories blocked on a missing data model; literal live-installed offline-recovery proof) are unchanged residuals, not addressed by this PR. ## Residuals (named follow-ups, not silently dropped) 1. Extension-side capture-health *producer* wiring (visible-vs-captured comparison → `POST /v1/capture-health` on detected gap/error/spool- backlog/provider-auth-broken) — the receiver/CLI/query side landed here, the extension-side detection+call did not. 2. Gemini (`gemini.google.com`) capture bridge — not attempted. 3. Native-messaging installer bootstrap for gnie AC #1/#4's full automatic path — not attempted (this repo cannot install/test it headlessly). 4. yyvg.7's explicit-approval/destructive-conflict attention categories — blocked on a ptx-side data model that does not exist yet (per the bead's own notes, unchanged by this PR).
CLI argument types and request construction were interpreted twice, once in the product command table and again in the shared operation declarations. Build Clap presentation from the shared argument projection and let `command-surface::parse_cli` construct request values, envelope options and calling-process options. Remove the product `Kind`, `Values` and JSON/envelope interpreter with their callers. Local commands and stream inputs now declare their schemas from the same command rows. Clap retains command placement, help, completion and configuration's OS-valued startup paths. File preparation, stream delivery and peer negotiation keep their existing owners. Existing transport/ready-call tests consume the parsed request; new controls cover typed values, caller-only options, envelope identity/deadline/budget, local choices and stream arguments. Adopt Common PR #127 through Sinex PR #3098 in one dependency graph. Declaration registration now appends to uniquely owned forms instead of copying all prior schemas and regenerating tool input for every command. Published declaration snapshots and rejection atomicity remain intact. The CLI reuses each command's argument projection while building its lexical presentation. Verification on aafb45f: the scoped native check passed command reachability and the existing document-pagination continuation/corruption contract (2/2). The document control completed every phase in 6.17 seconds under its unchanged 120-second limit. Five prebuilt startup probes reduced warm median child user CPU from 0.260 seconds to 0.021 seconds. Common's required check passed 815 tests; Sinex's adoption passed its required checks. The required hosted check on this PR head owns final verification. This is a finite CLI ownership slice; broader operation-catalog work remains open.
Summary
Four commits closing AC gaps on the three P0 extension beads flagged by the 2026-07-17 warroom It.17 sweep, all scoped to
browser-extension/+ receiver code:polylogue-yyvg.6.1AC1: a deterministic fixture proving no ChatGPT conversation/attachment request occurs for a terminal conversation across a receiver outage combined with a simulated service-worker restart.polylogue-ptxAC6: a static/contract test rejecting reintroduction of the retiredBrowserPostCommand/BrowserLaunchJobcampaign machinery or campaign-identity vocabulary.polylogue-ptxAC7: receiver-side coverage of all six typed pre-submit failure outcomes (the extension side already had it; the receiver's identical state-machine branch did not).polylogue-yyvg.7: a real (partial) slice of the exception-driven popup redesign — a single-itemcomputeAttention()surface plus a pending-browser-action count, and progressive-disclosure diagnostics for the previously always-visible machinery (receiver pairing/reset, work queue, backfill panel, raw logs, receiver settings).Problem
All three beads had their core behavior land already (
yyvg.6.1via #2977/#2979/#2981/#2983/#2986;ptxvia #2928;yyvg.7's first UX slice via #2928/#2929) but were left open pending explicit AC-by-AC checks, and several AC clauses specifically wanted fixtures, guards, or UI surfaces that didn't exist yet — see full AC-by-AC verdicts recorded in each bead's notes (polylogue-yyvg.6.1,polylogue-ptx,polylogue-yyvg.7).Solution
browser-extension/tests/background.test.js: new fixture combining a receiver outage with a simulated service-worker restart against a terminal conversation.tests/unit/architecture/test_browser_action_conduit_vocabulary.py: static scan overpolylogue/browser_capture/,polylogue/daemon/browser_capture.py, andbrowser-extension/src/.tests/unit/browser_capture/test_actions.py: parametrizedtest_typed_provider_failures_block_and_release_the_leaseover all six receiver failure outcomes.browser-extension/src/operator_status.js: newcomputeAttention()(strict single-item typed priority list: auth/pairing mismatch → actionoutcome_unknown→ capability mismatch → archive failure → null) andpendingBrowserActionCount(), added to the existing shared status module already used by ambient/message-layer/popup.browser-extension/src/popup.html+popup.js: a "Pending browser actions" count and hidden-by-default "Attention" section under the header; receiver pairing/reset, work queue, backfill panel, recent capture log, debug log, and receiver settings now live inside one collapsed<details id="diagnostics">. Clicking an attention item's action opens diagnostics and drives the real underlying control (no second authority copy).Honesty on scope: commit 4 is explicitly a partial yyvg.7 slice, not full closure — pixel-level mockup convergence, a compact bounded "Now" summary, the "explicit submit/destructive approval" and "destructive conflict" attention categories (no backing data model yet), a DOM/height budget check, and the live installed proof all remain open. Recorded honestly in the bead notes rather than claimed done.
Verification
npx vitest run(inbrowser-extension/) → 335 passed, 1 pre-existing unrelated failure (packaged service-worker backfill fixture intests/build.test.js; reproduced unchanged on a clean tree with this branch's changes stashed out)npm run lint/npm run validate(inbrowser-extension/) → clean / manifest okdevtools test tests/unit/architecture/test_browser_action_conduit_vocabulary.py→ 1 passeddevtools test tests/unit/browser_capture/test_actions.py→ 18 passeddevtools verify --quick(pre-push hook, all four pushes) → exit 0Ref polylogue-yyvg.6.1, polylogue-ptx, polylogue-yyvg.7