Fix web-ai tab stability closeout - #80
Merged
Merged
Conversation
… stability Documentation-only devlog set (no code changes). Four areas from 2026-06-18 gallery feedback, each with verified root cause (file:line + real code) and an implementable solution plan; test strategy woven in per area. - timeout_adaptive_scaling: hardcoded (provider,tier,effort) timeout table, pro/heavy/deep-research=3600s; positive done-signal completion gate to fix mid-stream "thinking" false-completion; adaptive poll backoff. - tab_parallel_stability: atomic lease acquire (record-before-bind), per-session send+poll+watcher mutex, active-lease TTL+60s heartbeat reaper, TOCTOU single-flight recovery, admission control to scale vendor5/global12-16. Cross-checked independently by a sub-agent and the Backend employee. - skill_envelope_integration: unified buildEnvelope with [DEVELOPER INSTRUCTIONS] (trusted) + [ATTACHMENT MANIFEST] (rendered on upload transport) separate from [UNTRUSTED_CONTEXT]; persist skill/tool selection into session.envelopeSummary. - watch_notification_gaps: Tier1 adaptive interval + per-provider conversation-id registry + self-healing URL (closes #77 watch-path); Tier2 opt-in CDP early-nudge with poll as source of truth. Cross-cut: pro=3600s timeout table is the single source of truth that unifies the three colliding TTLs (session lock 35m / active-command 2m / active-lease none) before raising concurrency caps. Index: devlog/_plan/260619_00_webai_stability_index.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verified with the author: "instruction + attachment" already works today via
--system (trusted [SYSTEM] section, question.mjs:145) + --file (native composer
upload, chatgpt.mjs:257). The earlier root-cause overstated it ("model doesn't
know the file exists" / "developer instructions ignored") — both corrected.
Reclassified from a code project to a docs/UX (discoverability) problem. The real
gap is that skills/web-ai/SKILL.md documents --file + context-packs but never
mentions --system as the trusted-instruction channel nor that --context is
untrusted. Fix is a small SKILL.md + --help upgrade, not a buildEnvelope refactor.
- Remove devlog/_plan/260619_skill_envelope_integration/ (overstated framing)
- Add devlog/_fin/260620_skill_envelope_already_capable.md (corrected summary)
- Index: mark area 3 closed; only areas 1/2/4 remain real code work
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…--file The capability to attach instructions + a file already exists, but neither the --help text nor skills/web-ai/SKILL.md told agents which flag carries trusted instructions. Agents put operating instructions in --context (untrusted) and saw them "ignored" — a discoverability gap, not a missing feature. - web-ai/cli.mjs WEB_AI_USAGE: --system now described as the trusted instruction channel; --context flagged as UNTRUSTED data whose instructions are ignored by design (use --system / --file instead). - skills/web-ai/SKILL.md: new "Where instructions go" section before File Upload, with the working --system + --file combo example. No behavior change (docs/help text only). Closes the action from devlog/_fin/260620_skill_envelope_already_capable.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cope all 3
Same outcome as the skill-envelope review across the board: existing mitigations
under-credited, plans over-engineered. Each folder gets a 20_pressure_test_verdict.md
with a per-claim KEEP/DOWNSCOPE/DROP table + file:line evidence; 10_solution_plan.md
banners marked SUPERSEDED-for-scope; overviews + index updated.
- timeout: DOWNSCOPE ~80%. --timeout escape hatch + action-button done-signal
already exist; claims 2 (thinking-probe) / 3 (backoff) / 4 (deep-research) dropped.
MVV = 4-entry tier-default map + export pro=3600 + 1 doc + 1 test. (Also caught a
pollTimeoutSec name-collision in the original sketch.)
- tab: DOWNSCOPE & split — the one area with real load-bearing fixes. Separate-process
model + existing active-command.target-owned cross-process mutex kill claims 1/3;
claim 5 (3-TTL) out-of-scope. Must-have = record-before-bind reorder + active-count
cap (revert maxTabs:Infinity) + PID reaper + doc fix.
- watch: DOWNSCOPE ~75%. 15s latency invisible under send->watch->bgtask; conv-id
registry misdiagnosed (gemini/grok never use the /c/{id} regex); Tier2 vetoed. Only
win: watcher already self-heals via resolveSessionPage but discards the healed
session — ~30-line consolidation, not new code.
Revised cross-cut: 3-TTL unification deferred; tab needs only the single pro=3600
constant from timeout, not a coupled rewrite.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Implements the pressure-tested MVV for the timeout and watch areas (tab deferred).
timeout: when --timeout is omitted the default now scales by model tier instead
of a flat 1200/600s, so a long `pro`/deep-research run is not silently capped.
- session.mjs: TIER_DEFAULT_TIMEOUT_SEC {instant:120,thinking:600,pro:3600,
'deep-research':3600}, PRO_TIMEOUT_SEC, tierDefaultTimeoutSec(), deriveTimeoutTier()
(reuses the per-vendor model normalizers), resolveTimeoutDefaultSec().
- cli.mjs: apply the tier default at the input builder (single spot → flows to
resolveDeadlineAt and all three pollers via the existing input.timeout; no new
field, no pollTimeoutSec collision). --help updated.
- Unknown/resume-without-model falls back to the vendor default (no value lowered
below today's behavior for that path).
watch: the watcher already routes through resolveSessionPage (allowNavigate) which
self-heals root->/c/ URL drift and returns the updated session, but it discarded
that healed copy and re-checked a stale one — re-introducing a false
reattach-mismatch (issue #77 watch-path). Feed the healed session to the attach
check (~2 lines in watcher.mjs).
Verified: vitest timeout-default+watcher 14/14, full unit 837/837, integration
fake-chatgpt+policy-cli 6/6, npm run gate:all 16/16.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per directive: patch everything except tab, close to _fin. Both areas implemented and verified (gate:all 16/16), so move their folders out of _plan into _fin and mark overviews CLOSED. tab_parallel_stability stays in _plan (deferred — the heavy multi-process concurrency work). - mv 260619_timeout_adaptive_scaling -> _fin (overview marked implemented) - mv 260619_watch_notification_gaps -> _fin (overview marked implemented) - index: implementation-status table; tab is the one remaining open area Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ompatible Completes the watch MVV's "retire urlsEquivalentForWatch / remove the redundant strict reattach check", flagged outstanding by an independent completion audit. A blind deletion was found unsafe — ensureWatcherAttached still guards the non-provider-landing case (goto redirects off-provider, resolver leaves conversationUrl un-healed). So replace rather than delete: the strict hash-only urlsEquivalentForWatch compare becomes the canonical tolerant urlsCompatible (now exported from tab-recovery.mjs, the same predicate resolveSessionPage uses). Same-conversation root->/c/ drift and trailing slashes are compatible; a genuinely different conversation or non-provider host still mismatches and (with --navigate) re-navigates. urlsEquivalentForWatch deleted (no other callers). Verified: affected tests 21/21 (watcher +2 retire/tolerant assertions), npm run gate:all 16/16. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
Closes #79